Skip to content

Custom plugin classes are not loaded before config/cms.php is executed #1283

Answered by LukeTowers
goldmont asked this question in Q&A
Discussion options

You must be logged in to vote

@nmiyazaki-chapleau we actually do support the folders being lowercase and the class file being TitleCase, it's what all the first party modules and plugins do and it's what the scaffolding generates.

@goldmont as for your original issue this is known and intentional. The config loader loads those files when the values are asked for. Plugin classes are not autoloaded until the plugin itself is registered and determined to be enabled so that disabled plugins do not have their code autoloaded.

Since the System ServiceProvider loads the cms.loadModules config item in order to determine which modules to load and register before it kicks off the plugin initialization it's expected that any plu…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@goldmont
Comment options

Answer selected by LukeTowers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1282 on January 07, 2025 23:00.