mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Use semver for Phraseanet version numbers
This commit is contained in:
@@ -16,6 +16,7 @@ use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpFoundation\File\File as SymfoFile;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use vierbergenlars\SemVer\version;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -387,13 +388,13 @@ class appbox extends base
|
||||
|
||||
$upgrader->add_steps_complete(1);
|
||||
|
||||
if (version_compare($from_version, '3.1') < 0) {
|
||||
if (version::lt($from_version, '3.1')) {
|
||||
$upgrader->addRecommendation(_('Your install requires data migration, please execute the following command'), 'bin/setup system:upgrade-datas --from=3.1');
|
||||
} elseif (version_compare($from_version, '3.5') < 0) {
|
||||
} elseif (version::lt($from_version, '3.5')) {
|
||||
$upgrader->addRecommendation(_('Your install requires data migration, please execute the following command'), 'bin/setup system:upgrade-datas --from=3.5');
|
||||
}
|
||||
|
||||
if (version_compare($from_version, '3.7') < 0) {
|
||||
if (version::lt($from_version, '3.7')) {
|
||||
$upgrader->addRecommendation(_('Your install might need to re-read technical datas'), 'bin/console records:rescan-technical-datas');
|
||||
$upgrader->addRecommendation(_('Your install might need to build some sub-definitions'), 'bin/console records:build-missing-subdefs');
|
||||
}
|
||||
|
@@ -10,7 +10,8 @@
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Version;
|
||||
use Alchemy\Phrasea\Core\Version as PhraseaVersion;
|
||||
use vierbergenlars\SemVer\version;
|
||||
|
||||
abstract class base implements cache_cacheableInterface
|
||||
{
|
||||
@@ -331,7 +332,7 @@ abstract class base implements cache_cacheableInterface
|
||||
return $recommends;
|
||||
}
|
||||
|
||||
protected function setVersion(Version $version)
|
||||
protected function setVersion(PhraseaVersion $version)
|
||||
{
|
||||
try {
|
||||
$sql = '';
|
||||
@@ -757,7 +758,7 @@ abstract class base implements cache_cacheableInterface
|
||||
|
||||
protected function apply_patches($from, $to, $post_process, Setup_Upgrade $upgrader, Application $app)
|
||||
{
|
||||
if (version_compare($from, $to, '=')) {
|
||||
if (version::eq($from, $to)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -783,7 +784,12 @@ abstract class base implements cache_cacheableInterface
|
||||
if ( ! ! $post_process !== ! ! $patch->require_all_upgrades())
|
||||
continue;
|
||||
|
||||
if ( ! version_compare($patch->get_release(), $from, '>') || ! version_compare($patch->get_release(), $to, '<=')) {
|
||||
// if patch is older than current install
|
||||
if (version::lte($patch->get_release(), $from)) {
|
||||
continue;
|
||||
}
|
||||
// if patch is new than current target
|
||||
if (version::gt($patch->get_release(), $to)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ class patch_320 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a1';
|
||||
private $release = '3.2.0-alpha.1';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320a implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a2';
|
||||
private $release = '3.2.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320ab implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a1';
|
||||
private $release = '3.2.0-alpha.1';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320b implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a3';
|
||||
private $release = '3.2.0-alpha.3';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320c implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a4';
|
||||
private $release = '3.2.0-alpha.4';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320d implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a5';
|
||||
private $release = '3.2.0-alpha.5';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320e implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a6';
|
||||
private $release = '3.2.0-alpha.6';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -23,7 +23,7 @@ class patch_320f implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a4';
|
||||
private $release = '3.2.0-alpha.4';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_320h implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.2.0.0.a8';
|
||||
private $release = '3.2.0-alpha.8';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_360 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.6.0.a1';
|
||||
private $release = '3.6.0-alpha.1';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_3602 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.6.0.a1';
|
||||
private $release = '3.6.0-alpha.1';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_3603 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.6.0.a2';
|
||||
private $release = '3.6.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_3604 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.6.0.a2';
|
||||
private $release = '3.6.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a2';
|
||||
private $release = '3.7.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -23,7 +23,7 @@ class patch_370a3 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a3';
|
||||
private $release = '3.7.0-alpha.3';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370a4 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a4';
|
||||
private $release = '3.7.0-alpha.4';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370a5 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a5';
|
||||
private $release = '3.7.0-alpha.5';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370a6 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a6';
|
||||
private $release = '3.7.0-alpha.6';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -24,7 +24,7 @@ class patch_370a7 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a7';
|
||||
private $release = '3.7.0-alpha.7';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370a8 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a8';
|
||||
private $release = '3.7.0-alpha.8';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_370a9 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.7.0.a9';
|
||||
private $release = '3.7.0-alpha.9';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_380 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.8.0.a2';
|
||||
private $release = '3.8.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -22,7 +22,7 @@ class patch_3802 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.8.0.a2';
|
||||
private $release = '3.8.0-alpha.2';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -23,7 +23,7 @@ class patch_3803 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.8.0.a3';
|
||||
private $release = '3.8.0-alpha.3';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -15,7 +15,7 @@ use Entities\AuthFailure;
|
||||
class patch_3805 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a4';
|
||||
private $release = '3.8.0-alpha.4';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3806 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a6';
|
||||
private $release = '3.8.0-alpha.6';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3808 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a8';
|
||||
private $release = '3.8.0-alpha.8';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3809 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a9';
|
||||
private $release = '3.8.0-alpha.9';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::DATA_BOX);
|
||||
|
@@ -23,7 +23,7 @@ class patch_380a3 implements patchInterface
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $release = '3.8.0.a3';
|
||||
private $release = '3.8.0-alpha.3';
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3810 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a10';
|
||||
private $release = '3.8.0-alpha.10';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -16,7 +16,7 @@ use Entities\SessionModule;
|
||||
class patch_3811 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a11';
|
||||
private $release = '3.8.0-alpha.11';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3813 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a13';
|
||||
private $release = '3.8.0-alpha.13';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3814 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a14';
|
||||
private $release = '3.8.0-alpha.14';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3815 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a15';
|
||||
private $release = '3.8.0-alpha.15';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3816 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a16';
|
||||
private $release = '3.8.0-alpha.16';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3817 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a17';
|
||||
private $release = '3.8.0-alpha.17';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -15,7 +15,7 @@ use Symfony\Component\Process\ExecutableFinder;
|
||||
class patch_3818 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.0.a18';
|
||||
private $release = '3.8.0-alpha.18';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3819 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.1';
|
||||
private $release = '3.8.1-alpha.1';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::APPLICATION_BOX);
|
||||
|
@@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application;
|
||||
class patch_3820 implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '3.8.1';
|
||||
private $release = '3.8.1-alpha.1';
|
||||
|
||||
/** @var array */
|
||||
private $concern = array(base::DATA_BOX);
|
||||
|
Reference in New Issue
Block a user