Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The following strict notice is emitted on each console command usage:

Declaration of Intechnic\InPortal\Core\kernel\Console\Command\CompletionCommand::setApplication()
should be compatible with Symfony\Component\Console\Command\Command::setApplication(Symfony\Component\Console\Application $application = NULL)   

Solution

We need to change $application parameter typehint of "setApplication" method to "Application" and inside assert that given object is instance of "ConsoleApplication" class. This way end developer will get an exception either way about parameter type mismatch and we'll ensure that right application object is being used.

Related Tasks

  • No labels