With PHP 5.3.2 I get the following error:
PHP Fatal error: Can't inherit abstract function Zend\Console\Prompt\PromptInterface::show() (previously declared abstract in Zend\Console\Prompt\AbstractPrompt) in /path/to/Zend/Console/Prompt/AbstractPrompt.php on line 24
If I remove the abstract method "show()" in AbstractPrompt (line 40), then everything is fine. In my opinion this fix has no side-effects, because the function is declared in the PromptInterface, so it has to be implemented anyway.
To reproduce this, you have to use a class with extends AbstractPrompt, eg:
With a newer version of PHP (5.3.18) the problem doesn't occur.
Removed abstract method AbstractPrompt::show() (Issue #2899)
Actually, this is a problem under Windows 7 & PHP 5.3.8 too. The provided fix resolves the issue.
I'm on PHP 5.3.5, just performed a Composer update to 2.0.7 release and I get this error.
Please a) fix the issue or b) increase the version number for min-required PHP.
Just upgraded PHP to 5.3.14 and it works fine on that version, so PHP 5.3.3 is misleading as a min-requirement here.
[#2899] Remove redundant method declaration
- Re-declaring a method as abstract when defined in an interface being
implemented can lead to issues under some versions of PHP. Removing
the abstract method in the abstract class fixes the issue.
[zendframework/zf2#2899] Remove redundant method declaration
Merge pull request zendframework/zf2#3681 branch 'hotfix/declare-abst…
…ract-method' Fix zendframework/zf2#2899