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

Update mautic with composer #243

Merged
merged 10 commits into from
Feb 25, 2024
33 changes: 0 additions & 33 deletions docs/getting_started/how_to_install_mautic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -354,39 +354,6 @@ When installing the given ``composer.json`` the following occurs:

.. vale off

Updating Mautic Core
~~~~~~~~~~~~~~~~~~~~

.. vale on

The Recommended Project attempts to keep all of your Mautic core files up-to-date.

The project ``mautic/core-composer-scaffold`` updates your scaffold files whenever there is an update to ``mautic/core-lib``.

If you customize any of the "scaffolding" files - commonly .htaccess - you may need to merge conflicts if new release of Mautic Core result in changes to your modified files.

Follow the steps below to update your core files.

1 Run ``composer update mautic/core-lib --with-dependencies`` to update Mautic core and its dependencies.

2 Run ``git diff`` to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to .htaccess or others.

3 Commit everything all together in a single commit, so the ``docroot`` remains in sync with the core when checking out branches or running git bisect.

4 In the event that there are non-trivial conflicts in step 2, you may wish to perform these steps on a branch, and use ``git merge`` to combine the updated core files with your customized files. This facilitates the use of a three-way merge tool such as :xref:`kdiff3`. This setup isn't necessary if your changes are simple - keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy.

5 Run the following commands to update your database with any changes from the release:

.. code-block:: shell

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

.. vale off

Composer FAQs
=============

Expand Down
35 changes: 34 additions & 1 deletion docs/getting_started/how_to_update_mautic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,39 @@

This means that you have downloaded the files and database of your Mautic instance, and you have re-created it in a test environment somewhere and tested that everything is working as expected. This is your only recourse if there are any problems with the update. Never update without having a working, up-to-date backup.

Updating Mautic Core (with Composer based)
RCheesley marked this conversation as resolved.
Show resolved Hide resolved
******************************************
RCheesley marked this conversation as resolved.
Show resolved Hide resolved
.. vale on

The Recommended Project attempts to keep all of your Mautic core files up-to-date.

The project mautic/core-composer-scaffold updates your scaffold files whenever there is an update to mautic/core-lib.

Check failure on line 31 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Vale.Terms] Use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 31, "column": 13}}}, "severity": "ERROR"}

Check warning on line 31 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 31, "column": 13}}}, "severity": "INFO"}

Check failure on line 31 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Composer' instead of 'composer'. Raw Output: {"message": "[Vale.Terms] Use 'Composer' instead of 'composer'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 31, "column": 25}}}, "severity": "ERROR"}

Check failure on line 31 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Vale.Terms] Use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 31, "column": 102}}}, "severity": "ERROR"}

Check warning on line 31 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 31, "column": 102}}}, "severity": "INFO"}
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

If you customize any of the "scaffolding" files - commonly .htaccess - you may need to merge conflicts if new release of Mautic Core result in changes to your modified files.
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

Follow the steps below to update your core files.

1 Run composer update mautic/core-lib --with-dependencies to update Mautic core and its dependencies.

Check failure on line 37 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Composer' instead of 'composer'. Raw Output: {"message": "[Vale.Terms] Use 'Composer' instead of 'composer'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 37, "column": 7}}}, "severity": "ERROR"}

Check warning on line 37 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 37, "column": 23}}}, "severity": "INFO"}

Check failure on line 37 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Vale.Terms] Use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 37, "column": 23}}}, "severity": "ERROR"}
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

2 Run git diff to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to .htaccess or others.
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

3 Commit everything all together in a single commit, so the docroot remains in sync with the core when checking out branches or running git bisect.

Check failure on line 41 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'docroot'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'docroot'?", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 41, "column": 61}}}, "severity": "ERROR"}
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

4 In the event that there are non-trivial conflicts in step 2, you may wish to perform these steps on a branch, and use git merge to combine the updated core files with your customized files. This facilitates the use of a three-way merge tool such as :xref:`kdiff3`. This setup isn't necessary if your changes are simple - keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy.
RCheesley marked this conversation as resolved.
Show resolved Hide resolved

5 Run the following commands to update your database with any changes from the release:

.. code-block:: shell

```
RCheesley marked this conversation as resolved.
Show resolved Hide resolved
bin/console cache:clear
bin/console mautic:update:apply --finish

Check failure on line 51 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Vale.Terms] Use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 51, "column": 13}}}, "severity": "ERROR"}

Check warning on line 51 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Mautic' instead of 'mautic'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 51, "column": 13}}}, "severity": "INFO"}
bin/console doctrine:migration:migrate --no-interaction
bin/console doctrine:schema:update --no-interaction --force
bin/console cache:clear
```
RCheesley marked this conversation as resolved.
Show resolved Hide resolved


Checking for updates at the command line
========================================

Expand Down Expand Up @@ -140,4 +173,4 @@

If you don't provide the information requested as a minimum, the person who might try to help you has to ask you for it, so please save them the trouble and provide the information upfront. Also, importantly, please be polite. Mautic is an open source project, and people are giving their free time to help you.

If you are sure that you have discovered a bug and you want to report it to developers, you can :xref:`Mautic Github New Issue` on GitHub. GitHub is not the right place to request support or ask for help with configuration errors. Always post on the forums first if you aren't sure, if a bug report is appropriate this can link to the forum thread.
If you are sure that you have discovered a bug and you want to report it to developers, you can :xref:`Mautic Github New Issue` on GitHub. GitHub is not the right place to request support or ask for help with configuration errors. Always post on the forums first if you aren't sure, if a bug report is appropriate this can link to the forum thread.

Check warning on line 176 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Report' instead of 'report'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Report' instead of 'report'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 176, "column": 64}}}, "severity": "INFO"}

Check failure on line 176 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'GitHub' instead of 'Github'. Raw Output: {"message": "[Vale.Terms] Use 'GitHub' instead of 'Github'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 176, "column": 111}}}, "severity": "ERROR"}

Check warning on line 176 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Google.Contractions] Feel free to use 'isn't' instead of 'is not'. Raw Output: {"message": "[Google.Contractions] Feel free to use 'isn't' instead of 'is not'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 176, "column": 147}}}, "severity": "INFO"}

Check warning on line 176 in docs/getting_started/how_to_update_mautic.rst

View workflow job for this annotation

GitHub Actions / prose

[vale] reported by reviewdog 🐶 [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Report' instead of 'report'. Raw Output: {"message": "[Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Report' instead of 'report'.", "location": {"path": "docs/getting_started/how_to_update_mautic.rst", "range": {"start": {"line": 176, "column": 293}}}, "severity": "INFO"}
RCheesley marked this conversation as resolved.
Show resolved Hide resolved
Loading