A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sebastianbergmann/version below:

sebastianbergmann/version: Library that helps with managing the version number of Git-hosted PHP projects

sebastian/version is a library that helps with managing the version number of Git-hosted PHP projects.

You can add this library as a local, per-project dependency to your project using Composer:

composer require sebastian/version

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev sebastian/version

The constructor of the SebastianBergmann\Version class expects two parameters:

Apart from the constructor, the SebastianBergmann\Version class has a single public method: asString().

Here is a contrived example that shows the basic usage:

<?php declare(strict_types=1);
use SebastianBergmann\Version;

$version = new Version('1.0.0', __DIR__);

var_dump($version->asString());
string(18) "1.0.0-17-g00f3408"

When a new release is prepared, the string that is passed to the constructor as the first argument needs to be updated.

How SebastianBergmann\Version::asString() works

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4