Download the PHP package stolt/version-aligner without Composer

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

version-aligner

Test Status Version Downloads PHP Version PDS Skeleton Lean dist package

A small development tool to keep application versions aligned with Git tags and changelog entries.

The version-aligner works particularly well with standardized PHP package structures such as those defined by pds/skeleton.

Why?

Releases can have more than one version source.

For example, a CLI application might have its version defined in the application itself, while the release version is represented by a Git tag and documented in CHANGELOG.md.

It is easy to update the Git tag and changelog while forgetting to bump the version in the application.

That has happened to me several times.

The result is a release where the repository says one thing, while the application reports another:

version-aligner exists to catch exactly this kind of inconsistency.

It checks whether your application's version matches the release version represented by Git and CHANGELOG.md before an outdated version reaches your users.

What it checks

version-aligner compares:

All three versions must refer to the same release.

Installation

The version-aligner CLI can be installed through Composer.

Available commands

Check command

check compares the application's version with the latest Git tag and the latest CHANGELOG.md entry.

You can use it in pre-commit Git hooks, Composer scripts, or continuous integration workflows.

Example Composer script:

Evaluable outcomes of the check command are:

Scenario Expected behavior
All versions match Exit 0
Version mismatch Non-zero exit
Required source missing Clear diagnostic and non-zero exit
Git metadata unavailable Clear diagnostic and non-zero exit

Align command

align updates the application version when it differs from the release version.

Version discovery

version-aligner automatically discovers the application version without requiring configuration.

It checks the following PHP files for a version string (1.2.3 or v1.2.3), in order:

  1. Executable files declared in composer.json's bin section.
  2. src/Console/Application.php
  3. src/Application.php
  4. src/Server.php

The first matching version string is used as the application's version. If no version is found, discovery returns null.

License

This library and its CLI are licensed under the MIT license. Please see LICENSE.md for more details.

Changelog

All noteworthy changes are documented in the CHANGELOG.md.

Reporting issues

Found a bug or an unexpected version alignment result? Please open an issue.

If version discovery fails or detects an incorrect version, include:

Please remove any sensitive information before sharing files or command output.

Contributing

If you're considering contributing to this project, have a look at this repository's CONTRIBUTING.md for more advice.


All versions of version-aligner with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
symfony/console Version ^7.4 || ^8.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 stolt/version-aligner contains the following files

Loading the files please wait ...