Ergebnis 1 bis 6 von 6

Thema: Composer-Problem beim Update innerhalb Contao 4.4

  1. #1
    Contao-Nutzer
    Registriert seit
    02.09.2022.
    Beiträge
    14

    Standard Composer-Problem beim Update innerhalb Contao 4.4

    Hallo mteinander

    Aufgrund einer Geschäftsaufgabe haben wir diverse Contao-Websites übernommen. Viele davon laufen noch mit Contao 4.4.x.
    Eine der Websites haben wir mit Contao 4.4.12 und PHP 7.1 übernommen. Aufgrund eines Hoster-Wechsels haben wir beim Umzug direkt auf PHP 7.4 aktualisiert, was scheinbar ohne grössere Probleme funktioniert hat. Die betroffene Website lief aktuell also mit Contao 4.4.12 und PHP 7.4. Auf einer Subdomain haben wir nun via ContaoManager versucht, die Contao-Version (inkl. aller Pakete) zu aktualisieren. Zuerst auf die neuste 4.4-Version, was folgende Fehlermeldung ausgeworfen hat:

    Code:
    > Resolving dependencies using Composer Cloud v3.5.1
    [5.0MiB/0.16s] Loading composer repositories with package information
    [78.5MiB/12.12s] Updating dependencies
    [197.6MiB/13.15s] Your requirements could not be resolved to an installable set of packages.
    [197.6MiB/13.15s] 
      Problem 1
        - contao/managed-edition is present at version 1.0.0+no-version-set and cannot be modified by Composer
        - roave/security-advisories dev-master conflicts with contao/managed-edition <=1.5.
        - Root composer.json requires roave/security-advisories dev-master -> satisfiable by roave/security-advisories[dev-master].
    [197.6MiB/13.15s] <warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>
    [43.7MiB/13.23s] Memory usage: 43.74MB (peak: 244.49MB), time: 13.23s.
    [43.7MiB/13.23s] Finished Composer Cloud resolving.
    # Cloud Job ID VJLygkhpfxHQm88xLdG2oo8YDKKiQkBaN5HdBpKfqASj1V5Vi6oTuMKMFC1CNl6N0cY8s0oZTEw3DMom617qOB71Y9DaL failed
    Trotz dieser Meldung scheint die Aktualisierung auf 4.4.57 funktioniert zu haben. Die composer.json hat folgende Einträge:

    Code:
    {
        "name": "contao/managed-edition",
        "type": "project",
        "description": "Contao Open Source CMS",
        "license": "LGPL-3.0+",
        "authors": [
            {
                "name": "Leo Feyer",
                "homepage": "https://github.com/leofeyer"
            }
        ],
        "require": {
            "php": "^5.6|^7.0",
            "contao/manager-bundle": "4.4.*",
            "contao/calendar-bundle": "4.4.*",
            "contao/comments-bundle": "4.4.*",
            "contao/faq-bundle": "4.4.*",
            "contao/listing-bundle": "4.4.*",
            "contao/news-bundle": "4.4.*",
            "contao/newsletter-bundle": "4.4.*",
            "roave/security-advisories": "dev-master",
            "madeyourday/contao-rocksolid-custom-elements": "^2.2",
            "madeyourday/contao-rocksolid-columns": "^2.0",
            "madeyourday/contao-rocksolid-icon-picker": "^2.0",
            "madeyourday/contao-rocksolid-slider": "^2.0",
            "madeyourday/contao-rocksolid-mega-menu": "^2.0",
            "madeyourday/contao-rocksolid-theme-assistant": "^2.0"
        },
        "config": {
            "component-dir": "assets"
        },
        "extra": {
            "branch-alias": {
                "dev-4.4": "4.4.x-dev"
            }
        },
        "scripts": {
            "post-install-cmd": [
                "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
            ],
            "post-update-cmd": [
                "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
            ]
        }
    }
    Habt ihr irgendwelche Hinweise, wie das Update auf 4.9 und dann hoffentlich auf 4.13 funktionieren könnten? Beim Update auf 4.9 ist nämlich Schluss, die Fehlermeldung bleibt die Gleiche ...

    Herzlichen Dank für eure Hilfe.

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.126
    Partner-ID
    10107

    Standard

    Einfach roave/security-advisories entfernen.
    » sponsor me via GitHub or PayPal or Revolut

  3. #3
    Contao-Nutzer
    Registriert seit
    02.09.2022.
    Beiträge
    14

    Standard

    Lieber Spooky

    Vielen Dank für deine schnelle Antwort. Beim Löschen der Erweiterung im ContaoManager erscheint folgende Fehlermeldung.

    Code:
    > Resolving dependencies using Composer Cloud v3.5.1
    [5.0MiB/0.18s] Loading composer repositories with package information
    [5.6MiB/0.33s] Updating dependencies
    [6.5MiB/0.35s] Your requirements could not be resolved to an installable set of packages.
    [6.5MiB/0.35s] 
      Problem 1
        - contao-components/installer 1.2.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.3.0] but it does not match the constraint.
        - contao/core-bundle 4.4.12 requires contao-components/tinymce4 4.6.* -> satisfiable by contao-components/tinymce4[4.6.7.2].
        - contao/calendar-bundle 4.4.12 requires contao/core-bundle ^4.4.2 -> satisfiable by contao/core-bundle[4.4.12].
        - contao-components/tinymce4 4.6.7.2 requires contao-components/installer ^1.0.9 -> satisfiable by contao-components/installer[1.2.6].
        - contao/calendar-bundle is locked to version 4.4.12 and an update of this package was not requested.
    [6.5MiB/0.35s] <warning>Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.</warning>
    [5.7MiB/0.35s] Memory usage: 5.69MB (peak: 6.96MB), time: 0.36s.
    [5.7MiB/0.35s] Finished Composer Cloud resolving.
    # Cloud Job ID hcwY8c1wGP3HZFNKDeNhgnc8K6w5WshCLiocj3nxfSzxQ5kyWv45113IbzuCLFcYrfPMtO7LrGLwk2laipqQP8AA4yRoONZbss6KQHSD6 failed
    Beim manuellen Löschen in der composer.json erhalte ich beim Aktualisieren der Änderung (Bestätigung der Löschung) im ContaoManager folgende Fehlermeldung:

    Code:
    $ /opt/plesk/php/7.4/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -ddisplay_startup_errors=0 -derror_reporting=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Zurich /home/httpd/vhosts/rutimann.com/httpdocs/web/contao-manager.phar.php composer install --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
    Using config.component-dir has been deprecated. Please use extra.contao-component-dir instead.
    Installing dependencies from lock file
    Verifying lock file contents can be installed on current platform.
    Package operations: 0 installs, 1 update, 1 removal
      - Downloading contao-components/ace (1.15.2)
      - Removing roave/security-advisories (dev-master 0703d86)
      - Upgrading contao-components/ace (1.15.0 => 1.15.2): Extracting archive
    Package contao-components/compass is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/highlight is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/html5shiv is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/mediaelement is abandoned, you should avoid using it. No replacement was suggested.
    Package contao-components/respimage is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/doctrine-cache-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package lexik/maintenance-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package oyejorge/less.php is abandoned, you should avoid using it. No replacement was suggested.
    Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Package sensio/distribution-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package sensiolabs/security-checker is abandoned, you should avoid using it. Use https://github.com/fabpot/local-php-security-checker instead.
    Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package terminal42/header-replay-bundle is abandoned, you should avoid using it. No replacement was suggested.
    Package true/punycode is abandoned, you should avoid using it. No replacement was suggested.
    Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
    Generating optimized autoload files
    contao/manager-plugin: Dumping generated plugins file...
    contao/manager-plugin: ...done dumping generated plugins file
    Class Contao\ManagerPlugin\PluginLoader located in ./vendor/contao/manager-plugin/src/Resources/PluginLoader.php does not comply with psr-4 autoloading standard. Skipping.
    39 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    > Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
     // Clearing the cache for the prod environment with debug                      
     // false                                                                       
     [OK] Cache for the "prod" environment (debug=false) was successfully cleared.  
     // Warming up the cache for the prod environment with debug                    
     // false                                                                       
     [OK] Cache for the "prod" environment (debug=false) was successfully warmed.   
     Trying to install assets as relative symbolic links.
     --- ------------------------------- ------------------ 
          Bundle                          Method / Error    
     --- ------------------------------- ------------------ 
      ?   ContaoCoreBundle                relative symlink  
      ?   RockSolidCustomElementsBundle   relative symlink  
      ?   ContaoFaqBundle                 relative symlink  
      ?   RockSolidColumnsBundle          relative symlink  
      ?   ContaoCommentsBundle            relative symlink  
      ?   ContaoNewsBundle                relative symlink  
      ?   RockSolidMegaMenuBundle         relative symlink  
      ?   RockSolidThemeAssistantBundle   relative symlink  
      ?   ContaoCalendarBundle            relative symlink  
      ?   ContaoNewsletterBundle          relative symlink  
      ?   RockSolidIconPickerBundle       relative symlink  
      ?   RockSolidSliderBundle           relative symlink  
     --- ------------------------------- ------------------ 
     [OK] All assets were successfully installed.                                   
    Added the system/initialize.php file.
    10:25:01 ERROR     [console] Error thrown while running command "contao:install --env=prod". Message: "The path "system/config/tcpdf.php" exists and is not a symlink." ["exception" => LogicException { …},"command" => "contao:install --env=prod","message" => "The path "system/config/tcpdf.php" exists and is not a symlink."]
    In SymlinkUtil.php line 80:
                                                                       
      The path "system/config/tcpdf.php" exists and is not a symlink.  
                                                                       
    contao:install [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<target>]
    Script Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication handling the post-install-cmd event terminated with an exception
    In ScriptHandler.php line 113:
                                                                                   
      An error occurred while executing the "contao:install" command: 10:25:01 ER  
      ROR     [console] Error thrown while running command "contao:install --env=  
      prod". Message: "The path "system/config/tcpdf.php" exists and is not a sym  
      link." ["exception" => LogicException { …},"command" => "contao:install --e  
      nv=prod","message" => "The path "system/config/tcpdf.php" exists and is not  
       a symlink."]                                                                
                                                                                   
      In SymlinkUtil.php line 80:                                                  
                                                                                   
        The path "system/config/tcpdf.php" exists and is not a symlink.            
                                                                                   
                                                                                   
      contao:install [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version  
      ] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [-  
      -] <command> [<target>]                                                      
                                                                                   
    install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
    # Process terminated with exit code 1
    # Result: General error
    Danach gibt der ContaoManager einen Error aus und beim Neustart erscheint dann die folgende Meldung. Dafür ist die Erweiterung dann verschwunden:

    Code:
    $ /opt/plesk/php/7.4/bin/php -q -dmax_execution_time=0 -dmemory_limit=-1 -ddisplay_errors=0 -ddisplay_startup_errors=0 -derror_reporting=0 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Zurich /home/httpd/vhosts/rutimann.com/httpdocs/web/contao-manager.phar.php composer install --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
    Using config.component-dir has been deprecated. Please use extra.contao-component-dir instead.
    Installing dependencies from lock file
    Verifying lock file contents can be installed on current platform.
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
    Your lock file does not contain a compatible set of packages. Please run composer update.
      Problem 1
        - contao-components/installer is locked to version 1.2.6 and an update of this package was not requested.
        - contao-components/installer 1.2.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
      Problem 2
        - contao-components/installer 1.2.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.2.0] but it does not match the constraint.
        - contao-components/tinymce4 4.6.7.2 requires contao-components/installer ^1.0.9 -> satisfiable by contao-components/installer[1.2.6].
        - contao-components/tinymce4 is locked to version 4.6.7.2 and an update of this package was not requested.
    # Process terminated with exit code 2
    # Result: Misuse of shell builtins

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.126
    Partner-ID
    10107

    Standard

    Nein, du musst die composer.json manuell anpassen (inkl. Anpassung der Contao Version) und dann "Composer Update ausführen".

    Und so wie es aussieht hast du die Contao Installation einfach kopiert, inkl. Symlinks. Du musst die Symlinks nun manuell löschen, bevor du das Composer Update ausführst (z.B. system/config/tcpdf.php).
    » sponsor me via GitHub or PayPal or Revolut

  5. #5
    Community-Moderatorin & Contao-Urgestein Avatar von mlweb
    Registriert seit
    10.07.2011.
    Beiträge
    6.758
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Du musst ein vollständiges "composer update" ausführen - entweder über den Manager oder die Konsole.
    Wenn das nicht hilft, kann es auch erforderlich sein die composer lock zu löschen oder umzubenennen und/oder den vendor-Ordner komplett zu löschen.
    Ich habe Dir mit meinen Hinweisen geholfen und Du möchtest Dich bedanken?
    Unterstütze bitte das Contao-Projekt (Button Links)
    Weitere Spendenmöglichkeiten
    ------------------------------------------------------------------------------------------------------
    Contao-Dokumentation: Contao-Handbuch und Contao-Entwickler-Doku
    Contao-Online-Video-Kurse: Contao Academy
    Funktionalität erweitern: Contao-Erweiterungen

    Für Dinge die man mit html5 und css3 lösen kann, braucht man kein javascript.




  6. #6
    Contao-Nutzer
    Registriert seit
    02.09.2022.
    Beiträge
    14

    Standard

    Vielen Dank für eure Hinweise. Nach dem Löschen der von Spooky genannten Datei hat das Composer-Update funktioniert. Soweit scheint alles zu funktionieren.

    Ich habe nun noch das Update auf 4.9 versucht und alle Pakete aktualisiert. Hat dann mit einem Umweg über andere Forums-Beiträge soweit ebenfalls funktioniert.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •