Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer Update command does not work as expected #11198

Closed
1 task done
trianity opened this issue May 27, 2022 · 22 comments
Closed
1 task done

Composer Update command does not work as expected #11198

trianity opened this issue May 27, 2022 · 22 comments
Labels
bug Issues or PR's relating to bugs composer Any bugs or PRs relating to composer stale Issues which have not received an update within 90 days

Comments

@trianity
Copy link

trianity commented May 27, 2022

Mautic Version

4.2.x series

PHP version

7.4.28

What browsers are you seeing the problem on?

Not relevant

What happened?

The Composer Update command does not work as expected.
Expected behavior: Update Mautic core with dependencies
Experienced behavior:
1.) Only composer packages have been updated, the Mauitc core was untouched
2.) The composer update command in the last step (Scaffolding files for mautic/core-lib) recreated the bug solved by patch from #10957
3.) The Mautic instance (in the bottom of admin panel) shows version 4.2.2 but after updating it should be 4.3.1
4.) The page: https://docs.mautic.org/en/setup/switch-to-composer is not contains any data about the update process

How can we reproduce this issue?

Step 1: Use a Mautic instance installed with composer or switched to composer install
Step 2: Go Mautic project root folder
Step 3: Run composer update command in this folder

Relevant log output

$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 31 updates, 0 removals
  - Upgrading aws/aws-sdk-php (3.222.7 => 3.223.0)
  - Upgrading composer/ca-bundle (1.3.1 => 1.3.2)
  - Upgrading composer/composer (2.2.12 => 2.2.13)
  - Upgrading composer/spdx-licenses (1.5.6 => 1.5.7)
  - Upgrading doctrine/cache (2.1.1 => 2.2.0)
  - Upgrading giggsey/libphonenumber-for-php (8.12.48 => 8.12.49)
  - Upgrading guzzlehttp/guzzle (7.4.2 => 7.4.3)
  - Upgrading intervention/image (2.7.1 => 2.7.2)
  - Upgrading maennchen/zipstream-php (2.1.0 => 2.2.1)
  - Upgrading php-http/discovery (1.14.1 => 1.14.2)
  - Upgrading symfony/cache (v4.4.41 => v4.4.42)
  - Upgrading symfony/config (v4.4.41 => v4.4.42)
  - Upgrading symfony/console (v4.4.41 => v4.4.42)
  - Upgrading symfony/dependency-injection (v4.4.41 => v4.4.42)
  - Upgrading symfony/doctrine-bridge (v4.4.41 => v4.4.42)
  - Upgrading symfony/event-dispatcher (v4.4.37 => v4.4.42)
  - Upgrading symfony/filesystem (v4.4.39 => v4.4.42)
  - Upgrading symfony/form (v4.4.41 => v4.4.42)
  - Upgrading symfony/framework-bundle (v4.4.41 => v4.4.42)
  - Upgrading symfony/http-client (v4.4.41 => v4.4.42)
  - Upgrading symfony/http-foundation (v4.4.41 => v4.4.42)
  - Upgrading symfony/http-kernel (v4.4.41 => v4.4.42)
  - Upgrading symfony/mime (v5.4.8 => v5.4.9)
  - Upgrading symfony/security (v4.4.41 => v4.4.42)
  - Upgrading symfony/security-bundle (v4.4.41 => v4.4.42)
  - Upgrading symfony/string (v5.4.8 => v5.4.9)
  - Upgrading symfony/twig-bridge (v4.4.41 => v4.4.42)
  - Upgrading symfony/var-dumper (v5.4.8 => v5.4.9)
  - Upgrading symfony/var-exporter (v5.4.8 => v5.4.9)
  - Upgrading tightenco/collect (v8.83.8 => v8.83.12)
  - Upgrading twig/twig (v3.3.10 => v3.4.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 31 updates, 0 removals
  - Downloading intervention/image (2.7.2)
  - Downloading symfony/filesystem (v4.4.42)
  - Downloading symfony/console (v4.4.42)
  - Downloading composer/spdx-licenses (1.5.7)
  - Downloading composer/ca-bundle (1.3.2)
  - Downloading composer/composer (2.2.13)
  - Downloading symfony/mime (v5.4.9)
  - Downloading symfony/http-foundation (v4.4.42)
  - Downloading symfony/event-dispatcher (v4.4.42)
  - Downloading symfony/var-dumper (v5.4.9)
  - Downloading symfony/http-kernel (v4.4.42)
  - Downloading doctrine/cache (2.2.0)
  - Downloading symfony/doctrine-bridge (v4.4.42)
  - Downloading symfony/dependency-injection (v4.4.42)
  - Downloading symfony/config (v4.4.42)
  - Downloading symfony/var-exporter (v5.4.9)
  - Downloading symfony/cache (v4.4.42)
  - Downloading symfony/framework-bundle (v4.4.42)
  - Downloading symfony/string (v5.4.9)
  - Downloading symfony/security (v4.4.42)
  - Downloading symfony/security-bundle (v4.4.42)
  - Downloading guzzlehttp/guzzle (7.4.3)
  - Downloading aws/aws-sdk-php (3.223.0)
  - Downloading twig/twig (v3.4.1)
  - Downloading symfony/twig-bridge (v4.4.42)
  - Downloading symfony/form (v4.4.42)
  - Downloading symfony/http-client (v4.4.42)
  - Downloading php-http/discovery (1.14.2)
  - Downloading maennchen/zipstream-php (2.2.1)
  - Downloading giggsey/libphonenumber-for-php (8.12.49)
  - Upgrading intervention/image (2.7.1 => 2.7.2): Extracting archive
  - Upgrading symfony/filesystem (v4.4.39 => v4.4.42): Extracting archive
  - Upgrading symfony/console (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading composer/spdx-licenses (1.5.6 => 1.5.7): Extracting archive
  - Upgrading composer/ca-bundle (1.3.1 => 1.3.2): Extracting archive
  - Upgrading composer/composer (2.2.12 => 2.2.13): Extracting archive
  - Upgrading symfony/mime (v5.4.8 => v5.4.9): Extracting archive
  - Upgrading symfony/http-foundation (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/event-dispatcher (v4.4.37 => v4.4.42): Extracting archive
  - Upgrading symfony/var-dumper (v5.4.8 => v5.4.9): Extracting archive
  - Upgrading symfony/http-kernel (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading doctrine/cache (2.1.1 => 2.2.0): Extracting archive
  - Upgrading symfony/doctrine-bridge (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/dependency-injection (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/config (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/var-exporter (v5.4.8 => v5.4.9): Extracting archive
  - Upgrading symfony/cache (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/framework-bundle (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/string (v5.4.8 => v5.4.9): Extracting archive
  - Upgrading symfony/security (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/security-bundle (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading guzzlehttp/guzzle (7.4.2 => 7.4.3): Extracting archive
  - Upgrading aws/aws-sdk-php (3.222.7 => 3.223.0): Extracting archive
  - Upgrading twig/twig (v3.3.10 => v3.4.1): Extracting archive
  - Upgrading symfony/twig-bridge (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading symfony/form (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading tightenco/collect (v8.83.8 => v8.83.12): Extracting archive
  - Upgrading symfony/http-client (v4.4.41 => v4.4.42): Extracting archive
  - Upgrading php-http/discovery (1.14.1 => 1.14.2): Extracting archive
  - Upgrading maennchen/zipstream-php (2.1.0 => 2.2.1): Extracting archive
  - Upgrading giggsey/libphonenumber-for-php (8.12.48 => 8.12.49): Extracting archive
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

What about running composer global require symfony/thanks && composer thanks now?
This will spread some 💖  by sending a ★  to the GitHub repositories of your fellow package maintainers.

Scaffolding files for mautic/core-lib:
  - Copy [project-root]/bin/console from assets/scaffold/files/console
  - Copy [web-root]/upgrade.php from assets/scaffold/files/upgrade.php

Output of 'php bin/console' after running 'composer update'

$ php bin/console mautic:update:find
PHP Warning:  require_once(/mautic-path/bin/../app/autoload.php): failed to open stream: No such file or directory in /mautic-path/bin/console on line 21
PHP Fatal error:  require_once(): Failed opening required '/mautic-path/bin/../app/autoload.php' (include_path='.:') in /mautic-path/bin/console on line 21

After correcting this issue with patch from https://github.com/mautic/mautic/issues/10957 :

$ php bin/console mautic:update:find
Version 4.3.1 of Mautic is available for download. Please visit https://github.com/mautic/mautic/releases/tag/4.3.1 for more information.
To update, you can run 'php bin/console mautic:update:apply' from the command line.

$ php bin/console mautic:update:apply
You have Composer updates enabled. This means that you can only update Mautic through the 'composer update' command. Read more in the documentation: https://mau.tc/switch-to-composer

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@trianity trianity added bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged labels May 27, 2022
@RCheesley
Copy link
Sponsor Member

Hi there,

The instructions for updating with Composer are here: https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer#updating-mautic-core

Does that make any difference?

We are working on improving the docs in our port to Read the Docs: https://mautic-documentation.readthedocs.io/en/latest/ - I think we probably need a separate section on updating with the recommended project setup, do you think so too?

@trianity
Copy link
Author

@RCheesley Hi Ruth,
Thanks for the update.
Using Composer update from the link above give the following output:

$ composer update mautic/core-lib --with-dependencies
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

Scaffolding files for mautic/core-lib:
  - Copy [project-root]/bin/console from assets/scaffold/files/console

After updating the composer packages (in the previous test) there was no updates.
The mautic/core-lib was untouched but this is normal, if the composer.json fixing the version, and do not give possibility to change.
The installed composer.json contains this lines:

  "require": {
    "composer/installers": "^1.11",
    "mautic/core-composer-scaffold": "4.x-dev",
    "mautic/core-project-message": "4.x-dev",
    "mautic/core-lib": "4.2.2",
    "mautic/grapes-js-builder-bundle": "4.2.2",
    "mautic/plugin-citrix": "4.2.2",
    "mautic/plugin-clearbit": "4.2.2",
    "mautic/plugin-cloudstorage": "4.2.2",
    "mautic/plugin-crm": "4.2.2",
    "mautic/plugin-emailmarketing": "4.2.2",
    "mautic/plugin-focus": "4.2.2",
    "mautic/plugin-fullcontact": "4.2.2",
    "mautic/plugin-gmail": "4.2.2",
    "mautic/plugin-outlook": "4.2.2",
    "mautic/plugin-social": "4.2.2",
    "mautic/plugin-tagmanager": "4.2.2",
    "mautic/plugin-zapier": "4.2.2",
    "mautic/theme-aurora": "4.2.2",
    "mautic/theme-blank": "4.2.2",
    "mautic/theme-brienz": "4.2.2",
    "mautic/theme-cards": "4.2.2",
    "mautic/theme-coffee": "4.2.2",
    "mautic/theme-confirmme": "4.2.2",
    "mautic/theme-fresh-center": "4.2.2",
    "mautic/theme-fresh-fixed": "4.2.2",
    "mautic/theme-fresh-left": "4.2.2",
    "mautic/theme-fresh-wide": "4.2.2",
    "mautic/theme-goldstar": "4.2.2",
    "mautic/theme-mauve": "4.2.2",
    "mautic/theme-nature": "4.2.2",
    "mautic/theme-neopolitan": "4.2.2",
    "mautic/theme-oxygen": "4.2.2",
    "mautic/theme-paprika": "4.2.2",
    "mautic/theme-skyline": "4.2.2",
    "mautic/theme-sparse": "4.2.2",
    "mautic/theme-sunday": "4.2.2",
    "mautic/theme-vibrant": "4.2.2",
    "mautic/theme-trulypersonal": "4.2.2"
  },

The composer required version should be e.g. "^4.2.2" for the possibilities of the update.

@trianity
Copy link
Author

The last step of the composer command in this case also recreated the bug solved by patch from #10957

The output of the console command was:

$ php bin/console cache:clear -v
PHP Warning:  require_once(/mautic-path/bin/../app/autoload.php): failed to open stream: No such file or directory in /mautic-path/bin/console on line 21
PHP Fatal error:  require_once(): Failed opening required '/mautic-path/bin/../app/autoload.php' (include_path='.:') in /mautic-path/bin/console on line 21

@trianity
Copy link
Author

Changing the "mautic/core-lib": "4.2.2" to "mautic/core-lib": "^4.2.2", the composer update can run with output:

$ composer update mautic/core-lib --with-dependencies
Loading composer repositories with package information 
Updating dependencies
Lock file operations: 1 install, 2 updates, 0 removals
  - Locking beberlei/doctrineextensions (v1.3.0)
  - Upgrading jms/serializer-bundle (3.10.0 => 4.0.2)
  - Upgrading mautic/core-lib (4.2.2 => 4.3.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 2 updates, 0 removals
  - Downloading beberlei/doctrineextensions (v1.3.0)
  - Downloading jms/serializer-bundle (4.0.2)
  - Downloading mautic/core-lib (4.3.1)
  - Installing beberlei/doctrineextensions (v1.3.0): Extracting archive
  - Upgrading jms/serializer-bundle (3.10.0 => 4.0.2): Extracting archive
  - Upgrading mautic/core-lib (4.2.2 => 4.3.1): Extracting archive
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

What about running composer global require symfony/thanks && composer thanks now?
This will spread some 💖  by sending a ★  to the GitHub repositories of your fellow package maintainers.

Scaffolding files for mautic/core-lib:
  - Copy [project-root]/Gruntfile.js from assets/scaffold/files/Gruntfile.js
  - Copy [project-root]/package.json from assets/scaffold/files/package.json
  - Copy [project-root]/package-lock.json from assets/scaffold/files/package-lock.json
  - Copy [project-root]/bin/console from assets/scaffold/files/console
  - Copy [project-root]/autoload.php from assets/scaffold/files/autoload.php
  - Copy [web-root]/media/js/mautic-form-src.js from assets/js/mautic-form-src.js
  - Copy [web-root]/media/css/mediaelementplayer.css from assets/css/mediaelementplayer.css
  - Copy [web-root]/media/css/mediaelementplayer.min.css from assets/css/mediaelementplayer.min.css
  - Copy [web-root]/media/css/modal.css from assets/css/modal.css
  - Copy [web-root]/media/css/modal.min.css from assets/css/modal.min.css

@trianity
Copy link
Author

After Mautic's core update the 'php bin/console cache:clear' command failed with the following output:

$ php bin/console cache:clear -v

In DecoratorFactory.php line 45:
                                                                                                                                                                                                                       
  [ArgumentCountError]                                                                                                                                                                                                 
  Too few arguments to function Mautic\LeadBundle\Segment\Decorator\DecoratorFactory::__construct(), 5 passed in /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php on l  
  ine 5216 and exactly 6 expected                                                                                                                                                                                      
                                                                                                                                                                                                                       

Exception trace:
  at /mautic-path/docroot/app/bundles/LeadBundle/Segment/Decorator/DecoratorFactory.php:45
 Mautic\LeadBundle\Segment\Decorator\DecoratorFactory->__construct() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5216
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Lead_Model_LeadSegmentDecoratorFactoryService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5226
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Lead_Model_LeadSegmentFilterFactoryService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5256
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Lead_Model_LeadSegmentServiceService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5278
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Lead_Model_ListService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5102
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Lead_Model_FieldService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:5580
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Plugin_Model_PluginService() at /mautic-path/docroot/var/cache/prod/ContainerLFW3n9K/appAppKernelProdContainer.php:4754
 ContainerLFW3n9K\appAppKernelProdContainer->getMautic_Helper_IntegrationService() at /mautic-path/vendor/symfony/dependency-injection/Container.php:257
 Symfony\Component\DependencyInjection\Container->make() at /mautic-path/vendor/symfony/dependency-injection/Container.php:231
 Symfony\Component\DependencyInjection\Container->get() at /mautic-path/docroot/plugins/MauticCitrixBundle/MauticCitrixBundle.php:27
 MauticPlugin\MauticCitrixBundle\MauticCitrixBundle->boot() at /mautic-path/docroot/app/AppKernel.php:259
 AppKernel->boot() at /mautic-path/vendor/symfony/framework-bundle/Console/Application.php:169
 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /mautic-path/vendor/symfony/framework-bundle/Console/Application.php:75
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /mautic-path/vendor/symfony/console/Application.php:149
 Symfony\Component\Console\Application->run() at /mautic-path/bin/console:42

@trianity
Copy link
Author

@RCheesley Yes, I agree: we probably need a separate section on updating with the recommended project setup.

@remyPulse
Copy link

remyPulse commented Jun 1, 2022

Any solution ? we have a version ready to go but not usable in real life :(
i follow explanation here : https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer#updating-mautic-core but i end up to the same situation.

Note : i was able to by pass this issue with an old dirty command :

cd docroot/app/cache/prod

rm -rf *

How can i update mautic and have all command to work as expected using official command and not tricks ?

@trianity
Copy link
Author

trianity commented Jun 1, 2022

Hello @remyPulse Yes, you should delete the cash manually. I’ve since done several successful updates on my test server, but I haven’t had time to describe the exact step order for anyone to follow. But I'm trying to post it today.

@jvkroeger
Copy link

jvkroeger commented Jun 1, 2022

Hi @trianity,

on my server these steps worked:

How-To update a composer based Mautic 4.2
Create a backup
sudo cp -pr /var/www/mautic /var/www/mautic.backup

composer.json is too restricted in 4.2.2. replace all occurrences of 4.2.2 with ^4.0 using:
sed -ri 's/("mautic\/[a-z\-]+": )"4.2.2"/\1"^4.0"/g' composer.json

Update mautic using:
composer update mautic/* --with-dependencies

Clear cache:
rm -rf /var/www/mautic/docroot/var/cache/*

Restore old Config from Backup:
cp /var/www/mautic.backup/docroot/app/config/local.php /var/www/mautic/docroot/app/config/local.php

I have posted this yesterday on Slack (https://www.mautic.org/slack).

As I am no Mautic developer and more or less a newbie in mautic, I cannot guarantee that this works for any other composer based installation. But maybe it helps.

@trianity
Copy link
Author

trianity commented Jun 4, 2022

Hi @trianity,

on my server these steps worked:

How-To update a composer based Mautic 4.2 Create a backup sudo cp -pr /var/www/mautic /var/www/mautic.backup

composer.json is too restricted in 4.2.2. replace all occurrences of 4.2.2 with ^4.0 using: sed -ri 's/("mautic\/[a-z\-]+": )"4.2.2"/\1"^4.0"/g' composer.json

Update mautic using: composer update mautic/* --with-dependencies

Clear cache: rm -rf /var/www/mautic/docroot/var/cache/*

Restore old Config from Backup: cp /var/www/mautic.backup/docroot/app/config/local.php /var/www/mautic/docroot/app/config/local.php

I have posted this yesterday on Slack (https://www.mautic.org/slack).

As I am no Mautic developer and more or less a newbie in mautic, I cannot guarantee that this works for any other composer based installation. But maybe it helps.

@jvkroeger Thanks for posting these steps. I used in my test server equivalent steps with the following add-ons:

  • it is recommended that you also back up the database before updating Mautic.
mysqldump -u <user> -p <password> mautic_database | gzip > /backup/mautic_database_2022_06_04.sql.gz

The full update is running with the following command also:

composer update

After restoring the old Config from Backup you should turn off the composer updates settings in the local.php

'composer_updates' => 0, //if it is set to 1 the 'php bin/console mautic:update:apply --finish' will not run

Run the commands:

php bin/console mautic:update:apply --finish
php bin/console doctrine:migration:migrate --no-interaction
php bin/console cache:clear

And finally turn on the composer updates settings in the local.php

'composer_updates' => 1,

The above steps handled all update related jobs in my test and in a production Mautic instance also at me.

@RCheesley Ruth, if you can confirm necessity these steps then it would be great to update documentation for the Mautic update with composer installation.

@saschafoerster
Copy link

@trianity with your help and steps I could make it work, thanks! But still, upgrading since the switch to composer is mostly error and the documentation of your trials helped me out.

@RCheesley RCheesley added composer Any bugs or PRs relating to composer and removed needs-triage For new issues/PRs that need to be triaged labels Jun 21, 2022
@stale
Copy link

stale bot commented Sep 20, 2022

This issue or PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like to keep it open please let us know by replying and confirming that this is still relevant to the latest version of Mautic and we will try to get to it as soon as we can. Thank you for your contributions.

@stale stale bot added the stale Issues which have not received an update within 90 days label Sep 20, 2022
@PointClickDigital
Copy link

PointClickDigital commented Oct 4, 2022

I can confirm this is still an issue when attempting to update from Mautic version 4.4.2 -> 4.4.3, previously recommended fixes also do not work as they are using command line update syntax which yields an error message:

"You have Composer updates enabled. This means that you can only update Mautic through the 'composer update' command. Read more in the documentation: https://mau.tc/switch-to-composer"

Has anyone resolved this issue yet?

Full output from running composer update command:

`Loading composer repositorUpdating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package lightsaml/lightsaml is abandoned, you should avoid using it. Use litesaml/lightsaml instead.
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
141 packages you are using are looking for funding.
Use the "composer fund" command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

Executing script php -r "if(file_exists('./.git')&&file_exists('./build/hooks/pre-commit'.(PHP_OS=='WINNT'?'.win':''))){copy('./build/hooks/pre-commit'.(PHP_OS=='WINNT'?'.win':''),'./.git/hooks/pre-commit');} if(file_exists('./.git')&&file_exists('./build/hooks/post-checkout')){copy('./build/hooks/post-checkout','./.git/hooks/post-checkout');}" [OK]
Executing script php -r "if(file_exists('./.git/hooks/pre-commit')&&(PHP_OS!='WINNT')){chmod('./.git/hooks/pre-commit',0755);} if(file_exists('./.git/hooks/post-checkout')&&(PHP_OS!='WINNT')){chmod('./.git/hooks/post-checkout',0755);}" [OK]

find . -mindepth 2 -type d -name .git | xargs rm -rf
No security vulnerability advisories found
root@host:/home/engage.attractvirtual.com/public_html# php bin/console mautic:update:apply --finish
You have Composer updates enabled. This means that you can only update Mautic through the 'composer update' command. Read more in the documentation: https://mau.tc/switch-to-composer
`

@stale stale bot removed the stale Issues which have not received an update within 90 days label Oct 4, 2022
@stremshs
Copy link

Hi everyone,
I confirm I'm having the same issue : Using command composer update mautic/core-lib --with-dependencies command did update packages, but not Mautic core (I'm still seeing v4.4.3 in the footer and when executing console -V command)

I ran console doctrine:migration:migrate (found nothing to update)
and then emptied the cache :

rm -rf ./docroot/var/cache/*
console cache:clear

Here is my composer update log :

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 14 updates, 0 removals
  - Upgrading aws/aws-sdk-php (3.240.11 => 3.242.1)
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2)
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-icu (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php74 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0)
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 14 updates, 0 removals
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0)
  - Upgrading aws/aws-sdk-php (3.240.11 => 3.242.1)
  - Upgrading symfony/polyfill-intl-icu (v1.26.0 => v1.27.0)
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2)
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php74 (v1.26.0 => v1.27.0)
Package lightsaml/lightsaml is abandoned, you should avoid using it. Use litesaml/lightsaml instead.
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
110 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
[ywop2408@ecrou mautic5]$ /opt/alt/php74/usr/bin/php -d memory_limit=-1 ~/.composer/composer.phar update mautic/core-lib --with-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 14 updates, 0 removals
  - Upgrading aws/aws-sdk-php (3.240.11 => 3.242.1)
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2)
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-icu (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php74 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 14 updates, 0 removals
  - Downloading symfony/polyfill-php80 (v1.27.0)
  - Downloading symfony/polyfill-php72 (v1.27.0)
  - Downloading symfony/polyfill-php73 (v1.27.0)
  - Downloading symfony/polyfill-mbstring (v1.27.0)
  - Downloading symfony/polyfill-ctype (v1.27.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
  - Downloading symfony/polyfill-intl-idn (v1.27.0)
  - Downloading symfony/polyfill-php81 (v1.27.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.27.0)
  - Downloading aws/aws-sdk-php (3.242.1)
  - Downloading symfony/polyfill-intl-icu (v1.27.0)
  - Downloading nikic/php-parser (v4.15.2)
  - Downloading symfony/polyfill-iconv (v1.27.0)
  - Downloading symfony/polyfill-php74 (v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading aws/aws-sdk-php (3.240.11 => 3.242.1): Extracting archive
  - Upgrading symfony/polyfill-intl-icu (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2): Extracting archive
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0): Extracting archive
  - Upgrading symfony/polyfill-php74 (v1.26.0 => v1.27.0): Extracting archive
Package lightsaml/lightsaml is abandoned, you should avoid using it. Use litesaml/lightsaml instead.
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
110 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

What about running composer global require symfony/thanks && composer thanks now?
This will spread some 💖  by sending a ★  to the GitHub repositories of your fellow package maintainers.

Scaffolding files for mautic/core-lib:
  - Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
No security vulnerability advisories found

Here is the result if I run composer update again :

Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package lightsaml/lightsaml is abandoned, you should avoid using it. Use litesaml/lightsaml instead.
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
110 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

No security vulnerability advisories found

@stale
Copy link

stale bot commented Feb 18, 2023

This issue or PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like to keep it open please let us know by replying and confirming that this is still relevant to the latest version of Mautic and we will try to get to it as soon as we can. Thank you for your contributions.

@stale stale bot added the stale Issues which have not received an update within 90 days label Feb 18, 2023
@saschafoerster
Copy link

👀

Copy link
Sponsor Member

@stale stale bot removed the stale Issues which have not received an update within 90 days label Feb 20, 2023
@Mancy
Copy link

Mancy commented Mar 3, 2023

same error here for 4.x and 5.x versions,

# composer install
Installing dependencies from lock file (including require-dev)
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>`.
Nothing to install, update or remove
Package lightsaml/lightsaml is abandoned, you should avoid using it. Use litesaml/lightsaml instead.
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/security is abandoned, you should avoid using it. No replacement was suggested.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.```

@stremshs
Copy link

Have you read the documentation here:

https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer#updating-mautic-core

I sure did.
And I'm pretty sure I followed step by step.

@stale
Copy link

stale bot commented Jul 14, 2023

This issue or PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like to keep it open please let us know by replying and confirming that this is still relevant to the latest version of Mautic and we will try to get to it as soon as we can. Thank you for your contributions.

@stale stale bot added the stale Issues which have not received an update within 90 days label Jul 14, 2023
@stale
Copy link

stale bot commented Aug 7, 2023

This issue or PR has been automatically closed because it has not had recent activity. In the case of issues, if it persists in the latest version of Mautic, please create a new issue and link back to this one for reference. With PRs if you wish to pick up the PR and update it so that it can be considered for a future release, please comment and we will re-open it. Thank you for your contributions.

@stale stale bot closed this as completed Aug 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If this issue is continuing with the lastest stable version of Mautic, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs composer Any bugs or PRs relating to composer stale Issues which have not received an update within 90 days
Projects
None yet
Development

No branches or pull requests

8 participants