From 95b0c24d4bd275cf7a94c78daa99a4c740ed61eb Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 7 Nov 2013 14:48:29 +0100 Subject: [PATCH] Use semver for Phraseanet version numbers --- composer.json | 1 + composer.lock | 50 ++++++++++++++++++- .../Command/Developer/BowerInstall.php | 3 +- .../Phrasea/Command/UpgradeDBDatas.php | 3 +- lib/Alchemy/Phrasea/Core/Version.php | 2 +- .../Plugin/Schema/ManifestValidator.php | 9 ++-- .../Phrasea/Setup/ConfigurationTester.php | 5 +- lib/classes/appbox.php | 7 +-- lib/classes/base.php | 14 ++++-- lib/classes/patch/320.php | 2 +- lib/classes/patch/320a.php | 2 +- lib/classes/patch/320ab.php | 2 +- lib/classes/patch/320b.php | 2 +- lib/classes/patch/320c.php | 2 +- lib/classes/patch/320d.php | 2 +- lib/classes/patch/320e.php | 2 +- lib/classes/patch/320f.php | 2 +- lib/classes/patch/320h.php | 2 +- lib/classes/patch/360.php | 2 +- lib/classes/patch/3602.php | 2 +- lib/classes/patch/3603.php | 2 +- lib/classes/patch/3604.php | 2 +- lib/classes/patch/370.php | 2 +- lib/classes/patch/370a3.php | 2 +- lib/classes/patch/370a4.php | 2 +- lib/classes/patch/370a5.php | 2 +- lib/classes/patch/370a6.php | 2 +- lib/classes/patch/370a7.php | 2 +- lib/classes/patch/370a8.php | 2 +- lib/classes/patch/370a9.php | 2 +- lib/classes/patch/380.php | 2 +- lib/classes/patch/3802.php | 2 +- lib/classes/patch/3803.php | 2 +- lib/classes/patch/3805.php | 2 +- lib/classes/patch/3806.php | 2 +- lib/classes/patch/3808.php | 2 +- lib/classes/patch/3809.php | 2 +- lib/classes/patch/380a3.php | 2 +- lib/classes/patch/3810.php | 2 +- lib/classes/patch/3811.php | 2 +- lib/classes/patch/3813.php | 2 +- lib/classes/patch/3814.php | 2 +- lib/classes/patch/3815.php | 2 +- lib/classes/patch/3816.php | 2 +- lib/classes/patch/3817.php | 2 +- lib/classes/patch/3818.php | 2 +- lib/classes/patch/3819.php | 2 +- lib/classes/patch/3820.php | 2 +- .../Phrasea/Setup/ConfigurationTesterTest.php | 4 +- 49 files changed, 118 insertions(+), 58 deletions(-) diff --git a/composer.json b/composer.json index 6638fdc4e2..b272a16cb5 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,7 @@ "themattharris/tmhoauth" : "~0.7", "twig/twig" : "~1.14, >=1.14.2", "twig/extensions" : "~1.0", + "vierbergenlars/php-semver" : "~2.1", "zend/gdata" : "~1.12.1" }, "require-dev": { diff --git a/composer.lock b/composer.lock index a63626919f..459f443815 100644 --- a/composer.lock +++ b/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "55c5aaf5173cac55c8869a159830a3d5", + "hash": "f75434de6657af7daaf97fc6c9f16494", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -2915,6 +2915,54 @@ ], "time": "2013-10-30 08:20:53" }, + { + "name": "vierbergenlars/php-semver", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/vierbergenlars/php-semver.git", + "reference": "6b16f72b8c2d3aa00368f9fa612b2218a96245fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vierbergenlars/php-semver/zipball/6b16f72b8c2d3aa00368f9fa612b2218a96245fc", + "reference": "6b16f72b8c2d3aa00368f9fa612b2218a96245fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "vierbergenlars/simpletest": "1.1.*" + }, + "bin": [ + "bin/semver", + "bin/update-versions" + ], + "type": "library", + "autoload": { + "psr-0": { + "vierbergenlars\\SemVer": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lars Vierbergen", + "email": "vierbergenlars@gmail.com" + } + ], + "description": "The Semantic Versioner for PHP", + "keywords": [ + "semantic", + "semver", + "versioning" + ], + "time": "2013-09-20 10:41:27" + }, { "name": "zend/gdata", "version": "1.12.1", diff --git a/lib/Alchemy/Phrasea/Command/Developer/BowerInstall.php b/lib/Alchemy/Phrasea/Command/Developer/BowerInstall.php index 89c83fc28a..f29946f9bf 100644 --- a/lib/Alchemy/Phrasea/Command/Developer/BowerInstall.php +++ b/lib/Alchemy/Phrasea/Command/Developer/BowerInstall.php @@ -18,6 +18,7 @@ use Alchemy\Phrasea\Exception\RuntimeException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; +use vierbergenlars\SemVer\version; class BowerInstall extends Command { @@ -38,7 +39,7 @@ class BowerInstall extends Command $version = trim($bower->command('-v')); - if (!version_compare('1.0.0-alpha.1', $version, '<=')) { + if (version::lt($version, '1.0.0-alpha.1')) { throw new RuntimeException(sprintf( 'Bower version 1.0.0-alpha.1 is required (version %s provided), please install bower-canary : `npm install -g bower-canary`', $version )); diff --git a/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php b/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php index ce79e4ecb1..aa0f49532c 100644 --- a/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php +++ b/lib/Alchemy/Phrasea/Command/UpgradeDBDatas.php @@ -17,6 +17,7 @@ use Alchemy\Phrasea\Command\Upgrade\Step35; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use vierbergenlars\SemVer\version; /** * @@ -69,7 +70,7 @@ EOF if (null !== $input->getOption('from')) { foreach ($versions as $classname => $version) { - if (version_compare($input->getOption('from'), $version) > 0) { + if (version::lt($version, $input->getOption('from'))) { continue; } diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index 1bc523b469..ea82f59c7e 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -18,7 +18,7 @@ namespace Alchemy\Phrasea\Core; */ class Version { - protected static $number = '3.8.0'; + protected static $number = '3.8.1-alpha.1'; protected static $name = 'Diplodocus'; public static function getNumber() diff --git a/lib/Alchemy/Phrasea/Plugin/Schema/ManifestValidator.php b/lib/Alchemy/Phrasea/Plugin/Schema/ManifestValidator.php index 7eb2fad1a8..26e9d18c5b 100644 --- a/lib/Alchemy/Phrasea/Plugin/Schema/ManifestValidator.php +++ b/lib/Alchemy/Phrasea/Plugin/Schema/ManifestValidator.php @@ -15,7 +15,8 @@ use Alchemy\Phrasea\Application; use JsonSchema\Validator as JsonValidator; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Plugin\Exception\JsonValidationException; -use Alchemy\Phrasea\Core\Version; +use Alchemy\Phrasea\Core\Version as PhraseaVersion; +use vierbergenlars\SemVer\version; class ManifestValidator { @@ -23,7 +24,7 @@ class ManifestValidator private $version; private $schemaData; - public function __construct(JsonValidator $validator, $schemaData, Version $version) + public function __construct(JsonValidator $validator, $schemaData, PhraseaVersion $version) { if (!is_object($schemaData)) { throw new InvalidArgumentException('Json Schema must be an object'); @@ -56,7 +57,7 @@ class ManifestValidator } if (isset($data->{'minimum-phraseanet-version'})) { - if (true !== version_compare($this->version->getNumber(), $data->{'minimum-phraseanet-version'}, '>=')) { + if (version::lt($this->version->getNumber(), $data->{'minimum-phraseanet-version'})) { throw new JsonValidationException(sprintf( 'Version incomptibility : Minimum Phraseanet version required is %s, current version is %s', $data->{'minimum-phraseanet-version'}, @@ -66,7 +67,7 @@ class ManifestValidator } if (isset($data->{'maximum-phraseanet-version'})) { - if (true !== version_compare($this->version->getNumber(), $data->{'maximum-phraseanet-version'}, '<')) { + if (version::gte($this->version->getNumber(), $data->{'maximum-phraseanet-version'})) { throw new JsonValidationException(sprintf( 'Version incomptibility : Maximum Phraseanet version required is %s, current version is %s', $data->{'maximum-phraseanet-version'}, diff --git a/lib/Alchemy/Phrasea/Setup/ConfigurationTester.php b/lib/Alchemy/Phrasea/Setup/ConfigurationTester.php index 8ff79f22a1..bb5820a1ff 100644 --- a/lib/Alchemy/Phrasea/Setup/ConfigurationTester.php +++ b/lib/Alchemy/Phrasea/Setup/ConfigurationTester.php @@ -27,6 +27,7 @@ use Alchemy\Phrasea\Setup\Probe\PhraseaProbe; use Alchemy\Phrasea\Setup\Probe\SearchEngineProbe; use Alchemy\Phrasea\Setup\Probe\SubdefsPathsProbe; use Alchemy\Phrasea\Setup\Probe\SystemProbe; +use vierbergenlars\SemVer\version; class ConfigurationTester { @@ -109,11 +110,11 @@ class ConfigurationTester return false; } - $upgradable = version_compare($this->app['phraseanet.appbox']->get_version(), $this->app['phraseanet.version']->getNumber(), ">"); + $upgradable = version::lt($this->app['phraseanet.appbox']->get_version(), $this->app['phraseanet.version']->getNumber()); if (!$upgradable) { foreach ($this->app['phraseanet.appbox']->get_databoxes() as $databox) { - if (version_compare($databox->get_version(), $this->app['phraseanet.version']->getNumber(), "<")) { + if (version::lt($databox->get_version(), $this->app['phraseanet.version']->getNumber())) { $upgradable = true; break; } diff --git a/lib/classes/appbox.php b/lib/classes/appbox.php index 6eac47ad35..2e3bd8d0d0 100644 --- a/lib/classes/appbox.php +++ b/lib/classes/appbox.php @@ -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'); } diff --git a/lib/classes/base.php b/lib/classes/base.php index d1982bb4c7..9dbdf0bdff 100644 --- a/lib/classes/base.php +++ b/lib/classes/base.php @@ -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; } diff --git a/lib/classes/patch/320.php b/lib/classes/patch/320.php index 725ef71ca5..5c10c49160 100644 --- a/lib/classes/patch/320.php +++ b/lib/classes/patch/320.php @@ -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'; /** * diff --git a/lib/classes/patch/320a.php b/lib/classes/patch/320a.php index 6361ea7348..9f013a9ed8 100644 --- a/lib/classes/patch/320a.php +++ b/lib/classes/patch/320a.php @@ -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'; /** * diff --git a/lib/classes/patch/320ab.php b/lib/classes/patch/320ab.php index 953be972ac..575bd9e82b 100644 --- a/lib/classes/patch/320ab.php +++ b/lib/classes/patch/320ab.php @@ -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'; /** * diff --git a/lib/classes/patch/320b.php b/lib/classes/patch/320b.php index c7fbc735b5..47d3f2f3c9 100644 --- a/lib/classes/patch/320b.php +++ b/lib/classes/patch/320b.php @@ -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'; /** * diff --git a/lib/classes/patch/320c.php b/lib/classes/patch/320c.php index 0b7a26ad49..a91991301e 100644 --- a/lib/classes/patch/320c.php +++ b/lib/classes/patch/320c.php @@ -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'; /** * diff --git a/lib/classes/patch/320d.php b/lib/classes/patch/320d.php index 1d727e7e22..9a090050e8 100644 --- a/lib/classes/patch/320d.php +++ b/lib/classes/patch/320d.php @@ -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'; /** * diff --git a/lib/classes/patch/320e.php b/lib/classes/patch/320e.php index 1f029aa479..be29c31792 100644 --- a/lib/classes/patch/320e.php +++ b/lib/classes/patch/320e.php @@ -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'; /** * diff --git a/lib/classes/patch/320f.php b/lib/classes/patch/320f.php index 933c4519d0..4b9afc9e5c 100644 --- a/lib/classes/patch/320f.php +++ b/lib/classes/patch/320f.php @@ -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'; /** * diff --git a/lib/classes/patch/320h.php b/lib/classes/patch/320h.php index 82acfdd9b6..e4ea489975 100644 --- a/lib/classes/patch/320h.php +++ b/lib/classes/patch/320h.php @@ -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'; /** * diff --git a/lib/classes/patch/360.php b/lib/classes/patch/360.php index 64dfad57f2..d591225cf3 100644 --- a/lib/classes/patch/360.php +++ b/lib/classes/patch/360.php @@ -22,7 +22,7 @@ class patch_360 implements patchInterface * * @var string */ - private $release = '3.6.0.a1'; + private $release = '3.6.0-alpha.1'; /** * diff --git a/lib/classes/patch/3602.php b/lib/classes/patch/3602.php index 457f1c834f..5c3b196df3 100644 --- a/lib/classes/patch/3602.php +++ b/lib/classes/patch/3602.php @@ -22,7 +22,7 @@ class patch_3602 implements patchInterface * * @var string */ - private $release = '3.6.0.a1'; + private $release = '3.6.0-alpha.1'; /** * diff --git a/lib/classes/patch/3603.php b/lib/classes/patch/3603.php index 1d8c278f46..a05aa27d88 100644 --- a/lib/classes/patch/3603.php +++ b/lib/classes/patch/3603.php @@ -22,7 +22,7 @@ class patch_3603 implements patchInterface * * @var string */ - private $release = '3.6.0.a2'; + private $release = '3.6.0-alpha.2'; /** * diff --git a/lib/classes/patch/3604.php b/lib/classes/patch/3604.php index 2fd0f8d6fe..4859b8ec6f 100644 --- a/lib/classes/patch/3604.php +++ b/lib/classes/patch/3604.php @@ -22,7 +22,7 @@ class patch_3604 implements patchInterface * * @var string */ - private $release = '3.6.0.a2'; + private $release = '3.6.0-alpha.2'; /** * diff --git a/lib/classes/patch/370.php b/lib/classes/patch/370.php index b5d33c7132..2061cb7e42 100644 --- a/lib/classes/patch/370.php +++ b/lib/classes/patch/370.php @@ -22,7 +22,7 @@ class patch_370 implements patchInterface * * @var string */ - private $release = '3.7.0.a2'; + private $release = '3.7.0-alpha.2'; /** * diff --git a/lib/classes/patch/370a3.php b/lib/classes/patch/370a3.php index 96995631d4..a007177fd5 100644 --- a/lib/classes/patch/370a3.php +++ b/lib/classes/patch/370a3.php @@ -23,7 +23,7 @@ class patch_370a3 implements patchInterface * * @var string */ - private $release = '3.7.0.a3'; + private $release = '3.7.0-alpha.3'; /** * diff --git a/lib/classes/patch/370a4.php b/lib/classes/patch/370a4.php index e0b25e1668..c37902cfd7 100644 --- a/lib/classes/patch/370a4.php +++ b/lib/classes/patch/370a4.php @@ -22,7 +22,7 @@ class patch_370a4 implements patchInterface * * @var string */ - private $release = '3.7.0.a4'; + private $release = '3.7.0-alpha.4'; /** * diff --git a/lib/classes/patch/370a5.php b/lib/classes/patch/370a5.php index f4ba285957..3c029660f3 100644 --- a/lib/classes/patch/370a5.php +++ b/lib/classes/patch/370a5.php @@ -22,7 +22,7 @@ class patch_370a5 implements patchInterface * * @var string */ - private $release = '3.7.0.a5'; + private $release = '3.7.0-alpha.5'; /** * diff --git a/lib/classes/patch/370a6.php b/lib/classes/patch/370a6.php index baeffe6f47..ddccd76b8c 100644 --- a/lib/classes/patch/370a6.php +++ b/lib/classes/patch/370a6.php @@ -22,7 +22,7 @@ class patch_370a6 implements patchInterface * * @var string */ - private $release = '3.7.0.a6'; + private $release = '3.7.0-alpha.6'; /** * diff --git a/lib/classes/patch/370a7.php b/lib/classes/patch/370a7.php index 1c37f52ba6..eee06a3752 100644 --- a/lib/classes/patch/370a7.php +++ b/lib/classes/patch/370a7.php @@ -24,7 +24,7 @@ class patch_370a7 implements patchInterface * * @var string */ - private $release = '3.7.0.a7'; + private $release = '3.7.0-alpha.7'; /** * diff --git a/lib/classes/patch/370a8.php b/lib/classes/patch/370a8.php index e6fb3834f6..3964b82116 100644 --- a/lib/classes/patch/370a8.php +++ b/lib/classes/patch/370a8.php @@ -22,7 +22,7 @@ class patch_370a8 implements patchInterface * * @var string */ - private $release = '3.7.0.a8'; + private $release = '3.7.0-alpha.8'; /** * diff --git a/lib/classes/patch/370a9.php b/lib/classes/patch/370a9.php index d33dcf4ca4..3510532f8e 100644 --- a/lib/classes/patch/370a9.php +++ b/lib/classes/patch/370a9.php @@ -22,7 +22,7 @@ class patch_370a9 implements patchInterface * * @var string */ - private $release = '3.7.0.a9'; + private $release = '3.7.0-alpha.9'; /** * diff --git a/lib/classes/patch/380.php b/lib/classes/patch/380.php index cf7a814aed..d0e697e168 100644 --- a/lib/classes/patch/380.php +++ b/lib/classes/patch/380.php @@ -22,7 +22,7 @@ class patch_380 implements patchInterface * * @var string */ - private $release = '3.8.0.a2'; + private $release = '3.8.0-alpha.2'; /** * diff --git a/lib/classes/patch/3802.php b/lib/classes/patch/3802.php index fc26058dc2..e69170e8e0 100644 --- a/lib/classes/patch/3802.php +++ b/lib/classes/patch/3802.php @@ -22,7 +22,7 @@ class patch_3802 implements patchInterface * * @var string */ - private $release = '3.8.0.a2'; + private $release = '3.8.0-alpha.2'; /** * diff --git a/lib/classes/patch/3803.php b/lib/classes/patch/3803.php index 7db67a1b12..523ec1a42a 100644 --- a/lib/classes/patch/3803.php +++ b/lib/classes/patch/3803.php @@ -23,7 +23,7 @@ class patch_3803 implements patchInterface * * @var string */ - private $release = '3.8.0.a3'; + private $release = '3.8.0-alpha.3'; /** * diff --git a/lib/classes/patch/3805.php b/lib/classes/patch/3805.php index 2a3d9daf49..6a07724bed 100644 --- a/lib/classes/patch/3805.php +++ b/lib/classes/patch/3805.php @@ -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); diff --git a/lib/classes/patch/3806.php b/lib/classes/patch/3806.php index e505de518e..8f78ccce22 100644 --- a/lib/classes/patch/3806.php +++ b/lib/classes/patch/3806.php @@ -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); diff --git a/lib/classes/patch/3808.php b/lib/classes/patch/3808.php index e50bc49f85..dcfcb005ad 100644 --- a/lib/classes/patch/3808.php +++ b/lib/classes/patch/3808.php @@ -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); diff --git a/lib/classes/patch/3809.php b/lib/classes/patch/3809.php index 703d5f2c6c..fb2c8e8e72 100644 --- a/lib/classes/patch/3809.php +++ b/lib/classes/patch/3809.php @@ -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); diff --git a/lib/classes/patch/380a3.php b/lib/classes/patch/380a3.php index a0ae43eb36..e372d3612b 100644 --- a/lib/classes/patch/380a3.php +++ b/lib/classes/patch/380a3.php @@ -23,7 +23,7 @@ class patch_380a3 implements patchInterface * * @var string */ - private $release = '3.8.0.a3'; + private $release = '3.8.0-alpha.3'; /** * diff --git a/lib/classes/patch/3810.php b/lib/classes/patch/3810.php index 4700f36fe9..d174794188 100644 --- a/lib/classes/patch/3810.php +++ b/lib/classes/patch/3810.php @@ -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); diff --git a/lib/classes/patch/3811.php b/lib/classes/patch/3811.php index bf6166a4b4..18cb1702df 100644 --- a/lib/classes/patch/3811.php +++ b/lib/classes/patch/3811.php @@ -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); diff --git a/lib/classes/patch/3813.php b/lib/classes/patch/3813.php index f39f3628e2..f8e900bc71 100644 --- a/lib/classes/patch/3813.php +++ b/lib/classes/patch/3813.php @@ -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); diff --git a/lib/classes/patch/3814.php b/lib/classes/patch/3814.php index a78bd54917..9f187fd932 100644 --- a/lib/classes/patch/3814.php +++ b/lib/classes/patch/3814.php @@ -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); diff --git a/lib/classes/patch/3815.php b/lib/classes/patch/3815.php index 5fce0b68ba..b850f3352d 100644 --- a/lib/classes/patch/3815.php +++ b/lib/classes/patch/3815.php @@ -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); diff --git a/lib/classes/patch/3816.php b/lib/classes/patch/3816.php index 2bd3840acb..75c0a5140a 100644 --- a/lib/classes/patch/3816.php +++ b/lib/classes/patch/3816.php @@ -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); diff --git a/lib/classes/patch/3817.php b/lib/classes/patch/3817.php index 5a9ea516b9..63241a7133 100644 --- a/lib/classes/patch/3817.php +++ b/lib/classes/patch/3817.php @@ -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); diff --git a/lib/classes/patch/3818.php b/lib/classes/patch/3818.php index c48852f961..68e0be68b4 100644 --- a/lib/classes/patch/3818.php +++ b/lib/classes/patch/3818.php @@ -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); diff --git a/lib/classes/patch/3819.php b/lib/classes/patch/3819.php index d5c7556042..8060f52393 100644 --- a/lib/classes/patch/3819.php +++ b/lib/classes/patch/3819.php @@ -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); diff --git a/lib/classes/patch/3820.php b/lib/classes/patch/3820.php index 153d486d5b..b37030cc9b 100644 --- a/lib/classes/patch/3820.php +++ b/lib/classes/patch/3820.php @@ -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); diff --git a/tests/Alchemy/Tests/Phrasea/Setup/ConfigurationTesterTest.php b/tests/Alchemy/Tests/Phrasea/Setup/ConfigurationTesterTest.php index 107c3b99a4..e4b7b0c57b 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/ConfigurationTesterTest.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/ConfigurationTesterTest.php @@ -93,7 +93,7 @@ class ConfigurationTesterTest extends AbstractSetupTester /** * Must return version + 1 */ - $app['phraseanet.version']->expects($this->any()) + $app['phraseanet.version']::staticExpects($this->any()) ->method('getNumber') ->will($this->returnValue('3.9')); @@ -134,7 +134,7 @@ class ConfigurationTesterTest extends AbstractSetupTester /** * Must return version + 1 */ - $app['phraseanet.version']->expects($this->any()) + $app['phraseanet.version']::staticExpects($this->any()) ->method('getNumber') ->will($this->returnValue('3.9'));