From 740f83f43e8e28c003721a9a51cf9b3239c87187 Mon Sep 17 00:00:00 2001 From: bdalsass Date: Thu, 3 Jul 2025 13:39:39 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B08395=20-=20php8.1=20compatibility=20in?= =?UTF-8?q?=20class=20extended=20Exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/src/Brick/AbstractBrick.php | 2 +- .../portal/src/Brick/AggregatePageBrick.php | 2 +- .../portal/src/Brick/BrowseBrick.php | 6 +++--- .../portal/src/Brick/FilterBrick.php | 2 +- .../portal/src/Brick/ManageBrick.php | 12 ++++++------ .../portal/src/Brick/UserProfileBrick.php | 2 +- .../PortalXmlConfiguration/Forms.php | 8 ++++---- .../PortalXmlConfiguration/Lists.php | 2 +- .../portal/src/Helper/ScopeValidatorHelper.php | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/AbstractBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/AbstractBrick.php index 217896e45..7374083d5 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/AbstractBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/AbstractBrick.php @@ -631,7 +631,7 @@ abstract class AbstractBrick implements TemplatesProviderInterface // Checking mandatory elements if (!$oMDElement->hasAttribute('id')) { - throw new DOMFormatException('Brick node must have both id and xsi:type attributes defined', null, null, $oMDElement); + throw new DOMFormatException('Brick node must have both id and xsi:type attributes defined', 0, null, $oMDElement); } $this->SetId($oMDElement->getAttribute('id')); diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/AggregatePageBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/AggregatePageBrick.php index 6fff14c08..4c3873901 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/AggregatePageBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/AggregatePageBrick.php @@ -93,7 +93,7 @@ class AggregatePageBrick extends PortalBrick { if (!$oAggregatePageBrickNode->hasAttribute('id')) { - throw new DOMFormatException('AggregatePageBrick : must have an id attribute', null, + throw new DOMFormatException('AggregatePageBrick : must have an id attribute', 0, null, $oAggregatePageBrickNode); } $sBrickName = $oAggregatePageBrickNode->getAttribute('id'); diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/BrowseBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/BrowseBrick.php index ef91ddf11..476d0fb02 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/BrowseBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/BrowseBrick.php @@ -375,7 +375,7 @@ class BrowseBrick extends PortalBrick { if (!$oModeNode->hasAttribute('id')) { - throw new DOMFormatException('BrowseBrick: Browse mode must have a unique ID attribute', null, + throw new DOMFormatException('BrowseBrick: Browse mode must have a unique ID attribute', 0, null, $oModeNode); } @@ -416,7 +416,7 @@ class BrowseBrick extends PortalBrick // Checking that the brick has at least a browse mode if (count($this->GetAvailablesBrowseModes()) === 0) { - throw new DOMFormatException('BrowseBrick : Must have at least one browse mode', null, null, $oMDElement); + throw new DOMFormatException('BrowseBrick : Must have at least one browse mode', 0, null, $oMDElement); } // Checking that default browse mode in among the available if (!in_array($this->sDefaultBrowseMode, array_keys($this->aAvailablesBrowseModes))) @@ -427,7 +427,7 @@ class BrowseBrick extends PortalBrick // Checking that the brick has at least a level if (count($this->GetLevels()) === 0) { - throw new DOMFormatException('BrowseBrick : Must have at least one level', null, null, $oMDElement); + throw new DOMFormatException('BrowseBrick : Must have at least one level', 0, null, $oMDElement); } return $this; diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/FilterBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/FilterBrick.php index 104d53649..3ed96552d 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/FilterBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/FilterBrick.php @@ -252,7 +252,7 @@ class FilterBrick extends PortalBrick // Checking that the brick has at least a target brick id if (($this->GetTargetBrickId() === null) || ($this->GetTargetBrickId() === '')) { - throw new DOMFormatException('FilterBrick : Must have a target brick id', null, null, $oMDElement); + throw new DOMFormatException('FilterBrick : Must have a target brick id', 0, null, $oMDElement); } return $this; diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/ManageBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/ManageBrick.php index f09338556..b770b6c40 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/ManageBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/ManageBrick.php @@ -893,7 +893,7 @@ class ManageBrick extends PortalBrick if (!$oModeNode->hasAttribute('id')) { throw new DOMFormatException('ManageBrick: Display mode must have a unique ID attribute', - null, null, $oModeNode); + 0, null, $oModeNode); } $sModeId = $oModeNode->getAttribute('id'); @@ -930,7 +930,7 @@ class ManageBrick extends PortalBrick { if (!$oFieldNode->hasAttribute('id')) { - throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', null, + throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', 0, null, $oFieldNode); } $this->AddField($oFieldNode->getAttribute('id')); @@ -950,7 +950,7 @@ class ManageBrick extends PortalBrick if (!$oFieldNode->hasAttribute('id')) { throw new DOMFormatException('ManageBrick : Field must have a unique ID attribute', - null, + 0, null, $oFieldNode); } $this->AddExportField($oFieldNode->getAttribute('id')); @@ -1012,7 +1012,7 @@ class ManageBrick extends PortalBrick if (!$oGroupNode->hasAttribute('id')) { throw new DOMFormatException('ManageBrick : Group must have a unique ID attribute', - null, null, $oGroupNode); + 0, null, $oGroupNode); } $sGroupId = $oGroupNode->getAttribute('id'); @@ -1038,12 +1038,12 @@ class ManageBrick extends PortalBrick if (!isset($aGroup['title']) || $aGroup['title'] === '') { throw new DOMFormatException('ManageBrick : Group must have a title tag and it must not be empty', - null, null, $oGroupNode); + 0, null, $oGroupNode); } if (!isset($aGroup['condition']) || $aGroup['condition'] === '') { throw new DOMFormatException('ManageBrick : Group must have a condition tag and it must not be empty', - null, null, $oGroupNode); + 0, null, $oGroupNode); } $aGroups[] = $aGroup; } diff --git a/datamodels/2.x/itop-portal-base/portal/src/Brick/UserProfileBrick.php b/datamodels/2.x/itop-portal-base/portal/src/Brick/UserProfileBrick.php index 0c97195e2..45fbbfb00 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Brick/UserProfileBrick.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Brick/UserProfileBrick.php @@ -211,7 +211,7 @@ class UserProfileBrick extends PortalBrick $this->aForm['fields'][$sFieldId] = $aField; } else { - throw new DOMFormatException('Field tag must have an id attribute', null, null, $oFieldNode); + throw new DOMFormatException('Field tag must have an id attribute', 0, null, $oFieldNode); } } } diff --git a/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Forms.php b/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Forms.php index d0821860b..650cec201 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Forms.php +++ b/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Forms.php @@ -53,13 +53,13 @@ class Forms extends AbstractConfiguration $sFormId = $oFormNode->getAttribute('id'); if ($oFormNode->getAttribute('id') === '') { - throw new DOMFormatException('form tag must have an id attribute', null, null, $oFormNode); + throw new DOMFormatException('form tag must have an id attribute', 0, null, $oFormNode); } // Parsing form object class if ($oFormNode->GetUniqueElement('class')->GetText() === null) { - throw new DOMFormatException('Class tag must be defined', null, null, $oFormNode); + throw new DOMFormatException('Class tag must be defined', 0, null, $oFormNode); } // Parsing class @@ -149,7 +149,7 @@ class Forms extends AbstractConfiguration $sModeId = $oModeNode->getAttribute('id'); if ($sModeId === '') { - throw new DOMFormatException('mode tag must have an id attribute', null, null, + throw new DOMFormatException('mode tag must have an id attribute', 0, null, $oFormNode); } $aModes[] = $sModeId; @@ -225,7 +225,7 @@ class Forms extends AbstractConfiguration } else { - throw new DOMFormatException('Field tag must have an id attribute', null, null, + throw new DOMFormatException('Field tag must have an id attribute', 0, null, $oFormNode); } } diff --git a/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Lists.php b/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Lists.php index 3ed73fca4..fbef50334 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Lists.php +++ b/datamodels/2.x/itop-portal-base/portal/src/DependencyInjection/SilexCompatBootstrap/PortalXmlConfiguration/Lists.php @@ -50,7 +50,7 @@ class Lists extends AbstractConfiguration $sClassId = $oClassNode->getAttribute('id'); if ($sClassId === null) { - throw new DOMFormatException('Class tag must have an id attribute', null, null, $oClassNode); + throw new DOMFormatException('Class tag must have an id attribute', 0, null, $oClassNode); } // - Each lists diff --git a/datamodels/2.x/itop-portal-base/portal/src/Helper/ScopeValidatorHelper.php b/datamodels/2.x/itop-portal-base/portal/src/Helper/ScopeValidatorHelper.php index 3777d84ce..6332a56c4 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Helper/ScopeValidatorHelper.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Helper/ScopeValidatorHelper.php @@ -490,7 +490,7 @@ EOF; { throw new DOMFormatException( 'Scope tag in class must have a not empty oql_view tag', - null, + 0, null, $oScopeNode );