I have a Drupal 8 site set up with Acquia Dev Desktop on my localhost. I am using PHP 7.0.14; everything is working fine, and the site works perfectly.
I installed Drush 8. When I try to run drush cr all
, I get this error message.
PHP Fatal error: Declaration of Drush\Command\DrushInputAdapter::hasParameterOption($values) must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) in /Applications/DevDesktop/tools/vendor/drush/drush/lib/Drush/Command/DrushInputAdapter.php on line 27
The lines causing the error are the following ones.
class DrushInputAdapter implements InputInterface {
protected $arguments;
protected $options;
protected $interactive;
public function __construct($arguments, $options, $command = false, $interactive = true)
{
$this->arguments = $arguments;
$this->options = $options;
// If a command name is provided as a parameter, then push
// it onto the front of the arguments list as a service
if ($command) {
$this->arguments = array_merge(
[ 'command' => $command ],
$this->arguments
);
}
// Is it interactive, or is it not interactive?
// Call drush_get_option() here if value not passed in?
$this->interactive = $interactive;
}
With Drupal Console, I get something similar.
PHP Fatal error: Declaration of Drupal\Component\DependencyInjection\Container::set($id, $service) must be compatible with Symfony\Component\DependencyInjection\ContainerInterface::set($id, $service, $scope = self::SCOPE_CONTAINER) in /Users/josue/WebDevelop/drupal-8.4.0/core/lib/Drupal/Component/DependencyInjection/Container.php on line 47