Phpspreadsheet: Refactor log system with PSR-3

Created on 16 Mar 2017  路  5Comments  路  Source: PHPOffice/PhpSpreadsheet

To offer a better integration with logging system that may already be in use in the end-user's project, we should consider refactoring our custom log system to PSR-3. This would give control to end-user on where/when/if logs are written.

BREAKING CHANGE help wanted

All 5 comments

PSR-3 encourages people to write the word _interface_ in an interface's name like:

public interface FooableInterface { }

You should not encourage people following that old PHP-3 style where identifiers (like variables) contains the type (here: interface) of it in it's name. An interface is indeed an interface. That is why I start disliking PSR altogether because of PSR-3's misconception of "bringing back the old times" (PHP3).

They should have buried that old stuff once and for all and now it is coming back and more people are following it. Please don't do that.

You should address your concern to the PSR mailing list instead of here, and possibly chime in on https://discourse.zendframework.com/t/interface-suffix-take-it-or-leave-it/259/13

I posted my concerns there: https://discourse.zendframework.com/t/interface-suffix-take-it-or-leave-it/259/18?u=quix0r Here, you should wait with it as for the said reasons, it is old-school naming like you did back in PHP3.

PSR-3 only states about a common Log interface, not how your code style should be.

Even PSR-2 does not states nothing about interfaces suffix. Discourage the use of PSRs only because you disagree with their name convention is irrelevant close to the benefit it brings.

I wholeheartedly agree with @gmsantos and won't let this kind of aspect determine whether we use a PSR.

That being said, I had a closer look at the code a few weeks ago and found out that the log in PhpSpreadsheet is strictly used for debugging PhpSpreadsheet internals. It is very low-level and very technical and is not meant to be read by someone else than PhpSpreadsheet developers.

So because it is actually an internal feature of low priority and that I won't have time to implement it in a reasonable time frame, I decided to cancel it.

However if someone else is willing to submit a PR for that, I would merge it. Meanwhile I'll close this issue not give false hopes.

Was this page helpful?
0 / 5 - 0 ratings