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

TASK: Migrate to PHPStan (adjustments in Flow 9) #3216

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Nov 3, 2023

With #3218 PHPStan level 1 was added to the whole Flow code base and CI for Flow 8. This upmerged change needs some adjustments to pass the CI in Flow 9

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@mhsdesign mhsdesign marked this pull request as ready for review November 3, 2023 17:46
@mhsdesign mhsdesign changed the title TASK: Add phpstan TASK: Migrate to phpstan Nov 3, 2023
@kitsunet
Copy link
Member

kitsunet commented Nov 4, 2023

Mmm, but like in 9.0? I think this will make upmerges harder than they already are with the many chnages in this major version, I would rather do it in 8.0 maybe? In the hopes that we don't upmerge 7.3 all that much anymore...

@mhsdesign
Copy link
Member Author

Draft as we probably want to target 8.0 #3218

Things that are not included there:

Adding never as return type

@mhsdesign mhsdesign marked this pull request as ready for review November 7, 2023 12:12
@mhsdesign mhsdesign changed the title TASK: Migrate to phpstan TASK: Migrate to phpstan (adjustments in flow 9) Nov 7, 2023
@kdambekalns kdambekalns changed the title TASK: Migrate to phpstan (adjustments in flow 9) TASK: Migrate to PHPStan (adjustments in Flow 9) Nov 7, 2023
Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

Nice, I think. But I'd like to see the deprecation removals in their own commit, at least. Otherwise they are camouflaged a bit too much…

Neos.Eel/Classes/ProtectedContext.php Outdated Show resolved Hide resolved
Neos.Flow/Classes/Mvc/ActionResponse.php Outdated Show resolved Hide resolved
.composer.json Outdated Show resolved Hide resolved
With #3218 PHPStan level 1 was added to the whole Flow code base and CI for Flow 8. This upmerged change needs some adjustments to pass the CI in Flow 9

- fix types and remove deprecated code
- fix types where neos depends on it (by correcting types and adding `never`)
- adjust unit test as `never` cannot be doubled (eventually this will be fixed via: sebastianbergmann/phpunit#5048)
- fix ci and style as neos 9 followup for #3218
@mhsdesign mhsdesign merged commit 0090b03 into 9.0 Nov 8, 2023
9 checks passed
@mhsdesign mhsdesign deleted the task/addPhpStan branch November 8, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants