javiereguiluz/easybook — Issue #1: E_STRICT level error
Author: mozen
Created: 2012-02-07 17:26:39+00:00
State: open

$ ./book
PHP Strict Standards: Declaration of Easybook\Console\Command\BaseCommand::initialize() should be compatible with Symfony\Component\Console\Command\Command::initialize(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) in /usr/local/src/javiereguiluz-easybook-c1e4bbe/src/Easybook/Console/Command/BaseCommand.php on line 74

When overriding methods, the parameter signature should remain the same or PHP will generate an E_STRICT level error. This does not apply to the constructor, which allows overriding with different parameters.

$ vi src/Easybook/Console/Command/BaseCommand.php
// Add
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

// Modify
protected function initialize()
↓
protected function initialize(InputInterface $input, OutputInterface $output)

$ php -v
PHP 5.4.0RC6