rector icon indicating copy to clipboard operation
rector copied to clipboard

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

Open samsonasik opened this issue 1 year ago • 3 comments

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 avatar Aug 21 '24 08:08 samsonasik

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 avatar Aug 21 '24 08:08 samsonasik

I created PR to laravel repo:

  • https://github.com/laravel/framework/pull/52541

samsonasik avatar Aug 21 '24 08:08 samsonasik

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

samsonasik avatar Aug 21 '24 08:08 samsonasik