Skip to content

Modernize the code#403

Merged
sukhwinder33445 merged 26 commits into
mainfrom
use-typed-class-attributes
May 12, 2026
Merged

Modernize the code#403
sukhwinder33445 merged 26 commits into
mainfrom
use-typed-class-attributes

Conversation

@jrauh01
Copy link
Copy Markdown
Contributor

@jrauh01 jrauh01 commented Nov 13, 2025

As we now use php 8.2 as minimal version, the following modernizations have been added to the code:

  • Typed class properties
  • Return values for methods
  • Match expressions
  • Modern string functions (e.g. str_contains(), str_starts_with() and str_ends_with())
  • Nullsafe operator usage
  • Deprecated code has been replaced
  • Imports are now used everywhere

Additionally the import blocks have been sorted, indentation has been fixed, and some smaller adjustments.

resolve #378
require Icinga/ipl-web/pull/342

@jrauh01 jrauh01 self-assigned this Nov 13, 2025
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Nov 13, 2025
@jrauh01 jrauh01 added the enhancement New feature or improvement label Nov 13, 2025
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch 3 times, most recently from 2bf4959 to 25c7cb4 Compare November 14, 2025 09:29
@jrauh01 jrauh01 requested a review from nilmerg November 14, 2025 09:34
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch 3 times, most recently from 34029a8 to 3af0375 Compare November 18, 2025 08:16
Copy link
Copy Markdown
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

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

I have looked through the files up to MoveRotationForm.php.

Comment thread application/controllers/ContactsController.php
Comment thread application/controllers/ContactGroupController.php Outdated
Comment thread application/controllers/ContactGroupController.php Outdated
Comment thread application/controllers/EventRuleController.php Outdated
Comment thread application/controllers/EventRuleController.php Outdated
Comment thread application/controllers/IncidentController.php Outdated
Comment thread application/forms/DatabaseConfigForm.php Outdated
Comment thread application/forms/EventRuleConfigElements/DynamicElements.php Outdated
Comment thread application/forms/RotationConfigForm.php Outdated
Comment thread application/forms/RotationConfigForm.php Outdated
Comment thread application/forms/RotationConfigForm.php Outdated
Comment thread application/forms/RotationConfigForm.php Outdated
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch from 3af0375 to 3723f76 Compare November 24, 2025 14:52
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch 2 times, most recently from 0094a30 to c043776 Compare November 25, 2025 13:09
Comment thread application/controllers/ChannelsController.php Outdated
Comment thread application/forms/ChannelForm.php Outdated
Comment thread application/forms/ChannelForm.php Outdated
Comment thread application/forms/MoveRotationForm.php Outdated
Comment thread application/forms/RotationConfigForm.php
Comment thread library/Notifications/Web/Control/SearchBar/ExtraTagSuggestions.php Outdated
Comment thread library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php
Comment thread library/Notifications/Widget/Calendar/Entry.php Outdated
Comment thread library/Notifications/Widget/TimeGrid/ExtraEntryCount.php Outdated
Comment thread library/Notifications/Model/RuleEscalationRecipient.php
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch 3 times, most recently from 1fa2990 to 5820718 Compare November 26, 2025 10:10
Copy link
Copy Markdown
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

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

LGTM

@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch from 5820718 to 3cfc457 Compare November 27, 2025 06:07
@jrauh01
Copy link
Copy Markdown
Contributor Author

jrauh01 commented Nov 27, 2025

The last force push did not change anything, but only moved a change from one commit into another.

Comment thread application/forms/RotationConfigForm.php Outdated
Comment thread library/Notifications/Widget/Detail/ObjectHeader.php Outdated
@nilmerg nilmerg removed the enhancement New feature or improvement label Nov 28, 2025
@jrauh01 jrauh01 force-pushed the use-typed-class-attributes branch from 3cfc457 to 33260df Compare December 1, 2025 06:36
@jrauh01 jrauh01 requested a review from nilmerg December 1, 2025 07:18
@sukhwinder33445 sukhwinder33445 mentioned this pull request Dec 5, 2025
@BastianLedererIcinga BastianLedererIcinga force-pushed the use-typed-class-attributes branch from 65fe9c0 to 0f538b9 Compare May 12, 2026 11:28
@sukhwinder33445 sukhwinder33445 merged commit d7131ae into main May 12, 2026
13 checks passed
@sukhwinder33445 sukhwinder33445 deleted the use-typed-class-attributes branch May 12, 2026 11:33
@nilmerg nilmerg added this to the 1.0.0 milestone Jun 3, 2026
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.

Use typed class attributes

5 participants