Conversation
eefa5b5 to
8686b59
Compare
|
The |
db90247 to
204a7aa
Compare
21ca328 to
c248141
Compare
589584f to
c0df0ec
Compare
ef5f5f3 to
9b2ebce
Compare
9b2ebce to
9fc16d4
Compare
|
The rest looks good. |
c0df0ec to
e1a3680
Compare
e1a3680 to
8bee499
Compare
9fc16d4 to
be685ed
Compare
8bee499 to
891337c
Compare
2ebbbb8 to
9aaf2fd
Compare
The base branch was changed.
214e28b to
d8c9e53
Compare
BastianLedererIcinga
left a comment
There was a problem hiding this comment.
Local unit tests all pass when using the other modernize branches.
BastianLedererIcinga
left a comment
There was a problem hiding this comment.
Looks good, tests all pass with Icinga/ipl-stdlib#63. Icinga\Module\Reporting\RetryConnection should be the only dependency.
|
I created Icinga/icingaweb2-module-reporting#269 to add the required change in sub-class. |
af2395c to
8e95943
Compare
41e2a82 to
f59dfc7
Compare
This was only introduced to reduce phpstan errors.
535b1a1 to
9673dad
Compare
lippserd
left a comment
There was a problem hiding this comment.
requires Icinga/ipl-i18n#26 (for tests to run, compatibility issue)
Why? ipl-i18n is not a dependency of either ipl-sql or ipl-stdlib.
77124d2 states "non-breaking", but it does introduce strict types on Cursor::limit() and Cursor::offset(), which requires a newer version of ipl-stdlib. Plus, the changes only become testable through follow-up commits, which spreads related changes across multiple places and makes it harder to reason about the impact.
To keep things manageable especially with all the releases coming soon, it helps if we follow a few rules:
When we say non-breaking, we mean it: no dependency or consumer must need to change. Any test adjustments belong in the same commit, and if a newer PHP version is needed, composer.json should reflect that in the same commit with a note in the description.
When a change in an IPL component does require updates in consumers,
those consumer updates should land in a single commit that also bumps the version constraint in composer.json.
Since we don't have releases yet, pointing to a branch is totally fine:
ipl-i18n#13 is a good example of how to do that.
We'll change those to proper version constraints once we actually release.
In the end, we're aiming for two distinct release steps:
- first a non-breaking IPL release that's safe for Icinga Web and its modules,
- then a follow-up breaking release that coordinates updates across everything affected.
Clean, self-contained commits are important.
One more thing worth clarifying: breaking changes that only affect IPL don't need to live in a separate PR as long as the commits are self-contained.
However, anything that breaks Icinga Web and/or its modules does need to go into a new PR.
@BastianLedererIcinga @Jan-Schuppik Please check your PRs to make sure they comply with these rules. I've already adjusted Icinga/ipl-stdlib#63.
Add strict type declarations to properties, function/method signatures, where types are unambiguous and no inheritance or interface contract is affected. `OrderByInterface::OrderBy()`: The following tests require `ExpressionInterface` & `Select` as param: - `SelectTest::testOrderByWithExpression()`: Method `OrderBy::orderBy()` must support `ExpressionInterface` as param - `SelectTest::testOrderByWithSelect()`: Method `OrderBy::orderBy()` must support `Select` as Param `ConfigTest`: Due to the strict type of `Config::$options`, the value of the `options` key must be an `Array`.
`setupTest()` had an empty function body, so no replacement is necessary.
The function `arrayval()` no longer throws this exception.
9673dad to
8bafaff
Compare
`ipl-stdlib` introduces strict type declarations, requiring all classes implementing its interfaces to match the exact parameter and return types defined there. Updated affected classes and bumped the required `ipl-stdlib` version in `composer.json` accordingly.
8bafaff to
b244e12
Compare
|
I have adjusted the commits accordingly. Each commit is now self-contained. |
Modernize and clean up the codebase by adopting the latest PHP features and functions.
Changes made:
InAndNotInUtilstrait, as it was only introduced to reduce phpstan errorsrequires Icinga/ipl-stdlib#63 (The signature of
limit()andoffset()methods inCursorandLimitOffsetInterfacemust be compatible withipl\Stdlib\Contract\Paginatable)