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

Add generic rule for adding comments to fusion prototype usage #52

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

dlubitz
Copy link
Contributor

@dlubitz dlubitz commented Apr 21, 2024

  • Add rule for adding comments to used Prototypes.
  • Replace dedicated Neos.Neos:PrimaryContent rule with generic rule
  • Add comments for Neos.Fusion:Attributes

Replace dedicated Neos.Neos:PrimaryContent rule with generic rule
Add comments for Neos.Fusion:Attributes
Copy link
Member

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, +1 by reading.
Thanks, those kind of tools are really helpful

@mhsdesign mhsdesign merged commit 4843c45 into main Apr 22, 2024
2 checks passed
@kdambekalns kdambekalns deleted the prototype-comment branch May 14, 2024 10:45
@kdambekalns
Copy link
Member

Ok, so this PR broke neos/rector, at least for me:

$ bin/rector --dry-run

 [ERROR] Expected an instance of this class or to this class among its parents
         "Rector\Core\Contract\Rector\RectorInterface". Got:
         "Neos\Rector\Generic\ValueObject\FusionPrototypeNameAddComment" in
         /…/Packages/Libraries/neos/rector/src/../config/set/contentrepository-90.php
         (which is being imported from "/…/rector.php").

If I go back one commit, it works.

*/
$rectorConfig->rule(FusionPrimaryContentRector::class);
$rectorConfig->ruleWithConfiguration(FusionPrototypeNameAddComment::class, [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kdambekalns Yeah, sorry. AFAIS there is wrong class used:
This needs to be: FusionPrototypeNameAddCommentRector::class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pretty sh**ty, that the tests are not covering the "real" configuration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, creating a PR right now…

@kitsunet
Copy link
Member

@kdambekalns with the hard pinned rector version of the package?

kdambekalns added a commit that referenced this pull request May 14, 2024
Fixes an error that slipped in with #52:

```
[ERROR] Expected an instance of this class or to this class among its parents
        "Rector\Core\Contract\Rector\RectorInterface". Got:
        "Neos\Rector\Generic\ValueObject\FusionPrototypeNameAddComment" in
        /…/Packages/Libraries/neos/rector/src/../config/set/contentrepository-90.php
        (which is being imported from "/…/rector.php").
```
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

Successfully merging this pull request may close these issues.

5 participants