Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush doesn't work on drupal 10? #535

Open
arrubiu opened this issue Dec 23, 2022 · 5 comments
Open

Drush doesn't work on drupal 10? #535

arrubiu opened this issue Dec 23, 2022 · 5 comments

Comments

@arrubiu
Copy link

arrubiu commented Dec 23, 2022

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

@arrubiu arrubiu changed the title D Drush doesn't work on drupal 10? Dec 23, 2022
@csandanov
Copy link
Member

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

@M0CHiNY
Copy link

M0CHiNY commented Dec 27, 2022

I also installed drupal 10, went into the container and entered the command "composer require drush/drush".
When I run the drush commands, I got the following error
image
PHP version 8.2 & drush version: 11.4.0

@arrubiu
Copy link
Author

arrubiu commented Dec 27, 2022

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$ 

@alexey-kuznetsov
Copy link

alexey-kuznetsov commented Jan 23, 2023

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

@iVegas
Copy link
Contributor

iVegas commented Jan 23, 2023

Druhs had such a similar issue report drush-ops/drush#5169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants