Loading...
 
Skip to main content

History: How to upgrade Cypht within Tiki via Composer

Source of version: 49 (current)

Copy to clipboard
((Cypht integration|Cypht Webmail)) is included in Tiki.

Tiki periodically gets latest code from https://packagist.org/packages/jason-munro/cypht via ((Composer)). Well, indirectly, because it first goes via ((composer-tiki-org))

After getting Cypht, the following script is ran: https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/core/Tiki/Composer/PatchCypht.php as part of https://gitlab.com/tikiwiki/tiki/-/blob/master/vendor_bundled/composer.json

This page explains how to update. Please note that Cypht depends on https://packagist.org/packages/henrique-borba/php-sieve-manager so we'll as well want something like{CODE()}"henrique-borba/php-sieve-manager": "^1.0.0",{CODE}

!! Trunk/master (future Tiki30)
Tiki trunk gets Cypht master, so we are always testing the latest innovations. Thus, https://gitlab.com/tikiwiki/tiki/-/blob/master/vendor_bundled/composer.json contains {CODE()}"jason-munro/cypht": "dev-master",{CODE}

# Get latest Tiki code
# {CODE(caption="Run from Tiki root directory to update just Cypht" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev jason-munro/cypht{CODE} %%% {CODE(caption="Run from Tiki root directory to update all dependencies (use this to commit to upstream)" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev{CODE}
** This will modify vendor_bundled/composer.lock and perhaps lib/cypht/site.js and lib/cypht/site.css (these 2 last files [https://gitlab.com/tikiwiki/tiki/-/commit/8ff29ea621c59e410443012af47f8730068acf9a|are now ignored by Git])
# Review changes and commit

!! 29x
Just use same pattern as 27.x
It is not an LTS

!! 27x
((Tiki27)) is a long term support (supported for 5 years) and bundles Cypht 2.x.y. Thus https://gitlab.com/tikiwiki/tiki/-/blob/27.x/vendor_bundled/composer.json contains the following: {CODE()}"jason-munro/cypht": "^2.0",{CODE}

# Get latest Tiki code
# {CODE(caption="Run from Tiki root directory to update just Cypht" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev jason-munro/cypht{CODE} %%% {CODE(caption="Run from Tiki root directory to update all dependencies (use this to commit to upstream)" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev{CODE}
** This will modify vendor_bundled/composer.lock and perhaps lib/cypht/site.js and lib/cypht/site.css (these 2 last files [https://gitlab.com/tikiwiki/tiki/-/commit/258e5ed084d447cf55f90a5c65bbbef48345169c|are now ignored by Git])
# Review changes and commit (along with changes to -+vendor_bundled/composer.json+-, if any)

!! 24x
((Tiki24)) is a long term support (supported for 5 years) and bundles Cypht 1.4.x. Thus https://gitlab.com/tikiwiki/tiki/-/blob/24.x/vendor_bundled/composer.json contains the following: {CODE()}"jason-munro/cypht": "^1.4",{CODE}

# Get latest Tiki code
# {CODE(caption="Run from Tiki root directory to update just Cypht" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev jason-munro/cypht{CODE} %%% {CODE(caption="Run from Tiki root directory to update all dependencies (use this to commit to upstream)" theme="default")}./temp/composer.phar update --prefer-dist --working-dir="vendor_bundled" --no-dev{CODE}
** This will modify vendor_bundled/composer.lock and perhaps lib/cypht/site.js and lib/cypht/site.css (these 2 last files [https://gitlab.com/tikiwiki/tiki/-/commit/258e5ed084d447cf55f90a5c65bbbef48345169c|are now ignored by Git])
# Review changes and commit (along with changes to -+vendor_bundled/composer.json+-, if any)

!!- 21x
__The Cypht integration in Tiki21 is not good and you really should upgrade to 24.x+__
As of 2021-10-03, ((Tiki21)) uses "jason-munro/cypht": ">=1.3.0", in https://gitlab.com/tikiwiki/tiki/-/blob/21.x/vendor_bundled/composer.json and we are working so that recent fixes are part of a stable release.
Show PHP error messages