Skip to content

Commit

Permalink
fix(di): avoid error on legacy v13 installation with deactivated admi…
Browse files Browse the repository at this point in the history
…n panel

related: #127
  • Loading branch information
brotkrueml committed Jan 23, 2025
1 parent e830ebf commit 5c05b34
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed
- Error on legacy v13 installation with deactivated admin panel (#127)

## [3.9.0] - 2025-01-13

### Added
Expand Down
12 changes: 9 additions & 3 deletions Configuration/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Brotkrueml\Schema\TypoScript\SchemaContentObject;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use TYPO3\CMS\Adminpanel\Service\ConfigurationService as AdminPanelConfigurationService;
use function Symfony\Component\DependencyInjection\Loader\Configurator\service;

return static function (ContainerConfigurator $configurator, ContainerBuilder $builder): void {
Expand All @@ -37,10 +38,15 @@
->autowire()
->autoconfigure();

$excludes = [
__DIR__ . '/../Classes/Extension.php',
];
if (! $builder->hasDefinition(AdminPanelConfigurationService::class)) {
$excludes[] = __DIR__ . '/../Classes/AdminPanel';
}

$services->load('Brotkrueml\Schema\\', __DIR__ . '/../Classes/*')
->exclude([
__DIR__ . '/../Classes/Extension.php',
]);
->exclude($excludes);

$services->set('schema.configuration', Configuration::class)
->factory([
Expand Down
6 changes: 6 additions & 0 deletions Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
`Unreleased <https://github.com/brotkrueml/schema/compare/v3.9.0...HEAD>`_
------------------------------------------------------------------------------

Fixed
^^^^^


* Error on legacy v13 installation with deactivated admin panel (#127)

`3.9.0 <https://github.com/brotkrueml/schema/compare/v3.8.0...v3.9.0>`_ - 2025-01-13
----------------------------------------------------------------------------------------

Expand Down

0 comments on commit 5c05b34

Please sign in to comment.