@@ -485,8 +485,9 @@ protected function _setAuthors(WrapperHordeYml $package, stdClass $composerDefin
485485 */
486486 protected function _setAutoload (WrapperHordeYml $ package , stdClass $ composerDefinition ): void
487487 {
488- // Extensions don't need PHP autoloading (they're compiled C code)
489- if ($ package ['type ' ] === 'extension ' ) {
488+ // Extensions and themes don't need PHP autoloading
489+ if (in_array ($ package ['type ' ], ['extension ' , 'horde-theme ' ], true )) {
490+ $ composerDefinition ->autoload = new stdClass ();
490491 return ;
491492 }
492493
@@ -523,6 +524,9 @@ protected function _setAutoload(WrapperHordeYml $package, stdClass $composerDefi
523524 $ composerDefinition ->autoload ['psr-4 ' ] = [$ Psr4Name => 'src/ ' ];
524525 }
525526 }
527+ if (empty ($ composerDefinition ->autoload )) {
528+ $ composerDefinition ->autoload = new stdClass ();
529+ }
526530 }
527531 /**
528532 * Configure Autoloading
@@ -534,8 +538,9 @@ protected function _setAutoload(WrapperHordeYml $package, stdClass $composerDefi
534538 */
535539 protected function _setAutoloadDev (WrapperHordeYml $ package , stdClass $ composerDefinition ): void
536540 {
537- // Extensions don't need PHP autoloading (they're compiled C code)
538- if ($ package ['type ' ] === 'extension ' ) {
541+ // Extensions and themes don't need PHP autoloading
542+ if (in_array ($ package ['type ' ], ['extension ' , 'horde-theme ' ], true )) {
543+ $ composerDefinition ->{'autoload-dev ' } = new stdClass ();
539544 return ;
540545 }
541546
0 commit comments