theseer / Autoload

A lightweight php namespace aware autoload generator and phar archive builder
Other
388 stars 47 forks source link

Fix PHP 8.0 deprecation warnings #99

Closed jrfnl closed 3 years ago

jrfnl commented 3 years ago

I was seeing some PHP 8.0 deprecation warnings - Required parameter $long follows optional parameter $short during runs of the phar of this package.

The warnings were coming from the zetacomponents/console-tools package, but based on their commits, releases and changelog, the issue was already fixed there and included in the 1.7.2 release of Oct 2020.

As this package has had a release since then, I was a little mystified as to why the deprecation warnings were being shown as the composer.json of this package already allowed for version 1.7.2 with a ^1.7.1 version constraint. Until I realized this package has a committed composer.lock file....

So this commit should now fix the deprecation notices.

theseer commented 3 years ago

Makes sense. Nice catch.

jrfnl commented 3 years ago

You're welcome ;-)

theseer commented 3 years ago

New release 1.26.2 is out. As already mentioned in https://github.com/sebastianbergmann/phpunit/pull/4743, I'm not sure if 1.26.2 is actually any different than 1.26.1 as a local composer update didn't yield any changes?

Am I missing something?

theseer commented 3 years ago

I extracted the 1.26.1 phar and it seems like indeed the fix was missing in the release phar and is now included in the 1.26.2 phar.

So, I indeed must have messed up before.

jrfnl commented 3 years ago

Glad you got it confirmed. Based on the reasoning above, this felt like it was the only thing which could be causing it. Could it be that you were running on master locally before ?

theseer commented 3 years ago

Most certainly do. That of course didn't help in this case ;)