Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Level up to PHPStan 8 #3786

Merged
merged 5 commits into from
Jun 25, 2024
Merged

FEATURE: Level up to PHPStan 8 #3786

merged 5 commits into from
Jun 25, 2024

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented May 18, 2024

This gives us proper type errors when doing things on possible null values which is super important.

Following (non behaviour changing) adjustments were made:

  • Handle nullability correctly
  • Make ChangeInterface::getSubject not nullable (as we always call setSubject, and simplify code not having to deal with the possible nullability here (which was also not done previously correctly for all cases)
    • (Until commit 7169667 i tried to go down the route of always handling the possible null case, which was started from sebastianK with the ESCR adjustments, but its just unnecessary complex and gives no advantage to have a Change without context node. Its useless)
  • Make some internal helpers final for sanity
  • wrap $view->setControllerContext (for out of band rendering) into a method_exists as the method is with FLow9 not part of the interface anymore
  • Declare workspaceName of UpdateWorkspaceInfo non nullable as its set always in the constructor
  • Declare node of UpdateNodeInfo non nullable as its set always via setter

@github-actions github-actions bot added the 9.0 label May 18, 2024
@mhsdesign mhsdesign changed the base branch from 9.0 to task/adjustToNodeTypeOnNodeRemoval June 18, 2024 19:21
Base automatically changed from task/adjustToNodeTypeOnNodeRemoval to 9.0 June 24, 2024 13:05
@mhsdesign mhsdesign force-pushed the task/phpstanLevel8 branch from 35d5f41 to 7169667 Compare June 24, 2024 13:33
@mhsdesign mhsdesign marked this pull request as ready for review June 24, 2024 15:47
@mhsdesign mhsdesign changed the title Task/phpstan level8 FEATURE: Level up to PHPStan 8 Jun 24, 2024
@github-actions github-actions bot added the Feature Label to mark the change as feature label Jun 24, 2024
Comment on lines 478 to 480
// todo ensure that https://github.com/neos/neos-ui/pull/3734 doesnt need to be refixed in Neos 9.0
$redirectNode = $documentNode;
while (true) {
Copy link
Member Author

@mhsdesign mhsdesign Jun 24, 2024

Choose a reason for hiding this comment

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

this code is probably broken but i didnt touch it here ... this deserves a follwup -> #3815

@mhsdesign mhsdesign requested review from grebaldi and kitsunet June 24, 2024 15:55
Copy link
Contributor

@grebaldi grebaldi left a comment

Choose a reason for hiding this comment

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

Thanks so much for sustaining the type-safety efforts, @mhsdesign! 👍 👍 👍

@mhsdesign mhsdesign merged commit ee00f76 into 9.0 Jun 25, 2024
13 checks passed
@mhsdesign mhsdesign deleted the task/phpstanLevel8 branch June 25, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 Feature Label to mark the change as feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants