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
Refactor conversion of PHPDoc to type declarations #4591
Conversation
777cb40
to
aba296c
Compare
Could we instead of abstract fixers introduce - as @SpacePossum suggested one day - a namespace of manipulators? |
Not sure what you mean exactly? |
Similarly like we have
|
Indeed, some parts of the new abstract class could probably be extracted to some "analyzer" class, but some are quite specific to these fixers. I'll have a closer look shortly. |
982d539
to
336a3d4
Compare
as this PR is also fixing a bugfix from 2.16 line, shouldn't it actually target 2.16.x as well ? |
This PR also introduces new public API in non-internal code ( |
so, you created a bugfix+feature in single PR? |
Well, at the time I created the PR, 2.16 was not released yet so targeting branch master was fine. The initial purpose of this PR was to refactor things to ease maintenance. While working on it, I noticed it made implementing parts of #4511 easy. When I noticed it also fixes #4605, the work on this PR was already finished. I only added the test cases, which passed without further work. I'm not sure fixing those bugs without leveraging this refactoring is easy. I'll give it a try. Edit: actually tests from #4605 needed extra work, didn't remember :) |
Tests fixed in #4605. |
336a3d4
to
53507e1
Compare
53507e1
to
4991700
Compare
4991700
to
9065c73
Compare
9065c73
to
2f742f2
Compare
2f742f2
to
dad8f40
Compare
eabe641
to
870f0b8
Compare
I rebased this PR to fix the conflict but did not apply any extra change. Let's merge this first and work on PHP 8 compatibility separately please. |
The reason I suggest that change is because support for mixed was added a few days ago, so this PR should not now break it. |
I think the php 8 tests now fail after this pr, but were passing before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken unit tests on php 8
870f0b8
to
edc96ce
Compare
@GrahamCampbell My bad, I didn't notice this was already supported on upstream branch, fixed as you suggested. |
Needs rebasing again, against 2.17. |
edc96ce
to
c4897c6
Compare
Actually, if I remember correctly, all "new features" are marked |
I think 2.17 is the right place for this PR. |
Why? |
Because it adds new features, and 2.16 should only be getting bug fixes? |
The PR:
So IMO everything can be merged in 2.16. What do you think @SpacePossum @keradus @kubawerlos? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have been testing this PR for a number of weeks, we no issues. Left just a couple of tiny comments.
c4897c6
to
2994b0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crazy amount of work. kudos!
0506a52
to
462260d
Compare
Thank you @julienfalque. |
This PR:
PhpdocToParamTypeFixer
andPhpdocToReturnTypeFixer
to ease sharing common logic.