From bb9634025448521d6edc53e17f012042c88cbb84 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Tue, 9 Apr 2024 10:57:03 +0100 Subject: [PATCH 1/4] Added v19 upgrade document --- other-docs/guides/upgrading/v19.md | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 other-docs/guides/upgrading/v19.md diff --git a/other-docs/guides/upgrading/v19.md b/other-docs/guides/upgrading/v19.md new file mode 100644 index 00000000..15795ab3 --- /dev/null +++ b/other-docs/guides/upgrading/v19.md @@ -0,0 +1,85 @@ +--- +order: 19 +--- + +# Upgrading to v19 + +_If you are migrating from WordPress to Altis, check out +the [migrating guide](../migrating/) first._ + +To upgrade to Altis v19, edit your `composer.json` and change the version +constraint for `altis/altis` and any local environment modules to `^19.0.0`. + +```json +{ + "require": { + "altis/altis": "^19.0.0" + }, + "require-dev": { + "altis/local-server": "^19.0.0" + }, + "config": { + "platform": { + "php": "8.1" + } + } +} +``` + +Once you have made these changes, run `composer update` and then run +the `wp altis migrate` command: + +```sh +# For cloud environments +wp altis migrate + +# For local server +composer server cli -- altis migrate +``` + +## Breaking Changes + +## Changes to the Altis platform + +### PHP + +PHP 8.1 and 8.2 are our recommended versions of PHP for Altis. Note that there are a small number of exceptions to +Compatibility in the core WordPress CMS module. See the [WordPress +documentation on compatibility](https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/) +for more information. + +PHP 8.0 is no longer supported in Altis. + +Refer to our [PHP Version Guide](docs://guides/updating-php/) for up-to-date +compatibility, testing and upgrading information. + +## Headline Features + +### WordPress 6.5.0 + +WordPress 6.5.0 brings lots of new features, bug fixes, and improvements. There are hundreds of enhancements, new +features, bug fixes, and more. The block editor alone has almost 100 updates. These improvements +include: + +- Performance and accessibility enhancements, +- Performant Translations, +- Block– and Site–Editor Unification, +- A new Font Library, and design tool enhancements + +See the +[WordPress 6.5 Field Guide](https://make.wordpress.org/core/2024/03/15/wordpress-6-5-field-guide/) for more +information. + +There are new and improved features of interest to developers such as: + +- The Block Bindings and Interactivity APIs, +- Classic themes and Site Editor updates, +- Native JavaScript module support, +- Plugin dependencies, and more. + +### Altis Dashboard + + +### Altis Core improvements + +We have incorporated many updates to modules and libraries in Altis to bring in important bug fixes and improvements. From 9ce4e8fc4496921762eadc45cf16c948fda682db Mon Sep 17 00:00:00 2001 From: Mike Little Date: Tue, 9 Apr 2024 11:03:13 +0100 Subject: [PATCH 2/4] Add v19 example and link to v19 upgrade guide Remove support for php 8.0 in v19 Remove v14 mention in updating-php guide --- other-docs/guides/updating-php/README.md | 2 +- other-docs/guides/upgrading/README.md | 26 ++++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/other-docs/guides/updating-php/README.md b/other-docs/guides/updating-php/README.md index d1adf881..84ab4575 100644 --- a/other-docs/guides/updating-php/README.md +++ b/other-docs/guides/updating-php/README.md @@ -12,11 +12,11 @@ There are 2 key steps to getting ready for a new version of PHP: | Altis | PHP 8.0 | PHP 8.1 | PHP 8.2 | |-------|----------------|---------------|----------------| +| v19 | | **Supported** | *Supported* | | v18 | **Deprecated** | **Supported** | *Supported* | | v17 | **Deprecated** | **Supported** | *Experimental* | | v16 | **Deprecated** | **Supported** | *Experimental* | | v15 | **Deprecated** | **Supported** | *Experimental* | -| v14 | **Deprecated** | **Supported** | | ## Checking PHP Version Compatibility diff --git a/other-docs/guides/upgrading/README.md b/other-docs/guides/upgrading/README.md index 6a3f9981..26801d65 100644 --- a/other-docs/guides/upgrading/README.md +++ b/other-docs/guides/upgrading/README.md @@ -6,35 +6,45 @@ order: 0 _If you are migrating an existing install to Altis check out the [migrating guide](../migrating/) first._ -When new versions of Altis are released you will need to manually upgrade your project to the new version. New versions can bring anything from breaking changes to new features. It's important you read the changelog / upgrade notes for the specific version you are upgrading to. When upgrading multiple versions at once, be sure to follow the release notes on all intermediate versions. +When new versions of Altis are released you will need to manually upgrade your project to the new version. New versions +can bring anything from breaking changes to new features. It's important you read the changelog / upgrade notes for the +specific version you are upgrading to. When upgrading multiple versions at once, be sure to follow the release notes on +all intermediate versions. -To switch the version of Altis for your project, modify the version constraint for the `altis/altis` dependency in your `composer.json`. For example, to upgrade to Altis version 18. +To switch the version of Altis for your project, modify the version constraint for the `altis/altis` dependency in +your `composer.json`. For example, to upgrade to Altis version 19. ```json { "name": "company-name/my-site", "require": { - "altis/altis": "^18.0.0" + "altis/altis": "^19.0.0" }, "require-dev": { - "altis/local-chassis": "^18.0.0", - "altis/local-server": "^18.0.0" + "altis/local-chassis": "^19.0.0", + "altis/local-server": "^19.0.0" } } ``` Next run `rm -rf vendor` on MacOS or Linux, or on Windows `rmdir vendor`. -*Note:* this is due to an issue in how Composer handles installation of `composer-plugin` type packages, and ensures the latest version of the package is used during the upgrade process. We are working to improve this process in future releases. +*Note:* this is due to an issue in how Composer handles installation of `composer-plugin` type packages, and ensures the +latest version of the package is used during the upgrade process. We are working to improve this process in future +releases. Next, run `composer update` to pull in the latest version of the packages. -This will generate a new `composer.lock` file. Both the `composer.json` and `composer.lock` should be committed to version control, and deployed. +This will generate a new `composer.lock` file. Both the `composer.json` and `composer.lock` should be committed to +version control, and deployed. -Any upgrade will usually require some modification to your project (for example, deprecated APIs, new features you may want to implement). Altis is conservative about breaking backwards compatibility. Any known issues will be prefixed with "BREAKING: " in the version release notes. +Any upgrade will usually require some modification to your project (for example, deprecated APIs, new features you may +want to implement). Altis is conservative about breaking backwards compatibility. Any known issues will be prefixed +with "BREAKING: " in the version release notes. ## Upgrade Guides +- [Version 19](./v19.md) - [Version 18](./v18.md) - [Version 17](./v17.md) - [Version 16](./v16.md) From a932346da400455073c19836a316f750b46f9255 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Tue, 9 Apr 2024 11:07:53 +0100 Subject: [PATCH 3/4] Fix formatting to standard. --- other-docs/guides/updating-php/README.md | 58 ++++++++++++++---------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/other-docs/guides/updating-php/README.md b/other-docs/guides/updating-php/README.md index 84ab4575..4362af5c 100644 --- a/other-docs/guides/updating-php/README.md +++ b/other-docs/guides/updating-php/README.md @@ -1,6 +1,7 @@ # Updating PHP Version -On occasion Altis will make a PHP version update available. Once a particular version of PHP is out of support, updating to a later version will become mandatory to help protect the security of your application. +On occasion Altis will make a PHP version update available. Once a particular version of PHP is out of support, updating +to a later version will become mandatory to help protect the security of your application. There are 2 key steps to getting ready for a new version of PHP: @@ -9,7 +10,6 @@ There are 2 key steps to getting ready for a new version of PHP: ## Altis Compatibility Chart - | Altis | PHP 8.0 | PHP 8.1 | PHP 8.2 | |-------|----------------|---------------|----------------| | v19 | | **Supported** | *Supported* | @@ -18,10 +18,10 @@ There are 2 key steps to getting ready for a new version of PHP: | v16 | **Deprecated** | **Supported** | *Experimental* | | v15 | **Deprecated** | **Supported** | *Experimental* | - ## Checking PHP Version Compatibility -**Note:** Before carrying out the following tasks locally, ensure your application is fully installed so that all code that will be deployed to the cloud is present. +**Note:** Before carrying out the following tasks locally, ensure your application is fully installed so that all code +that will be deployed to the cloud is present. ### Switch Off Composer's Platform Check @@ -29,23 +29,24 @@ In your `composer.json` you may have some code like the following: ```json { - "config": { - "platform": { - "php": "8.1" - } - } + "config": { + "platform": { + "php": "8.1" + } + } } ``` -If present, and the PHP version does not match the version you are upgrading to you should update it to reflect the new target PHP version. +If present, and the PHP version does not match the version you are upgrading to you should update it to reflect the new +target PHP version. In addition you _must_ add the following setting in the `config` property of your `composer.json` file: ```json { - "config": { - "platform-check": false - } + "config": { + "platform-check": false + } } ``` @@ -53,7 +54,8 @@ This will prevent Composer from exiting your application early while your cloud ### Update All Altis Modules -The first task is to ensure your application has the latest patch versions of all Altis modules by running the following command in your project root: +The first task is to ensure your application has the latest patch versions of all Altis modules by running the following +command in your project root: ``` composer update "altis/*" --with-all-dependencies @@ -63,7 +65,9 @@ Afterwards commit the updated `composer.lock` file. ### Run The Compatibility Check -The next step is using the PHP Compatibility package for PHP Code Sniffer. The guide belows shows you how to install and use this tool globally, however you may wish to install them directly in your project and use them in CI as part of your code linting process. +The next step is using the PHP Compatibility package for PHP Code Sniffer. The guide belows shows you how to install and +use this tool globally, however you may wish to install them directly in your project and use them in CI as part of your +code linting process. First install the standard and dependencies using the following command: @@ -85,11 +89,14 @@ This can take a long time to run so may wish to run it just in your custom code **Note:** You _must_ fix anything reported as an "Error". Warnings can be ignored at your discretion. -Fix any reported errors (ignoring those listed in the section below) by upgrading affected third party plugins and amending first party custom code as needed following your standard code review and deployment processes. +Fix any reported errors (ignoring those listed in the section below) by upgrading affected third party plugins and +amending first party custom code as needed following your standard code review and deployment processes. #### Known Warnings and Errors -There are some known warnings in the following packages that you can safely ignore. Altis guarantees its core packages and their dependencies are verified as working with the versions outlined in the compatibility chart at the top of this page. +There are some known warnings in the following packages that you can safely ignore. Altis guarantees its core packages +and their dependencies are verified as working with the versions outlined in the compatibility chart at the top of this +page. - `aws/aws-sdk-php` - `humanmade/batcache` @@ -97,13 +104,17 @@ There are some known warnings in the following packages that you can safely igno - `wp-phpunit/wp-phpunit` - `lucatume/wp-browser` -You can add these to the ignored directories in the command when checking if desired; e.g. `--ignore=vendor/aws,vendor/guzzlehttp,...`. +You can add these to the ignored directories in the command when checking if desired; +e.g. `--ignore=vendor/aws,vendor/guzzlehttp,...`. ## Requesting A Cloud Environment Update -Once you are confident that your application is compatible with the version of PHP to upgrade to you should do the following for each environment: +Once you are confident that your application is compatible with the version of PHP to upgrade to you should do the +following for each environment: -1. Create a support ticket for the target environment with the type "Task", titled "Upgrade to PHP 8.1", replacing "8.1" with the target version if necessary ( noting that the updated PHP version will not be deployed automatically until the next application deployment ). +1. Create a support ticket for the target environment with the type "Task", titled "Upgrade to PHP 8.1", replacing "8.1" + with the target version if necessary ( noting that the updated PHP version will not be deployed automatically until + the next application deployment ). 2. Wait for the Altis team to confirm the environment has been updated. 3. Deploy the updated application code. @@ -115,12 +126,13 @@ The Altis team will follow up with you on the ticket once the environment has be Once your environment has been upgraded, the PHP upgrade will take effect upon the next application deployment. - ## Re-Enable Composer's Platform Check -If you previously disabled the platform check in Composer, you can now re-enable it once everything has been upgraded. Remove the `"platform-check": false` line if you added it. +If you previously disabled the platform check in Composer, you can now re-enable it once everything has been upgraded. +Remove the `"platform-check": false` line if you added it. -Additionally, we recommend setting the PHP version explicitly, which will ensure the correct packages are installed for your PHP version. +Additionally, we recommend setting the PHP version explicitly, which will ensure the correct packages are installed for +your PHP version. The easiest way to add this is to run: From 34549272208d4fc6f8e82fc83401973fad444b47 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Mon, 22 Apr 2024 15:23:41 +0100 Subject: [PATCH 4/4] Updated guide --- other-docs/guides/upgrading/v19.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/other-docs/guides/upgrading/v19.md b/other-docs/guides/upgrading/v19.md index 15795ab3..3d868cdb 100644 --- a/other-docs/guides/upgrading/v19.md +++ b/other-docs/guides/upgrading/v19.md @@ -58,13 +58,13 @@ compatibility, testing and upgrading information. ### WordPress 6.5.0 WordPress 6.5.0 brings lots of new features, bug fixes, and improvements. There are hundreds of enhancements, new -features, bug fixes, and more. The block editor alone has almost 100 updates. These improvements -include: +features, bug fixes, and more. The block editor alone has almost 100 updates. These improvements include: - Performance and accessibility enhancements, - Performant Translations, - Block– and Site–Editor Unification, -- A new Font Library, and design tool enhancements +- A new Font Library, and design tool enhancements, and +- Support for [AVIF images](https://make.wordpress.org/core/2024/02/23/wordpress-6-5-adds-avif-support/). See the [WordPress 6.5 Field Guide](https://make.wordpress.org/core/2024/03/15/wordpress-6-5-field-guide/) for more @@ -77,9 +77,6 @@ There are new and improved features of interest to developers such as: - Native JavaScript module support, - Plugin dependencies, and more. -### Altis Dashboard - - ### Altis Core improvements We have incorporated many updates to modules and libraries in Altis to bring in important bug fixes and improvements.