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

Add AllowDynamicProperties Attribute to classes #145

Closed
wants to merge 1 commit into from

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Nov 15, 2022

Carry Shardj/zf1-future#278, which was extracted from Shardj/zf1-future#275 which was created by @hungtrinh:

To save time, i used Classes with #[AllowDynamicProperties] attribute to resolve issue Deprecated: Creation of dynamic property {x} is deprecated on PHP 8.2

This is to fix the issue:

Deprecated: Creation of dynamic property {x} is deprecated

This is to fix issue:
> Deprecated: Creation of dynamic property {x} is deprecated

Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
Co-authored-by: Elan Ruusamäe <glen@pld-linux.org>
@falkenhawk
Copy link
Member

falkenhawk commented Nov 18, 2022

Thank you for setting this PR up! This is going to greatly reduce the amount of deprecation warnings in 8.2. We will tackle this after #141 is finalized, hopefully within next two weeks.

Copy link
Member

@falkenhawk falkenhawk left a comment

Choose a reason for hiding this comment

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

On second thought I'd prefer adding missing props, instead of taking a shortcut with adding only class attributes, as this would be a temporary workaround which would throw fatal errors in future php versions.

I took the approach with adding missing attributes in ovos/doctrine1#12 and I've found a few inconsistencies along the way, so I consider those deprecation warnings as one of the most useful ones.

@hungtrinh
Copy link
Contributor

I also want to add the missing props that's why I created Shardj/zf1-future#291 to fix my mess

@glensc
Copy link
Contributor Author

glensc commented Dec 12, 2022

Needs to include Shardj/zf1-future#291 as well, back to Draft

@glensc
Copy link
Contributor Author

glensc commented May 11, 2023

This is incomplete. should start over porting from z1-future

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.

3 participants