heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Error when upgrading to Contao 4.11 #28

Closed Kahmoon closed 3 years ago

Kahmoon commented 3 years ago

Context Contao version: 4.10.7 to 4.11 Bundle version: PHP version: 7.4

When updating my installation to 4.11 the page goes offline with error 500

composer .json

{
    "type": "project",
    "require": {
        "bugbuster/contao-dlstats-bundle": "^1.0",
        "codefog/contao-cookiebar": "^2.1",
        "codefog/contao-events_subscriptions": "^2.3",
        "contao-bootstrap/core": "^2.0",
        "contao-bootstrap/grid": "^2.0",
        "contao-bootstrap/layout": "^2.0",
        "contao-bootstrap/navbar": "^2.1",
        "contao/calendar-bundle": "4.10.*",
        "contao/comments-bundle": "4.10.*",
        "contao/conflicts": "*@dev",
        "contao/faq-bundle": "4.10.*",
        "contao/listing-bundle": "4.10.*",
        "contao/manager-bundle": "4.10.*",
        "contao/news-bundle": "4.10.*",
        "contao/newsletter-bundle": "4.10.*",
        "dklemmt/contao_dk_mmenu": "^3.0",
        "do-while/contao-backupdb-bundle": "^1.3",
        "erdmannfreunde/euf_overlay": "^1.3",
        "frank-berger/events-subscriptions": "1.0.4",
        "heimrichhannot/contao-teaser-bundle": "^1.0.0",
        "hofff/contao-calendarfield": "^3.0",
        "jrgregory/m17-sticky-backend-footer": "^2.0",
        "kmielke/calendar-extended-bundle": "^1.0",
        "madeyourday/contao-rocksolid-custom-elements": "^2.2",
        "madeyourday/contao-rocksolid-frontend-helper": "^2.0",
        "markocupic/resource-booking-bundle": "^2.4",
        "netzmacht/contao-font-awesome-inserttag": "^2.0",
        "omosde/contao-om-backend": "^1.6",
        "oneup/contao-ical-export": "^2.0",
        "phpoffice/phpspreadsheet": "^1.14",
        "terminal42/contao-easy_themes": "^2.2",
        "terminal42/contao-leads": ">=1.4.10.0,<1.5-dev",
        "terminal42/contao-pageimage": ">=3.3.0.0,<3.4-dev",
        "terminal42/notification_center": "^1.4"
    },
    "extra": {
        "contao-component-dir": "assets"
    },
    "conflict": {
        "doctrine/doctrine-bundle": "<1.12.8"
    },
    "scripts": {
        "post-install-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ],
        "post-update-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ]
    }
}
$ /usr/bin/php7.4-cli -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Berlin /homepages/46/23456/htdocs/xxx-v3/vendor/contao/manager-bundle/bin/contao-console cache:clear --env=prod --no-warmup

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in /homepages/46/xxx/htdocs/xxx-v3/vendor/heimrichhannot/contao-utils-bundle/src/DependencyInjection/Configuration.php on line 23 and at least 1 expected in /homepages/46/xxx/htdocs/xxx-v3/vendor/symfony/config/Definition/Builder/TreeBuilder.php:26
Stack trace:
#0 /homepages/46/xxx/htdocs/xxx-v3/vendor/heimrichhannot/contao-utils-bundle/src/DependencyInjection/Configuration.php(23): Symfony\Component\Config\Definition\Builder\TreeBuilder->__construct()
#1 /homepages/46/xxx/htdocs/xxx-v3/vendor/symfony/config/Definition/Processor.php(50): HeimrichHannot\UtilsBundle\DependencyInjection\Configuration->getConfigTreeBuilder()
#2 /homepages/46/xxx/htdocs/xxx-v3/vendor/symfony/dependency-injection/Extension/Extension.php(111): Symfony\Component\Config\Definition\Pro in /homepages/46/xxx/htdocs/xxx-v3/vendor/symfony/config/Definition/Builder/TreeBuilder.php on line 26

# Process terminated with exit code 255
# Result: Unknown erro

Description

koertho commented 3 years ago

I assume symfony 5 is installed? Seams like this is the problem. I will look into it

Kahmoon commented 3 years ago

I don´t know which symfony is installed sorry. Its a IONOS Hosting.

koertho commented 3 years ago

Symfony is the framework, which contao uses. It has nothing to do with your hosting. But we already locked the config component to 4.4. You could check your installed bundle versions with composer show, I think it is also possible in contao manager. maybe you just need to update the utils bundle to the latests version.

Kahmoon commented 3 years ago

How can i update utils to the latest version? I don´t have it in my composer.json. It is probably a dependecie

koertho commented 3 years ago

composer update heimrichhannot/contao-utils-bundle or just composer update

Kahmoon commented 3 years ago

Nope. That did not help in the first place. i copied my composer.json from dev system and updated all packages twice. Now it seems to be online again with a working 4.11

puh!!!

:-)

koertho commented 3 years ago

Wow, you did update a production system without testing?

Kahmoon commented 3 years ago

No no, at the staging system there was no error! :-(

koertho commented 3 years ago

But still very strange. Do you use the contao manager? Aren't the installed bundle versions visible there?

Kahmoon commented 3 years ago

I don´t use console at all. Everything i do is via contao manager. I cannot see contao-utils-bundle there

koertho commented 3 years ago

Ok, I just checked in contao manager: you could go to packages -> {bundle} -> details ->requirements -> {bundle} -> details, there are the current installed version is shown.

Kahmoon commented 3 years ago

Actually i got the same error at another installation at another hosting (All-Inkl). Also vom 4.10.7 to 4.11

This module is at every installation where i get those errors.

koertho commented 3 years ago

I just tried and found a dependency issue, but it's not the utils bundle itself, but a dependency of it. I will look into it and report back. In the meantime I would recommend not to upgrade to 4.11.

koertho commented 3 years ago

@Kahmoon The issue wasn't with the dependency I thought, it was a missing symfony dependency in this bundle. I just release 2.188.10, which should fix this issue.

fritzmg commented 3 years ago

This still allows an update path to 2.188.9 with Symfony 5, as the package previously had no dependency on smyfony/config. To fix this, you might need to manually add

    "conflict": {
        "heimrichhannot/contao-utils-bundle": "<2.188.10"
    },

to your composer.json.

luhmannAlexander commented 3 years ago

Hi I have written a bundle that requires "heimrichhannot/contao-fieldpalette-bundle": "~0.5.1". This in turn requires contao-utils-bundle which leads to this problem. I think the conflict in my composer.json is too late here because Contao has already taken a higher version of Symfony. Any ideas? Many thanks for the help. In my bundle I have this: "require": { "php": ">=7.0", "contao/core-bundle": "^4.4", "heimrichhannot/contao-fieldpalette-bundle": "~0.5.1", "symfony/serializer": "*", "ext-dom": "*", "ext-json": "*", "ext-curl": "*", "ext-gettext": "*", "doctrine/data-fixtures": "*", "doctrine/dbal": "*" }, "conflict": { "contao/core": "*", "heimrichhannot/contao-utils-bundle": "<2.188.10" },

koertho commented 3 years ago

@luhmannAlexander We have already symfony 5 support in newer utils-bundle versions, ~you should try remove the conflict entry from your composer.json~.

I also think we can close this issue here, as the issue should be fixed, the author doesn't respond and the solution is out of date.

koertho commented 3 years ago

@luhmannAlexander Ok, the conflict shouldn't be a problem. Please open a new issue with more information about your problem.

fritzmg commented 3 years ago

This in turn requires contao-utils-bundle which leads to this problem.

Which problem exactly? Always post the console output (in your new issue).