rectorphp / rector

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
https://getrector.com
MIT License
8.61k stars 680 forks source link

Latest illuminate/container 11.21.0 cause error Call to undefined method ReflectionParameter::getAttributes() on php 7.x #8804

Closed samsonasik closed 5 days ago

samsonasik commented 3 weeks ago

Bug Report

Subject Details
Rector version e.g. dev-main

Ref error build https://github.com/rectorphp/rector/actions/runs/10485665712/job/29042254179

Expected Behaviour

should be working.

samsonasik commented 3 weeks ago

It seems due to invalid @param on new version of illuminate/container 11.21.0

     * @param  ReflectionParameter  $dependency

which ReflectionParameter never used on use statement, so it cause error and not downgraded, it should be either add to use statement or make it fqcn:

-     * @param  ReflectionParameter  $dependency
+     * @param  \ReflectionParameter  $dependency

ref https://github.com/rectorphp/rector/commit/082c3ba4ca7414b12d3a3cc490a15c78c0ed7df1#diff-4c4b9f8c4ed85bfdd4b8dd7c23180b75b2842d98e620cd40ddcd03fb0d24a63a

samsonasik commented 3 weeks ago

I created PR to laravel repo:

samsonasik commented 3 weeks ago

Temporary solution on our side https://github.com/rectorphp/rector-src/pull/6247