A versioning based on git for all Blumilk projects. If Git is not available, it falls back to the timestamp.
Add package to the project:
composer require blumilksoftware/versionThen use the Version class to generate version strings based on Git or timestamp:
<?php
declare(strict_types=1);
use Blumilk\Version\Version;
$version = (new Version())->generate();You can configure the Version class to generate long version strings:
<?php
declare(strict_types=1);
use Blumilk\Version\Version;
$version = (new Version(true))->generate();You can use also the VersionHelper class to generate version strings:
<?php
declare(strict_types=1);
use Blumilk\Version\VersionHelper;
$shortVersion = VersionHelper::generateShortVersion();
$longVersion = VersionHelper::generateLongVersion();In a cloned or forked repository, run:
composer installThere are scripts available for package codestyle checking and testing:
| Command | Description |
|---|---|
composer cs |
Runs codestyle against the package itself |
composer csf |
Runs codestyle with fixer enabled against the package itself |
composer test |
Runs all test cases |
There is also the Docker Compose configuration available:
docker compose up -d
docker compose exec php php -v
docker compose exec php composer -vThere are also Makefile commands available:
make run
make shell
make test
make csf
make stopPlease maintain our project guidelines:
- keep issues well described, labeled and in English,
- add the issue number to all your commits,
- add the issue number to your branch name,
- squash your commits into one commit with a standardized name.