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

feat: Add support for callable template in PHPDoc parser #7084

Merged
merged 10 commits into from Mar 13, 2024

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Jun 24, 2023

add support for parsing callable PHPDoc type with template like Closure<T of DateTimeInterface>(T): bool

related phpstan phpstan/phpdoc-parser#232, phpstan/phpstan-src#2938 PRs

@mvorisek mvorisek force-pushed the callable_generic_support branch 2 times, most recently from 4a8b276 to c2b0ec8 Compare June 24, 2023 17:40
@mvorisek mvorisek changed the title minor: Add generic Closure phpdoc parser support feature: Add generic Closure phpdoc parser support Jun 24, 2023
@mvorisek mvorisek changed the title feature: Add generic Closure phpdoc parser support feature: Add callable template phpdoc parser support Jun 24, 2023
@mvorisek mvorisek force-pushed the callable_generic_support branch 2 times, most recently from c4bb5ce to 531943b Compare June 26, 2023 08:21
@github-actions

This comment was marked as outdated.

@mvorisek mvorisek marked this pull request as ready for review October 4, 2023 13:25
@mvorisek mvorisek marked this pull request as draft October 4, 2023 13:25
@github-actions github-actions bot added status/to verify issue needs to be confirmed or analysed to continue and removed status/stale labels Oct 5, 2023
@mvorisek mvorisek changed the title feature: Add callable template phpdoc parser support feat: Add callable template phpdoc parser support Feb 25, 2024
@mvorisek mvorisek force-pushed the callable_generic_support branch 2 times, most recently from 0f2c97d to e5d481e Compare February 25, 2024 11:13
@mvorisek mvorisek marked this pull request as ready for review February 25, 2024 15:27
@mvorisek
Copy link
Contributor Author

mvorisek commented Mar 7, 2024

@Wirone may I ask you for a review?

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.

Test cases are clear and code look OK in general, but the actual logic for parsing callable template is too mysterious IMHO. Please provide context (as a comments), so it's easier to grasp. Please don't answer that code is self-describing, because it's not (for me) 😛 .

src/DocBlock/TypeExpression.php Outdated Show resolved Hide resolved
src/DocBlock/TypeExpression.php Show resolved Hide resolved
@mvorisek mvorisek requested a review from Wirone March 12, 2024 10:56
@Wirone Wirone removed the status/to verify issue needs to be confirmed or analysed to continue label Mar 13, 2024
@Wirone Wirone changed the title feat: Add callable template phpdoc parser support feat: Add support for callable template in PHPDoc parser Mar 13, 2024
@Wirone Wirone merged commit 54e8f39 into PHP-CS-Fixer:master Mar 13, 2024
25 checks passed
@Wirone
Copy link
Member

Wirone commented Mar 13, 2024

Thank you @mvorisek 🍻!

@mvorisek mvorisek deleted the callable_generic_support branch March 13, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants