Download the PHP package typisttech/composer-semver without Composer

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

# Composer SemVer [![GitHub Release](https://img.shields.io/github/v/release/typisttech/composer-semver)](https://github.com/typisttech/composer-semver/releases) [![Test](https://github.com/typisttech/composer-semver/actions/workflows/test.yml/badge.svg)](https://github.com/typisttech/composer-semver/actions/workflows/test.yml) [![License](https://img.shields.io/github/license/typisttech/composer-semver.svg)](https://github.com/typisttech/composer-semver/blob/master/LICENSE) [![Follow @TangRufus on X](https://img.shields.io/badge/Follow-TangRufus-15202B?logo=x&logoColor=white)](https://x.com/tangrufus) [![Follow @TangRufus.com on Bluesky](https://img.shields.io/badge/Bluesky-TangRufus.com-blue?logo=bluesky)](https://bsky.app/profile/tangrufus.com) [![Sponsor @TangRufus via GitHub](https://img.shields.io/badge/Sponsor-TangRufus-EA4AAA?logo=githubsponsors)](https://github.com/sponsors/tangrufus) [![Hire Typist Tech](https://img.shields.io/badge/Hire-Typist%20Tech-778899)](https://typist.tech/contact/)

Static linked CLI wrapper for composer/semver.
Parsing and validating versions exactly like Composer does without installing PHP.

Built with ♥ by Typist Tech


Usage

Normalize Versions

Normalizes a version string to be able to perform comparisons on it. This is a wrapper of the Composer\Semver\VersionParser::normalize() method.

Parse Constraints

Parses a constraint string and strip its ignorable parts. This is a wrapper of the Composer\Semver\VersionParser::parseConstraints() method.

Print Bundled PHP and composer/semver Versions

Dump Shell Completion Scripts

For shell completions, follow the instructions from:

If you installed Composer SemVer via Homebrew, completion scripts are managed by Homebrew. Read more at https://docs.brew.sh/Shell-Completion


[!TIP] Hire Tang Rufus!

I am looking for my next role, freelance or full-time. If you find this tool useful, I can build you more weird stuff like this. Let's talk if you are hiring PHP / Ruby / Go developers.

Contact me at https://typist.tech/contact/


Why

Which version numbering system does Composer itself use?

Composer uses Semantic Versioning (aka SemVer) 2.0.0.

-- Composer FAQ

Under the hood, Composer uses composer/semver to parse and validate versions.

Despite the lie on Composer FAQ, the fragmentary documentation, and the deceitful package name composer/semver, Composer implements only a subset of Semantic Versioning specification while supports some uncommon versioning schemes. Working with Composer packages versions without composer/semver is a bit tricky.

"A bit tricky" is an understatement.

Version Validity
1.2.3 :white_check_mark: Valid.
1.2.3.4 :white_check_mark: Valid. But not SemVer compliant.
1.0.0-a :white_check_mark: Valid.
1.0.0-b :white_check_mark: Valid.
1.0.0-c :x: Invalid. But SemVer compliant. Composer only accepts a limited sets of pre-release versions.
99999 :white_check_mark: Valid. Composer normalize it to 99999.0.0.0.
100000.0.0 :white_check_mark: Valid
100000.0.0.0 :x: Invalid. Starting from 100000, Composer treats it as CalVer which cannot have 4 bits.
2010-01-02 :white_check_mark: Valid.
2010-01-02-10-20-30.5 :white_check_mark: Valid.
20100102-203040 :white_check_mark: Valid.
20100102.0.3.4 :x: Invalid. CalVer cannot have 4 bits.
2023013.0.0 :x: Invalid. YYYYMMD is a bad CalVer major version.
202301311.0.0 :x: Invalid. YYYYMMDDh is a bad CalVer major version.
20230131000.0.0 :x: Invalid.YYYYMMDDhhm is a bad CalVer major version.
2023013100000.0.0 :x: Invalid. YYYYMMDDhhmmX is a bad CalVer major version.
000.001.003.004 :white_check_mark: Valid. Composer normalizes it to 000.001.003.004. The leading zeros are significant and cannot be ignored.
0700 :white_check_mark: Valid. Composer normalizes it to 0700.0.0.0. The leading zero is significant and cannot be ignored.
1.00.000 :white_check_mark: Valid. Composer normalizes it to 1.00.000.0. All the zeroes are significant and cannot be ignored.

Composer SemVer wraps composer/semver and the PHP runtime as a static linked CLI tool, so you can work with the package versions exactly like Composer does without installing PHP.

[!TIP] Hire Tang Rufus!

There is no need to understand any of these quirks. Let me handle them for you. I am seeking my next job, freelance or full-time.

If you are hiring PHP / Ruby / Go developers, contact me at https://typist.tech/contact/

Installation

Homebrew (macOS / Linux) (Recommended)

apt-get (Debian based distributions, for example: Ubuntu)

Instead of the automatic setup script, you can manually configure the repository with the instructions on Cloudsmith.

Manual .deb (Debian based distributions, for example: Ubuntu)

[!WARNING] If you install the .deb file manually, you have to take care of updating it by yourself.

Download the latest .deb file from GitHub Releases, or via gh:

Optionally, verify the .deb file:

Finally, install the package:

Manual Binary

[!WARNING] If you install the binary manually, you have to take care of updating it by yourself.

Download the latest .tar.gz file from GitHub Releases, or via gh:

Optionally, verify the .tar.gz file:

Finally, unarchive and move the binary into $PATH:

Alternatives

Credits

Composer SemVer is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.

Full list of contributors can be found on GitHub.

Copyright and License

This project is a free software distributed under the terms of the MIT license. For the full license, see LICENSE.

Contribute

Feedbacks / bug reports / pull requests are welcome.


All versions of composer-semver with dependencies

PHP Build Version
Package Version
Requires php Version ~8.4.13
composer-runtime-api Version ^2.2
composer/semver Version ^3.4
symfony/console Version ^7.3
symfony/polyfill-iconv Version ^1.33
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 typisttech/composer-semver contains the following files

Loading the files please wait ...