-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use Illuminate\Support\Carbon instead of Carbon\Carbon #600
Conversation
Any update on this? 🙂 This was included in Laravel since laravel/framework#19771, would be useful to have in ide-helper as well 😄 |
It still mixes \Illuminate\Support\Carbon and Carbon\Carbon when generating phpdoc blocks for models. Laravel 5.x, 6.x, 7.x, ide helper 2.6.7
all these fields are in the |
But your example only has |
I copy-pasted that from the actual code, while typed in the text above it from head memory. Just deleted that phpdoc block and ran ide-helper:models again, and the output is different again. \Carbon doesn't even exists, it should be \Carbon\Carbon. Just searched the source code at ...myPathTpProject/vendor/barryvdh/laravel-ide-helper, and everywhere i see \Illuminate\Support\Carbon, yet the output randomly produces \Carbon for some fields. Both start and stop are DATE fields ( date nullable default null ), yet they end up having different classes.
|
This discussion doesn't seem to be related to this issue? Maybe create a new issue so it can be tracked better? :) |
ok, sure |
Use Illuminate\Support\Carbon instead of Carbon\Carbon
Laravel has a wrapper class for Carbon that it uses for model attributes in the
$dates
array and thecreated_at
andupdated_at
attributes. This pull request changes all model docblocks to use the wrapper class instead of the base class.