Lock your Textpattern CMS version or define package dependencies

4.8.8 2019-02-28 21:42 UTC

README

Composer meta package for Textpattern CMS. This package can be used to lock the installed Textpattern version and handle Textpattern version dependencies in packages. This package makes sure your Textpattern installation and packages are compatible and can work together, making the painless dependency management reality.

Locking your Textpattern installation version

When you start using Composer to manage Textpattern packages, plugins and themes, you should lock in your Textpattern version. This makes sure the packages you install are compatible with the Textpattern version you have. You can lock in your Textpattern version using Composer's require command.

$ composer require textpattern/lock:4.7.3

Where the 4.7.3 is the Textpattern version you have.

Defining required Textpattern version as a dependency in your packages

Textpattern plugin and theme developers can define the compatible and required Textpattern versions using the textpattern/lock package. You can set requirements using the require property, or exclude versions using the conflict. In your package's composer.json:

{
    "require": {
        "textpattern/lock": ">=4.5.0"
    }
}

The above would require Textpattern version 4.5.0 or newer, and the plugin or theme will not be installed if the user's Textpattern installation doesn't meet the requirements. See Composer schema and basic usage for more information about defining requirements.