Returns the version of this library install.
public static getVersion ( ) : string | ||
return | string |
public function testVersion() { $this->assertEquals('1.7.0', Version::getVersion()); $this->assertEquals('1.7.0', trim(Version::getLatest())); $this->assertEquals(1, Version::compareVersion(1.8)); }
$autoloader->splAutoloadRegister(); use Pop\File\File; use Pop\Loader\Classmap; use Pop\I18n\I18n; use Pop\Project\Install; use Pop\Version; // Write header echo PHP_EOL; echo 'Pop PHP Framework CLI' . PHP_EOL; echo '=====================' . PHP_EOL . PHP_EOL; if (!empty($argv[1])) { // Check for version if ($argv[1] == '-v' || $argv[1] == '--version') { echo 'Version Check' . PHP_EOL; echo '-------------' . PHP_EOL; echo 'Installed: ' . Version::getVersion() . PHP_EOL; echo 'Latest Available: ' . Version::getLatest() . PHP_EOL . PHP_EOL; // Else, check dependencies } else { if ($argv[1] == '-c' || $argv[1] == '--check') { echo 'Dependencies Check' . PHP_EOL; echo '------------------' . PHP_EOL; echo Version::check() . PHP_EOL; // Else, display help } else { if ($argv[1] == '-h' || $argv[1] == '--help') { echo 'Help' . PHP_EOL; echo '----' . PHP_EOL; Install::cliHelp(); // Else, show instructions } else {