We are proud to release a new major version of the Platform.sh CLI. We got some great feedback from you and there are some major changes to the way the CLI works… so you should pay attention …
This post will help you with updating your CLI installation, and it will explain some of the major changes.
You can update with the command:
platform self-update (but do read this first).
The Platform.sh CLI version 3.0.0 includes a major change to the way it structures your files.
Previously the CLI always needed your project to have all its code inside a
repository subdirectory, and it kept its own data one level up, in files such as
builds , and a
www symlink. Example structure with the CLI version 2.x.x:
$ ls -A1 my-project .platform-project builds repository www $ ls -A1 my-project/repository .git .platform .platform.app.yaml # and your project's files
This worked well, but it was always a little bit confusing for new users, and it works differently from many other CLI tools. It also means the CLI could not recognise a project from a plain repository (fetched via
git clone ) - now it can.
So, the CLI version 3 has changed the file structure. It runs directly inside your project’s repository.
Example structure with the CLI version 3.x.x:
$ ls -A1 my-project .git .platform .platform.app.yaml _www # and your project's files
For each project, the CLI will prompt you to ‘migrate’ to the new file structure. You can do this by accepting the prompt, or you can manually run the command:
platform legacy-migrate . A backup of your project will be created to ensure you do not lose any data.
The CLI version 3 has a different location for the local “web root” symlink: it has changed from
_www . This is to avoid conflicts with files in your repository.
The web root will only exist if you run the command:
You may need to update your local web server configuration: just change
The CLI version 3 keeps its own metadata about your project inside a folder named
.platform/local/ . This is automatically excluded from Git.
Because of new dependencies, version 3 requires PHP version 5.5.9 as a minimum. It is tested with PHP 5.5, 5.6, 7.0, and HHVM.