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
ReflectionParameter::getClass is deprecated in PHP 8 #727
Comments
In ReflectionBaseduaowiring.php chaning getparamtersDefinition to something like
seems to work. (Solution based on pull-requests seen elsewhere). For FactoryParamterResolver.php the following solution appears to work:
I'm not very familiar with php-di and I can't tell if these are actual solutions which is why I've neglected to make a pull-request. |
In this pull request I fixed a few things for PHP 8 support: https://github.com/PHP-DI/PHP-DI/pull/726/commits I think we'll have to support PHP 8 in PHP-DI 6 anyway, so it might be worth applying these "PHP 8" commits on master too. |
@Findus23 yes, PHP-DI 6 should support PHP 8. |
@mnapoli As the last PHP8 beta was released, it would be amazing if you could publish a new PHP-DI 6 version including the PHP 8 compatibility. |
After spending a good amount of time into this, PHP 8 support for PHP-DI 6 is harder than I anticipated because of PHP-DI/PhpDocReader#19. Since there is already more work on PHP-DI to do, my current plan is to support PHP 8 in PHP-DI 7 (which drops the need for PhpDocReader, i.e. it removes the problem). If anyone wants PHP 8 support for PHP-DI 6, please work on PhpDocReader to support PHP 8. If you can't, you can also hire me to work on that (with enough time I know I can), but at the moment I cannot spend a whole day working on this on my own time. |
Hi @mnapoli we at Matomo would sponsor it. I get Matt to reach out to you. We'd require PHP 7.2.5+ support though and not PHP 7.3+. Currently we're using PHP DI 6.2.1 in Matomo AFAIK https://github.com/matomo-org/matomo/blob/4.x-dev/composer.lock#L1219 |
@tsteur thanks, email received! |
PHP-DI 6.3 is released with PHP 8 support 🎉 . Thanks a lot to the InnoCraft team, the makers of Matomo, for sponsoring this release! Let me know of any compatibility you may see, all dependencies have been upgraded and tested as well. For those curious, all tests are now running on GitHub Actions because Travis CI does not support PHP 8 yet. |
I'm testing out PHP-DI on PHP 8 and noticed that it's throwing some deprecation warnings. If this issue is not wanted feel free to delete it.
and
The text was updated successfully, but these errors were encountered: