Closed hlev closed 2 years ago
Thanks - the solution includes the filenames being uppercase?
No problem. PSR-4 autoloading requires one class definition per file where class name matches filename and namespacing matches directory structure. AFAIK on case-sensitive file systems it matters as well that the filenames have correct casing.
Makes a lot of sense. I think WordPress uses lowercase for class names and adds the class-prefix (e.g. class-classname.php), but I prefer the uppercase as you suggested (reminds me of some JS projects as well)
I manually pushed a new update, which includes the uppercase class names and directories.
Addresses https://github.com/makeitworkpress/wp-custom-fields/issues/4
dump-autoload -o
will work in Composer 2.0+I was using this in a custom child theme as a dependency and did not see any issues with just simply including the generated
autoload.php
infunctions.php