zendframework / zend-log

Log component from Zend Framework
BSD 3-Clause "New" or "Revised" License
62 stars 51 forks source link

[php 7.2] incompatible prototype #76

Closed remicollet closed 6 years ago

remicollet commented 7 years ago

PHP Fatal error: Declaration of Zend\Log\Writer\FingersCrossed::setFormatter($formatter) must be compatible with Zend\Log\Writer\AbstractWriter::setFormatter($formatter, ?array $options = NULL) in ...

naprstek commented 6 years ago

Sorry, Fix #76 is not enough. In this case is broken interface implementation. Interface WriterInterface declares setFormatter($formatter), but AbstractWritter implements it as setFormatter($formatter, array $options = null) and other classes inherits wrong implementation from AbstractWriter.

There must be done corrects for whole chain. Must be either replaced AbstractWritter::setFormatter or changed WriterInterface::setFormatter and all inheritted classes.

By Vladimir