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

fix: union PHPDoc support in fully_qualified_strict_types fixer #7719

Merged
merged 16 commits into from
Feb 5, 2024

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Jan 12, 2024

\X\Y|null PHPDoc was wrongly imported as use X\Y|null;

now it is fixed and full simple union support is added (related with #7619)

also fix shortening, previously the shortest name could be not-shortest (but was still correct) landed in #7752

also fix shortening, in namespaced files, relative names are not further imported, match this behaviour for non-namespaced files if any matching use is present for name

@mvorisek mvorisek changed the title fix: union support in fully_qualified_strict_types fixer fix: union PHPDoc support in fully_qualified_strict_types fixer Jan 12, 2024
@mvorisek mvorisek marked this pull request as ready for review January 12, 2024 17:23
@mvorisek mvorisek force-pushed the fix_phpdoc_fqn_nullable_import branch from b403669 to 81ffc39 Compare January 12, 2024 17:25
@mvorisek mvorisek force-pushed the fix_phpdoc_fqn_nullable_import branch from 81ffc39 to c5e9d7e Compare January 12, 2024 19:42
@mvorisek mvorisek force-pushed the fix_phpdoc_fqn_nullable_import branch from e80ad64 to 94a2936 Compare January 12, 2024 20:19
@mvorisek
Copy link
Contributor Author

Kindly ping @Wirone, the current master/release is broken.

@Wirone
Copy link
Member

Wirone commented Jan 15, 2024

Wasn't the previous release broken too when it comes to this fix? I am just unable to review everything, I am aware of every PR, but simply don't have that much time.

@mvorisek
Copy link
Contributor Author

IDK, I had to cherrypick this fix into some repos and I would be happy if it can be merged and released asap.

@Wirone
Copy link
Member

Wirone commented Jan 15, 2024

And it will be merged and released ASAP, with an emphasis on P 😉. You really need to remember we have work, families and hobbies, can't spend all the time on Fixer 😅.

@mvorisek mvorisek force-pushed the fix_phpdoc_fqn_nullable_import branch 3 times, most recently from 9358b1f to b73b062 Compare January 17, 2024 00:26
@mvorisek mvorisek force-pushed the fix_phpdoc_fqn_nullable_import branch from b73b062 to 6d2c124 Compare January 17, 2024 00:41
Copy link
Member

@Wirone Wirone left a comment

Choose a reason for hiding this comment

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

Without digging deeper into fixer's code, just by looking at tests.

@mvorisek mvorisek requested a review from Wirone January 21, 2024 02:18
nickvergessen added a commit to nextcloud/coding-standard that referenced this pull request Feb 1, 2024
There are currently too many issues for the rule on the project itself
#17
PHP-CS-Fixer/PHP-CS-Fixer#7719

Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
@mvorisek
Copy link
Contributor Author

mvorisek commented Feb 2, 2024

The feedback has been addressed, let's merge this PR. It is a bugfix and people already complains about the issue.

Copy link
Member

@Wirone Wirone left a comment

Choose a reason for hiding this comment

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

I miss some more comments describing what's happening, but still good enough. However it would be good to add some info behind the logic 😉.

Let's resolve 2 minor discussions and we'll be ready.

src/Fixer/Import/FullyQualifiedStrictTypesFixer.php Outdated Show resolved Hide resolved
src/Fixer/Import/FullyQualifiedStrictTypesFixer.php Outdated Show resolved Hide resolved
@Wirone Wirone enabled auto-merge (squash) February 5, 2024 21:13
@Wirone Wirone merged commit 7d399e3 into PHP-CS-Fixer:master Feb 5, 2024
26 checks passed
@mvorisek mvorisek deleted the fix_phpdoc_fqn_nullable_import branch February 5, 2024 23:52
@mvorisek mvorisek restored the fix_phpdoc_fqn_nullable_import branch February 5, 2024 23:54
@mvorisek mvorisek deleted the fix_phpdoc_fqn_nullable_import branch February 5, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug topic/fqcn Fully Qualified Class Name usage and conversions topic/phpdoc PHPDoc tags, Doctrine Annotations etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants