1. Go to this page and download the library: Download nucleos/relazy library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nucleos / relazy example snippets
use Nucleos\Relazy\Changelog\Formatter\SemanticFormatter;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SimpleGenerator;
use Nucleos\Relazy\Version\Persister\TagPersister;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git()))
->versionGenerator(new SimpleGenerator())
->versionPersister(new TagPersister(tagPrefix: 'v_'))
->formatter(new SemanticFormatter())
// ...
;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git()))
->versionGenerator(new \Acme\CustomGenerator())
// ...
;
use Nucleos\Relazy\Changelog\Formatter\SemanticFormatter;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SimpleGenerator;
use Nucleos\Relazy\Version\Persister\ChangelogPersister;
use Nucleos\Relazy\VersionControl\Noop;
return (new RelazyConfig())
->versionGenerator(new SimpleGenerator())
->versionPersister(new ChangelogPersister())
->formatter(new SemanticFormatter())
// ...
;
new Nucleos\Relazy\Action\VersionControl\CheckWorkingCopyAction;
new Nucleos\Relazy\Action\VersionControl\LastChangesAction;
use Nucleos\Relazy\Changelog\Formatter\SemanticFormatter;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SimpleGenerator;
use Nucleos\Relazy\Version\Persister\ChangelogPersister;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git()))
->versionGenerator(new SimpleGenerator())
->versionPersister(new ChangelogPersister())
->formatter(new SemanticFormatter())
->startupActions([
new CheckWorkingCopyAction(),
new DisplayLastChanges(),
])
;
use Nucleos\Relazy\Action\Composer\ValidateAction;
use Nucleos\Relazy\Action\Composer\StabilityCheckAction;
use Nucleos\Relazy\Action\Composer\DependencyStabilityCheckAction;
use Nucleos\Relazy\Changelog\Formatter\SemanticFormatter;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SimpleGenerator;
use Nucleos\Relazy\Version\Persister\TagPersister;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git(signCommit: true, signTag: true)))
->versionGenerator(new SimpleGenerator())
->versionPersister(new TagPersister())
->startupActions([
new ValidateAction(),
new StabilityCheckAction(),
new DependencyStabilityCheckAction(allowList: [
'symfony/console',
'phpunit/phpunit' => '
new Nucleos\Relazy\Action\VersionControl\CheckWorkingCopyAction;
new Nucleos\Relazy\Action\VersionControl\LastChangesAction;
use Nucleos\Relazy\Changelog\Formatter\SemanticFormatter;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SimpleGenerator;
use Nucleos\Relazy\Version\Persister\ChangelogPersister;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git(signCommit: true, signTag: true)))
->versionGenerator(new SimpleGenerator())
->versionPersister(new ChangelogPersister())
->startupActions([
new CheckWorkingCopyAction(),
new DisplayLastChanges(),
])
;
use Nucleos\Relazy\Action\Filesystem\FilesUpdateAction;
use Nucleos\Relazy\Action\VersionControl\PublishAction;
use Nucleos\Relazy\Config\RelazyConfig;
use Nucleos\Relazy\Version\Generator\SemanticGenerator;
use Nucleos\Relazy\Version\Persister\TagPersister;
use Nucleos\Relazy\VersionControl\Git;
return (new RelazyConfig(new Git(signCommit: true, signTag: true)))
->versionGenerator(new SemanticGenerator())
->versionPersister(new TagPersister(tagPrefix: 'v_'))
->preReleaseActions([
new FilesUpdateAction(files: [
'config.yml' => '%version%',
'app.ini' => 'dynamic-version: %version%'
]),
])
->postReleaseActions([
new PublishAction(),
])
;
composer global
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.