-
Notifications
You must be signed in to change notification settings - Fork 466
fix: php deprecation error for dynamic properties on AppContext class #3033
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
fix: php deprecation error for dynamic properties on AppContext class #3033
Conversation
|
👋🏻 Hey Jason... This can be squelched by adding the following to the list of properties in /**
* Stores the class to use for the connection query.
*
* @var WP_Query|null
*/
public $connection_query_class = null; |
This might be a "why not both?" situation, since while Similarly (more of a note to self), while squelching the deprecation warning is our immediate concern, we do need to think about what the ideal DX should be for overloading the ConnectionResolver in order to reuse an existing one instead of needing to define an entire child class (or even if overloading is the way to do it vs lets say a callable in the related: #2821 |
|
I think this is fixed, now. Thanks! |
@justlevine @gregrickaby ya, I agree with this (and everything @justlevine said after). We definitely need to shore up some patterns for hooking into AppContext. For now, I think we can do both, and then circle back in the future on what ideal patterns should be if/when AppContext needs to be modified during resolution, etc |
- add // @phpcs:ignore to the #[\AllowDynamicProperties] line
- Add php8.0 + wp6.3 to the include list
|
Code Climate has analyzed commit a3696ff and detected 0 issues on this pull request. View more on Code Climate. |
What does this implement/fix? Explain your changes.
Sets the AppContext class to "allow dynamic properties"
Does this close any currently open issues?
closes #2981