From 28979c47581c6fbab9d7b1383c6102880d863df4 Mon Sep 17 00:00:00 2001 From: fritzmg Date: Mon, 31 Oct 2022 09:28:50 +0000 Subject: [PATCH] unlock Contao 5 --- .php-cs-fixer.dist.php | 8 +++++--- composer.json | 12 +++++++----- src/EventListener/InheritArticleListener.php | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 01e3786..8a82e43 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -31,9 +31,11 @@ 'escape_implicit_backslashes' => true, 'fully_qualified_strict_types' => true, 'general_phpdoc_annotation_remove' => [ - 'author', - 'expectedException', - 'expectedExceptionMessage', + 'annotations' => [ + 'author', + 'expectedException', + 'expectedExceptionMessage', + ], ], 'header_comment' => ['header' => $header], 'heredoc_to_nowdoc' => true, diff --git a/composer.json b/composer.json index dda279d..f48dafe 100644 --- a/composer.json +++ b/composer.json @@ -26,13 +26,15 @@ ], "require": { "php": ">=7.1", - "contao/core-bundle": "^4.4", - "symfony/dependency-injection": "^3.4 || ^4.4 || ^5.1", - "symfony/config": "^3.4 || ^4.4 || ^5.1", - "symfony/http-kernel": "^3.4 || ^4.4 || ^5.1" + "contao/core-bundle": "^4.4 || ^5.0", + "doctrine/dbal": "^2.11 || ^3.0", + "symfony/dependency-injection": "^3.4 || ^4.4 || ^5.1 || ^6.0", + "symfony/config": "^3.4 || ^4.4 || ^5.1 || ^6.0", + "symfony/http-kernel": "^3.4 || ^4.4 || ^5.1 || ^6.0" }, "require-dev": { - "contao/manager-plugin": "^2.0" + "contao/manager-plugin": "^2.0", + "friendsofphp/php-cs-fixer": "^2.16 || ^3.0" }, "autoload": { "psr-4": { diff --git a/src/EventListener/InheritArticleListener.php b/src/EventListener/InheritArticleListener.php index 2ec5e0c..d9d4f2d 100644 --- a/src/EventListener/InheritArticleListener.php +++ b/src/EventListener/InheritArticleListener.php @@ -58,7 +58,7 @@ private function getRenderedInheritedArticles(int $pageId, string $column): stri // Search for next parent ids while parent id > 0 do { // Get the next pid - $parent = $this->db->executeQuery('SELECT pid FROM tl_page WHERE id=?', [$pid])->fetchAssociative(); + $parent = $this->db->fetchAssociative('SELECT pid FROM tl_page WHERE id=?', [$pid]); // If there are no parents anymore, break the loop if (!$parent) {