doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Deprecate callable loggers #462

Closed derrabus closed 8 months ago

derrabus commented 10 months ago

We should not invent our own contract for logging. There's PSR-3 for that.

This PR proposes to deprecate passing a callable to AbstractExecutor::setLogger() in favor of a PSR-3 logger.

I've also deprecated the public AbstractExecutor::log() method because I believe that the executor should not act as a logger.

Note that logging was not covered by tests at all, so the large part of this PR was actually adding tests. 🙈

See https://github.com/doctrine/data-fixtures/pull/455#discussion_r1426888383 for a discussion.

derrabus commented 10 months ago

cc @GromNaN