Download the PHP package swisscom/commandmigration without Composer

On this page you can find all versions of the php package swisscom/commandmigration. 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 commandmigration

Swisscom.CommandMigration

Neos Flow package for framework based CLI command migrations.

The package allows to create migration scripts similar to Doctrine migrations. Contrary to executing SQL statements, it allows you to define versions with sets of Flow CLI commands. Those are executed when running the migration by the command ./flow commandmigration:migrate.

This mainly solves the problem of executing one-off commands on distributed environments as well as different staging environments. Without this package, those one-off commands are possibly executed manually when needed, or are part of some other scripts in your deployment process. With this package, this becomes part of the code base. For integration, the migration command might be added to your deployment strategy the same way as the ./flow doctrine:migrate command probably already is.

Usage

Create migrations

To create a migration inherit from the AbstractMigration with the naming convention VersionYmdHis and implent the up() method. The class has to be within the namespace Swisscom\CommandMigration and be stored in your package under Migrations/Command/.

Example migration Packages/Your.Package/Migrations/Command/Version20200220114245.php:

<?php
namespace Swisscom\CommandMigration;

/**
 * A test migration
 */
class Version20200220114245 extends AbstractMigration
{

    /**
     * @return void
     */
    public function up(): void
    {
        $this->addCommand('your:command', ['test' => true]);
    }
}

Executing commands

The provided commands follow the naming of the familiar Doctrine commands and work in likewise manner:

Command identifier Description
commandmigration:migrate Execute the pending migrations
commandmigration:migrationexecute Execute a single migration
commandmigration:migrationstatus Show the current migration status
commandmigration:migrationversion Mark/unmark migrations as migrated

Notes

The package is highly inspired by the Flow Doctrine migrations and the Flow code migrations. Some logic, semantics as well as code is borrowed from those core modules.


All versions of commandmigration with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0
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 swisscom/commandmigration contains the following files

Loading the files please wait ....