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

"Deprecated: Creation of dynamic property" Error in PHP 8.3 #9

Open
alfreddagenais opened this issue Dec 26, 2023 · 0 comments
Open

Comments

@alfreddagenais
Copy link

Description

I am encountering a deprecation warning when using thedevdojo/themes with PHP 8.3. The warning is related to the creation of dynamic properties, which is deprecated in PHP 8.2 and later versions.

Error Message

The exact error message I am receiving is:

Deprecated: Creation of dynamic property DevDojo\Themes\ThemesServiceProvider::$themes_folder is deprecated in /var/www/html/vendor/devdojo/themes/src/ThemesServiceProvider.php on line 84

Steps to Reproduce

  1. Install thedevdojo/themes on a Laravel project.
  2. Upgrade PHP to version 8.3.
  3. Run the application or execute a command that loads the ThemesServiceProvider.
  4. The deprecation warning is displayed.

Expected Behavior

The package should not use dynamic properties and should be compatible with PHP 8.3 without triggering deprecation warnings.

Possible Solution

As PHP 8.2 deprecates the creation of dynamic properties, it might be necessary to update ThemesServiceProvider.php to define properties explicitly or refactor the code to avoid dynamic property creation. More information about this deprecation can be found here: PHP 8.2 Deprecation Notice.

Environment

  • Laravel Version: 10.38
  • PHP Version: 8.3
  • thedevdojo/themes Version: 0.0.7

I am looking forward to any updates or guidance on how to address this issue. Thank you!

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

No branches or pull requests

1 participant