Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
36 lines
792 B
PHP
36 lines
792 B
PHP
<?php
|
|
|
|
namespace Doctrine\DBAL;
|
|
|
|
use function str_replace;
|
|
use function strtoupper;
|
|
use function version_compare;
|
|
|
|
/**
|
|
* Class to store and retrieve the version of Doctrine.
|
|
*
|
|
* @internal
|
|
* @deprecated Refrain from checking the DBAL version at runtime.
|
|
*/
|
|
class Version
|
|
{
|
|
/**
|
|
* Current Doctrine Version.
|
|
*/
|
|
public const VERSION = '2.13.9';
|
|
|
|
/**
|
|
* Compares a Doctrine version with the current one.
|
|
*
|
|
* @param string $version The Doctrine version to compare to.
|
|
*
|
|
* @return int -1 if older, 0 if it is the same, 1 if version passed as argument is newer.
|
|
*/
|
|
public static function compare($version)
|
|
{
|
|
$version = str_replace(' ', '', strtoupper($version));
|
|
|
|
return version_compare($version, self::VERSION);
|
|
}
|
|
}
|