PHP code example of granam / web-versions
1. Go to this page and download the library: Download granam/web-versions 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/ */
granam / web-versions example snippets
= new \Granam\Git\Git();
$webVersions = new \Granam\WebVersions\WebVersions($git, __DIR__, 'dev-branch-name');
print_r($webVersions->getAllMinorVersions()); // Array ( [0] => dev-branch-name [1] => 1.0 )
print_r($webVersions->getAllStableMinorVersions()); // Array ( [0] => 1.0 )
print_r($webVersions->getAllPatchVersions()); // Array ( [0] => dev-branch-name [1] => 1.0.0 )
print_r($webVersions->getAllStablePatchVersions()); // Array ( [0] => 1.0.0 )