-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add AllowDynamicProperties
Attribute to cooperate with php8.2 deprecation
#1428
Add AllowDynamicProperties
Attribute to cooperate with php8.2 deprecation
#1428
Conversation
Any news on this? It has started to be much problematic with phpstan support |
@barryvdh any possibility of this merging in any time soon? Looks like it has been approved and tests are passing. Is currently needed to make use of mixins while using PHP8.2 |
I want to understand the issue better first, I added a comment in #1402 (comment) |
@mfn please can you provide a solution here? yes, generated class can extend the initial eloquent model, but either way is a 'stub'. So 'AllowDynamicProperties' can just do this without extra complexity. |
Is this still required now that the files are ignored? |
php 8.2 introduced a change where dynamicProperties are not allowed be default, so when phpStan reads the Short answer: Yes we really need this , and would appreciate your help |
This PR should disable the inspection though right? #1486 |
Yes for codesniffer, and for phpstorm. PhpStan doesn't seem to respect/recognize any the following /* @noinspection ALL */
// @formatter:off
// phpcs:ignoreFile ps: have already test it, getting the |
See #1516 |
Maybe my hunch for the proposed fix is correct, then it would be as fast as the revert. But I can't do it right now |
See #1517 |
…cation (barryvdh#1428) * Add `AllowDynamicProperties` Attribute to cooperate with php8.2 deprecation * lint snapshot
Summary
Trying to Add
#[\AllowDynamicProperties]
before class on mixin, as solution to PHPStan errorsNote: could add an extra check
PHP_VERSION_ID>= 80200
, but seems redundant as attributes have backwards compatibilityType of change
Checklist
composer fix-style
rel #1386
closes #1402