- Issue created by @aludescher
- Merge request !4Issue #3511128: PHP 8.3 compatibility and code style fixes. → (Open) created by aludescher
rector reports PHP 8.3 compatibility issues
phpstan reports a code style issue
$ rector process web/modules/contrib/health_check_url --dry-run
2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
2 files with changes
====================
1) web/modules/contrib/health_check_url/src/Form/HealthCheckSettingsForm.php:12
---------- begin diff ----------
@@ @@
/**
* {@inheritdoc}
*/
+ #[\Override]
public function getFormId() {
....
2) web/modules/contrib/health_check_url/src/Routing/RouteService.php:32
---------- begin diff ----------
@@ @@
public function routes() {
$route_collection = new RouteCollection();
- $endpoint = !empty($this->settings->get('endpoint')) ? trim($this->settings->get('endpoint'), '/') : 'health';
+ $endpoint = !empty($this->settings->get('endpoint')) ? trim((string) $this->settings->get('endpoint'), '/') : 'health';
...
Applied rules:
* StringClassNameToClassConstantRector
* NullToStrictStringFuncCallArgRector
$ phpstan analyze --level 0 web/modules/contrib/health_check_url
------ ------------------------------------------------------------------------------
Line src/Form/HealthCheckSettingsForm.php
------ ------------------------------------------------------------------------------
98 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------
Fix these issues in code.
Active
3.0
Code