- Host|ServiceController: The extended class `CompatController` has its own tabs. Therefore, set the view script tabs to null
to avoid creating tabs twice.
- View-scripts: Add a condition to create tabs only when the `monitoring` backend (ido[Host|Service]Controller) is used.
PHP 8.3 -> PHP 8.4:
* Function parameters that are null by default must be declared nullable.
* The E_STRICT error level has been deprecated
* The `$escape` parameter of `fputcsv()` must be set explicitly
PHP 8.4 -> PHP 8.5:
* Using null as an array offset is deprecated.
Additionally the `required` attribute of the `uploaded_file` element in
`BpUploadForm` was set to true.
Previously the form could be submitted without a file causing an exception.
A bug was caused by BpConfig::getName returning null,
because the result was used as an array key, which is deprecated since PHP-8.5.
To avoid any further issues the constructor now ensures the name is always set.
Elements passed to ZendForm::addDisplayGroup will be used as array keys,
if they are null that causes a deprecation warning since PHP-8.5.
To avoid this all null values are removed.
Explictly set the required attribute of the uploaded_file element of BpUploadForm to true.
previously the resulting-html element was not required and submitting the form caused null being passed.
This is necessary because this class does not extend the Web\Form,
and the Zend_Form does not mark the elment as required.
Using null as an array key is deprecated in PHP-8.5,
an empty string can be used for identical behavior.
This includes values that are passed to ZendForm::addDisplayGroup as elements,
as they will be used as array keys.
This PR switches to the new PHP workflow, which combines linting, static
analysis, and unit testing. `phpcs.xml` and `phpunit.xml` have been
removed, as the new workflow provides sane defaults for both and the
files did not contain any special configurations anyway. Since the new
workflow uses the latest PHPUnit version by default, deprecated PHPUnit
features have been migrated. In addition, code style corrections were
made to comply with the latest PSR coding standards.
Custom variables used in Detail View Extension can be read from the host
if not present on the service, and can be customized, if desired, in the
config.ini for this module
`HostServiceTermValidator`: `$testConfig` requires backend for
`MonitoringState::apply()` call.
If the `$testConfig` has no backend set and icingadb is in use,
`MonitoringState::__construct($config) => $config->getBackend()` returns
an icingadb backend that is not suitable for the `MonitoringState`
class.
fixes
https://github.com/Icinga/icingaweb2-module-businessprocess/issues/430
`HostServiceTermValidator`: `$testConfig` requires backend for `MonitoringState::apply()` call.
If the `$testConfig` has no backend set and icingadb is in use, `MonitoringState::__construct($config) => $config->getBackend()` returns an icingadb backend that is not suitable for the `MonitoringState` class.