From f330fcba9194e02a3fe5824501bced4dc2e59327 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:48:04 +0200 Subject: [PATCH 001/153] Add PHP 8.2 to the php workflow --- .github/workflows/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index bde75ce130..167058803a 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] os: ['ubuntu-latest'] steps: @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] os: ['ubuntu-latest'] include: - php: '7.2' From 6de4bd6e7e0be8e1bb065396aacbd7b88388ef6b Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 21 Sep 2022 11:29:58 +0200 Subject: [PATCH 002/153] Explicitly add Module#configdir as (non-dynamic) property W/o this the login page, if on PHP 8.2, says: Deprecated: Creation of dynamic property Icinga\Application\Modules\Module::$configdir is deprecated in /usr/share/icingaweb2/library/Icinga/Application/Modules/Module.php on line 264 This breaks modules (if any) which use the property and not the getter. --- library/Icinga/Application/Modules/Module.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/Icinga/Application/Modules/Module.php b/library/Icinga/Application/Modules/Module.php index 00a33838e5..cdc23464c1 100644 --- a/library/Icinga/Application/Modules/Module.php +++ b/library/Icinga/Application/Modules/Module.php @@ -76,6 +76,13 @@ class Module */ private $libdir; + /** + * Config directory + * + * @var string + */ + private $configdir; + /** * Directory containing translations * From 825f3a9b7f2c82038375f8485cf3f4e31b8c742e Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:51:41 +0200 Subject: [PATCH 003/153] Avoid use of dynamic properties deprecated in PHP 8.2 --- library/Icinga/Cli/Command.php | 3 +++ library/Icinga/Web/Navigation/ConfigMenu.php | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Cli/Command.php b/library/Icinga/Cli/Command.php index d1a19862a7..c1d7705b81 100644 --- a/library/Icinga/Cli/Command.php +++ b/library/Icinga/Cli/Command.php @@ -50,6 +50,9 @@ abstract class Command /** @var bool Whether to automatically load enabled modules */ protected $loadEnabledModules = true; + /** @var bool Whether to enable trace for the CLI commands */ + protected $trace = false; + public function __construct(App $app, $moduleName, $commandName, $actionName, $initialize = true) { $this->app = $app; diff --git a/library/Icinga/Web/Navigation/ConfigMenu.php b/library/Icinga/Web/Navigation/ConfigMenu.php index db3f566023..ba541f721c 100644 --- a/library/Icinga/Web/Navigation/ConfigMenu.php +++ b/library/Icinga/Web/Navigation/ConfigMenu.php @@ -173,12 +173,10 @@ protected function assembleLevel2Nav(BaseHtmlElement $level2Nav) protected function getHealthCount() { $count = 0; - $title = null; $worstState = null; foreach (HealthHook::collectHealthData()->select() as $result) { if ($worstState === null || $result->state > $worstState) { $worstState = $result->state; - $title = $result->message; $count = 1; } elseif ($worstState === $result->state) { $count++; @@ -200,8 +198,6 @@ protected function getHealthCount() break; } - $this->title = $title; - return $count; } From 695fe258913ebbe3578454e97bd1fb8587a0fc15 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:52:49 +0200 Subject: [PATCH 004/153] Remove dead code from `Visitor.php` The method `Visitor::visitColor` seems like a dead code and contains dynamic property allocation. Hence, this method has been removed. --- library/Icinga/Less/Visitor.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/library/Icinga/Less/Visitor.php b/library/Icinga/Less/Visitor.php index 48417c8501..c04a0eb729 100644 --- a/library/Icinga/Less/Visitor.php +++ b/library/Icinga/Less/Visitor.php @@ -189,16 +189,6 @@ public function visitVariable($v) ->setVariable($v); } - public function visitColor($c) - { - if ($this->definingVariable !== false) { - // Make sure that all less tree colors do have a proper name - $c->name = $this->variableOrigin->name; - } - - return $c; - } - public function run($node) { $this->lightMode = new LightMode(); From 8e3c456327ea44dbe82c2ee41b2639146870eb60 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:57:52 +0200 Subject: [PATCH 005/153] Fix parameter name mismatch in `View::escape` method The mismatch arises after migration from ZF1 to ZF-future. --- library/Icinga/Web/View.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Web/View.php b/library/Icinga/Web/View.php index ec169401ef..f00584f9f7 100644 --- a/library/Icinga/Web/View.php +++ b/library/Icinga/Web/View.php @@ -99,12 +99,12 @@ public function init() /** * Escape the given value top be safely used in view scripts * - * @param string $value The output to be escaped + * @param string $var The output to be escaped * @return string */ - public function escape($value) + public function escape($var) { - return htmlspecialchars($value ?? '', ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML5, self::CHARSET, true); + return htmlspecialchars($var ?? '', ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML5, self::CHARSET, true); } /** From bd0fb8c154a0c78bae58cbfc32716c1b45e3f6a6 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:36:06 +0200 Subject: [PATCH 006/153] Remove the use of unavailable property `$this->lessc->importDisabled` The functionality to set import to disabled is removed in `lessc`. Hence the code where this property is used has been removed from `LessCompiler`. --- library/Icinga/Web/LessCompiler.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php index 1f72560bbb..d7eda09538 100644 --- a/library/Icinga/Web/LessCompiler.php +++ b/library/Icinga/Web/LessCompiler.php @@ -62,8 +62,6 @@ class LessCompiler public function __construct() { $this->lessc = new LessParser(); - // Discourage usage of import because we're caching based on an explicit list of LESS files to compile - $this->lessc->importDisabled = true; } /** From 31bfdb33e10c3e10a0afbc9e37c41377fa71b644 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 14 Jun 2023 13:46:41 +0200 Subject: [PATCH 007/153] Github Actions: Add PhpStan Co-authored-by: Ravi Srinivasa --- .github/workflows/php.yml | 10 +++ phpstan.neon | 129 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 phpstan.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 167058803a..4084b66eb1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,9 +29,15 @@ jobs: with: php-version: ${{ matrix.php }} tools: phpcs + extensions: ldap - name: Setup dependencies run: composer require -n --no-progress overtrue/phplint + && git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library + && git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty + && git clone --single-branch --branch main https://github.com/Icinga/icingaweb2-module-x509.git vendor/modules/x509-web + && git clone --single-branch --branch master https://github.com/Icinga/icingadb-web.git vendor/modules/icingadb-web + && git clone --single-branch --branch master https://github.com/Icinga/icingaweb2-module-pdfexport.git vendor/modules/pdfexport-web - name: PHP Lint if: success() || matrix.allow_failure @@ -41,6 +47,10 @@ jobs: if: success() || matrix.allow_failure run: phpcs + - name: PHPStan + uses: php-actions/phpstan@v3 + if: success() || matrix.allow_failure + test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000000..e8bec3fd5c --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,129 @@ +parameters: + level: 2 + + checkFunctionNameCase: true + checkMissingIterableValueType: true + checkInternalClassCaseSensitivity: true + checkDynamicProperties: true + treatPhpDocTypesAsCertain: true + checkExplicitMixedMissingReturn: false + reportWrongPhpDocTypeInVarTag: false + reportMaybesInPropertyPhpDocTypes: false + checkTooWideReturnTypesInProtectedAndPublicMethods: false + + paths: + - application + - library/Icinga + - modules/doc/application + - modules/migrate/application + - modules/monitoring/application + - modules/setup/application + - modules/test/application + - modules/translation/application + - modules/doc/library + - modules/migrate/library + - modules/monitoring/library + - modules/setup/library + - modules/translation/library + + ignoreErrors: + - '#Unsafe usage of new static\(\)#' + - '#Call to an undefined method#' + - '#. but return statement is missing#' + - '#PHPDoc tag @param references unknown parameter: \$[a-zA-Z0-9]+#' + - '#PHPDoc tag @var .#' + - '#Function ldap_control_paged_result not found#' + - '#Function ldap_control_paged_result_response not found#' + + - + message: '#Variable \$this might not be defined#' + paths: + - library/Icinga/Web/View/helpers/format.php + - library/Icinga/Web/View/helpers/generic.php + - library/Icinga/Web/View/helpers/string.php + - library/Icinga/Web/View/helpers/url.php + + - + message: '#Undefined variable: \$this#' + path: library/Icinga/Web/View/helpers/string.php + + - + message: '#Variable \$status in isset\(\) always exists and is always null#' + path: modules/monitoring/library/Monitoring/Object/ObjectList.php + + - + message: '#Variable \$restrictedBy in empty\(\) always exists and is not falsy#' + path: library/Icinga/Web/View/PrivilegeAudit.php + + - + message: '#Cannot call method getInterval\(\) on null#' + path: modules/monitoring/application/controllers/TimelineController.php + + - + message: '#Cannot call method getFilter\(\) on null#' + path: modules/monitoring/application/controllers/TacticalController.php + + - + message: '#Access to an undefined property object::\$service.#' + path: modules/monitoring/application/clicommands/ListCommand.php + + - + message: '#Method Icinga\\Data\\FilterColumns\:\:getSearchColumns\(\) invoked with 1 parameter, 0 required#' + path: library/Icinga/Web/Widget/FilterEditor.php + + - + message: '#Cannot call method setEscape\(\) on Zend_Form_Decorator_Abstract\|false#' + path: library/Icinga/Web/Form.php + + - + message: '#Cannot call method remove\(\) on null#' + path: modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php + + - + message: '#Static call to instance method stdClass\:\:getConfigurationFormClass\(\)#' + paths: + - library/Icinga/Authentication/User/UserBackend.php + - library/Icinga/Authentication/UserGroup/UserGroupBackend.php + + - + message: '#Access to an undefined property Less_Tree\:\:\$value#' + path: library/Icinga/Less/ColorPropOrVariable.php + + - + message: '#Cannot cast Icinga\\Data\\QueryInterface to string#' + path: library/Icinga/Repository/RepositoryQuery.php + + - + message: "#. should always throw an exception or terminate script execution but doesn't do that#" + path: library/Icinga/Common/PdfExport.php + + - + message: '#Access to an undefined property object\:\:\$host_name#' + path: modules/monitoring/library/Monitoring/ProvidedHook/X509/Sni.php + - + message: '#PHPDoc tag \@param has invalid value .#' + paths: + - library/Icinga/Protocol/Ldap/LdapUtils.php + - library/Icinga/Application/Benchmark.php + + - + message: '#Comparison operation "<" between int<0, max> and array\|int results in an error#' + path: library/Icinga/Protocol/Ldap/LdapConnection.php + + scanDirectories: + - vendor + + excludePaths: + - library/Icinga/Test + + universalObjectCratesClasses: # to ignore magic property errors (db columns) + - Icinga\Data\ConfigObject + - Icinga\Web\View + - Icinga\Module\Monitoring\Object\MonitoredObject + - Icinga\Module\Monitoring\DataView\DataView + - Icinga\Web\Session\SessionNamespace + - Zend_View_Interface + - Zend_Controller_Action_HelperBroker + - Icinga\User\Preferences + - Zend_Form_Element + - Zend_Controller_Action_Helper_Abstract From 72d155c57d45795f0ac00fef667c42d09c96acf0 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 21 Jun 2023 17:28:31 +0200 Subject: [PATCH 008/153] Remove not in use class `Plugin.php` --- modules/monitoring/library/Monitoring/Plugin.php | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 modules/monitoring/library/Monitoring/Plugin.php diff --git a/modules/monitoring/library/Monitoring/Plugin.php b/modules/monitoring/library/Monitoring/Plugin.php deleted file mode 100644 index e8e1f5dbb8..0000000000 --- a/modules/monitoring/library/Monitoring/Plugin.php +++ /dev/null @@ -1,12 +0,0 @@ - Date: Mon, 14 Aug 2023 11:05:01 +0200 Subject: [PATCH 009/153] `MonitoredObjectController`: Access `MonitoredObject::fetchEventhistory()` with correct name case --- .../Monitoring/Web/Controller/MonitoredObjectController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php index 014ac43987..b001ca800c 100644 --- a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php +++ b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php @@ -13,6 +13,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\ToggleObjectFeaturesCommandForm; use Icinga\Module\Monitoring\Hook\DetailviewExtensionHook; use Icinga\Module\Monitoring\Hook\ObjectDetailsTabHook; +use Icinga\Module\Monitoring\Object\Service; use Icinga\Web\Hook; use Icinga\Web\Url; use Icinga\Web\Widget\Tabextension\DashboardAction; @@ -116,7 +117,7 @@ public function showAction() public function historyAction() { $this->getTabs()->activate('history'); - $this->view->history = $this->object->fetchEventHistory()->eventhistory; + $this->view->history = $this->object->fetchEventhistory()->eventhistory; $this->applyRestriction('monitoring/filter/objects', $this->view->history); $this->setupLimitControl(50); @@ -229,6 +230,7 @@ protected function createTabs() } } else { $isService = true; + /** @var Service $object */ $params = array( 'host' => $object->getHost()->getName(), 'service' => $object->getName() From 06d61001b19db5442506ae7a71dd4f01ff5f7b14 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:25:11 +0200 Subject: [PATCH 010/153] `GettextTranslationHelper`: Fix parameter list for `getSourceFileNames()` method --- .../library/Translation/Util/GettextTranslationHelper.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/translation/library/Translation/Util/GettextTranslationHelper.php b/modules/translation/library/Translation/Util/GettextTranslationHelper.php index d1e6ac287b..043b2b73c8 100644 --- a/modules/translation/library/Translation/Util/GettextTranslationHelper.php +++ b/modules/translation/library/Translation/Util/GettextTranslationHelper.php @@ -389,7 +389,6 @@ private function createFileCatalog() * * @param string $directory The directory where to search for sources * @param File $file The file where to write the results - * @param array $blacklist A list of directories to omit * * @throws Exception In case the given directory is not readable */ From c0145890a396570b4648d0da048f08b2c950ecfb Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 11:29:03 +0200 Subject: [PATCH 011/153] `ArrayToTextTableHelper`: Update PHPDoc for constructor --- .../library/Translation/Cli/ArrayToTextTableHelper.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/translation/library/Translation/Cli/ArrayToTextTableHelper.php b/modules/translation/library/Translation/Cli/ArrayToTextTableHelper.php index af01d5fa66..46d4e81d3a 100644 --- a/modules/translation/library/Translation/Cli/ArrayToTextTableHelper.php +++ b/modules/translation/library/Translation/Cli/ArrayToTextTableHelper.php @@ -51,10 +51,7 @@ class ArrayToTextTableHelper /** * Prepare array into textual format * - * @param array $rows The input array - * @param bool $head Show heading - * @param int $maxWidth Max Column Height (returns) - * @param int $maxHeight Max Row Width (chars) + * @param $rows */ public function __construct($rows) { From aa5da53c9da422ed27ba90e7619ad73828b04ace Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:19:40 +0200 Subject: [PATCH 012/153] `Webserver`: Fix name case of return type for `createInstance()` method --- modules/setup/library/Setup/Webserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setup/library/Setup/Webserver.php b/modules/setup/library/Setup/Webserver.php index 2251ba3d94..77ff237769 100644 --- a/modules/setup/library/Setup/Webserver.php +++ b/modules/setup/library/Setup/Webserver.php @@ -51,7 +51,7 @@ abstract class Webserver * * @param string $type * - * @return WebServer + * @return Webserver * * @throws ProgrammingError */ From fc321ddc4984cf9051f79aed4d20e3f180c0d962 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:37:57 +0200 Subject: [PATCH 013/153] `WebWizard`: Use inline `@var` to cast setup pages to correct type --- modules/setup/library/Setup/WebWizard.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/setup/library/Setup/WebWizard.php b/modules/setup/library/Setup/WebWizard.php index f25be555a2..dbf990af59 100644 --- a/modules/setup/library/Setup/WebWizard.php +++ b/modules/setup/library/Setup/WebWizard.php @@ -117,6 +117,7 @@ protected function init() $this->addPage(new SummaryPage(array('name' => 'setup_summary'))); if (($modulePageData = $this->getPageData('setup_modules')) !== null) { + /** @var ModulePage $modulePage */ $modulePage = $this->getPage('setup_modules')->populate($modulePageData); foreach ($modulePage->getModuleWizards() as $moduleWizard) { $this->addPage($moduleWizard); @@ -133,6 +134,7 @@ protected function init() public function setupPage(Form $page, Request $request) { if ($page->getName() === 'setup_requirements') { + /** @var RequirementsPage $page */ $page->setWizard($this); } elseif ($page->getName() === 'setup_authentication_backend') { /** @var AuthBackendPage $page */ @@ -177,9 +179,11 @@ public function setupPage(Form $page, Request $request) . ' it is going to be created once the wizard is about to be finished.' )); } elseif ($page->getName() === 'setup_usergroup_backend') { + /** @var UserGroupBackendPage $page */ $page->setResourceConfig($this->getPageData('setup_ldap_resource')); $page->setBackendConfig($this->getPageData('setup_authentication_backend')); } elseif ($page->getName() === 'setup_admin_account') { + /** @var AdminAccountPage $page */ $page->setBackendConfig($this->getPageData('setup_authentication_backend')); $page->setGroupConfig($this->getPageData('setup_usergroup_backend')); $authData = $this->getPageData('setup_authentication_type'); @@ -189,6 +193,7 @@ public function setupPage(Form $page, Request $request) $page->setResourceConfig($this->getPageData('setup_ldap_resource')); } } elseif ($page->getName() === 'setup_auth_db_creation' || $page->getName() === 'setup_config_db_creation') { + /** @var DatabaseCreationPage $page */ $page->setDatabaseSetupPrivileges( array_unique(array_merge($this->databaseCreationPrivileges, $this->databaseSetupPrivileges)) ); @@ -197,6 +202,7 @@ public function setupPage(Form $page, Request $request) $this->getPageData('setup_auth_db_resource') ?: $this->getPageData('setup_config_db_resource') ); } elseif ($page->getName() === 'setup_summary') { + /** @var SummaryPage $page */ $page->setSubjectTitle('Icinga Web 2'); $page->setSummary($this->getSetup()->getSummary()); } elseif ($page->getName() === 'setup_config_db_resource') { @@ -553,7 +559,9 @@ public function getSetup() } } - $setup->addStep(new EnableModuleStep(array_keys($this->getPage('setup_modules')->getCheckedModules()))); + /** @var ModulePage $setupPage */ + $setupPage = $this->getPage('setup_modules'); + $setup->addStep(new EnableModuleStep(array_keys($setupPage->getCheckedModules()))); return $setup; } From ea2166be6dcb0b3d8ea86a2208b3db8ec94c10f4 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:42:29 +0200 Subject: [PATCH 014/153] `WebWizard`: Import exception `InvalidArgumentException` --- modules/setup/library/Setup/WebWizard.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/setup/library/Setup/WebWizard.php b/modules/setup/library/Setup/WebWizard.php index dbf990af59..42972a9974 100644 --- a/modules/setup/library/Setup/WebWizard.php +++ b/modules/setup/library/Setup/WebWizard.php @@ -6,6 +6,7 @@ use Icinga\Application\Platform; use Icinga\Module\Setup\Requirement\SetRequirement; use Icinga\Module\Setup\Requirement\WebLibraryRequirement; +use InvalidArgumentException; use PDOException; use Icinga\Web\Form; use Icinga\Web\Wizard; From 7677a0bc4e15290e866cf90cd1bec35938839297 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:44:11 +0200 Subject: [PATCH 015/153] `WebWizard`: Access `Form::getName()` with correct name case in `getNewPage()` --- modules/setup/library/Setup/WebWizard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setup/library/Setup/WebWizard.php b/modules/setup/library/Setup/WebWizard.php index 42972a9974..b71a0df960 100644 --- a/modules/setup/library/Setup/WebWizard.php +++ b/modules/setup/library/Setup/WebWizard.php @@ -283,7 +283,7 @@ protected function getNewPage($requestedPage, Form $originPage) if ($newPage->getName() === 'setup_auth_db_resource') { $authData = $this->getPageData('setup_authentication_type'); $skip = $authData['type'] !== 'db'; - } elseif ($newPage->getname() === 'setup_ldap_discovery') { + } elseif ($newPage->getName() === 'setup_ldap_discovery') { $authData = $this->getPageData('setup_authentication_type'); $skip = $authData['type'] !== 'ldap'; /*} elseif ($newPage->getName() === 'setup_ldap_discovery_confirm') { From 9e0c8ef76a3132f0b2147b83f6c6cae09692fef2 Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:46:47 +0200 Subject: [PATCH 016/153] `RequirementsRenderer`: Cast `$currentSet` to `RequirementSet` in `beginChildren()` using inline @var --- modules/setup/library/Setup/RequirementsRenderer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/setup/library/Setup/RequirementsRenderer.php b/modules/setup/library/Setup/RequirementsRenderer.php index cc9392a1ad..af21db872d 100644 --- a/modules/setup/library/Setup/RequirementsRenderer.php +++ b/modules/setup/library/Setup/RequirementsRenderer.php @@ -20,6 +20,7 @@ public function endIteration(): void public function beginChildren(): void { $this->tags[] = '
  • '; + /** @var RequirementSet $currentSet */ $currentSet = $this->getSubIterator(); $state = $currentSet->getState() ? 'fulfilled' : ($currentSet->isOptional() ? 'not-available' : 'missing'); $this->tags[] = '