Download the PHP package ttree/flowplatformsh without Composer

On this page you can find all versions of the php package ttree/flowplatformsh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flowplatformsh

Platform.sh for Flow Framework made easy

Flow framework utility package to parse Platform.sh variables

Configure your distribution to deploy on Platform.sh

composer require ttree/flowplatformsh
./flow platform:bootstrap --id fajq56c55mc5s --host eu.platform.sh --database MySQL|PostgreSQL

Check and modify the configuration to match your project:

Run a command during Build or Deploy hook

You can run any Flow CLI commands during build or deploy hook. Remember that during Build hook you don't have access to services (database, cache, ...). This the default configuration:

Ttree:
  FlowPlatformSh:
    buildHooks:
      commands:
        'flow:package:rescan': true
    deployHooks:
      commands:
        'flow:cache:flush': true
        'flow:cache:warmup': true
        'flow:doctrine:migrate': true

You can set the value to to disable a command. If the value is an array, the array is passed as command arguments:

Ttree:
  FlowPlatformSh:
   deployHooks:
     commands:
      'ttree.neosplatformsh:platform:createadminaccount':
        username: 'admin'
        password: 'changeme'
      'ttree.neosplatformsh:platform:importsitepackage':
        package: 'Neos.Demo'

Check that your execute and in the respective hook.

You can use a custom FLOW_CONTEXT during the build hook to avoid issue when Flow try to connect to redis cache, like this :

variables:
  env:
    FLOW_CONTEXT: 'Production/PlatformSh'
    FLOW_PATH_TEMPORARY_BASE: '/tmp'
    FLOW_REWRITEURLS: 1

hooks:
  build: |
    set -e
    export FLOW_CONTEXT=${FLOW_CONTEXT}Build
    php flow platform:build
  deploy: |
    set -e
    php flow platform:deploy

Check the command controller in Ttree.NeosPlatformSh.

How to configure

This file extract variables from and create env variables that you can use in your configuration (, , ...). Every line contains the variable name and the path to get the variable content from .

DATABASE_HOST = database.0.host
DATABASE_PORT = database.0.port
DATABASE_NAME = database.0.path
DATABASE_USER = database.0.username
DATABASE_PASSWORD = database.0.password

REDIS_HOST = redis.0.host
REDIS_PORT = redis.0.port

REDIS_ALTERNATIVE_HOST = redis.1.host
REDIS_ALTERNATIVE_PORT = redis.1.port

ELASTICSEARCH_HOST = elasticsearch.0.host
ELASTICSEARCH_PORT = elasticsearch.0.port

Then you can edit your to use the new env variables:

Neos:
  Flow:
    persistence:
      backendOptions:
        driver: pdo_pgsql
        dbname: '%env:DATABASE_NAME%'
        port: '%env:DATABASE_PORT%'
        user: '%env:DATABASE_USER%'
        password: '%env:DATABASE_PASSWORD%'
        host: '%env:DATABASE_HOST%'

Push local data to platform.sh

You can sync a local project data (resources and databases) to platform with the following command:

./flow platform:push --directory Data/Persistent --publish --database --migrate --environment master

You can provide the path to your local with the paramater .

The options run the resources publishing after the rsync command on the remote server.

The options and clone the local database and run migration on the remote server.

The options create a snapshot of the current platform environement before the synchronzation.

The options , default , allow to target specific platform environment.

The options flush all remote caches after the synchronization.

The options preview the commands and execute nothing.

The options non interactive mode.

Warning: Currently we push only files and databases, if you use ElasticSearch you need to rebuild the index manually.

You should see this output:

Local -> platform.sh

    + Create Snapshot
    + Sync directory Data/Persistent
    + Publish resources
    + Clone database
    + Migrate database

Pull data from platform.sh to your local setup

You can sync a local project data (resources and databases) from a platform environment with the following command:

./flow platform:pull --directory Data/Persistent --publish --database --migrate --environment master

You can provide the path to your local with the paramater .

The options run the resources publishing after the rsync command on the remote server.

The options and clone the remote database and run migration on the local server.

The options , default , allow to target specific platform environment.

The options flush all local caches after the synchronization.

The options preview the commands and execute nothing.

The options non interactive mode.

Warning: Currently we pull only files and databases, if you use ElasticSearch you need to rebuild the index manually.

You should see this output:

platform.sh -> Local

    + Sync directory Data/Persistent
    + Publish resources
    + Clone database
    + Migrate database
    + Flush all caches

I use docker locally to host my database, the push command failed

You can use a custom dump command, by editing your , by example for PostgreSQL:

Ttree:
  FlowPlatformSh:
    commands:
      push:
        dump:
          pgsql:
            '*': 'docker exec -e "PGPASSWORD=@PASSWORD@" -t [docker-container-name] pg_dump -c -b -d @DBNAME@ -U @USER@ > Data/Temporary/PlatformShDump-@[email protected]'
      pull:
        restore:
          pgsql:
            '*': 'cat Data/Temporary/PlatformShDump-@[email protected] | docker exec -e "PGPASSWORD=@PASSWORD@" -i [docker-container-name] psql --host=@HOST@ -U@USER@ @DBNAME@'

Replace by the name or the identifier of the PostgreSQL container.

Acknowledgments

Development sponsored by ttree ltd - neos solution provider.

We try our best to craft this package with a lots of love, we are open to sponsoring, support request, ... just contact us.

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of flowplatformsh with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
neos/flow Version ^4.0 || ^5.0
m1/env Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ttree/flowplatformsh contains the following files

Loading the files please wait ....