Skip to content

Conversation

@provokateurin
Copy link
Member

This is meant for new files in order to have top quality from the start. Of course it can also be used for existing files, but they should go through the normal psalm/rector configs first.

@provokateurin provokateurin added this to the Nextcloud 33 milestone Nov 19, 2025
@provokateurin provokateurin requested a review from a team as a code owner November 19, 2025 10:18
@provokateurin provokateurin requested review from ArtificialOwl and icewind1991 and removed request for a team November 19, 2025 10:18
Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

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

For psalm, I am still a bit more in favor or increasing the level and add more stuff to the baseline. This has a bit of the same effect. New code has higher quality requirements, old code has know defect we can slowly get rid of with time.

I feel like for new files, we will always forgot to add them to the list of new files.

@provokateurin
Copy link
Member Author

For psalm, I am still a bit more in favor or increasing the level and add more stuff to the baseline. This has a bit of the same effect. New code has higher quality requirements, old code has know defect we can slowly get rid of with time.

I get your point, but we can't just set the level to 1 right now, as it would explode the baseline size. So for new code, it's much easier to have a separate config.

I feel like for new files, we will always forgot to add them to the list of new files.

That is probably true, but for example in my case I want to add whole a new app and it would be really useful to just have it all clean and tidy from the start, even if it's only used for that one app.

Comment on lines +15 to +27
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
privatization: true,
instanceOf: true,
earlyReturn: true,
rectorPreset: true,
phpunitCodeQuality: true,
doctrineCodeQuality: true,
symfonyCodeQuality: true,
symfonyConfigs: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m uneasy about using rector for code style like this because it has no ignore mechanism so we’re screwed on any false-positive, no?

Also, this PR adds rector-strict.php but only runs it on itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, this PR adds rector-strict.php but only runs it on itself?

Yes, because rector will complain if you run it without any files, so it's just meant as a placeholder.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! Can you explain that in a comment? 😆

This was referenced Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants