diff --git a/.make/release/update-versions.php b/.make/release/update-versions.php index f6f7348c6..7d1caef23 100644 --- a/.make/release/update-versions.php +++ b/.make/release/update-versions.php @@ -26,7 +26,7 @@ require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php'); $aFilesUpdaters = array( new iTopVersionFileUpdater(), new DatamodelsModulesFiles(), - new ConstantFileUpdater('ITOP_CORE_VERSION', 'core/config.class.inc.php'), + new ConstantFileUpdater('ITOP_CORE_VERSION', 'approot.inc.php'), ); if (count($argv) === 1) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 2aa9843c9..f851f599b 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -539,8 +539,10 @@ class DisplayBlock * @throws DictExceptionMissingString * @throws MySQLException * @throws Exception + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 add type hinting to $aExtraParams */ - public function GetRenderContent(WebPage $oPage, array $aExtraParams = [], string $sId = null) + public function GetRenderContent(WebPage $oPage, array $aExtraParams, string $sId) { $sHtml = ''; $oBlock = null; @@ -1730,7 +1732,24 @@ class HistoryBlock extends DisplayBlock $this->iLimitCount = $iCount; } - public function GetRenderContent(WebPage $oPage, array $aExtraParams = [], string $sId = null) + /** + * @param \WebPage $oPage + * @param array $aExtraParams + * @param string $sId + * + * @return string + * @throws \ArchivedObjectException + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \DictExceptionMissingString + * @throws \MissingQueryArgument + * @throws \MySQLException + * @throws \MySQLHasGoneAwayException + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $aExtraParams and add type hinting for PHP 8.0 compatibility + * (var is unused, and all calls were already made using a default value) + */ + public function GetRenderContent(WebPage $oPage, array $aExtraParams, string $sId) { $sHtml = ''; $bTruncated = false; @@ -1871,11 +1890,10 @@ class MenuBlock extends DisplayBlock * @throws \DictExceptionMissingString * @throws \MissingQueryArgument * @throws \MySQLException - * @throws \MySQLHasGoneAwayException - * @throws \OQLException - * @throws \ReflectionException + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value and add type hinting on $aExtraParams for PHP 8.0 compatibility */ - public function GetRenderContent(WebPage $oPage, array $aExtraParams = [], string $sId = null) + public function GetRenderContent(WebPage $oPage, array $aExtraParams, string $sId) { $oRenderBlock = new UIContentBlock(); diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index ea59b5aad..671d14847 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -61,6 +61,8 @@ class UIExtKeyWidget protected $sAttCode; protected $bSearchMode; + //public function __construct($sAttCode, $sClass, $sTitle, $oAllowedValues, $value, $iInputId, $bMandatory, $sNameSuffix = '', $sFieldPrefix = '', $sFormPrefix = '') + /** * @param \WebPage $oPage * @param string $sAttCode @@ -80,18 +82,13 @@ class UIExtKeyWidget * @throws \Exception * * @since 3.0.0 N°3750 new $sInputType parameter + * @since 2.7.7 3.0.1 3.1.0 N°3129 Add default value for $aArgs for PHP 8.0 compat */ public static function DisplayFromAttCode( $oPage, $sAttCode, $sClass, $sTitle, $oAllowedValues, $value, $iInputId, $bMandatory, $sFieldName = '', $sFormPrefix = '', $aArgs = [], $bSearchMode = false, &$sInputType = '' ) { - // we will only use key & name, so let's reduce fields loaded ! - $aAttToLoad = [ - $sClass => [], // nothing, id and friendlyname are automatically added by the API - ]; - $oAllowedValues->OptimizeColumnLoad($aAttToLoad); - $oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); $sTargetClass = $oAttDef->GetTargetClass(); $iMaxComboLength = $oAttDef->GetMaximumComboLength(); @@ -776,9 +773,11 @@ JS * * @throws CoreException * @throws OQLException + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $oObj for PHP 8.0 compatibility */ public function AutoComplete( - WebPage $oP, $sFilter, $oObj = null, $sContains = '', $sOutputFormat = self::ENUM_OUTPUT_FORMAT_CSV, $sOperation = null + WebPage $oP, $sFilter, $oObj, $sContains, $sOutputFormat = self::ENUM_OUTPUT_FORMAT_CSV, $sOperation = null ) { if (is_null($sFilter)) { diff --git a/application/ui.linksdirectwidget.class.inc.php b/application/ui.linksdirectwidget.class.inc.php index 8268058e8..1a750e327 100644 --- a/application/ui.linksdirectwidget.class.inc.php +++ b/application/ui.linksdirectwidget.class.inc.php @@ -75,9 +75,15 @@ class UILinksWidgetDirect * @param array $aArgs * @param string $sFormPrefix * @param DBObject $oCurrentObj + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $aArgs for PHP 8.0 compatibility (handling wrong values at method start) */ - public function Display(WebPage $oPage, $oValue, $aArgs = array(), $sFormPrefix, $oCurrentObj) + public function Display(WebPage $oPage, $oValue, $aArgs, $sFormPrefix, $oCurrentObj) { + if (empty($aArgs)) { + $aArgs = []; + } + $oLinksetDef = MetaModel::GetAttributeDef($this->sClass, $this->sAttCode); switch($oLinksetDef->GetEditMode()) { @@ -127,8 +133,10 @@ class UILinksWidgetDirect * @param string $sFormPrefix * @param DBObject $oCurrentObj * @param bool $bDisplayMenu + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $aArgs for PHP 8.0 compatibility (protected method, always called with default value) */ - protected function DisplayAsBlock(WebPage $oPage, $oValue, $aArgs = array(), $sFormPrefix, $oCurrentObj, $bDisplayMenu) + protected function DisplayAsBlock(WebPage $oPage, $oValue, $aArgs, $sFormPrefix, $oCurrentObj, $bDisplayMenu) { $oLinksetDef = MetaModel::GetAttributeDef($this->sClass, $this->sAttCode); $sTargetClass = $oLinksetDef->GetLinkedClass(); @@ -228,8 +236,10 @@ class UILinksWidgetDirect * @param string $sFormPrefix * @param DBObject $oCurrentObj * @param array $aButtons + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $aArgs for PHP 8.0 compatibility (protected method, caller already handles it) */ - protected function DisplayEditInPlace(WebPage $oPage, $oValue, $aArgs = array(), $sFormPrefix, $oCurrentObj, $aButtons = array('create', 'delete')) + protected function DisplayEditInPlace(WebPage $oPage, $oValue, $aArgs, $sFormPrefix, $oCurrentObj, $aButtons = array('create', 'delete')) { $aAttribs = $this->GetTableConfig(); $oValue->Rewind(); diff --git a/application/utils.inc.php b/application/utils.inc.php index de9425d57..bf50d2bda 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -2404,43 +2404,19 @@ class utils } /** - * @return string eg : '2_7_0' ITOP_VERSION is '2.7.1-dev' + * @return string eg : '2_7_0' if iTop core version is '2.7.5-2' + * @throws \ApplicationException if constant value is invalid + * @uses ITOP_CORE_VERSION */ - public static function GetItopVersionWikiSyntax() { - $sMinorVersion = self::GetItopMinorVersion(); + public static function GetCoreVersionWikiSyntax() + { + $aExplodedVersion = explode('.', ITOP_CORE_VERSION); - return str_replace('.', '_', $sMinorVersion).'_0'; - } - - /** - * @param string $sPatchVersion if non provided, will call GetItopPatchVersion - * - * @return string eg 2.7 if ITOP_VERSION is '2.7.0-dev' - * @throws \Exception - */ - public static function GetItopMinorVersion($sPatchVersion = null) { - if (is_null($sPatchVersion)) { - $sPatchVersion = self::GetItopPatchVersion(); - } - $aExplodedVersion = explode('.', $sPatchVersion); - - if (count($aExplodedVersion) < 2) { - throw new Exception('iTop version is wrongfully configured!'); - } - if (($aExplodedVersion[0] == '') || ($aExplodedVersion[1] == '')) { - throw new Exception('iTop version is wrongfully configured!'); + if (empty($aExplodedVersion[0]) || empty($aExplodedVersion[1])) { + throw new ApplicationException('iTop version is wrongfully configured!'); } - return sprintf('%d.%d', $aExplodedVersion[0], $aExplodedVersion[1]); - } - - /** - * @return string eg '2.7.0' if ITOP_VERSION is '2.7.0-dev' - */ - public static function GetItopPatchVersion() { - $aExplodedVersion = explode('-', ITOP_VERSION); - - return $aExplodedVersion[0]; + return "{$aExplodedVersion[0]}_{$aExplodedVersion[1]}_0"; } /** diff --git a/approot.inc.php b/approot.inc.php index 6444593c1..280e1b040 100644 --- a/approot.inc.php +++ b/approot.inc.php @@ -13,4 +13,16 @@ define('APPCONF', APPROOT.'conf/'); */ define('ITOP_DESIGN_LATEST_VERSION', '3.0'); +/** + * Constant containing the iTop core version, whatever application was built + * + * Note that in iTop 3.0.0 we used {@see ITOP_DESIGN_LATEST_VERSION} to get core version. + * When releasing, both constants should be updated : see `.make/release/update-versions.php` for that ! + * + * @since 2.7.7 3.0.1 3.1.0 N°4714 constant creation + * @used-by utils::GetCoreVersionWikiSyntax() + * @used-by iTopModulesPhpVersionIntegrationTest + */ +define('ITOP_CORE_VERSION', '2.7.7'); + require_once APPROOT.'bootstrap.inc.php'; diff --git a/composer.lock b/composer.lock index d099e62d7..ee84df7ec 100644 --- a/composer.lock +++ b/composer.lock @@ -2221,16 +2221,16 @@ }, { "name": "symfony/twig-bundle", - "version": "v3.4.36", + "version": "v3.4.47", "source": { "type": "git", "url": "https://github.com/symfony/twig-bundle.git", - "reference": "d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9" + "reference": "977b3096e2df96bc8a8d2329e83466cfc30c373d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9", - "reference": "d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/977b3096e2df96bc8a8d2329e83466cfc30c373d", + "reference": "977b3096e2df96bc8a8d2329e83466cfc30c373d", "shasum": "" }, "require": { @@ -2263,11 +2263,6 @@ "symfony/yaml": "~2.8|~3.0|~4.0" }, "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Bundle\\TwigBundle\\": "" @@ -2292,7 +2287,24 @@ ], "description": "Symfony TwigBundle", "homepage": "https://symfony.com", - "time": "2019-10-01T15:13:36+00:00" + "support": { + "source": "https://github.com/symfony/twig-bundle/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-24T10:57:07+00:00" }, { "name": "symfony/yaml", diff --git a/core/config.class.inc.php b/core/config.class.inc.php index c08f4802c..e59ba1272 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -31,17 +31,6 @@ define('ITOP_APPLICATION_SHORT', 'iTop'); */ define('ITOP_VERSION', '3.0.1-dev'); -/** - * Constant containing the iTop core version, whatever application was built - * - * Note that in iTop 3.0.0 we used {@see ITOP_DESIGN_LATEST_VERSION} to get core version. - * When releasing, both constants should be updated : see `.make/release/update-versions.php` for that ! - * - * @since 2.7.7 3.0.1 3.1.1 N°4714 constant creation - * @used-by utils::GetItopPatchVersion - */ -define('ITOP_CORE_VERSION', '3.0.1'); - define('ITOP_VERSION_NAME', 'Fullmoon'); define('ITOP_REVISION', 'svn'); define('ITOP_BUILD_DATE', '$WCNOW$'); diff --git a/core/dbobjectsearch.class.php b/core/dbobjectsearch.class.php index d698eddf2..8be53e24b 100644 --- a/core/dbobjectsearch.class.php +++ b/core/dbobjectsearch.class.php @@ -1236,7 +1236,7 @@ class DBObjectSearch extends DBSearch elseif (MetaModel::IsParentClass($oRightFilter->GetFirstJoinedClass(), $oLeftFilter->GetClass())) { // Specialize $oRightFilter - $oRightFilter->ChangeClass($oLeftFilter->GetClass()); + $oRightFilter->ChangeClass($oLeftFilter->GetFirstJoinedClass()); } else { diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 4b64b1e41..e975ae448 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -655,7 +655,7 @@ abstract class MetaModel * @param string $sRuleId * * @throws \CoreException - * @since 2.6.1 N°1918 (sous les pavés, la plage) initialize in 'root_class' property the class that has the first + * @since 2.6.1 N°1968 (sous les pavés, la plage) initialize in 'root_class' property the class that has the first * definition of the rule in the hierarchy */ private static function SetUniquenessRuleRootClass($sRootClass, $sRuleId) diff --git a/core/sqlobjectquery.class.inc.php b/core/sqlobjectquery.class.inc.php index 283551d35..d433cb26f 100644 --- a/core/sqlobjectquery.class.inc.php +++ b/core/sqlobjectquery.class.inc.php @@ -494,7 +494,17 @@ class SQLObjectQuery extends SQLQuery } } - private function PrepareSingleTable(SQLObjectQuery $oRootQuery, &$aFrom, $sCallerAlias = '', $aJoinData) + /** + * @param \SQLObjectQuery $oRootQuery + * @param $aFrom + * @param $sCallerAlias + * @param $aJoinData + * + * @return string + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 Remove default value for $sCallerAlias for PHP 8.0 compat (Private method with only 2 calls in the class, both providing the optional parameter) + */ + private function PrepareSingleTable(SQLObjectQuery $oRootQuery, &$aFrom, $sCallerAlias, $aJoinData) { $aTranslationTable[$this->m_sTable]['*'] = $this->m_sTableAlias; $sJoinCond = ''; @@ -613,6 +623,7 @@ class SQLObjectQuery extends SQLQuery $aTempFrom = array(); // temporary subset of 'from' specs, to be grouped in the final query foreach ($this->m_aJoinSelects as $aJoinData) { + /** @var \SQLObjectQuery $oRightSelect */ $oRightSelect = $aJoinData["select"]; $oRightSelect->PrepareSingleTable($oRootQuery, $aTempFrom, $this->m_sTableAlias, $aJoinData); diff --git a/css/css-variables.scss b/css/css-variables.scss index 1717b7ad0..8de8945bb 100644 --- a/css/css-variables.scss +++ b/css/css-variables.scss @@ -15,6 +15,9 @@ * * You should have received a copy of the GNU Affero General Public License */ + +// Beware the version number MUST be enclosed with quotes otherwise v2.3.0 becomes v2 0.3 .0 +$version: "v2.7.7"; $approot-relative: "../../../../" !default; // relative to env-***/branding/themes/***/main.css // Base colors diff --git a/lib/.gitignore b/lib/.gitignore index fe9051d17..db8232362 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -32,4 +32,5 @@ # TWIG /twig/twig/doc /twig/twig/test -/twig/twig/drupal_test.sh \ No newline at end of file +/twig/twig/drupal_test.sh +/symfony/twig-bundle/Tests diff --git a/lib/composer/autoload_classmap.php b/lib/composer/autoload_classmap.php index 5d27d2f5f..4c84361ad 100644 --- a/lib/composer/autoload_classmap.php +++ b/lib/composer/autoload_classmap.php @@ -2361,6 +2361,8 @@ return array( 'iApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php', 'iAttributeNoGroupBy' => $baseDir . '/core/attributedef.class.inc.php', 'iBackgroundProcess' => $baseDir . '/core/backgroundprocess.inc.php', + 'iBackofficeDictEntriesExtension' => $baseDir . '/application/applicationextension.inc.php', + 'iBackofficeDictEntriesPrefixesExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeEarlyScriptExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeInitScriptExtension' => $baseDir . '/application/applicationextension.inc.php', 'iBackofficeLinkedScriptsExtension' => $baseDir . '/application/applicationextension.inc.php', diff --git a/lib/composer/autoload_static.php b/lib/composer/autoload_static.php index 6ce312922..1bfb8f3d3 100644 --- a/lib/composer/autoload_static.php +++ b/lib/composer/autoload_static.php @@ -2591,6 +2591,8 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b 'iApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iAttributeNoGroupBy' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php', 'iBackgroundProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php', + 'iBackofficeDictEntriesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', + 'iBackofficeDictEntriesPrefixesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeEarlyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeInitScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', 'iBackofficeLinkedScriptsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php', diff --git a/lib/composer/installed.json b/lib/composer/installed.json index b3418a3d3..5d3afb8fd 100644 --- a/lib/composer/installed.json +++ b/lib/composer/installed.json @@ -2367,17 +2367,17 @@ }, { "name": "symfony/twig-bundle", - "version": "v3.4.36", - "version_normalized": "3.4.36.0", + "version": "v3.4.47", + "version_normalized": "3.4.47.0", "source": { "type": "git", "url": "https://github.com/symfony/twig-bundle.git", - "reference": "d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9" + "reference": "977b3096e2df96bc8a8d2329e83466cfc30c373d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9", - "reference": "d39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/977b3096e2df96bc8a8d2329e83466cfc30c373d", + "reference": "977b3096e2df96bc8a8d2329e83466cfc30c373d", "shasum": "" }, "require": { @@ -2409,13 +2409,8 @@ "symfony/web-link": "~3.3|~4.0", "symfony/yaml": "~2.8|~3.0|~4.0" }, - "time": "2019-10-01T15:13:36+00:00", + "time": "2020-10-24T10:57:07+00:00", "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -2441,6 +2436,23 @@ ], "description": "Symfony TwigBundle", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/twig-bundle/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "install-path": "../symfony/twig-bundle" }, { diff --git a/lib/composer/installed.php b/lib/composer/installed.php index d7aa42ced..e09e7a3a6 100644 --- a/lib/composer/installed.php +++ b/lib/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1d28bbe3f4e8467dc8f5459f638bed79526022bc', + 'reference' => '47feb7f4259aebc4e9b27cfc8a6eafbbbf0b3686', 'name' => '__root__', 'dev' => true, ), @@ -16,7 +16,7 @@ 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1d28bbe3f4e8467dc8f5459f638bed79526022bc', + 'reference' => '47feb7f4259aebc4e9b27cfc8a6eafbbbf0b3686', 'dev_requirement' => false, ), 'combodo/tcpdf' => array( @@ -383,12 +383,12 @@ 'dev_requirement' => false, ), 'symfony/twig-bundle' => array( - 'pretty_version' => 'v3.4.36', - 'version' => '3.4.36.0', + 'pretty_version' => 'v3.4.47', + 'version' => '3.4.47.0', 'type' => 'symfony-bundle', 'install_path' => __DIR__ . '/../symfony/twig-bundle', 'aliases' => array(), - 'reference' => 'd39ed8f5df62aeeeb27a6f3bf7f58a6c02a58ea9', + 'reference' => '977b3096e2df96bc8a8d2329e83466cfc30c373d', 'dev_requirement' => false, ), 'symfony/var-dumper' => array( diff --git a/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php b/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php index 23abdbf99..329e018c2 100644 --- a/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php +++ b/lib/symfony/twig-bundle/CacheWarmer/TemplateCacheWarmer.php @@ -40,9 +40,9 @@ class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInte $this->container = $container; } elseif ($container instanceof Environment) { $this->twig = $container; - @trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED); + @trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, ContainerInterface::class), \E_USER_DEPRECATED); } else { - throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__)); + throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__)); } $this->iterator = $iterator; diff --git a/lib/symfony/twig-bundle/Command/DebugCommand.php b/lib/symfony/twig-bundle/Command/DebugCommand.php index 107eece30..c04a28a9f 100644 --- a/lib/symfony/twig-bundle/Command/DebugCommand.php +++ b/lib/symfony/twig-bundle/Command/DebugCommand.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\TwigBundle\Command; -@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Bridge\Twig\Command\DebugCommand instead.', DebugCommand::class), E_USER_DEPRECATED); +@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Bridge\Twig\Command\DebugCommand instead.', DebugCommand::class), \E_USER_DEPRECATED); use Symfony\Bridge\Twig\Command\DebugCommand as BaseDebugCommand; use Symfony\Component\DependencyInjection\ContainerAwareInterface; diff --git a/lib/symfony/twig-bundle/ContainerAwareRuntimeLoader.php b/lib/symfony/twig-bundle/ContainerAwareRuntimeLoader.php index 7595f5674..47ec9a961 100644 --- a/lib/symfony/twig-bundle/ContainerAwareRuntimeLoader.php +++ b/lib/symfony/twig-bundle/ContainerAwareRuntimeLoader.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\TwigBundle; -@trigger_error(sprintf('The %s class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Twig\RuntimeLoader\ContainerRuntimeLoader class instead.', ContainerAwareRuntimeLoader::class), E_USER_DEPRECATED); +@trigger_error(sprintf('The %s class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Twig\RuntimeLoader\ContainerRuntimeLoader class instead.', ContainerAwareRuntimeLoader::class), \E_USER_DEPRECATED); use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php b/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php index 51b6d9b4f..bd0c606a8 100644 --- a/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php +++ b/lib/symfony/twig-bundle/DependencyInjection/Compiler/TwigLoaderPass.php @@ -39,7 +39,7 @@ class TwigLoaderPass implements CompilerPassInterface } if (!$found) { - throw new LogicException('No twig loaders found. You need to tag at least one loader with "twig.loader"'); + throw new LogicException('No twig loaders found. You need to tag at least one loader with "twig.loader".'); } if (1 === $found) { diff --git a/lib/symfony/twig-bundle/LICENSE b/lib/symfony/twig-bundle/LICENSE index a677f4376..9e936ec04 100644 --- a/lib/symfony/twig-bundle/LICENSE +++ b/lib/symfony/twig-bundle/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2019 Fabien Potencier +Copyright (c) 2004-2020 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/symfony/twig-bundle/TwigBundle.php b/lib/symfony/twig-bundle/TwigBundle.php index bd766c152..5a353833e 100644 --- a/lib/symfony/twig-bundle/TwigBundle.php +++ b/lib/symfony/twig-bundle/TwigBundle.php @@ -32,7 +32,8 @@ class TwigBundle extends Bundle { parent::build($container); - $container->addCompilerPass(new ExtensionPass()); + // ExtensionPass must be run before the FragmentRendererPass as it adds tags that are processed later + $container->addCompilerPass(new ExtensionPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); $container->addCompilerPass(new TwigEnvironmentPass()); $container->addCompilerPass(new TwigLoaderPass()); $container->addCompilerPass(new ExceptionListenerPass()); diff --git a/lib/symfony/twig-bundle/composer.json b/lib/symfony/twig-bundle/composer.json index f48e3bc07..16c0888ef 100644 --- a/lib/symfony/twig-bundle/composer.json +++ b/lib/symfony/twig-bundle/composer.json @@ -50,10 +50,5 @@ "/Tests/" ] }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "3.4-dev" - } - } + "minimum-stability": "dev" } diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index 19c875201..d84962a91 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -2311,6 +2311,9 @@ EOF; * Replaces a node by another one, making sure that recursive nodes are preserved * * @param MFElement $oNewNode The replacement + * + * @since 2.7.7 3.0.1 3.1.0 N°3129 rename method (from `ReplaceWith` to `MFReplaceWith`) to avoid collision with parent `\DOMElement::replaceWith` method (different method modifier and parameters : + * throws fatal error in PHP 8.0) */ protected function ReplaceWithSingleNode($oNewNode) { diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 7db2cfd84..40ac6c582 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -1012,7 +1012,7 @@ class SetupUtils $oPage, $bIsItopInstall, $sDBServer, $sDBUser, $sDBPwd, $sDBName, $sDBPrefix, $bTlsEnabled, $sTlsCA, $sNewDBName = '' ) { - $sWikiVersion = utils::GetItopVersionWikiSyntax(); //eg : '2_7_0'; + $sWikiVersion = utils::GetCoreVersionWikiSyntax(); //eg : '2_7_0'; $sMysqlTlsWikiPageUrl = 'https://www.itophub.io/wiki/page?id='.$sWikiVersion.':install:php_and_mysql_tls'; $oPage->add('