Download the PHP package vaslv/composer-release without Composer

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

vaslv/composer-release

Interactive release helper for Composer projects. It looks at your existing git tags, offers the next patch / minor / major version, then tags and (optionally) pushes — so you never have to check what the last version was before cutting a release.

The git tag is the only source of truth. A release writes no files and creates no release commit: nothing in the working tree records the version, so nothing can drift from the tag or conflict on a merge.

Requirements

Installation

The package is a Composer plugin, so on first install Composer will ask whether you trust it. Answer y, or allow it up front:

Usage

The plugin registers a native Composer command:

The script is also exposed through vendor/bin, so these work too:

What it does

  1. Refuses to run with a dirty working tree or on a detached HEAD; warns when you are not on main/master.
  2. Fetches tags from origin (when the remote exists), then finds the latest semver tag — 1.2.3 and v1.2.3 styles are both supported, mixed styles compare correctly, and the existing prefix is preserved.
  3. Lets you pick patch / minor / major / custom for the next version.
  4. Creates an annotated tag, its message defaulting to the tag itself and configurable (see below). That is the whole release: no file is written and no commit is made.
  5. Asks whether to push the branch and the tag to origin in one atomic push. The branch goes along even though nothing was committed — the tagged commit may simply not be on origin yet, and an atomic push never leaves a tag pointing at a commit nobody can fetch.

Every destructive step asks for confirmation first; nothing is pushed without an explicit yes.

If composer.json still commits a version field, the command prints a warning. It does not touch the field — see below.

Configuring the tag message

By default the annotated tag carries the tag as its message (v1.2.3). Set a template once per repository to use your own wording instead:

Migrating from 0.1.x

0.1.x updated a version field in composer.json and made a chore(release): <tag> commit whenever the project committed one. 0.2.0 drops that entirely: the release is always tag-only.

If your project commits the field:

Removing the field changes composer.json, which changes the hash recorded in composer.lock; without the second command composer validate reports the lock file as out of date.

Nothing else is required — a project that never committed the field already behaved this way.

Getting the version into a deployed application

A library needs no follow-up: Packagist derives the version from the tag. An application does, because the deployed artifact has no tags. Pass the tag in at build time and bake it into the image — that is the whole recipe.

Dockerfile, as the last layers so a version bump invalidates nothing above them:

CI (GitLab shown; GitHub Actions is the same with github.ref_name / github.sha) — note the single variable feeding both the image tag and the build argument, so the two can never disagree:

In a Laravel application, read it in config/app.phpenv() must be called inside the config file, because php artisan config:cache does not load .env at all and a runtime env() would return null silently, only in production:

Two traps worth stating outright:

What a running container actually is:

Development

The two suites stay separate commands on purpose: composer test needs only PHP, while test-shell needs bats and runs the actual script against throwaway git repositories.

License

MIT


All versions of composer-release with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
composer-plugin-api Version ^2.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 vaslv/composer-release contains the following files

Loading the files please wait ...