• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog

CLI version 3.0 released

phpcli
22 March, 2016
Patrick Dawkins
Patrick Dawkins
Product Engineer

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.

Updating

You can update with the command:  platform self-update  (but do read this first).

New file structure

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  .platform-projectbuilds , 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.

New web root location.

The CLI version 3 has a different location for the local “web root” symlink: it has changed from  www  to  _www . This is to avoid conflicts with files in your repository.

The web root will only exist if you run the command:  platform build

You may need to update your local web server configuration: just change  www  to _www .

New metadata location.

The CLI version 3 keeps its own metadata about your project inside a folder named  .platform/local/ . This is automatically excluded from Git.

New PHP requirement

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.

Get the latest Platform.sh news and resources
Subscribe

Related Content

Running with FrankenPHP on Platform.sh

Running with FrankenPHP on Platform.sh

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺