Skip to content

Conversation

@williamdes williamdes self-assigned this Nov 12, 2022
@williamdes williamdes added the enhancement New feature or request label Nov 12, 2022
@williamdes williamdes force-pushed the phpstan-doc-support branch 3 times, most recently from 12f419d to 62592fa Compare November 12, 2022 10:59
@williamdes williamdes mentioned this pull request Nov 29, 2022
@tillkruss
Copy link
Contributor

Nice, looking forward to this!

@jaapio
Copy link

jaapio commented Mar 20, 2024

Finally found the time to address the last reported issues on reflection-docblock. If you have time to update and rerun your test suite that would be very welcome!

@williamdes williamdes force-pushed the phpstan-doc-support branch from 1b5119c to 8e823e4 Compare March 21, 2024 08:39
@williamdes
Copy link
Member Author

Finally found the time to address the last reported issues on reflection-docblock. If you have time to update and rerun your test suite that would be very welcome!

Thank you so much !

Here is the test errors

There were 2 failures:

1) Doctum\Tests\Parser\NodeVisitorTest::testUpdateMethodParametersFromInvalidTags
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
     0 => 'The "param2" parameter of the method "fun1" is missing a @param tag'
     1 => 'The method "fun1" has "6" @param tags but only "2" where expected.'
-    2 => 'The method "fun1" has "1" invalid @param tags.'
-    3 => 'Invalid @param tag on "fun1": "array[\Illuminate\Notifications\Channels\Notification]  $notification"'
 )

/mnt/Dev/@code-lts/doctum/tests/Parser/NodeVisitorTest.php:471

2) Doctum\Tests\Parser\NodeVisitorTest::testUpdateMethodParametersFromInvalidTagsReport
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 (
-    0 => 'The "notification" parameter of the method "fun1" is missing a @param tag'
-    1 => 'The method "fun1" has "1" invalid @param tags.'
-    2 => 'Invalid @param tag on "fun1": "array[\Illuminate\Notifications\Channels\Notification]  $notification"'
-)
+Array &0 ()

/mnt/Dev/@code-lts/doctum/tests/Parser/NodeVisitorTest.php:509

Do you think * @param array[\Illuminate\Notifications\Channels\Notification] $notification should be reported as invalid ?

it seems like it I change the test case to @param array\Illuminate\Notifications\Channels\Notification] $notification it still does not get reported. Is there a mistake in my implementation or is it missing in the phpdocumentor library ?

@jaapio
Copy link

jaapio commented Mar 21, 2024

I do not recognize those as valid notations. Array[] cannot have any content. Array<> can

@williamdes
Copy link
Member Author

Okay, so they should be reported as invalid.
This one should definitely be reported @param array\Illuminate\Notifications\Channels\Notification> $notification

@williamdes
Copy link
Member Author

How does your library handle Invalid tags?

@jaapio
Copy link

jaapio commented Mar 22, 2024

We will return an InvalidTag object, so people can see what is wrong and the parsing continues.

@williamdes
Copy link
Member Author

We will return an InvalidTag object, so people can see what is wrong and the parsing continues.

Awesome, let me know when it is pushed

@jasonmccallister
Copy link

👋 just wanted to give a friendly nudge and say I love this library and also see if there is anything I can do to help get this merged/pushed along?

@williamdes
Copy link
Member Author

👋 just wanted to give a friendly nudge and say I love this library and also see if there is anything I can do to help get this merged/pushed along?

Hi,
This is very nice, thank you for the support !
I am sorting out the PHP version issues with the libraries bumps
And will rebase this one so we can get it merged

@williamdes williamdes marked this pull request as ready for review November 18, 2025 19:51
@williamdes williamdes added this to the v5.6.0 milestone Nov 18, 2025
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.20%. Comparing base (ba67a5d) to head (d411fb3).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #51      +/-   ##
============================================
+ Coverage     62.84%   63.20%   +0.35%     
- Complexity     1203     1208       +5     
============================================
  Files            53       53              
  Lines          3335     3400      +65     
============================================
+ Hits           2096     2149      +53     
- Misses         1239     1251      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@williamdes williamdes merged commit d411fb3 into main Nov 18, 2025
86 of 94 checks passed
@williamdes williamdes deleted the phpstan-doc-support branch November 18, 2025 23:38
@williamdes williamdes temporarily deployed to API documentations November 19, 2025 12:22 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

5 participants