Skip to content
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

Error with change property visibility #145

Closed
R1KO opened this issue Oct 5, 2023 · 1 comment
Closed

Error with change property visibility #145

R1KO opened this issue Oct 5, 2023 · 1 comment

Comments

@R1KO
Copy link

R1KO commented Oct 5, 2023

Hello

When i use dev-main branch, i receive this error:

./vendor/bin/rector --dry-run
Fatal error: Cannot redeclare non-readonly property Rector\Core\Rector\AbstractRector::$phpDocInfoFactory as readonly
RectorLaravel\Rector\ClassMethod\AddGenericReturnTypeToRelationsRector::$phpDocInfoFactory in /var/www/api/vendor/driftingly/rector-laravel/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php on line 30

but when i use 0.26.1 version then error:

Fatal error: Access level to RectorLaravel\Rector\ClassMethod\AddGenericReturnTypeToRelationsRector::$phpDocInfoFactory must be protected (as in class Rector\Core\Rector\AbstractRector) or weaker in /var/www/api/vendor/driftingly/rector-laravel/src/Rector/ClassMethod/AddGenericReturnTypeToRelationsRector.php on line 30

PHP 8.1
Laravel 10.0

@GeniJaho
Copy link
Collaborator

This was caused by differences and changes in the core Rector repo and has since been fixed in the 0.26.* releases, or at least before 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants