-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
ignore phpstorm attributes when instantiating and add readonly property #281
ignore phpstorm attributes when instantiating and add readonly property #281
Conversation
…ion-1 Add Dependabot Automation
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 1 to 2. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](ramsey/composer-install@v1...v2) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
…amsey/composer-install-2 Bump ramsey/composer-install from 1 to 2
…ctions/checkout-3 Bump actions/checkout from 2 to 3
add missing `array $context` to cast method
2acbe70
to
3caed1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, I've left a few remarks + could you also provide tests for the readonly functionality. And is it possible to add support for PHP 8.2 readonly classes? So we can get it in one go!
Thanks!
Ok, no problem. Your comments make good sense to me. Ill get them fixed up. |
@rubenvanassche You think I should just keep these properties as they are, though the |
72fb0d2
to
5eb1960
Compare
5eb1960
to
689703a
Compare
Ok, I've pushed up the changes I've made. If you decide you'd like to keep the |
Thanks! |
This package throws an error while instantiating a data class if/when a built-in php storm attribute is used on a dto class.
e.g.:
and/or
and/or
I'm using
\JetBrains\PhpStorm\Immutable
in these examples, but I've written this PR to ignore any of the other attributes that they have within the same namespaceIn the process of fixing this functionality, I came across the need to add the a 'isReadonly' property to the
DataType
class ... I was actually surprised it wasn't already there. Though, despite me using this package (and source-diving) it quite a bit, maybe its elsewhere in the library and I'm just unaware. Just lmk.Love the package, thx for the great work!