Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Helper/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,9 @@ protected function _setAuthors(WrapperHordeYml $package, stdClass $composerDefin
*/
protected function _setAutoload(WrapperHordeYml $package, stdClass $composerDefinition): void
{
// Extensions don't need PHP autoloading (they're compiled C code)
if ($package['type'] === 'extension') {
// Extensions and themes don't need PHP autoloading
if (in_array($package['type'], ['extension', 'horde-theme'], true)) {
$composerDefinition->autoload = new stdClass();
return;
}

Expand Down Expand Up @@ -523,6 +524,9 @@ protected function _setAutoload(WrapperHordeYml $package, stdClass $composerDefi
$composerDefinition->autoload['psr-4'] = [$Psr4Name => 'src/'];
}
}
if (empty($composerDefinition->autoload)) {
$composerDefinition->autoload = new stdClass();
}
}
/**
* Configure Autoloading
Expand All @@ -534,8 +538,9 @@ protected function _setAutoload(WrapperHordeYml $package, stdClass $composerDefi
*/
protected function _setAutoloadDev(WrapperHordeYml $package, stdClass $composerDefinition): void
{
// Extensions don't need PHP autoloading (they're compiled C code)
if ($package['type'] === 'extension') {
// Extensions and themes don't need PHP autoloading
if (in_array($package['type'], ['extension', 'horde-theme'], true)) {
$composerDefinition->{'autoload-dev'} = new stdClass();
return;
}

Expand Down
21 changes: 21 additions & 0 deletions src/Task/Release/AddChangelogEntryTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,31 @@ public function __construct(
}


/**
* Component types that do not use doc/changelog.yml.
*/
private const TYPES_WITHOUT_CHANGELOG = [
'horde-theme',
];

public function getName(): string
{
return "Ad\1 \2hangelo\1 \2ntry";
}

public function shouldSkip(Context $context): bool
{
$componentPath = $context->getComponentPath();
$hordeYmlPath = $componentPath . '/.horde.yml';
if (file_exists($hordeYmlPath)) {
$hordeYml = new HordeYmlFile($hordeYmlPath);
if (in_array($hordeYml->getType(), self::TYPES_WITHOUT_CHANGELOG, true)) {
return true;
}
}
return false;
}

public function run(Context $context): Result
{
$componentPath = $context->getComponentPath();
Expand Down
Loading