From e6914543391b0acde333f6edbf6e80e7ff484884 Mon Sep 17 00:00:00 2001 From: acognet Date: Fri, 15 Apr 2022 10:00:08 +0200 Subject: [PATCH 01/15] =?UTF-8?q?N=C2=B05002=20-=20memory=20leak=20after?= =?UTF-8?q?=20object=20creation=20in=20popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/forms-json-utils.js | 106 ++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 60 deletions(-) diff --git a/js/forms-json-utils.js b/js/forms-json-utils.js index 0eec9508d..57c97e91b 100644 --- a/js/forms-json-utils.js +++ b/js/forms-json-utils.js @@ -300,75 +300,61 @@ function ValidateField(sFieldId, sPattern, bMandatory, sFormId, nullValue, origi function ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue) { - var bValid; - var sExplain = ''; - var sTextContent; + if ($('#'+sFieldId).size() > 0) { + var bValid; + var sExplain = ''; + var sTextContent; - if ($('#'+sFieldId).prop('disabled')) - { - bValid = true; // disabled fields are not checked - } - else - { - // Get the contents without the tags - var oFormattedContents = $("#cke_"+sFieldId+" iframe"); - if (oFormattedContents.length == 0) - { - var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source"); - sTextContent = oSourceContents.val(); - } - else - { - sTextContent = oFormattedContents.contents().find("body").text(); - - if (sTextContent == '') - { - // No plain text, maybe there is just an image... - var oImg = oFormattedContents.contents().find("body img"); - if (oImg.length != 0) - { - sTextContent = 'image'; + if ($('#'+sFieldId).prop('disabled')) { + bValid = true; // disabled fields are not checked + } else { + // Get the contents without the tags + var oFormattedContents = $("#cke_"+sFieldId+" iframe"); + if (oFormattedContents.length == 0) { + var oSourceContents = $("#cke_"+sFieldId+" textarea.cke_source"); + sTextContent = oSourceContents.val(); + } else { + sTextContent = oFormattedContents.contents().find("body").text(); + + if (sTextContent == '') { + // No plain text, maybe there is just an image... + var oImg = oFormattedContents.contents().find("body img"); + if (oImg.length != 0) { + sTextContent = 'image'; + } } } - } - // Get the original value without the tags - var oFormattedOriginalContents = (originalValue !== undefined) ? $('
').html(originalValue) : undefined; - var sTextOriginalContents = (oFormattedOriginalContents !== undefined) ? oFormattedOriginalContents.text() : undefined; - - if (bMandatory && (sTextContent == nullValue)) - { - bValid = false; - sExplain = Dict.S('UI:ValueMustBeSet'); - } - else if ((sTextOriginalContents != undefined) && (sTextContent == sTextOriginalContents)) - { - bValid = false; - if (sTextOriginalContents == nullValue) - { + // Get the original value without the tags + var oFormattedOriginalContents = (originalValue !== undefined) ? $('
').html(originalValue) : undefined; + var sTextOriginalContents = (oFormattedOriginalContents !== undefined) ? oFormattedOriginalContents.text() : undefined; + + if (bMandatory && (sTextContent == nullValue)) { + bValid = false; sExplain = Dict.S('UI:ValueMustBeSet'); - } - else - { - // Note: value change check is not working well yet as the HTML to Text conversion is not exactly the same when done from the PHP value or the CKEditor value. - sExplain = Dict.S('UI:ValueMustBeChanged'); + } else if ((sTextOriginalContents != undefined) && (sTextContent == sTextOriginalContents)) { + bValid = false; + if (sTextOriginalContents == nullValue) { + sExplain = Dict.S('UI:ValueMustBeSet'); + } else { + // Note: value change check is not working well yet as the HTML to Text conversion is not exactly the same when done from the PHP value or the CKEditor value. + sExplain = Dict.S('UI:ValueMustBeChanged'); + } + } else { + bValid = true; } } - else - { - bValid = true; + + ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain); + + if ($('#'+sFieldId).data('timeout_validate') == undefined) { + // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92 + var iTimeoutValidate = setInterval(function () { + ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue); + }, 500); + $('#'+sFieldId).data('timeout_validate', iTimeoutValidate); } } - - ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain); - - if ($('#'+sFieldId).data('timeout_validate') == undefined) { - // We need to check periodically as CKEditor doesn't trigger our events. More details in UIHTMLEditorWidget::Display() @ line 92 - var iTimeoutValidate = setInterval(function () { - ValidateCKEditField(sFieldId, sPattern, bMandatory, sFormId, nullValue, originalValue); - }, 500); - $('#'+sFieldId).data('timeout_validate', iTimeoutValidate); - } } /* From 6fa2d47780335ea5d4a9e311a3d931782b0a089a Mon Sep 17 00:00:00 2001 From: acognet Date: Fri, 15 Apr 2022 10:03:04 +0200 Subject: [PATCH 02/15] =?UTF-8?q?N=C2=B04538=20-=20Dashlet=20Groupby=20on?= =?UTF-8?q?=20ExternalKey=20with=20special=20character,=20bad=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/forms.class.inc.php | 24 +++++++++++------------- pages/ajax.render.php | 11 ++++++++++- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/application/forms.class.inc.php b/application/forms.class.inc.php index eadd1661b..a28d5154c 100644 --- a/application/forms.class.inc.php +++ b/application/forms.class.inc.php @@ -1223,7 +1223,7 @@ class DesignerComboField extends DesignerFormField $sChecked = $this->defaultValue ? 'checked' : ''; $sMandatory = $this->bMandatory ? 'true' : 'false'; $sReadOnly = $this->IsReadOnly() ? 'disabled="disabled"' : ''; - if ($this->IsSorted()) + if ($this->IsSorted() && isset($this->aAllowedValues) ) { asort($this->aAllowedValues); } @@ -1271,19 +1271,17 @@ class DesignerComboField extends DesignerFormField $sHtml .= ""; } } - foreach($this->aAllowedValues as $sKey => $sDisplayValue) - { - if ($this->bMultipleSelection) - { - $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : ''; + if ( isset($this->aAllowedValues) ) { + foreach ($this->aAllowedValues as $sKey => $sDisplayValue) { + if ($this->bMultipleSelection) { + $sSelected = in_array($sKey, $this->defaultValue) ? 'selected' : ''; + } else { + $sSelected = ($sKey == $this->defaultValue) ? 'selected' : ''; + } + // Quick and dirty: display the menu parents as a tree + $sHtmlValue = str_replace(' ', ' ', $sDisplayValue); + $sHtml .= ""; } - else - { - $sSelected = ($sKey == $this->defaultValue) ? 'selected' : ''; - } - // Quick and dirty: display the menu parents as a tree - $sHtmlValue = str_replace(' ', ' ', htmlentities($sDisplayValue, ENT_QUOTES, 'UTF-8')); - $sHtml .= ""; } $sHtml .= ""; if ($this->bOtherChoices) diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 8df024513..fbe25a152 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -1368,7 +1368,16 @@ EOF foreach($aUpdatedProperties as $sProp) { $sDecodedProp = str_replace('attr_', '', $sProp); // Remove the attr_ prefix - $aCurrentValues[$sDecodedProp] = (isset($aPreviousValues[$sProp]) ? $aPreviousValues[$sProp] : ''); // Set the previous value + // Set the previous value + if ( isset($aPreviousValues[$sProp]) && $aPreviousValues[$sProp] != '' ){ + $aCurrentValues[$sDecodedProp] = $aPreviousValues[$sProp]; + } else { + if(gettype($aCurrentValues[$sDecodedProp]) == "array") { + $aCurrentValues[$sDecodedProp] = []; + } else { + $aCurrentValues[$sDecodedProp] = ''; + } + } $aUpdatedDecoded[] = $sDecodedProp; } From e831d66b76a1c0bbb548c2e9046512d36f73a9ad Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 15 Apr 2022 17:30:05 +0200 Subject: [PATCH 03/15] =?UTF-8?q?N=C2=B05090=20Setup=20:=20improve=20missi?= =?UTF-8?q?ng=20dependencies=20message=20(#280)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The setup now relies on the new method MissingDependencyException::getHtmlDesc to get the message to display MissingDependencyException is also now a CoreException child. Note that previous behavior (MissingDependencyException instantiator setting message) is kept, as some consumer still do $e->getMessage() (like unattended install) --- setup/modulediscovery.class.inc.php | 39 ++++++++++++++++++++++++++++- setup/wizardsteps.class.inc.php | 4 +-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/setup/modulediscovery.class.inc.php b/setup/modulediscovery.class.inc.php index a77db0ecd..aaffe7c49 100644 --- a/setup/modulediscovery.class.inc.php +++ b/setup/modulediscovery.class.inc.php @@ -19,9 +19,46 @@ * */ -class MissingDependencyException extends Exception +class MissingDependencyException extends CoreException { + /** + * @see \ModuleDiscovery::OrderModulesByDependencies property init + * @var array module id as key + * another array as value, containing : 'module' with module info, 'dependencies' with missing dependencies + */ public $aModulesInfo; + + /** + * @return string HTML to print to the user the modules impacted + * @since 2.7.7 3.0.2 3.1.0 PR #280 + */ + public function getHtmlDesc($sHighlightHtmlBegin = null, $sHighlightHtmlEnd = null) + { + $sErrorMessage = <<The following modules have unmet dependencies:

+
    +HTML; + foreach ($this->aModulesInfo as $sModuleId => $aModuleErrors) { + $sModuleLabel = $aModuleErrors['module']['label']; + $aModuleMissingDependencies = $aModuleErrors['dependencies']; + $sErrorMessage .= <<{$sModuleLabel} ({$sModuleId}): +
      +HTML; + + foreach ($aModuleMissingDependencies as $sMissingModule) { + $sErrorMessage .= "
    • {$sMissingModule}
    • "; + } + $sErrorMessage .= << + +HTML; + + } + $sErrorMessage .= '
    '; + + return $sErrorMessage; + } } class ModuleDiscovery diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index cb412885e..d7db579ea 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -1351,7 +1351,7 @@ class WizStepModulesChoice extends WizardStep } catch(MissingDependencyException $e) { - $oPage->warning($e->getMessage()); + $oPage->warning($e->getHtmlDesc()); } $this->bUpgrade = ($this->oWizard->GetParameter('install_mode') != 'install'); @@ -2092,7 +2092,7 @@ class WizStepSummary extends WizardStep catch(MissingDependencyException $e) { $this->bDependencyCheck = false; - $this->sDependencyIssue = $e->getMessage(); + $this->sDependencyIssue = $e->getHtmlDesc(); } } return $this->bDependencyCheck; From e02d9f3f0e9fdecb0510c7499fd4e77f6972ccaf Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 15 Apr 2022 17:43:20 +0200 Subject: [PATCH 04/15] =?UTF-8?q?:bulb:=20N=C2=B05090=20Improve=20phpdoc?= =?UTF-8?q?=20using=20list=20array=20shape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/modulediscovery.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/modulediscovery.class.inc.php b/setup/modulediscovery.class.inc.php index aaffe7c49..dc22780e7 100644 --- a/setup/modulediscovery.class.inc.php +++ b/setup/modulediscovery.class.inc.php @@ -23,8 +23,9 @@ class MissingDependencyException extends CoreException { /** * @see \ModuleDiscovery::OrderModulesByDependencies property init - * @var array module id as key - * another array as value, containing : 'module' with module info, 'dependencies' with missing dependencies + * @var array> + * module id as key + * another array as value, containing : 'module' with module info, 'dependencies' with missing dependencies */ public $aModulesInfo; From e422adb0d09632bd3c6a22cf6ff8a56892feac2d Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 19 Apr 2022 12:25:15 +0200 Subject: [PATCH 05/15] =?UTF-8?q?N=C2=B04998=20Fix=20CSS=20for=20Attribute?= =?UTF-8?q?Duration=20in=20transition=20form=20(#281)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/light-grey.scss | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/css/light-grey.scss b/css/light-grey.scss index 46e1943a6..77c1e31f3 100644 --- a/css/light-grey.scss +++ b/css/light-grey.scss @@ -2424,26 +2424,33 @@ fieldset .details>.field_container { .selectize-dropdown, .selectize-input, - .selectize-input input{ - font-size: 12px; - } - .selectize-input{ - padding: 2px 2px 0px 2px; /* padding-bottom = padding-top - item margin-bottom */ - border: 1px solid #ABABAB; - border-radius: 0; + .selectize-input input { + font-size: 12px; + } - .attribute-set-item.partial-code{ - color: transparentize($gray-darker, 0.4); - background-color: lighten($gray-lighter, 5%); - } - } - } - } - } - } - } - } - } + .selectize-input { + padding: 2px 2px 0px 2px; /* padding-bottom = padding-top - item margin-bottom */ + border: 1px solid #ABABAB; + border-radius: 0; + + .attribute-set-item.partial-code { + color: transparentize($gray-darker, 0.4); + background-color: lighten($gray-lighter, 5%); + } + } + } + } + } + } + } + } + } + + &[data-attribute-type="AttributeDuration"] { + .field_value_container { + white-space: nowrap; + } + } } .one-col-details .details .field_container.field_small { div.field_label { From 11e811cc4b18fe7b1b6dd1240acc9d6414145ce5 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 19 Apr 2022 17:13:18 +0200 Subject: [PATCH 06/15] =?UTF-8?q?N=C2=B03717=20Improve=20iTop=20object=20h?= =?UTF-8?q?istory=20API=20(#192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a major flaw in the history API that was causing "phantom" CMDBChange records (without any CMDBChangeOp attached). That was happening especially in iProcess impl. For example this lead to the creation of the combodo-cmdbchange-cleaner module in the Mail To Ticket extension. The modifications in detail : - We can now pass a non persisted CMDBChange instance to \CMDBObject::SetCurrentChange - No persistence done in \CMDBObject::CreateChange anymore - Persistence of the attached CMDChange will be done if necessary in CMDBChangeOp::OnInsert - New CMDBObject::SetCurrentChangeFromParams helper method to ease resetting the current change --- core/cmdbchangeop.class.inc.php | 22 ++++-- core/cmdbobject.class.inc.php | 41 ++++++++--- datamodels/2.x/combodo-db-tools/dbtools.php | 4 +- test/core/CMDBObjectTest.php | 75 +++++++++++++++++++++ webservices/cron.php | 7 +- 5 files changed, 124 insertions(+), 25 deletions(-) create mode 100644 test/core/CMDBObjectTest.php diff --git a/core/cmdbchangeop.class.inc.php b/core/cmdbchangeop.class.inc.php index b1b015516..aeb94bf7a 100644 --- a/core/cmdbchangeop.class.inc.php +++ b/core/cmdbchangeop.class.inc.php @@ -63,22 +63,30 @@ class CMDBChangeOp extends DBObject /** * Describe (as a text string) the modifications corresponding to this change - */ + */ public function GetDescription() { return ''; } /** - * Safety net: in case the change is not given, let's guarantee that it will - * be set to the current ongoing change (or create a new one) - */ + * Safety net: + * * if change isn't persisted yet, use the current change and persist it if needed + * * in case the change is not given, let's guarantee that it will be set to the current ongoing change (or create a new one) + * + * @since 2.7.7 3.0.2 3.1.0 N°3717 do persist the current change if needed + */ protected function OnInsert() { - if ($this->Get('change') <= 0) - { - $this->Set('change', CMDBObject::GetCurrentChange()); + $iChange = $this->Get('change'); + if (($iChange <= 0) || (is_null($iChange))) { + $oChange = CMDBObject::GetCurrentChange(); + if ($oChange->IsNew()) { + $oChange->DBWrite(); + } + $this->Set('change', $oChange); } + parent::OnInsert(); } } diff --git a/core/cmdbobject.class.inc.php b/core/cmdbobject.class.inc.php index ce8acf0d6..e5d1a4b2f 100644 --- a/core/cmdbobject.class.inc.php +++ b/core/cmdbobject.class.inc.php @@ -114,6 +114,26 @@ abstract class CMDBObject extends DBObject self::$m_oCurrChange = $oChange; } + /** + * @param string $sUserInfo + * @param string $sOrigin + * @param \DateTime $oDate + * + * @throws \CoreException + * + * @since 2.7.7 3.0.2 3.1.0 N°3717 new method to reset current change + */ + public static function SetCurrentChangeFromParams($sUserInfo, $sOrigin = null, $oDate = null) + { + static::SetTrackInfo($sUserInfo); + static::SetTrackOrigin($sOrigin); + static::CreateChange(); + + if (!is_null($oDate)) { + static::$m_oCurrChange->Set("date", $oDate); + } + } + // // Todo: simplify the APIs and do not pass the current change as an argument anymore // SetTrackInfo to be invoked in very few cases (UI.php, CSV import, Data synchro) @@ -145,6 +165,8 @@ abstract class CMDBObject extends DBObject * $oMyChange->Set("userinfo", 'this is done by ... for ...'); * $iChangeId = $oMyChange->DBInsert(); * + * **warning** : this will do nothing if current change already exists ! + * * @see SetCurrentChange to specify a CMDBObject instance instead * * @param string $sInfo @@ -157,6 +179,8 @@ abstract class CMDBObject extends DBObject /** * Provides information about the origin of the change * + * **warning** : this will do nothing if current change already exists ! + * * @see SetTrackInfo * @see SetCurrentChange to specify a CMDBObject instance instead * @@ -167,18 +191,15 @@ abstract class CMDBObject extends DBObject { self::$m_sOrigin = $sOrigin; } - + /** * Get the additional information (defaulting to user name) - */ - protected static function GetTrackInfo() + */ + public static function GetTrackInfo() { - if (is_null(self::$m_sInfo)) - { + if (is_null(self::$m_sInfo)) { return CMDBChange::GetCurrentUserName(); - } - else - { + } else { return self::$m_sInfo; } } @@ -201,7 +222,8 @@ abstract class CMDBObject extends DBObject /** * Set to {@link $m_oCurrChange} a standard change record (done here 99% of the time, and nearly once per page) * - * The CMDBChange is persisted so that it has a key > 0, and any new CMDBChangeOp can link to it + * @since 2.7.7 3.0.2 3.1.0 N°3717 {@see CMDBChange} **will be persisted later** in {@see \CMDBChangeOp::OnInsert} (was done previously directly here) + * This will avoid creating in DB CMDBChange lines without any corresponding CMDBChangeOp */ protected static function CreateChange() { @@ -209,7 +231,6 @@ abstract class CMDBObject extends DBObject self::$m_oCurrChange->Set("date", time()); self::$m_oCurrChange->Set("userinfo", self::GetTrackInfo()); self::$m_oCurrChange->Set("origin", self::GetTrackOrigin()); - self::$m_oCurrChange->DBInsert(); } /** diff --git a/datamodels/2.x/combodo-db-tools/dbtools.php b/datamodels/2.x/combodo-db-tools/dbtools.php index b0289d4c9..11dddd82e 100644 --- a/datamodels/2.x/combodo-db-tools/dbtools.php +++ b/datamodels/2.x/combodo-db-tools/dbtools.php @@ -301,9 +301,7 @@ function DisplayLostAttachments(iTopWebPage &$oP, ApplicationContext &$oAppConte $sHistoryEntry = Dict::Format('DBTools:LostAttachments:History', $oOrmDocument->GetFileName()); CMDBObject::SetTrackInfo(UserRights::GetUserFriendlyName()); $oChangeOp = MetaModel::NewObject('CMDBChangeOpPlugin'); - /** @var \Change $oChange */ - $oChange = CMDBObject::GetCurrentChange(); - $oChangeOp->Set('change', $oChange->GetKey()); + // CMDBChangeOp.change will be automatically filled $oChangeOp->Set('objclass', $sTargetClass); $oChangeOp->Set('objkey', $sTargetId); $oChangeOp->Set('description', $sHistoryEntry); diff --git a/test/core/CMDBObjectTest.php b/test/core/CMDBObjectTest.php new file mode 100644 index 000000000..237b51ca4 --- /dev/null +++ b/test/core/CMDBObjectTest.php @@ -0,0 +1,75 @@ +Set('name', 'PHPUnit test'); + $oTestObject->Set('org_id', 1); + $oTestObject->Set('url', 'https://www.combodo.com'); + $oTestObject->DBWrite(); + self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'TrackInfo : Current change persisted'); + self::assertEquals($sTrackInfo, CMDBObject::GetCurrentChange()->Get('userinfo'), + 'TrackInfo : current change created with expected trackinfo'); + + //-- new object with non persisted current change + $sTrackInfo2 = $sTrackInfo.'_2'; + /** @var \CMDBChange $oCustomChange */ + $oCustomChange = MetaModel::NewObject('CMDBChange'); + $oCustomChange->Set('date', time()); + $oCustomChange->Set('userinfo', $sTrackInfo2); + CMDBObject::SetCurrentChange($oCustomChange); + $oTestObject->Set('url', 'https://fr.wikipedia.org'); + $oTestObject->DBUpdate(); + self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'SetCurrentChange : Current change persisted'); + self::assertEquals($sTrackInfo2, CMDBObject::GetCurrentChange()->Get('userinfo'), + 'SetCurrentChange : current change created with expected trackinfo'); + + //-- new object with current change init using helper method + $sTrackInfo3 = $sTrackInfo.'_3'; + CMDBObject::SetCurrentChangeFromParams($sTrackInfo3); + $oTestObject->Set('url', 'https://en.wikipedia.org'); + $oTestObject->DBUpdate(); + self::assertFalse(CMDBObject::GetCurrentChange()->IsNew(), 'SetCurrentChangeFromParams : Current change persisted'); + self::assertEquals($sTrackInfo3, CMDBObject::GetCurrentChange()->Get('userinfo'), + 'SetCurrentChangeFromParams : current change created with expected trackinfo'); + + // restore initial conditions + $oTestObject->DBDelete(); + CMDBObject::SetCurrentChange($oInitialCurrentChange); + CMDBObject::SetTrackInfo($sInitialTrackInfo); + } +} \ No newline at end of file diff --git a/webservices/cron.php b/webservices/cron.php index 980085fd5..ea3e45cb6 100644 --- a/webservices/cron.php +++ b/webservices/cron.php @@ -266,12 +266,9 @@ function CronExec($oP, $aProcesses, $bVerbose, $bDebug=false) // N°3219 for each process will use a specific CMDBChange object with a specific track info // Any BackgroundProcess can overrides this as needed - CMDBObject::SetCurrentChange(null); - CMDBObject::SetTrackInfo("Background task ($sTaskClass)"); - CMDBObject::SetTrackOrigin(null); + CMDBObject::SetCurrentChangeFromParams("Background task ($sTaskClass)"); - if (!array_key_exists($sTaskClass, $aTasks)) - { + if (!array_key_exists($sTaskClass, $aTasks)) { // New entry, let's create a new BackgroundTask record, and plan the first execution $oTask = new BackgroundTask(); $oTask->SetDebug($bDebug); From b9ddadeb44ab924e7fbc3df50b89d502332d7c29 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 20 Apr 2022 17:22:35 +0200 Subject: [PATCH 07/15] =?UTF-8?q?N=C2=B05109=20update=20PHP=20requirements?= =?UTF-8?q?=20from=205.6=20to=207.0=20No=20embedded=20libs=20supports=20al?= =?UTF-8?q?l=20versions=20from=20PHP=205.6=20to=208.0=20included=20:/=207.?= =?UTF-8?q?0.8=20is=20required=20for=20our=20Symfony=20version=20(updated?= =?UTF-8?q?=20with=20N=C2=B04770)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 ++-- setup/setuputils.class.inc.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 1da0fd1d6..c94bff4a4 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "type": "project", "license": "AGPLv3", "require": { - "php": ">=5.6.0", + "php": ">=7.0.8", "ext-ctype": "*", "ext-dom": "*", "ext-gd": "*", @@ -37,7 +37,7 @@ }, "config": { "platform": { - "php": "5.6.0" + "php": "7.0.8" }, "vendor-dir": "lib", "preferred-install": { diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 18b40fd61..c746ca225 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -50,15 +50,15 @@ class CheckResult class SetupUtils { // -- Minimum versions (requirements : forbids installation if not met) - const PHP_MIN_VERSION = '5.6.0'; // 5.6 will be supported until the end of 2018 (see http://php.net/supported-versions.php) + const PHP_MIN_VERSION = '7.0.8'; // 7.0 for embedded libs, see N°3129 const MYSQL_MIN_VERSION = '5.6.0'; // 5.6 to have fulltext on InnoDB for Tags fields (N°931) const MYSQL_NOT_VALIDATED_VERSION = ''; // MySQL 8 is now OK (N°2010 in 2.7.0) but has no query cache so mind the perf on large volumes ! // -- versions that will be the minimum in next iTop major release (warning if not met) - const PHP_NEXT_MIN_VERSION = '7.1.3'; // we are aiming on switching to Symfony 4 in iTop 2.8 + const PHP_NEXT_MIN_VERSION = '7.1.3'; const MYSQL_NEXT_MIN_VERSION = ''; // no new MySQL requirement for next iTop version // -- First recent version that is not yet validated by Combodo (warning) - const PHP_NOT_VALIDATED_VERSION = '7.5.0'; + const PHP_NOT_VALIDATED_VERSION = '8.0.0'; const MIN_MEMORY_LIMIT = '32M'; const SUHOSIN_GET_MAX_VALUE_LENGTH = 2048; From cb39541e2a7b885cd939179e51228204cfa188a3 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 21 Apr 2022 10:36:26 +0200 Subject: [PATCH 08/15] =?UTF-8?q?N=C2=B03091=20Update=20PHPUnit=20to=208.5?= =?UTF-8?q?=20:=20composer=20and=20base=20files=20Autoload=20wasn't=20work?= =?UTF-8?q?ing=20anymore,=20easy=20to=20see=20:=20just=20launch=20`php=20u?= =?UTF-8?q?nittestautoload.php`=20(or=20see=20fatal=20errors=20when=20laun?= =?UTF-8?q?ching=20tests=20with=20your=20IDE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/composer.json | 14 +- test/composer.lock | 994 ++++++++++++++++++---------- test/phpunit.xml.dist | 62 +- test/postbuild_integration.xml.dist | 59 +- test/unittestautoload.php | 8 +- 5 files changed, 709 insertions(+), 428 deletions(-) diff --git a/test/composer.json b/test/composer.json index 511fa9083..5e570e48d 100644 --- a/test/composer.json +++ b/test/composer.json @@ -1,10 +1,10 @@ { - "require": { - "phpunit/phpunit": "^6" - }, - - "autoload": { - "psr-4": { "": "src/" } + "require-dev": { + "phpunit/phpunit": "^8.5.23" + }, + "autoload": { + "psr-4": { + "": "src/" } - + } } diff --git a/test/composer.lock b/test/composer.lock index 094a73224..351e80239 100644 --- a/test/composer.lock +++ b/test/composer.lock @@ -1,41 +1,40 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e45f846daa710cb799f80d91c1f35aef", - "packages": [ + "content-hash": "e564642f87b1049582c4001ac479b368", + "packages": [], + "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.1.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -49,47 +48,69 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2017-07-22T11:58:36+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -103,32 +124,43 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -158,24 +190,28 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -205,39 +241,38 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -259,44 +294,46 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -307,44 +344,50 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -357,42 +400,47 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + }, + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -420,44 +468,48 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.2", + "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", - "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -483,29 +535,42 @@ "testing", "xunit" ], - "time": "2018-04-06T15:36:58+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.5", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", - "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -520,7 +585,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -530,7 +595,17 @@ "filesystem", "iterator" ], - "time": "2017-11-27T13:52:08+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -571,32 +646,36 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -611,7 +690,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -620,33 +699,43 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -669,57 +758,67 @@ "keywords": [ "tokenizer" ], - "time": "2017-11-27T05:48:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" }, { "name": "phpunit/phpunit", - "version": "6.5.8", + "version": "8.5.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b" + "reference": "ef117c59fc4c54a979021b26d08a3373e386606d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b", - "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef117c59fc4c54a979021b26d08a3373e386606d", + "reference": "ef117c59fc4c54a979021b26d08a3373e386606d", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.5", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -727,7 +826,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -753,86 +852,41 @@ "testing", "xunit" ], - "time": "2018-04-10T11:38:34+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.26" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2018-01-06T05:45:45+00:00" + "time": "2022-04-01T12:34:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -857,34 +911,44 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": ">=7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -897,6 +961,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -908,10 +976,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -921,32 +985,43 @@ "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -959,46 +1034,62 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1023,29 +1114,39 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.0", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -1063,6 +1164,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -1071,17 +1176,13 @@ "name": "Volker Dusch", "email": "github@wallbash.com" }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, { "name": "Adam Harvey", "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], "description": "Provides the functionality to export PHP variables for visualization", @@ -1090,27 +1191,40 @@ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-11-11T13:51:24+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/de036ec91d55d2a9e0db2ba975b512cdb1c23921", + "reference": "de036ec91d55d2a9e0db2ba975b512cdb1c23921", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -1118,7 +1232,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1141,24 +1255,34 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-10T06:55:38+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -1188,24 +1312,34 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -1233,24 +1367,34 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -1271,14 +1415,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -1286,29 +1430,39 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1328,7 +1482,73 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", @@ -1371,27 +1591,113 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.0", + "name": "symfony/polyfill-ctype", + "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + }, + "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": "2021-10-20T20:35:02+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1411,33 +1717,47 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -1461,15 +1781,19 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/test/phpunit.xml.dist b/test/phpunit.xml.dist index f037fdc78..c4ed78656 100644 --- a/test/phpunit.xml.dist +++ b/test/phpunit.xml.dist @@ -1,44 +1,26 @@ - - - - - - - - - - - - - - - - - + + - + + + + diff --git a/test/postbuild_integration.xml.dist b/test/postbuild_integration.xml.dist index 8128c1cb8..34aab85da 100644 --- a/test/postbuild_integration.xml.dist +++ b/test/postbuild_integration.xml.dist @@ -1,44 +1,21 @@ - - - - - - - - - - - - - - - - - - - + + diff --git a/test/unittestautoload.php b/test/unittestautoload.php index 4c523c2e8..3fbf99cca 100644 --- a/test/unittestautoload.php +++ b/test/unittestautoload.php @@ -1,7 +1,5 @@ Date: Fri, 4 Mar 2022 17:57:44 +0100 Subject: [PATCH 09/15] =?UTF-8?q?:see=5Fno=5Fevil:=20N=C2=B03091=20Update?= =?UTF-8?q?=20PHPUnit=20to=208.5=20:=20add=20PHPunit=20cache=20file=20to?= =?UTF-8?q?=20ignore=20We=20don't=20want=20to=20disable=20the=20feature,?= =?UTF-8?q?=20nor=20we=20want=20this=20file=20to=20be=20versionned=20https?= =?UTF-8?q?://phpunit.readthedocs.io/en/8.5/configuration.html#the-cachere?= =?UTF-8?q?sult-attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 92eb71a34..9bb9bc145 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,9 @@ test/vendor/* !/log/index.php !/log/web.config +# PHPUnit cache file +/test/.phpunit.result.cache + # Jetbrains /.idea/** From ec143c43dbc0d2100a11f4aee65f54518fd6234c Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 21 Apr 2022 10:37:07 +0200 Subject: [PATCH 10/15] =?UTF-8?q?N=C2=B03091=20Update=20PHPUnit=20to=208.5?= =?UTF-8?q?=20:=20fix=20setUp=20and=20teardDown=20methods=20signatures=20"?= =?UTF-8?q?Return=20type=20declaration=20must=20be=20compatible=20with=20p?= =?UTF-8?q?arent"=20See=20https://phpunit.de/announcements/phpunit-8.html?= =?UTF-8?q?=20"Return=20Type=20of=20Template=20Methods"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/ItopDataTestCase.php | 11 ++++------- test/ItopTestCase.php | 13 +++++++------ test/OQL/DataLocalizerTest.php | 4 ++-- test/OQL/OQLToSQLAllClassesTest.php | 3 +-- test/OQL/OQLToSQLGroupByTest.php | 3 +-- test/OQL/OQLToSQLNestedSelectTest.php | 3 +-- test/OQL/OQLToSQLTest.php | 3 +-- test/application/DashboardLayoutTest.php | 7 ------- test/application/UtilsTest.php | 6 ------ test/application/composer/iTopComposerTest.php | 2 +- test/application/privUITransactionFileTest.php | 7 ------- .../search/CriterionConversionTest.php | 10 ---------- .../application/search/CriterionParserTest.php | 12 ++---------- test/application/search/SearchFormTest.php | 10 ---------- test/core/BulkChangeTest.inc.php | 5 +++-- test/core/CMDBSource/CMDBSourceTest.php | 2 +- test/core/CMDBSource/TransactionsTest.php | 4 ++-- test/core/ConfigPlaceholdersResolverTest.php | 5 ++--- test/core/ConfigTest.php | 7 +++---- test/core/DBObjectTest.php | 2 +- test/core/DBSearchIntersectTest.php | 2 +- test/core/DBSearchJoinTest.php | 2 +- test/core/DBSearchTest.php | 2 +- test/core/DBSearchUpdateRealiasingMapTest.php | 2 +- test/core/LogAPITest.php | 2 +- test/core/LogFileNameBuilderTest.php | 7 +++---- test/core/MetaModelTest.php | 2 +- test/core/TriggerTest.php | 4 +--- test/core/UniquenessConstraintTest.php | 2 +- test/core/UserRightsTest.php | 9 ++++----- test/core/WeeklyScheduledProcessTest.php | 2 +- test/core/apcEmulationTest.php | 5 ++--- test/core/dictApcuTest.php | 15 +++++++-------- test/core/dictTest.php | 16 ++++++++-------- test/core/iTopConfigParserTest.php | 9 ++++----- test/core/ormLinkSetTest.php | 4 ++-- test/core/ormTagSetTest.php | 2 +- .../sanitizer/AbstractDOMSanitizerTest.php | 2 +- test/coreExtensions/UserLocalTest.php | 7 +++---- .../iTopModulesXmlVersionChecklistTest.php | 2 +- .../Validator/iTopConfigAstValidatorTest.php | 2 +- .../iTopConfigSyntaxValidatorTest.php | 2 +- test/itop-tickets/itopTicketTest.php | 8 -------- .../iTopDesignFormatChecklistTest.php | 3 ++- test/replay_query_log.php | 2 +- test/setup/DBBackupTest.php | 4 +--- test/setup/SetupUtilsTest.php | 2 +- .../iTopDesignFormat/iTopDesignFormatTest.php | 2 +- test/status/StatusIncTest.php | 17 +++++++---------- test/webservices/RestTest.php | 18 +++++++++--------- 50 files changed, 101 insertions(+), 176 deletions(-) diff --git a/test/ItopDataTestCase.php b/test/ItopDataTestCase.php index 6f6cd21c9..89a0fd1d2 100644 --- a/test/ItopDataTestCase.php +++ b/test/ItopDataTestCase.php @@ -77,7 +77,7 @@ class ItopDataTestCase extends ItopTestCase /** * @throws Exception */ - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'/application/startup.inc.php'); @@ -101,15 +101,12 @@ class ItopDataTestCase extends ItopTestCase /** * @throws Exception */ - protected function tearDown() + protected function tearDown(): void { - if (static::USE_TRANSACTION) - { + if (static::USE_TRANSACTION) { $this->debug("ROLLBACK !!!"); CMDBSource::Query('ROLLBACK'); - } - else - { + } else { $this->debug(""); $this->aCreatedObjects = array_reverse($this->aCreatedObjects); foreach ($this->aCreatedObjects as $oObject) diff --git a/test/ItopTestCase.php b/test/ItopTestCase.php index fbfac87d0..0e983fcec 100644 --- a/test/ItopTestCase.php +++ b/test/ItopTestCase.php @@ -34,10 +34,11 @@ class ItopTestCase extends TestCase { const TEST_LOG_DIR = 'test'; - protected function setUp() + /** @noinspection UsingInclusionOnceReturnValueInspection avoid errors for approot includes */ + protected function setUp(): void { @include_once '../approot.inc.php'; - @include_once '../../approot.inc.php'; + @include_once '../../approot.inc.php'; @include_once '../../../approot.inc.php'; @include_once '../../../../approot.inc.php'; @include_once '../../../../../approot.inc.php'; @@ -45,7 +46,7 @@ class ItopTestCase extends TestCase @include_once '../../../../../../../approot.inc.php'; @include_once '../../../../../../../../approot.inc.php'; - $this->debug("\n----------\n---------- ".$this->getName()."\n----------\n"); + $this->debug("\n----------\n---------- ".$this->getName()."\n----------\n"); } @@ -57,9 +58,9 @@ class ItopTestCase extends TestCase { echo "$sMsg\n"; } - else - { - print_r($sMsg); + else { + /** @noinspection ForgottenDebugOutputInspection */ + print_r($sMsg); } } } diff --git a/test/OQL/DataLocalizerTest.php b/test/OQL/DataLocalizerTest.php index e2a7f8370..26a2f2069 100644 --- a/test/OQL/DataLocalizerTest.php +++ b/test/OQL/DataLocalizerTest.php @@ -17,10 +17,10 @@ class DataLocalizerTest extends ItopDataTestCase const USE_TRANSACTION = false; const TEST_CSV_RESULT = 'DataLocalizerTest.csv'; - public function setUp() + protected function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); + ApplicationContext::SetPluginProperty('QueryLocalizerPlugin', 'language_code', 'FR FR'); SetupUtils::builddir(APPROOT.'log/test/OQLToSQL'); diff --git a/test/OQL/OQLToSQLAllClassesTest.php b/test/OQL/OQLToSQLAllClassesTest.php index ab021885c..09bf54d3a 100644 --- a/test/OQL/OQLToSQLAllClassesTest.php +++ b/test/OQL/OQLToSQLAllClassesTest.php @@ -22,10 +22,9 @@ class OQLToSQLAllCLassesTest extends ItopDataTestCase { const USE_TRANSACTION = false; - public function setUp() + public function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); SetupUtils::builddir(APPROOT.'log/test/OQLToSQL'); } diff --git a/test/OQL/OQLToSQLGroupByTest.php b/test/OQL/OQLToSQLGroupByTest.php index 62c279f5a..8db7239a4 100644 --- a/test/OQL/OQLToSQLGroupByTest.php +++ b/test/OQL/OQLToSQLGroupByTest.php @@ -17,10 +17,9 @@ class OQLToSQLTest extends ItopDataTestCase const USE_TRANSACTION = false; const TEST_CSV_RESULT = 'OQLToSQLTest.csv'; - public function setUp() + public function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); SetupUtils::builddir(APPROOT.'log/test/OQLToSQL'); } diff --git a/test/OQL/OQLToSQLNestedSelectTest.php b/test/OQL/OQLToSQLNestedSelectTest.php index 38383b351..296147c6a 100644 --- a/test/OQL/OQLToSQLNestedSelectTest.php +++ b/test/OQL/OQLToSQLNestedSelectTest.php @@ -22,10 +22,9 @@ class OQLToSQLNestedSelectTest extends ItopDataTestCase const USE_TRANSACTION = false; const TEST_CSV_RESULT = 'OQLToSQLTest.csv'; - public function setUp() + public function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); SetupUtils::builddir(APPROOT.'log/test/OQLToSQL'); } diff --git a/test/OQL/OQLToSQLTest.php b/test/OQL/OQLToSQLTest.php index dec00c31e..d7bb621f1 100644 --- a/test/OQL/OQLToSQLTest.php +++ b/test/OQL/OQLToSQLTest.php @@ -22,10 +22,9 @@ class OQLToSQLTest extends ItopDataTestCase const USE_TRANSACTION = false; const TEST_CSV_RESULT = 'OQLToSQLTest.csv'; - public function setUp() + public function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); SetupUtils::builddir(APPROOT.'log/test/OQLToSQL'); } diff --git a/test/application/DashboardLayoutTest.php b/test/application/DashboardLayoutTest.php index fc4e2dcc0..b6a552cd5 100644 --- a/test/application/DashboardLayoutTest.php +++ b/test/application/DashboardLayoutTest.php @@ -24,13 +24,6 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase; */ class DashboardLayoutTest extends ItopTestCase { - public function setUp() - { - parent::setUp(); - - require_once APPROOT.'application/dashboardlayout.class.inc.php'; - } - /** * @return array */ diff --git a/test/application/UtilsTest.php b/test/application/UtilsTest.php index 39c08405f..f2d671fad 100644 --- a/test/application/UtilsTest.php +++ b/test/application/UtilsTest.php @@ -24,12 +24,6 @@ */ class UtilsTest extends \Combodo\iTop\Test\UnitTest\ItopTestCase { - public function setUp() - { - parent::setUp(); - require_once(APPROOT.'application/utils.inc.php'); - } - public function testEndsWith() { $this->assertFalse(utils::EndsWith('a', 'bbbb')); diff --git a/test/application/composer/iTopComposerTest.php b/test/application/composer/iTopComposerTest.php index b3bcd356d..30e66c2a2 100644 --- a/test/application/composer/iTopComposerTest.php +++ b/test/application/composer/iTopComposerTest.php @@ -27,7 +27,7 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase; class iTopComposerTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); clearstatcache(); diff --git a/test/application/privUITransactionFileTest.php b/test/application/privUITransactionFileTest.php index de36678d9..adfb86cbf 100644 --- a/test/application/privUITransactionFileTest.php +++ b/test/application/privUITransactionFileTest.php @@ -32,13 +32,6 @@ class privUITransactionFileTest extends ItopDataTestCase const USER1_TEST_LOGIN = 'user1_support_test_privUITransaction'; const USER2_TEST_LOGIN = 'user2_support_test_privUITransaction'; - public function setUp() - { - parent::setUp(); - require_once(APPROOT.'/application/startup.inc.php'); -// require_once(APPROOT.'application/utils.inc.php'); - } - /** * @dataProvider cleanupOldTransactionsProvider */ diff --git a/test/application/search/CriterionConversionTest.php b/test/application/search/CriterionConversionTest.php index a3d988d0f..ed1f86bf2 100644 --- a/test/application/search/CriterionConversionTest.php +++ b/test/application/search/CriterionConversionTest.php @@ -50,16 +50,6 @@ class CriterionConversionTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; - /** - * @throws \Exception - */ - protected function setUp() - { - parent::setUp(); - - require_once(APPROOT."sources/application/search/criterionconversionabstract.class.inc.php"); - } - /** * @dataProvider ToOqlProvider * diff --git a/test/application/search/CriterionParserTest.php b/test/application/search/CriterionParserTest.php index 8bc6bfd23..ed31adb61 100644 --- a/test/application/search/CriterionParserTest.php +++ b/test/application/search/CriterionParserTest.php @@ -29,23 +29,15 @@ namespace Combodo\iTop\Test\UnitTest\Application\Search; use Combodo\iTop\Application\Search\CriterionParser; -use Combodo\iTop\Test\UnitTest\ItopTestCase; +use Combodo\iTop\Test\UnitTest\ItopDataTestCase; /** * @runTestsInSeparateProcesses * @preserveGlobalState disabled * @backupGlobals disabled */ -class CriterionParserTest extends ItopTestCase +class CriterionParserTest extends ItopDataTestCase { - protected function setUp() - { - parent::setUp(); - - require_once(APPROOT."application/startup.inc.php"); - require_once(APPROOT."sources/application/search/criterionparser.class.inc.php"); - } - public function testParse() { $sBaseOql = 'SELECT UserRequest'; diff --git a/test/application/search/SearchFormTest.php b/test/application/search/SearchFormTest.php index aac17df86..1cedd0312 100644 --- a/test/application/search/SearchFormTest.php +++ b/test/application/search/SearchFormTest.php @@ -36,16 +36,6 @@ class SearchFormTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; - /** - * @throws Exception - */ - protected function setUp() - { - parent::setUp(); - - require_once(APPROOT."sources/application/search/searchform.class.inc.php"); - } - /** * @dataProvider GetFieldsProvider * @throws \OQLException diff --git a/test/core/BulkChangeTest.inc.php b/test/core/BulkChangeTest.inc.php index 7ceb0d06f..8fc3c93d0 100644 --- a/test/core/BulkChangeTest.inc.php +++ b/test/core/BulkChangeTest.inc.php @@ -2,8 +2,8 @@ namespace Combodo\iTop\Test\UnitTest\Core; -use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use CMDBSource; +use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use MetaModel; /** @@ -14,7 +14,8 @@ use MetaModel; class BulkChangeTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; - protected function setUp() { + protected function setUp(): void + { parent::setUp(); require_once(APPROOT.'core/coreexception.class.inc.php'); require_once(APPROOT.'core/bulkchange.class.inc.php'); diff --git a/test/core/CMDBSource/CMDBSourceTest.php b/test/core/CMDBSource/CMDBSourceTest.php index 592786b02..106bbd91d 100644 --- a/test/core/CMDBSource/CMDBSourceTest.php +++ b/test/core/CMDBSource/CMDBSourceTest.php @@ -20,7 +20,7 @@ use utils; */ class CMDBSourceTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/test/core/CMDBSource/TransactionsTest.php b/test/core/CMDBSource/TransactionsTest.php index b5f548e7e..335ab2938 100644 --- a/test/core/CMDBSource/TransactionsTest.php +++ b/test/core/CMDBSource/TransactionsTest.php @@ -26,10 +26,10 @@ class TransactionsTest extends ItopTestCase /** @var DeadLockInjection */ private $oMySQLiMock; - protected function setUp() + protected function setUp(): void { parent::setUp(); - require_once ('DeadLockInjection.php'); + require_once('DeadLockInjection.php'); require_once(APPROOT.'/core/cmdbsource.class.inc.php'); $sEnv = 'production'; $sConfigFile = APPCONF.$sEnv.'/config-itop.php'; diff --git a/test/core/ConfigPlaceholdersResolverTest.php b/test/core/ConfigPlaceholdersResolverTest.php index a9589360a..a4c6868ea 100644 --- a/test/core/ConfigPlaceholdersResolverTest.php +++ b/test/core/ConfigPlaceholdersResolverTest.php @@ -23,7 +23,6 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use ConfigPlaceholdersResolver; -use PHPUnit\Framework\TestCase; /** * @runTestsInSeparateProcesses @@ -32,10 +31,10 @@ use PHPUnit\Framework\TestCase; */ class ConfigPlaceholdersResolverTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); - require_once (APPROOT.'core/config.class.inc.php'); + require_once(APPROOT.'core/config.class.inc.php'); } /** * @dataProvider providerResolve diff --git a/test/core/ConfigTest.php b/test/core/ConfigTest.php index f990cda08..0088ab374 100644 --- a/test/core/ConfigTest.php +++ b/test/core/ConfigTest.php @@ -23,19 +23,18 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use Config; -use PHPUnit\Framework\TestCase; - /** +/** * @runTestsInSeparateProcesses * @preserveGlobalState disabled * @backupGlobals disabled */ class ConfigTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); - require_once (APPROOT.'core/config.class.inc.php'); + require_once(APPROOT.'core/config.class.inc.php'); } /** diff --git a/test/core/DBObjectTest.php b/test/core/DBObjectTest.php index 3b11d1ca6..50d47d67f 100644 --- a/test/core/DBObjectTest.php +++ b/test/core/DBObjectTest.php @@ -40,7 +40,7 @@ class DBObjectTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'core/coreexception.class.inc.php'); diff --git a/test/core/DBSearchIntersectTest.php b/test/core/DBSearchIntersectTest.php index daa3f4929..44c609ab9 100644 --- a/test/core/DBSearchIntersectTest.php +++ b/test/core/DBSearchIntersectTest.php @@ -18,7 +18,7 @@ use DBSearch; class DBSearchIntersectTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'application/startup.inc.php'); diff --git a/test/core/DBSearchJoinTest.php b/test/core/DBSearchJoinTest.php index e71c9ee92..e590eaa53 100644 --- a/test/core/DBSearchJoinTest.php +++ b/test/core/DBSearchJoinTest.php @@ -19,7 +19,7 @@ class DBSearchJoinTest extends ItopDataTestCase { const USE_TRANSACTION = false; - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'application/startup.inc.php'); diff --git a/test/core/DBSearchTest.php b/test/core/DBSearchTest.php index f6e10ddbd..8d29bfc99 100644 --- a/test/core/DBSearchTest.php +++ b/test/core/DBSearchTest.php @@ -53,7 +53,7 @@ class DBSearchTest extends ItopDataTestCase /** * @throws \Exception */ - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/test/core/DBSearchUpdateRealiasingMapTest.php b/test/core/DBSearchUpdateRealiasingMapTest.php index dd090bdc9..7187e466d 100644 --- a/test/core/DBSearchUpdateRealiasingMapTest.php +++ b/test/core/DBSearchUpdateRealiasingMapTest.php @@ -19,7 +19,7 @@ class DBSearchUpdateRealiasingMapTest extends ItopDataTestCase { const USE_TRANSACTION = false; - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'application/startup.inc.php'); diff --git a/test/core/LogAPITest.php b/test/core/LogAPITest.php index 1a47561ba..7f253ddf9 100644 --- a/test/core/LogAPITest.php +++ b/test/core/LogAPITest.php @@ -17,7 +17,7 @@ class LogAPITest extends ItopTestCase private $mockFileLog; private $oMetaModelConfig; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->mockFileLog = $this->createMock('FileLog'); diff --git a/test/core/LogFileNameBuilderTest.php b/test/core/LogFileNameBuilderTest.php index 6144a6f32..09f91e61c 100644 --- a/test/core/LogFileNameBuilderTest.php +++ b/test/core/LogFileNameBuilderTest.php @@ -25,21 +25,20 @@ class LogFileNameBuilderTest extends ItopTestCase clearstatcache(true, $sLogFile); } - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once APPROOT.'core/log.class.inc.php'; } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); // remove log files created in the test $aTestLogFiles = glob(__DIR__.DIRECTORY_SEPARATOR.self::TEST_LOGFILE_PREFIX.'*.'.self::TEST_LOGFILE_EXTENSION); - foreach ($aTestLogFiles as $sLogFile) - { + foreach ($aTestLogFiles as $sLogFile) { unlink($sLogFile); } } diff --git a/test/core/MetaModelTest.php b/test/core/MetaModelTest.php index c0bd95fa9..58b406043 100644 --- a/test/core/MetaModelTest.php +++ b/test/core/MetaModelTest.php @@ -23,7 +23,7 @@ class MetaModelTest extends ItopDataTestCase protected static $sDefaultUserRequestTitle = 'Unit test title'; protected static $sDefaultUserRequestDescription = 'Unit test description'; - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once APPROOT.'/core/metamodel.class.php'; diff --git a/test/core/TriggerTest.php b/test/core/TriggerTest.php index 768f1fb3b..87b41001e 100644 --- a/test/core/TriggerTest.php +++ b/test/core/TriggerTest.php @@ -2,11 +2,9 @@ namespace Combodo\iTop\Test\UnitTest\Core; -use Combodo\iTop\Portal\Controller\ObjectController; use Combodo\iTop\Test\UnitTest\ItopDataTestCase; use ContextTag; use MetaModel; -use PHPUnit\Exception; use TriggerOnObjectCreate; /** @@ -22,7 +20,7 @@ class TriggerTest extends ItopDataTestCase const USE_TRANSACTION = false; - protected function setUp() + protected function setUp(): void { parent::setUp(); } diff --git a/test/core/UniquenessConstraintTest.php b/test/core/UniquenessConstraintTest.php index 8411eefe5..1b724c749 100644 --- a/test/core/UniquenessConstraintTest.php +++ b/test/core/UniquenessConstraintTest.php @@ -16,7 +16,7 @@ use MetaModel; */ class UniquenessConstraintTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'/core/metamodel.class.php'); diff --git a/test/core/UserRightsTest.php b/test/core/UserRightsTest.php index ef38e1e68..317d3c9d4 100644 --- a/test/core/UserRightsTest.php +++ b/test/core/UserRightsTest.php @@ -36,16 +36,15 @@ use UserRights; */ class UserRightsTest extends ItopDataTestCase { - public function setUp() + public function setUp(): void { parent::setUp(); // TODO: Change the autogenerated stub - try{ - \utils::GetConfig()->SetModuleSetting('authent-local', 'password_validation.pattern', '' ); + try { + \utils::GetConfig()->SetModuleSetting('authent-local', 'password_validation.pattern', ''); self::CreateUser('admin', 1); } - catch(\CoreCannotSaveObjectException $e) - { + catch (\CoreCannotSaveObjectException $e) { } } diff --git a/test/core/WeeklyScheduledProcessTest.php b/test/core/WeeklyScheduledProcessTest.php index b1c31c4c4..e7a85f62b 100644 --- a/test/core/WeeklyScheduledProcessTest.php +++ b/test/core/WeeklyScheduledProcessTest.php @@ -7,7 +7,7 @@ use DateTime; class WeeklyScheduledProcessTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'core/backgroundprocess.inc.php'); diff --git a/test/core/apcEmulationTest.php b/test/core/apcEmulationTest.php index 65a1d6f13..abc1296c4 100644 --- a/test/core/apcEmulationTest.php +++ b/test/core/apcEmulationTest.php @@ -27,7 +27,6 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; -use PHPUnit\Framework\TestCase; define('UNIT_MAX_CACHE_FILES', 10); @@ -40,7 +39,7 @@ define('UNIT_MAX_CACHE_FILES', 10); class apcEmulationTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'core/apc-emulation.php'); @@ -48,7 +47,7 @@ class apcEmulationTest extends ItopTestCase apc_clear_cache(); } - public function tearDown() + public function tearDown(): void { apc_clear_cache(); } diff --git a/test/core/dictApcuTest.php b/test/core/dictApcuTest.php index cce8060f9..de6e6623c 100644 --- a/test/core/dictApcuTest.php +++ b/test/core/dictApcuTest.php @@ -28,7 +28,6 @@ namespace Combodo\iTop\Test\UnitTest\Core; use Combodo\iTop\Test\UnitTest\ItopTestCase; use Dict; -use Exception; /** @@ -42,12 +41,12 @@ class dictApcuTest extends ItopTestCase private $oApcService; private $sDictionaryFolder; - protected function setUp() + protected function setUp(): void { parent::setUp(); - require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'coreexception.class.inc.php'); - require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'dict.class.inc.php'); - require_once (APPROOT.'core' . DIRECTORY_SEPARATOR . 'apc-service.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); $this->sEnvName = time(); $_SESSION['itop_env'] = $this->sEnvName; @@ -110,12 +109,12 @@ PHP; file_put_contents($sDictionaryFolder . DIRECTORY_SEPARATOR . "$sLanguageCodeInFilename.dict.php", $sContent); } - protected function tearDown() + protected function tearDown(): void { - foreach (glob(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries" . DIRECTORY_SEPARATOR . "*") as $sFile){ + foreach (glob(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries".DIRECTORY_SEPARATOR."*") as $sFile) { unlink($sFile); } - rmdir(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries"); + rmdir(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries"); rmdir(APPROOT."env-$this->sEnvName"); } diff --git a/test/core/dictTest.php b/test/core/dictTest.php index 5bea10386..8d66ae5f8 100644 --- a/test/core/dictTest.php +++ b/test/core/dictTest.php @@ -39,14 +39,14 @@ use Exception; class dictTest extends ItopTestCase { private $sEnvName; - protected function setUp() + protected function setUp(): void { parent::setUp(); - require_once (APPROOT.'core'. DIRECTORY_SEPARATOR . 'coreexception.class.inc.php'); - require_once (APPROOT.'core'. DIRECTORY_SEPARATOR . 'dict.class.inc.php'); - require_once (APPROOT.'core'. DIRECTORY_SEPARATOR . 'apc-service.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'coreexception.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'dict.class.inc.php'); + require_once(APPROOT.'core'.DIRECTORY_SEPARATOR.'apc-service.class.inc.php'); $this->sEnvName = time(); - $sDictionaryFolder = APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries"; + $sDictionaryFolder = APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries"; @mkdir($sDictionaryFolder, 0777, true); $sContent = <<sEnvName" . DIRECTORY_SEPARATOR . "dictionaries" . DIRECTORY_SEPARATOR . "*") as $sFile){ + foreach (glob(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries".DIRECTORY_SEPARATOR."*") as $sFile) { unlink($sFile); } - rmdir(APPROOT."env-$this->sEnvName" . DIRECTORY_SEPARATOR . "dictionaries"); + rmdir(APPROOT."env-$this->sEnvName".DIRECTORY_SEPARATOR."dictionaries"); rmdir(APPROOT."env-$this->sEnvName"); } diff --git a/test/core/iTopConfigParserTest.php b/test/core/iTopConfigParserTest.php index 0461f6391..1669ea2af 100644 --- a/test/core/iTopConfigParserTest.php +++ b/test/core/iTopConfigParserTest.php @@ -13,14 +13,14 @@ class iTopConfigParserTest extends ItopTestCase private $tmpSavePath; private $sConfigPath; - public function setUp() + public function setUp(): void { parent::setUp(); require_once APPROOT.'/core/iTopConfigParser.php'; clearstatcache(); $this->sConfigPath = utils::GetConfigFilePath(); - $this->tmpSavePath = tempnam( '/tmp/', 'config-itop'); + $this->tmpSavePath = tempnam('/tmp/', 'config-itop'); $this->conf_exists = is_file($this->sConfigPath); if ($this->conf_exists) @@ -30,11 +30,10 @@ class iTopConfigParserTest extends ItopTestCase clearstatcache(); } - public function tearDown() + public function tearDown(): void { parent::tearDown(); // TODO: Change the autogenerated stub - if ($this->conf_exists) - { + if ($this->conf_exists) { rename($this->tmpSavePath, $this->sConfigPath); } } diff --git a/test/core/ormLinkSetTest.php b/test/core/ormLinkSetTest.php index efa2f6cb8..ad9ab9b99 100644 --- a/test/core/ormLinkSetTest.php +++ b/test/core/ormLinkSetTest.php @@ -47,9 +47,9 @@ class ormLinkSetTest extends ItopDataTestCase /** * @throws Exception */ - protected function setUp() + protected function setUp(): void { - parent::setUp(); + parent::setUp(); } /** diff --git a/test/core/ormTagSetTest.php b/test/core/ormTagSetTest.php index 1cdc0f49a..ce8779689 100644 --- a/test/core/ormTagSetTest.php +++ b/test/core/ormTagSetTest.php @@ -49,7 +49,7 @@ class ormTagSetTest extends ItopDataTestCase /** * @throws Exception */ - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/test/core/sanitizer/AbstractDOMSanitizerTest.php b/test/core/sanitizer/AbstractDOMSanitizerTest.php index bff69cf43..082f54e01 100644 --- a/test/core/sanitizer/AbstractDOMSanitizerTest.php +++ b/test/core/sanitizer/AbstractDOMSanitizerTest.php @@ -9,7 +9,7 @@ abstract class AbstractDOMSanitizerTest extends ItopTestCase const INPUT_DIRECTORY = 'input'; const OUTPUT_DIRECTORY = 'output'; - protected function setUp() + protected function setUp(): void { parent::setUp(); require_once(APPROOT.'application/utils.inc.php'); diff --git a/test/coreExtensions/UserLocalTest.php b/test/coreExtensions/UserLocalTest.php index c765d909b..889a44813 100644 --- a/test/coreExtensions/UserLocalTest.php +++ b/test/coreExtensions/UserLocalTest.php @@ -21,13 +21,12 @@ use UserLocal; class UserLocalTest extends ItopDataTestCase { - public function setUp() + public function setUp(): void { parent::setUp(); - require_once(APPROOT.'application/startup.inc.php'); - require_once (APPROOT.'test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php'); - require_once (APPROOT.'env-production/authent-local/model.authent-local.php'); + require_once(APPROOT.'test/coreExtensions/UserLocalTest/UserLocalPasswordPolicyMock.php'); + require_once(APPROOT.'env-production/authent-local/model.authent-local.php'); } /** diff --git a/test/integration/iTopModulesXmlVersionChecklistTest.php b/test/integration/iTopModulesXmlVersionChecklistTest.php index 45a0f0a82..b6dfcb289 100644 --- a/test/integration/iTopModulesXmlVersionChecklistTest.php +++ b/test/integration/iTopModulesXmlVersionChecklistTest.php @@ -29,7 +29,7 @@ use iTopDesignFormat; */ class iTopModulesXmlVersionIntegrationTest extends ItopTestCase { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/test/itop-config/Validator/iTopConfigAstValidatorTest.php b/test/itop-config/Validator/iTopConfigAstValidatorTest.php index e06f7e0b6..c29d285d6 100644 --- a/test/itop-config/Validator/iTopConfigAstValidatorTest.php +++ b/test/itop-config/Validator/iTopConfigAstValidatorTest.php @@ -15,7 +15,7 @@ use PhpParser\PrettyPrinter\Standard; class iTopConfigAstValidatorTest extends ItopTestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php index 74e779c38..77427cd94 100644 --- a/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php +++ b/test/itop-config/Validator/iTopConfigSyntaxValidatorTest.php @@ -16,7 +16,7 @@ use PhpParser\PrettyPrinter\Standard; class iTopConfigSyntaxValidatorTest extends ItopTestCase { - public function setUp() + public function setUp(): void { parent::setUp(); diff --git a/test/itop-tickets/itopTicketTest.php b/test/itop-tickets/itopTicketTest.php index fbddcca04..486f1eb55 100644 --- a/test/itop-tickets/itopTicketTest.php +++ b/test/itop-tickets/itopTicketTest.php @@ -39,14 +39,6 @@ class ItopTicketTest extends ItopDataTestCase { const CREATE_TEST_ORG = true; - /** - * @throws Exception - */ - protected function setUp() - { - parent::setUp(); - } - /** *
     	 * Given:
    diff --git a/test/postbuild_integration/iTopDesignFormatChecklistTest.php b/test/postbuild_integration/iTopDesignFormatChecklistTest.php
    index 48e7a77f6..20b1063c1 100644
    --- a/test/postbuild_integration/iTopDesignFormatChecklistTest.php
    +++ b/test/postbuild_integration/iTopDesignFormatChecklistTest.php
    @@ -17,7 +17,7 @@ use PHPUnit\Exception;
      */
     class TestForITopDesignFormatClass extends ItopTestCase
     {
    -	protected function setUp()
    +	protected function setUp(): void
     	{
     		parent::setUp();
     
    @@ -148,6 +148,7 @@ class TestForITopDesignFormatClass extends ItopTestCase
     			{
     				if (is_dir($sPath))
     				{
    +					/** @noinspection SlowArrayOperationsInLoopInspection */
     					$aDataModelFiles = array_merge($aDataModelFiles, $this->GetDataModelFiles($sPath));
     				}
     				else if (preg_match("/datamodel\..*\.xml/", basename($sPath)))
    diff --git a/test/replay_query_log.php b/test/replay_query_log.php
    index 4e9ba7847..fed149b0c 100644
    --- a/test/replay_query_log.php
    +++ b/test/replay_query_log.php
    @@ -147,6 +147,7 @@ class QueryLogEntry
     			$iRepeat = utils::ReadParam('repeat', 3);
     			try
     			{
    +				$resQuery = null;
     				$fRefTime = MyHelpers::getmicrotime();
     				for($i = 0 ; $i < $iRepeat ; $i++)
     				{
    @@ -167,7 +168,6 @@ class QueryLogEntry
     			catch (Exception $e)
     			{
     				$this->aErrors[] = "Failed to execute the SQL:".$e->getMessage();
    -				$resQuery = null;
     			}
     			if ($resQuery)
     			{
    diff --git a/test/setup/DBBackupTest.php b/test/setup/DBBackupTest.php
    index 7f767f439..3ad7a2115 100644
    --- a/test/setup/DBBackupTest.php
    +++ b/test/setup/DBBackupTest.php
    @@ -19,12 +19,10 @@ class DBBackupTest extends ItopTestCase
     	 * @throws \MySQLException
     	 * @throws \ConfigException
     	 */
    -	protected function setUp()
    +	protected function setUp(): void
     	{
     		parent::setUp();
    -		require_once(APPROOT.'core/config.class.inc.php');
     		require_once(APPROOT.'setup/backup.class.inc.php');
    -		require_once(APPROOT.'core/cmdbsource.class.inc.php'); // DBBackup dependency
     
     		// We need a connection to the DB, so let's open it !
     		// We are using the default config file... as the server might not be configured for all the combination we are testing
    diff --git a/test/setup/SetupUtilsTest.php b/test/setup/SetupUtilsTest.php
    index c2c43221a..b93a9a5f0 100644
    --- a/test/setup/SetupUtilsTest.php
    +++ b/test/setup/SetupUtilsTest.php
    @@ -17,7 +17,7 @@ use SetupUtils;
      */
     class SetupUtilsTest extends ItopTestCase
     {
    -	protected function setUp()
    +	protected function setUp(): void
     	{
     		parent::setUp();
     
    diff --git a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
    index 7b94ddd0f..74ee553ef 100644
    --- a/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
    +++ b/test/setup/iTopDesignFormat/iTopDesignFormatTest.php
    @@ -17,7 +17,7 @@ use iTopDesignFormat;
      */
     class TestForITopDesignFormatClass extends ItopTestCase
     {
    -	protected function setUp()
    +	protected function setUp(): void
     	{
     		parent::setUp();
     
    diff --git a/test/status/StatusIncTest.php b/test/status/StatusIncTest.php
    index fbf72af1e..645c9ded5 100644
    --- a/test/status/StatusIncTest.php
    +++ b/test/status/StatusIncTest.php
    @@ -30,19 +30,16 @@ if (!defined('DEBUG_UNIT_TEST')) {
     class StatusIncTest extends TestCase {
     
         /**
    -     *
    -     * @var string 
    +     * @var string
          */
         protected $sAppRoot = '';
     
    -    /**
    -     * 
    -     */
    -    protected function setUp() {
    -        //AppRoot is the directory containing the directory 
    -        //Assume getcwd() is runned inside APPROOT/test
    -        $this->sAppRoot = __DIR__ . '/../../sources/application/status';
    -    }
    +	protected function setUp(): void
    +	{
    +		//AppRoot is the directory containing the directory
    +		//Assume getcwd() is runned inside APPROOT/test
    +		$this->sAppRoot = __DIR__.'/../../sources/application/status';
    +	}
     
         /**
          * @expectedException \Exception
    diff --git a/test/webservices/RestTest.php b/test/webservices/RestTest.php
    index d600660db..16604009d 100644
    --- a/test/webservices/RestTest.php
    +++ b/test/webservices/RestTest.php
    @@ -24,16 +24,16 @@ class RestTest extends ItopDataTestCase
     	/**
          * @throws Exception
          */
    -    protected function setUp()
    -	{
    -		parent::setUp();
    -		require_once(APPROOT.'application/startup.inc.php');
    -		$this->sLogin = "rest-user-" . date('dmYHis');
    -		$this->CreateTestOrganization();
    +    protected function setUp(): void
    +    {
    +	    parent::setUp();
     
    -		if (!empty($this->sTmpFile)){
    -			unlink($this->sTmpFile);
    -		}
    +	    $this->sLogin = "rest-user-".date('dmYHis');
    +	    $this->CreateTestOrganization();
    +
    +	    if (!empty($this->sTmpFile)) {
    +		    unlink($this->sTmpFile);
    +	    }
     
     		$sConfigFile = \utils::GetConfig()->GetLoadedFile();
     		@chmod($sConfigFile, 0770);
    
    From 163ba41e8d66298dd339d9a13b3ddbf5d15c99e9 Mon Sep 17 00:00:00 2001
    From: Pierre Goiffon 
    Date: Mon, 7 Mar 2022 18:34:42 +0100
    Subject: [PATCH 11/15] =?UTF-8?q?N=C2=B03091=20Update=20PHPUnit=20to=208.5?=
     =?UTF-8?q?=20:=20remove=20doesNotPerformAssertions=20annotation?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    Modified tests :
    - iTopConfigParsertest
    - DBSearchIntersectTest::testIntersectOptimization
    
    As expected this isn't working with PHPUnit 8.5
    Why does it worked with previous PHPUnit 6 version ? Maybe this annotation wasn't handled yet ? The corresponding PHPUnit doc isn't available anymore...
    
    Annotations doc for PHP 8.5 : https://phpunit.readthedocs.io/en/8.5/annotations.html#doesnotperformassertions
    ---
     test/core/DBSearchIntersectTest.php | 1 -
     test/core/iTopConfigParserTest.php  | 4 ----
     2 files changed, 5 deletions(-)
    
    diff --git a/test/core/DBSearchIntersectTest.php b/test/core/DBSearchIntersectTest.php
    index 44c609ab9..a4d4c4b5b 100644
    --- a/test/core/DBSearchIntersectTest.php
    +++ b/test/core/DBSearchIntersectTest.php
    @@ -336,7 +336,6 @@ class DBSearchIntersectTest extends ItopTestCase
     
     	/**
     	 * @dataProvider IntersectOptimizationProvider
    -	 * @doesNotPerformAssertions
     	 *
     	 * @param string $sOQL
     	 * @param string $sResult
    diff --git a/test/core/iTopConfigParserTest.php b/test/core/iTopConfigParserTest.php
    index 1669ea2af..924de9517 100644
    --- a/test/core/iTopConfigParserTest.php
    +++ b/test/core/iTopConfigParserTest.php
    @@ -146,8 +146,6 @@ class iTopConfigParserTest extends ItopTestCase
     	}
     
     	/**
    -	 * @doesNotPerformAssertions
    -	 *
     	 * @throws \ConfigException
     	 * @throws \CoreException
     	 */
    @@ -198,8 +196,6 @@ CONF;
     	}
     
     	/**
    -	 * @doesNotPerformAssertions
    -	 *
     	 * @throws \ConfigException
     	 * @throws \CoreException
     	 */
    
    From 6e619f2c35c84ec84e8999baa80433f4e8bb9619 Mon Sep 17 00:00:00 2001
    From: Pierre Goiffon 
    Date: Mon, 7 Mar 2022 18:35:02 +0100
    Subject: [PATCH 12/15] Fix
     \iTopConfigParserTest::testConfigWriteToFile_FromScratchInstallation throwing
     error
    
    ---
     test/core/iTopConfigParserTest.php | 15 ++++++---------
     1 file changed, 6 insertions(+), 9 deletions(-)
    
    diff --git a/test/core/iTopConfigParserTest.php b/test/core/iTopConfigParserTest.php
    index 924de9517..6934db62e 100644
    --- a/test/core/iTopConfigParserTest.php
    +++ b/test/core/iTopConfigParserTest.php
    @@ -17,6 +17,7 @@ class iTopConfigParserTest extends ItopTestCase
     	{
     		parent::setUp();
     		require_once APPROOT.'/core/iTopConfigParser.php';
    +		require_once APPROOT.'/setup/runtimeenv.class.inc.php';
     
     		clearstatcache();
     		$this->sConfigPath = utils::GetConfigFilePath();
    @@ -201,14 +202,10 @@ CONF;
     	 */
     	public function testConfigWriteToFile_FromScratchInstallation()
     	{
    -		$sConfigPath = utils::GetConfigFilePath();
    -		$oConfig = new Config($sConfigPath, false);
    -		try{
    -			clearstatcache();
    -			$oConfig->WriteToFile();
    -		}catch(\Exception $e)
    -		{
    -			$this->assertTrue(false, "failed writetofile with no initial file: " . $e->getMessage());
    -		}
    +		$oConfig = new Config();
    +		clearstatcache();
    +		$oTestEnv = new RunTimeEnvironment('test-phpunit');
    +		$oTestEnv->WriteConfigFileSafe($oConfig);
    +		$this->assertTrue(true, "Config file was written");
     	}
     }
    
    From 83ec19dfcad7a32a4f86b8cc6633644dc8c4ff6f Mon Sep 17 00:00:00 2001
    From: Molkobain 
    Date: Thu, 21 Apr 2022 14:26:56 +0200
    Subject: [PATCH 13/15] Remove duplicated lines in .gitignore
    
    ---
     .gitignore | 7 +------
     1 file changed, 1 insertion(+), 6 deletions(-)
    
    diff --git a/.gitignore b/.gitignore
    index 9bb9bc145..2b22be192 100644
    --- a/.gitignore
    +++ b/.gitignore
    @@ -6,12 +6,6 @@
     # maintenance mode (N°2240)
     /.maintenance
     
    -# listing prevention in conf directory
    -/conf/**
    -!/conf/.htaccess
    -!/conf/index.php
    -!/conf/web.config
    -
     # composer reserver directory, from sources, populate/update using "composer install"
     vendor/*
     test/vendor/*
    @@ -19,6 +13,7 @@ test/vendor/*
     # all conf but listing prevention
     /conf/**
     !/conf/.htaccess
    +!/conf/index.php
     !/conf/web.config
     
     # all datas but listing prevention
    
    From 8e6e2432d304ec72e48297f0238fd6b6906915fa Mon Sep 17 00:00:00 2001
    From: Pierre Goiffon 
    Date: Thu, 21 Apr 2022 17:29:40 +0200
    Subject: [PATCH 14/15] Extensibility : iPortalUIExtension and
     AbstractPortalUIExtension aren't experimental anymore
    
    ---
     application/applicationextension.inc.php | 12 ++++++++----
     1 file changed, 8 insertions(+), 4 deletions(-)
    
    diff --git a/application/applicationextension.inc.php b/application/applicationextension.inc.php
    index cdea42927..e3f929c21 100644
    --- a/application/applicationextension.inc.php
    +++ b/application/applicationextension.inc.php
    @@ -1083,11 +1083,11 @@ abstract class AbstractPageUIExtension implements iPageUIExtension
     /**
      * Implement this interface to add content to any enhanced portal page
      *
    - * IMPORTANT! Experimental API, may be removed at anytime, we don't recommend to use it just now!
    - *
      * @api
      * @package     Extensibility
    - * @since 2.4.0
    + *
    + * @since 2.4.0 interface creation
    + * @since 2.7.0 change method signatures due to Silex to Symfony migration
      */
     interface iPortalUIExtension
     {
    @@ -1160,7 +1160,11 @@ interface iPortalUIExtension
     }
     
     /**
    - * IMPORTANT! Experimental API, may be removed at anytime, we don't recommend to use it just now!
    + * Extend this class instead of iPortalUIExtension if you don't need to overload all methods
    + *
    + * @api
    + * @package     Extensibility
    + * @since       2.4.0
      */
     abstract class AbstractPortalUIExtension implements iPortalUIExtension
     {
    
    From d0ba0d193b94eb0d23507bda571574bf2d29eab2 Mon Sep 17 00:00:00 2001
    From: Pierre Goiffon 
    Date: Fri, 22 Apr 2022 14:42:12 +0200
    Subject: [PATCH 15/15] =?UTF-8?q?N=C2=B03091=20iTopComposerTest=20:=20chan?=
     =?UTF-8?q?ge=20deprecated=20PHPUnit=20method=20call?=
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    ---
     test/application/composer/iTopComposerTest.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/test/application/composer/iTopComposerTest.php b/test/application/composer/iTopComposerTest.php
    index 30e66c2a2..e103360aa 100644
    --- a/test/application/composer/iTopComposerTest.php
    +++ b/test/application/composer/iTopComposerTest.php
    @@ -40,7 +40,7 @@ class iTopComposerTest extends ItopTestCase
     	public function testIsTestDir($sDirName, $bIsTest)
     	{
     		$isTestDir = iTopComposer::IsTestDir($sDirName);
    -		$this->assertInternalType('int', $isTestDir);
    +		$this->assertIsInt($isTestDir);
     		if (true === $bIsTest) {
     			$this->assertTrue(($isTestDir > 0));
     		} else {