Skip to content

Modernize code#448

Merged
BastianLedererIcinga merged 15 commits into
use-typed-class-attributesfrom
modernize-code
Mar 4, 2026
Merged

Modernize code#448
BastianLedererIcinga merged 15 commits into
use-typed-class-attributesfrom
modernize-code

Conversation

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor

@BastianLedererIcinga BastianLedererIcinga commented Mar 3, 2026

Add types and missing return statements for implementations of:

  • QueryAwarebehavior
  • RewriteFilterbehavior

To ensure compatibility with Icinga/ipl-orm#155.

Add types to ContactForm::isValidEent() as required by Icinga/ipl-stdlib#68

@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Mar 3, 2026
}

public function rewriteCondition(Filter\Condition $condition, $relation = null)
public function rewriteCondition(Filter\Condition $condition, $relation = null): null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add type for $relation param (?string $relation = null).

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Mar 4, 2026

Have you overseen #403?

@BastianLedererIcinga
Copy link
Copy Markdown
Contributor Author

Have you overseen #403?

Yes...

sukhwinder33445 and others added 11 commits March 4, 2026 11:15
- Remove obsolete workflow trigger for `release/*` branch pushes
- Run workflow on push to branch `support/*`
Use defaults from new workflows.
Allow GitHub Actions to run for every pull request instead of only main-based pull requests
It is used as DataProvider in unit-tests and `>=phpUnit10` requires it to be static.
ref https://docs.phpunit.de/en/10.5/writing-tests-for-phpunit.html#data-providers
PHP 8.4 deprecates implicitly nullable parameter declarations, meaning that
declaring a function or method parameter with a default value of `null` without
explicitly marking the type as nullable (using `?Type`) will trigger a
deprecation notice:

https://www.php.net/manual/en/migration84.deprecated.php#migration84.deprecated.core.implicitly-nullable-parameter
`PDO::MYSQL_ATTR_INIT_COMMAND` is deprecated as of PHP 8.5 and should be
replaced with `Pdo\Mysql::ATTR_INIT_COMMAND`:

https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.pdo
`SplObjectStorage` methods `attach()`, `contains()`, and `detach()` are
deprecated in PHP 8.5.

Since these methods are aliases for the methods `offsetSet()`, `offsetExists()`
and `offsetUnset()` of the `ArrayAccess` interface implemented by
`SplObjectStorage`, they can safely be replaced by these equivalents:

https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.spl
In PHP 8.5, `null` can no longer be used as an array key. Previously, `null`
was automatically converted to an empty string (`''`), but this behavior is now
deprecated:

https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.core.using-null-as-an-array-offset
The package has been migrated to `reac/async`. Use that instead.
@BastianLedererIcinga BastianLedererIcinga changed the base branch from main to use-typed-class-attributes March 4, 2026 10:24
Set the return type to static to ensure compatibility with ipl-orm.
Add types and return statements to ensure compatibility with
`RewriteFilterbehavior` of ipl-orm.
Add parameter and return type for compatibility with
ipl-html and ipl-stdlib
Add types and missing return statements for compatibility with ipl-orm.
@BastianLedererIcinga BastianLedererIcinga merged commit cfa7368 into use-typed-class-attributes Mar 4, 2026
13 checks passed
@BastianLedererIcinga BastianLedererIcinga deleted the modernize-code branch March 4, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants