diff --git a/calendar-bundle/src/Resources/contao/config/config.php b/calendar-bundle/src/Resources/contao/config/config.php index 5ab60fbb043..47aec8b9f20 100644 --- a/calendar-bundle/src/Resources/contao/config/config.php +++ b/calendar-bundle/src/Resources/contao/config/config.php @@ -35,7 +35,7 @@ $GLOBALS['TL_CRON']['daily']['generateCalendarFeeds'] = array('Calendar', 'generateFeeds'); // Style sheet -if (TL_MODE == 'BE') +if (defined('TL_MODE') && TL_MODE == 'BE') { $GLOBALS['TL_CSS'][] = 'bundles/contaocalendar/calendar.min.css|static'; } diff --git a/core-bundle/tests/Contao/RoutingTest.php b/core-bundle/tests/Contao/RoutingTest.php index 493c6d89579..bafe1901335 100644 --- a/core-bundle/tests/Contao/RoutingTest.php +++ b/core-bundle/tests/Contao/RoutingTest.php @@ -47,7 +47,7 @@ public function setUp(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsThePageIdFromTheUrl(): void { @@ -77,7 +77,7 @@ public function testReturnsThePageIdFromTheUrl(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsNullIfTheRequestIsEmpty(): void { @@ -93,7 +93,7 @@ public function testReturnsNullIfTheRequestIsEmpty(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfTheRequestContainsAutoItem(): void { @@ -123,7 +123,7 @@ public function testReturnsFalseIfTheRequestContainsAutoItem(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfTheUrlSuffixDoesNotMatch(): void { @@ -153,7 +153,7 @@ public function testReturnsFalseIfTheUrlSuffixDoesNotMatch(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseUponDuplicateParameters(): void { @@ -183,7 +183,7 @@ public function testReturnsFalseUponDuplicateParameters(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfTheRequestContainsAnAutoItemKeyword(): void { @@ -214,7 +214,7 @@ public function testReturnsFalseIfTheRequestContainsAnAutoItemKeyword(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testDecodesTheRequestString(): void { @@ -244,7 +244,7 @@ public function testDecodesTheRequestString(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testUnsetsEmptyFragments(): void { @@ -278,7 +278,8 @@ public function testUnsetsEmptyFragments(): void * * @runInSeparateProcess * @preserveGlobalState disabled - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testAddsTheAutoItemFragment(): void { @@ -311,7 +312,7 @@ public function testAddsTheAutoItemFragment(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsNullIfOnlyTheLanguageIsGiven(): void { @@ -342,7 +343,7 @@ public function testReturnsNullIfOnlyTheLanguageIsGiven(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfTheLanguageIsNotProvided(): void { @@ -373,7 +374,7 @@ public function testReturnsFalseIfTheLanguageIsNotProvided(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfTheAliasIsEmpty(): void { @@ -405,7 +406,7 @@ public function testReturnsFalseIfTheAliasIsEmpty(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfThereAreNoFragments(): void { @@ -441,7 +442,7 @@ public function testReturnsFalseIfThereAreNoFragments(): void } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testHandlesFolderUrlsWithoutLanguage(): void { @@ -502,7 +503,7 @@ function (array $options) { } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testHandlesFolderUrlsWithLanguage(): void { @@ -573,7 +574,7 @@ function (array $options) { } /** - * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated and will no longer work in Contao 5.0. Use the Symfony routing instead. + * @expectedDeprecation Using Frontend::getPageIdFromUrl() has been deprecated %s. */ public function testReturnsFalseIfThereAreNoAliases(): void { diff --git a/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php b/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php index ddefaad058f..9a653c9ff14 100644 --- a/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php +++ b/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php @@ -856,7 +856,7 @@ public function testRegistersTheContaoFramework(): void $this->assertSame(ContaoFramework::class, $definition->getClass()); $this->assertTrue($definition->isPublic()); - $this->assertSame(null, $definition->getArgument(0)); + $this->assertNull($definition->getArgument(0)); $this->assertSame('router', (string) $definition->getArgument(1)); $this->assertSame('contao.routing.scope_matcher', (string) $definition->getArgument(2)); $this->assertSame('%kernel.project_dir%', (string) $definition->getArgument(3)); diff --git a/core-bundle/tests/Functional/RoutingTest.php b/core-bundle/tests/Functional/RoutingTest.php index a30d6a637c2..0d3cf61bc9f 100644 --- a/core-bundle/tests/Functional/RoutingTest.php +++ b/core-bundle/tests/Functional/RoutingTest.php @@ -46,6 +46,8 @@ protected function setUp(): void Input::resetUnusedGet(); Environment::reset(); InsertTags::reset(); + + Config::set('debugMode', false); } /** diff --git a/faq-bundle/src/Resources/contao/config/config.php b/faq-bundle/src/Resources/contao/config/config.php index 7b0e954e66a..624468d87d9 100644 --- a/faq-bundle/src/Resources/contao/config/config.php +++ b/faq-bundle/src/Resources/contao/config/config.php @@ -29,7 +29,7 @@ )); // Style sheet -if (TL_MODE == 'BE') +if (defined('TL_MODE') && TL_MODE == 'BE') { $GLOBALS['TL_CSS'][] = 'bundles/contaofaq/faq.min.css|static'; } diff --git a/news-bundle/src/Resources/contao/config/config.php b/news-bundle/src/Resources/contao/config/config.php index dd0d0c0b3dc..cbd7c698e3e 100644 --- a/news-bundle/src/Resources/contao/config/config.php +++ b/news-bundle/src/Resources/contao/config/config.php @@ -35,7 +35,7 @@ $GLOBALS['TL_CRON']['daily']['generateNewsFeeds'] = array('News', 'generateFeeds'); // Style sheet -if (TL_MODE == 'BE') +if (defined('TL_MODE') && TL_MODE == 'BE') { $GLOBALS['TL_CSS'][] = 'bundles/contaonews/news.min.css|static'; }