Skip to content

fix: force value on readonly property in inherited classes - #47

Merged
benconda merged 1 commit into
mainfrom
fix-readonly
Nov 25, 2025
Merged

benconda merged 1 commit into
mainfrom
fix-readonly

Conversation

@benconda

Copy link
Copy Markdown
Contributor

In case we have a class with inherited readonly property it fails, in my example with a messenger RunCommandMessage override:

[Error]
Cannot initialize readonly property Symfony\Component\Console\Messenger\RunCommandMessage::$input from scope Infrastructure\Messenger\RunCommandMessage

This fix and allow to force property values on these inherited readonly properties

@B-Galati B-Galati left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perfect if you add an automatic test 👍

@benconda
benconda merged commit da20619 into main Nov 25, 2025
8 checks passed
@benconda
benconda deleted the fix-readonly branch November 26, 2025 13:05
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.

2 participants