diff --git a/composer.json b/composer.json index bf50960a4..0fd7b64b8 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "require": { "php": "^8.1", "ext-dom": "*", - "contao-community-alliance/dc-general": "^2.3.18", + "contao-community-alliance/dc-general": "^2.3.19", "contao-community-alliance/events-contao-bindings": "^4.13.1", "contao-community-alliance/meta-palettes": "^2.0.10", "contao-community-alliance/translator": "^2.4.2", diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php index 34401887b..79ec518f7 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php @@ -39,8 +39,10 @@ */ class JumpToListener extends AbstractAbstainingListener { + /** @psalm-suppress MissingClassConstType */ private const DEFAULT_TYPE = UrlGeneratorInterface::ABSOLUTE_PATH; + /** @psalm-suppress MissingClassConstType */ private const TYPE_MAP = [ 'absolute_url' => UrlGeneratorInterface::ABSOLUTE_URL, 'absolute_path' => UrlGeneratorInterface::ABSOLUTE_PATH, @@ -48,6 +50,8 @@ class JumpToListener extends AbstractAbstainingListener 'network_path' => UrlGeneratorInterface::NETWORK_PATH, ]; + /** @psalm-suppress MissingClassConstType */ + private const TYPE_MAP_INVERSE = [ UrlGeneratorInterface::ABSOLUTE_URL => 'absolute_url', UrlGeneratorInterface::ABSOLUTE_PATH => 'absolute_path', diff --git a/src/CoreBundle/Resources/config/services.yml b/src/CoreBundle/Resources/config/services.yml index e66fdbccb..37162dcb5 100644 --- a/src/CoreBundle/Resources/config/services.yml +++ b/src/CoreBundle/Resources/config/services.yml @@ -192,7 +192,7 @@ services: MetaModels\MetaModelsServiceContainer: deprecated: package: metamodels/core - version: 2.3 + version: 2.2 message: 'The service "%service_id%" is deprecated and to be removed in MetaModels 3 - inject needed services directly.' configurator: ['@MetaModels\CoreBundle\LegacyCompat\ServiceContainerInitializer', 'configure'] public: true diff --git a/src/Events/DatabaseBackedListener.php b/src/Events/DatabaseBackedListener.php index 175ffd8ad..dfc2bd562 100644 --- a/src/Events/DatabaseBackedListener.php +++ b/src/Events/DatabaseBackedListener.php @@ -248,9 +248,12 @@ protected function createInstance(CreateMetaModelEvent $event, $arrData) */ public function createMetaModel(CreateMetaModelEvent $event) { - if ($event->getMetaModel() !== null) { - /** @psalm-suppress DeprecatedMethod */ - if (!($metaModel = $event->getMetaModel()) instanceof ITranslatedMetaModel && $metaModel->isTranslated()) { + if (null !== ($metaModel = $event->getMetaModel())) { + /** + * @psalm-suppress DeprecatedMethod + * @psalm-suppress TooManyArguments + */ + if (!($metaModel instanceof ITranslatedMetaModel) && $metaModel->isTranslated(false)) { // @codingStandardsIgnoreStart @\trigger_error( 'Translated "\MetaModel\IMetamodel" instances are deprecated since MetaModels 2.2 ' . @@ -259,6 +262,7 @@ public function createMetaModel(CreateMetaModelEvent $event) ); // @codingStandardsIgnoreEnd } + return; }