Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is TestLogger missing #57

Closed
remicollet opened this issue Nov 22, 2018 · 3 comments
Closed

Is TestLogger missing #57

remicollet opened this issue Nov 22, 2018 · 3 comments

Comments

@remicollet
Copy link
Contributor

See php-fig/log#57

IIUC, this is not part of the PSR-3, but provided by the psr/log pure-PHP library

@jbboehr
Copy link
Owner

jbboehr commented Nov 23, 2018

Yeah, it's definitely not yet implemented. The extension was written against v1.0.0 of psr/log (IIRC the 1.0.x releases since then have been documentation-only).

I also did not implement LoggerInterfaceTest as it extends a userland class from phpunit, and, while I wouldn't be surprised if it was possible, I'm not sure if an internal class extending a userland class is a good idea or worth the trouble, although I would be happy to hear someone disagree.

I think that, on the above precedent, and that most likely TestLogger will only be used in userland test code and not in extensions, which this extension was intended to serve, that we should not implement the class and document that users should install psr/log if they need the test-related classes.

cc @sergeyklay

@sergeyklay
Copy link
Contributor

sergeyklay commented Nov 23, 2018

In general I agree with @jbboehr. In any case TestLogger was implemented in the psr/log v1.1.0. So users can specify desired version as well as their expectations in the composer.json. In other words, if users installs the php-psr extension, then they will expect functionality appropriate with php-psr's change log.

@Jean85 Is there any chance to move TestLogger outside of PSR Log API, for example to the separated (and suggested in the composer.json) library?

@Jean85
Copy link

Jean85 commented Nov 24, 2018

Moving the testlogger outside now, after a release, would break BC; not possible without bumping psr/log to 2.0, which would not solve your issue.

BTW, it's not part of the PSR, it's just an utility class useful for tests; I don't know if you should implement that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants