From f1be7af446052c6fed7033664c6c6350f558961b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 23 Aug 2016 16:49:12 +0200 Subject: Change share entry behavior --- var/SymfonyRequirements.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php index 841338f4..0a5de546 100644 --- a/var/SymfonyRequirements.php +++ b/var/SymfonyRequirements.php @@ -681,10 +681,17 @@ class SymfonyRequirements extends RequirementCollection if (class_exists('Symfony\Component\Intl\Intl')) { $this->addRecommendation( - \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), - sprintf('intl ICU version installed on your system (%s) should match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), - 'In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.' + \Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.' ); + if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To avoid internationalization data incosistencies upgrade the symfony/intl component.' + ); + } } $this->addPhpIniRecommendation( -- cgit v1.2.3 From 58fadbc9df3f8b735c04995919b6cf913ca6a977 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 11 Sep 2016 15:53:16 +0200 Subject: Fix error on EntityManager clear Introduced in the recent 2.5.5 release. Also updated deps. --- var/SymfonyRequirements.php | 74 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 18 deletions(-) (limited to 'var') diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php index 0a5de546..f3e8ca8e 100644 --- a/var/SymfonyRequirements.php +++ b/var/SymfonyRequirements.php @@ -168,6 +168,9 @@ class PhpIniRequirement extends Requirement */ class RequirementCollection implements IteratorAggregate { + /** + * @var Requirement[] + */ private $requirements = array(); /** @@ -265,7 +268,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns both requirements and recommendations. * - * @return array Array of Requirement instances + * @return Requirement[] */ public function all() { @@ -275,7 +278,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns all mandatory requirements. * - * @return array Array of Requirement instances + * @return Requirement[] */ public function getRequirements() { @@ -292,7 +295,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns the mandatory requirements that were not met. * - * @return array Array of Requirement instances + * @return Requirement[] */ public function getFailedRequirements() { @@ -309,7 +312,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns all optional recommendations. * - * @return array Array of Requirement instances + * @return Requirement[] */ public function getRecommendations() { @@ -326,7 +329,7 @@ class RequirementCollection implements IteratorAggregate /** * Returns the recommendations that were not met. * - * @return array Array of Requirement instances + * @return Requirement[] */ public function getFailedRecommendations() { @@ -376,7 +379,8 @@ class RequirementCollection implements IteratorAggregate */ class SymfonyRequirements extends RequirementCollection { - const REQUIRED_PHP_VERSION = '5.3.3'; + const LEGACY_REQUIRED_PHP_VERSION = '5.3.3'; + const REQUIRED_PHP_VERSION = '5.5.9'; /** * Constructor that initializes the requirements. @@ -386,16 +390,26 @@ class SymfonyRequirements extends RequirementCollection /* mandatory requirements follow */ $installedPhpVersion = phpversion(); + $requiredPhpVersion = $this->getPhpRequiredVersion(); - $this->addRequirement( - version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='), - sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion), - sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. - Before using Symfony, upgrade your PHP installation, preferably to the latest version.', - $installedPhpVersion, self::REQUIRED_PHP_VERSION), - sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion) + $this->addRecommendation( + $requiredPhpVersion, + 'Vendors should be installed in order to check all requirements.', + 'Run the composer install command.', + 'Run the "composer install" command.' ); + if (false !== $requiredPhpVersion) { + $this->addRequirement( + version_compare($installedPhpVersion, $requiredPhpVersion, '>='), + sprintf('PHP version must be at least %s (%s installed)', $requiredPhpVersion, $installedPhpVersion), + sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. + Before using Symfony, upgrade your PHP installation, preferably to the latest version.', + $installedPhpVersion, $requiredPhpVersion), + sprintf('Install PHP %s or newer (installed version is %s)', $requiredPhpVersion, $installedPhpVersion) + ); + } + $this->addRequirement( version_compare($installedPhpVersion, '5.3.16', '!='), 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', @@ -433,7 +447,7 @@ class SymfonyRequirements extends RequirementCollection ); } - if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { + if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { $timezones = array(); foreach (DateTimeZone::listAbbreviations() as $abbreviations) { foreach ($abbreviations as $abbreviation) { @@ -689,7 +703,7 @@ class SymfonyRequirements extends RequirementCollection $this->addRecommendation( \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), - 'To avoid internationalization data incosistencies upgrade the symfony/intl component.' + 'To avoid internationalization data inconsistencies upgrade the symfony/intl component.' ); } } @@ -725,9 +739,9 @@ class SymfonyRequirements extends RequirementCollection if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $this->addRecommendation( - $this->getRealpathCacheSize() > 1000, - 'realpath_cache_size should be above 1024 in php.ini', - 'Set "realpath_cache_size" to e.g. "1024" in php.ini* to improve performance on windows.' + $this->getRealpathCacheSize() > 5 * 1024 * 1024, + 'realpath_cache_size should be above 5242880 in php.ini', + 'Setting "realpath_cache_size" to e.g. "5242880" or "5000k" in php.ini* may improve performance on Windows significantly in some cases.' ); } @@ -778,4 +792,28 @@ class SymfonyRequirements extends RequirementCollection return (int) $size; } } + + /** + * Defines PHP required version from Symfony version. + * + * @return string|false The PHP required version or false if it could not be guessed + */ + protected function getPhpRequiredVersion() + { + if (!file_exists($path = __DIR__.'/../composer.lock')) { + return false; + } + + $composerLock = json_decode(file_get_contents($path), true); + foreach ($composerLock['packages'] as $package) { + $name = $package['name']; + if ('symfony/symfony' !== $name && 'symfony/http-kernel' !== $name) { + continue; + } + + return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION; + } + + return false; + } } -- cgit v1.2.3 From 05d2d62f128df5dafa3be17d9848fb9b5b146836 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 19 Sep 2016 11:35:35 +0200 Subject: Update generated files from Symfony --- var/SymfonyRequirements.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/SymfonyRequirements.php b/var/SymfonyRequirements.php index f3e8ca8e..7e7723af 100644 --- a/var/SymfonyRequirements.php +++ b/var/SymfonyRequirements.php @@ -739,9 +739,9 @@ class SymfonyRequirements extends RequirementCollection if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $this->addRecommendation( - $this->getRealpathCacheSize() > 5 * 1024 * 1024, - 'realpath_cache_size should be above 5242880 in php.ini', - 'Setting "realpath_cache_size" to e.g. "5242880" or "5000k" in php.ini* may improve performance on Windows significantly in some cases.' + $this->getRealpathCacheSize() >= 5 * 1024 * 1024, + 'realpath_cache_size should be at least 5M in php.ini', + 'Setting "realpath_cache_size" to e.g. "5242880" or "5M" in php.ini* may improve performance on Windows significantly in some cases.' ); } -- cgit v1.2.3