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

PHP 8.2 Deprecated Dynamic Properties when using getService #256

Open
marcuspoehls opened this issue Apr 16, 2024 · 1 comment · May be fixed by #257
Open

PHP 8.2 Deprecated Dynamic Properties when using getService #256

marcuspoehls opened this issue Apr 16, 2024 · 1 comment · May be fixed by #257
Labels
Milestone

Comments

@marcuspoehls
Copy link

Bug report

Summary

Update to PHP 8.2 and watch your Modx log file. You’ll notice PHP deprecation warnings for dynamic properties in the xPDO class. This happens in xPDO when using the getService method because it dynamically assigns the named service to their instance. See https://github.com/modxcms/revolution/blob/45e4b239f72a2352e788e4f2a3c3f0f456a5e175/core/xpdo/xpdo.class.php#L1238

The deprecation log lines look like this:

Deprecated: Creation of dynamic property modX::$myCustomService is deprecated in /core/xpdo/xpdo.class.php on line 1238

Environment

MODX 2.8.7, PHP 8.2.16

@sonicpunk
Copy link

I can confirm this.

@opengeek opengeek transferred this issue from modxcms/revolution Apr 16, 2024
@opengeek opengeek added this to the 2.8.7 milestone Apr 16, 2024
@opengeek opengeek linked a pull request Apr 16, 2024 that will close this issue
@opengeek opengeek linked a pull request Apr 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants