drush-ops / drush-launcher

A small wrapper around Drush for your global $PATH.
GNU General Public License v2.0
237 stars 50 forks source link

Deprecation warning with php 8.2 #102

Closed bagong closed 1 year ago

bagong commented 1 year ago

Hi,

using drush(-launcher) as advised produces a deprecation warning on my system (dl-0.10.., D10, drush 3.14, php 8.2) reading something like (quoted from bad memory):

php warning: deprecated use of static in line 1973

Thanks for your consideration .r.

back-2-95 commented 1 year ago

Hi, I can confirm. I use Wodby stack with their PHP 8.2 image. Image has drush-launcher and this error comes for every drush command. I using Drush 10.4 from my project (vendor/bin/drush) this does not happen as it has newer webmozarts/assert package: https://github.com/webmozarts/assert/issues/274

gapple commented 1 year ago

I've created a pull request to upgrade the necessary dependency versions.
If you would like to build an updated launcher locally:

back-2-95 commented 1 year ago

@gapple I did what you instructed and here is the result (after creating new drush.phar):

wodby@php.container:/var/www/html/drush-launcher $ /usr/local/bin/drush --version
Drush Launcher Version: 0.10.1
[03-Feb-2023 06:38:54 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
[03-Feb-2023 06:38:54 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
Drush Commandline Tool 11.4.0
wodby@php.container:/var/www/html/drush-launcher $ cp drush.phar /usr/local/bin/drush
wodby@php.container:/var/www/html/drush-launcher $ /usr/local/bin/drush --version
Drush Launcher Version: be1945c
Drush Commandline Tool 11.4.0
back-2-95 commented 1 year ago

@webflo ^^

webflo commented 1 year ago

Thanks to all. Released as https://github.com/drush-ops/drush-launcher/releases/tag/0.10.2