-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[8.x] fix doc blocks #35675
[8.x] fix doc blocks #35675
Conversation
src/Illuminate/Mail/PendingMail.php
Outdated
@@ -114,12 +114,11 @@ public function bcc($users) | |||
* Send a new mailable message instance. | |||
* | |||
* @param \Illuminate\Contracts\Mail\Mailable $mailable | |||
* | |||
* @return mixed | |||
* @return void |
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.
Here I removed the extra blank line between parameters and return, and also changed the return to match the interface.
Mailer implementation send
method does not return anything.
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.
Oh okay, did Doctum say something about that ?
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.
No, but when I was reviewing the others I found this. Neither doctum or StyleCI complained about this one.
I will update my opening comment to clarify I made other fixes.
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.
phpstan would have got it I think ;p
@@ -171,7 +171,7 @@ protected function shouldSendNotification($notifiable, $notification, $channel) | |||
* Queue the given notification instances. | |||
* | |||
* @param mixed $notifiables | |||
* @param array[\Illuminate\Notifications\Channels\Notification] $notification | |||
* @param \Illuminate\Notifications\Notification $notification |
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.
The implementation does not expects an array on this parameter
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.
Hi @williamdes
Maybe this one you want to take a look on how doctum is handling, the error message was odd for this line:
ERROR: The "r" @param tag variable name is wrong (should be "notification") on "Illuminate\Notifications\NotificationSender::queueNotification" in build/doctum/laravel/src/Illuminate/Notifications/NotificationSender.php:177
As you can see the @param
variable was not called r
. Maybe it is because it used this odd syntax with brackets
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.
Ha, thanks for pointing this out
I had some chance this time because you looked to the old errors report, please have a look to the "5.3.0-dev" one instead :)
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.
Now I see, thanks for the heads up
@@ -347,7 +347,7 @@ public function send($view, array $data = [], $callback = null) | |||
/** | |||
* Queue a new e-mail message for sending. | |||
* | |||
* @param string|array $view | |||
* @param \Illuminate\Contracts\Mail\Mailable|string|array $view |
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.
Changed to match its interface
* @param \Illuminate\Contracts\Mail\Mailable $mailable; | ||
* @return mixed | ||
* @param \Illuminate\Contracts\Mail\Mailable $mailable | ||
* @return void |
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.
Here I removed the extra semicolon, and also changed the return to match the interface.
Mailer implementation send method does not return anything.
From the errors for the 8.x branch the only I left unaddressed was this:
This was a feature added by commit d034e2c to allow a callback but avoid a breaking change on changing the method's signature. Maybe the method signature could be changed for 9.x |
This comment has been minimized.
This comment has been minimized.
Here are the errors that are not fixed, thank you for your quick work on the other ones ! |
Nonsense myself .. 😄 At
Seems like https://stackoverflow.com/questions/14513356/phpdoc-documenting-a-function-with-a-variable-number-of-arguments will be usefull for the event helper function |
Hi @williamdes , thanks for the quick review. Besides the one for I will wait for the maintainers to take a look on those first as to me it is tricky and could be a matter of opinion.
|
We are not changing the mailer stuff yet. We marked it as void, however some people are still using the return value, and we have no good way of providing an alternative for their use case yet, so that's how we arrived having a void contract, but mixed in reality. The mailer component may be getting some refactoring in 9.x if we decide to switch to symfony mailer. The issue with the void-mixed stuff may be resolved properly, at that point. |
Hi @GrahamCampbell |
The cache and validation fixes look good, though. Please submit a PR fixing that on 6.x (if the code exists on 6.x, otherwise 8.x is fine). |
And for 5.x issues ? |
Hey @GrahamCampbell , thanks for your review Wouldn't reverting the return for If you think so I just pushed a commit to revert the |
I think you can re-open a pull-request :) |
@rodrigopedra re-opened. Is this ready to go? |
Some of these need fixing on the 6.x series, first. |
Hi @taylorotwell I just force-pushed again to force re-syncing the PR. So now there are just docblock changes. No code changes. I think it is good to go. Again, I left the I also didn't change the I think the I can send the needed fixes for 6.x too. |
If you want I can make the changes from comment #35675 (comment) before merging. |
By the way I just want to say that the variadic is not well documented Please refer to 20Tauri/DoxyDoxygen#135 (comment) |
Addresses errors for 8.x branch listed on #35673 .
EDIT: I also made some other fixes I found while assessing doctum error messages.
To clarify, I didn't run doctum myself. I based my code review on the error messages listed on #35673