Closed PeterHuefner closed 1 week ago
please provide code example and config at https://getrector.com/demo
You need to invest time to narrow down rules half by half until it found the minimal rule(s) that cause it, and the expected output.
Read this post: https://tomasvotruba.com/blog/2021/02/01/effective-debug-tricks-narrow-scoping/
Reproduced on interface Mixin
with Webmozart\Assert
namespace on ReturnTypeFromStrictConstantReturnRector
https://getrector.com/demo/e6b2e871-1b41-4897-8864-2f9aaad48de1
if webmozart/assert
is located in vendor
directory, rector should not run type declaration fix on it, as it may cause error, see this warning:
Looking at your error, you're running on vendor/
directory, which should not, while it seems on non-root directory (as package), but that a vendor/
from composer.
If you want to apply it, you should apply it per-project basis, and only apply on "source" project that matter, excluding third party part, otherwise, you can get autoload jugling and crash.
While there is no longer Mixin
interface on latest webmozart/assert, the issue is reproduced at :
should be fixed at:
due to Internal error.
on PHPStan enterClass()
on MutatingScope
.
Still, same suggestion: you should apply it per-project basis, and only apply on "source" project that matter, excluding third party part, otherwise, you can get autoload jugling and crash.
Dear rector-Team, you have made an awesome tool. It is really great! by using it I get an error on a file inside the library simplesamlphp:
The Mixin.php.txt is attachted as txt, cause of file type restrictions.
Other files inside the simplesamlphp library are parsed with out errors.
I used rector 1.04, PHP 8.3.2. I would appreciate some help.
Thank you for creating rector and making it available to the community!