PHP code example of voral / vinc-file-version-regexp
1. Go to this page and download the library: Download voral/vinc-file-version-regexp 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/ */
voral / vinc-file-version-regexp example snippets
use Vasoft\VersionIncrement\Config;
use Vasoft\VersionIncrement\Events\EventType;
use Vasoft\VersionIncrement\Extension\RegexpFileModifier;
$config = (new Config());
$config->getEventBus()->addListener(
EventType::BEFORE_VERSION_SET,
new RegexpFileModifier(
'./src/version.php',
'#(\$version\s*=\s*\'|"v)\d+\.\d+\.\d+(\'|";)#s'
)
);
return $config;
$version = "Version 1.0.0";
$version = "Version 2.0.0";