Closed hmazter closed 11 months ago
You might need a backslash before the rule name. Maybe.
You might need a backslash before the rule name. Maybe.
Thanks for the reply. Unfortenly it makes no difference, and neither does importing the class.
The same thing happens in a fresh Laravel install if the @extends
is removed from the default UserFactory
@hmazter In that case I think it's because of the latest Rector release https://github.com/rectorphp/rector/releases/tag/0.18.3, which breaks rules that modify docblocks.
There is a PR to support that release https://github.com/driftingly/rector-laravel/pull/135, but until it gets merged, you can use a fixed older version of core Rector like 0.18.2: "rector/rector": "0.18.2",
.
Thanks that worked! 👍
I'm trying to use the
AddExtendsAnnotationToModelFactoriesRector
to add the@extends
annotation to factory classes, but nothing is applied. Am I missing something?Factory class
database/factories/CategoryFactory.php
Rector config
rector.php