Skip to content

Conversation

ChristophWurst
Copy link
Member

99% sure tests will explode without https://packagist.org/packages/dg/bypass-finals

Extracted from #11224

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
use OCP\IRequest;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
final #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
Copy link
Member Author

Choose a reason for hiding this comment

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

🤦

@ChristophWurst
Copy link
Member Author

ChristophWurst commented Jun 5, 2025

@kesselb @st3iny what's your take on this? I get the idea of https://psalm.dev/docs/running_psalm/issues/ClassMustBeFinal/, but it seems a bit impractical, at least for classes that we mock often.

The only type of class where this seems appropriate are entities (DTOs), the main Application class, and migrations.

@st3iny
Copy link
Member

st3iny commented Jun 5, 2025

Improved performance sounds nice but I'm not really convinced by this idea. For public API it makes sense to mark some classes as final but I'm not sure about the internal stuff.

But yeah, we could do this for migrations, DTOs, etc.

@ChristophWurst ChristophWurst deleted the refactor/final-classes branch June 6, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants