Drush doesn't work on drupal 10?
arrubiu opened this issue · 5 comments
Hi!
I've downloaded drupal 10.0.0 source code with composer and I add in the document root the docker-compose.yml default version.
I've added only the port.
I've installed without problem drupal but I can't use drush.
If I try to run this command from the document root:
docker-compose exec --user 82 php drush --version
I obtain this errors:
Drush Launcher Version: 0.10.1
[23-Dec-2022 09:38:45 UTC] PHP Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
[23-Dec-2022 09:41:50 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/wodby/.composer/vendor/consolidation/config/src/Util/ArrayUtil.php on line 78
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/wodby/.composer/vendor/consolidation/config/src/Util/ArrayUtil.php on line 78
[23-Dec-2022 09:41:50 UTC] PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/wodby/.composer/vendor/consolidation/config/src/Util/ArrayUtil.php on line 86
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/wodby/.composer/vendor/consolidation/config/src/Util/ArrayUtil.php on line 86
[23-Dec-2022 09:41:50 UTC] PHP Fatal error: Declaration of Drush\Symfony\DrushArgvInput::getFirstArgument() must be compatible with Symfony\Component\Console\Input\ArgvInput::getFirstArgument(): ?string in /home/wodby/.composer/vendor/drush/drush/src/Symfony/DrushArgvInput.php on line 267
Fatal error: Declaration of Drush\Symfony\DrushArgvInput::getFirstArgument() must be compatible with Symfony\Component\Console\Input\ArgvInput::getFirstArgument(): ?string in /home/wodby/.composer/vendor/drush/drush/src/Symfony/DrushArgvInput.php on line 267
The fatal error seems the last.
What's wrong?
Thanks,
Sergio
What’s the PHP version? You should probably install drush as a part of your composer project instead of using the global drush which is version 10 and probably doesn’t work with Drupal 10
I'm using php 8.2.
After installation of drush 11.4.0 with "composer require drush/drush", drush works but I've warnings:
03:03:37 ~/Websites/drupal10$ drush status
[27-Dec-2022 14:03:53 UTC] PHP Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
[27-Dec-2022 14:03:53 UTC] PHP Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
Deprecated: Use of "static" in callables is deprecated in phar:///usr/local/bin/drush/vendor/webmozart/assert/src/Assert.php on line 1973
Drupal version : 10.0.0
Site URI : http://default
DB driver : mysql
DB hostname : mariadb
DB port : 3306
DB username : drupal
DB name : drupal
Database : Connected
Drupal bootstrap : Successful
Default theme : olivero
Admin theme : claro
PHP binary : /usr/local/bin/php
PHP config : /usr/local/etc/php/php.ini
PHP OS : Linux
PHP version : 8.2.0
Drush script : /usr/local/bin/drush
Drush version : 11.4.0
Drush temp : /tmp
Drush configs : /var/www/html/vendor/drush/drush/drush.yml
Install profile : standard
Drupal root : /var/www/html/web
Site path : sites/default
Files, Public : sites/default/files
Files, Temp : /tmp
03:03:53 ~/Websites/drupal10$
Have the same issue with Drupal 10, Drush 11 and php 8.2. Drush works, but there are these notices in output of every command
Druhs had such a similar issue report drush-ops/drush#5169