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

[12.x] Fix DateFactory docblock type hints #55244

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

AndrewMast
Copy link
Contributor

Followup to #55235 and #55243. These previous PRs addressed the issue of DateTimeInterface and DateTimeZone, but after merging, I realized there were a few more mistakes.

#55151, which added Carbon v3 compatibility, first introduced these issues since the docblocks in Carbon/Factory.php did not include the namespace for the classes, since they were imported into the file directly, unlike in Laravel's DateFactory.php.

Fixes:

  • TranslatorInterface -> \Symfony\Contracts\Translation\TranslatorInterface
  • Closure -> \Closure
  • WeekDay -> \Carbon\WeekDay
  • Month -> \Carbon\Month
  • CarbonInterface -> \Carbon\CarbonInterface

Apologies for not catching this in my previous PR, I'm sure docblock-only PRs are annoying 🙄.

@taylorotwell taylorotwell merged commit e561ef8 into laravel:12.x Apr 1, 2025
41 checks passed
@AndrewMast AndrewMast deleted the docs/fix-date-factory branch April 1, 2025 22:07
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.

2 participants