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

Exclude Doctrine documents from final fixer #5622

Merged

Conversation

ossinkine
Copy link
Contributor

Doctrine ORM entities already excluded from FinalClassFixer. I propose also to exclude Doctrine ODM documents.

@coveralls
Copy link

coveralls commented Apr 12, 2021

Coverage Status

Coverage remained the same at 91.864% when pulling 1beaa54 on ossinkine:exclude-final-doctrine-document into a503ace on FriendsOfPHP:2.18.

@keradus
Copy link
Member

keradus commented Apr 12, 2021

would you mind to share reasoning for a person who is not using Doctrine daily?

@ossinkine
Copy link
Contributor Author

Doctrine has two object mapping packages: ORM for relational DB and ODM document-oriented DB.
ORM works with entities, ODM works with documents.
Both can't be final because they can be proxied (will be created proxy classes extends them).
Since FinalClassFixer already excluded entities, I assumed it would be logical to also exclude documents.

@ossinkine ossinkine force-pushed the exclude-final-doctrine-document branch from 823cbb3 to b6bda17 Compare April 13, 2021 09:18
Copy link
Contributor

@kubawerlos kubawerlos left a comment

Choose a reason for hiding this comment

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

Is the list complete now for Doctrine? @Ocramius is there a place we can verify it is or not?

@Ocramius
Copy link

@Document seems a bit generic: shouldn't it be @ODM\Document?

@ossinkine ossinkine force-pushed the exclude-final-doctrine-document branch from b6bda17 to 0dfdcfd Compare April 14, 2021 08:02
@ossinkine
Copy link
Contributor Author

Added @ODM\Document

@ossinkine ossinkine force-pushed the exclude-final-doctrine-document branch from 0dfdcfd to 1beaa54 Compare April 15, 2021 07:40
@keradus keradus added this to the 2.18.6 milestone Apr 16, 2021
@keradus
Copy link
Member

keradus commented Apr 16, 2021

Thank you @ossinkine.

@keradus keradus merged commit 29b3a89 into PHP-CS-Fixer:2.18 Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants