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
Comments
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? |
@RCheesley Hi Ruth,
After updating the composer packages (in the previous test) there was no updates.
The composer required version should be e.g. "^4.2.2" for the possibilities of the update. |
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:
|
Changing the "mautic/core-lib": "4.2.2" to "mautic/core-lib": "^4.2.2", the composer update can run with output:
|
After Mautic's core update the 'php bin/console cache:clear' command failed with the following output:
|
@RCheesley Yes, I agree: we probably need a separate section on updating with the recommended project setup. |
Any solution ? we have a version ready to go but not usable in real life :( Note : i was able to by pass this issue with an old dirty command :
How can i update mautic and have all command to work as expected using official command and not tricks ? |
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. |
Hi @trianity, on my server these steps worked: How-To update a composer based Mautic 4.2 composer.json is too restricted in 4.2.2. replace all occurrences of 4.2.2 with ^4.0 using: Update mautic using: Clear cache: Restore old Config from Backup: 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:
The full update is running with the following command also:
After restoring the old Config from Backup you should turn off the composer updates settings in the local.php
Run the commands:
And finally turn on the composer updates settings in the local.php
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. |
@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. |
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. |
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 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]
|
Hi everyone, I ran
Here is my composer update log :
Here is the result if I run composer update again :
|
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. |
👀 |
Have you read the documentation here: |
same error here for 4.x and 5.x versions,
|
I sure did. |
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. |
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. |
|
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
Code of Conduct
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: