Add strict type declarations and modernize codebase#63
Add strict type declarations and modernize codebase#63sukhwinder33445 wants to merge 9 commits intomainfrom
Conversation
52f1357 to
415ad2b
Compare
4bc935f to
422c34e
Compare
BastianLedererIcinga
left a comment
There was a problem hiding this comment.
The return type of BaseFilter::setBaseFilter can be changed to static.
01fc4fa to
2030a2d
Compare
5c7ad36 to
0e8fbc5
Compare
6408fa8 to
d67ed2a
Compare
d67ed2a to
dd095bd
Compare
The base branch was changed.
|
Please rebase. |
0e8fbc5 to
20d500b
Compare
I assume you mean the |
sukhwinder33445
left a comment
There was a problem hiding this comment.
Everything else looks good to me.
Please ignore, we cannot add a return type to |
4831767 to
5ffb327
Compare
5ffb327 to
8a06264
Compare
sukhwinder33445
left a comment
There was a problem hiding this comment.
Looks good to me.
8a06264 to
77be55b
Compare
4a6fb1e to
a5d07c8
Compare
Add strict type declarations to properties, function/method signatures, where types are unambiguous and no inheritance is affected. Remove any now superfluous type checks. PHPDoc adjusted: nullable shorthand, union type ordering, compact format. Raise minimum PHP version to 8.0. Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
Raise minimum PHP version to 8.2. Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
This change requires adjustments to the following consumers:
ipl-html:
- src/Contract/FormElement.php
PHPDoc adjusted: nullable shorthand, union type ordering, compact format.
This change requires adjustments to the following consumers:
ipl-orm:
- src/Common/PropertiesWithDefaults.php
This change requires adjustments to the following consumers:
ipl-sql
- src/Cursor.php
- src/LimitOffset.php
PHPDoc adjusted: nullable shorthand, union type ordering, compact format.
This change requires adjustments to the following consumers:
ipl-i18n
- src/GettextTranslator.php
- src/NoopTranslator.php
PHPDoc adjusted: nullable shorthand, union type ordering, compact format.
a5d07c8 to
f84582d
Compare
Add strict type declarations to all method parameters, return types,
and properties throughout the codebase. Remove redundant runtime type
checks now enforced by the type system. Update PHPDoc to use nullable
shorthand, consistent union type ordering, and compact format.
Replace
list()with array destructuring,switch/casewithmatchexpressions, and
selfreturn types withstaticfor better fluentinterface support.
Breaking changes — consumers of the following APIs require updates:
Translator(ipl-i18n:GettextTranslator,NoopTranslator)Paginatable(ipl-sql:Cursor,LimitOffset)Messages::addMessage()(ipl-html:Contract/FormElement)Properties::getProperty()(ipl-orm:Common/PropertiesWithDefaults)Intentionally left without type declarations:
Validatorinterface: too many overrides in consumersEvents::on(): must matchEvenement\EventEmitterInterfaceMessages::getMessage(): must matchValidatorinterfacecloses #30