Skip to content

[12.x] Update Date Facade Docblocks#55235

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
fdalcin:patch-1
Apr 1, 2025
Merged

[12.x] Update Date Facade Docblocks#55235
taylorotwell merged 1 commit into
laravel:12.xfrom
fdalcin:patch-1

Conversation

@fdalcin

@fdalcin fdalcin commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

Update the accepted docblock parameter from DateTimeInterface and DateTimeZone to \DateTimeInterface and \DateTimeZone. This prevents IDEs and phpstan from complaining on stuff like below:

Error: Parameter #1 $date of static method Illuminate\Support\Facades\Date::instance() expects Illuminate\Support\Facades\DateTimeInterface, DateTime given.

@taylorotwell taylorotwell merged commit 3301640 into laravel:12.x Apr 1, 2025
@realodix

realodix commented Apr 1, 2025

Copy link
Copy Markdown

auto reverted 1d65895

@AndrewMast

Copy link
Copy Markdown
Contributor

Looks like we might need to open a PR to laravel/facade-documenter in order to fix this issue.

The facade documenter is being run in the github action here.

@AndrewMast

Copy link
Copy Markdown
Contributor

Nevermind, we need to change the docblocks on Illuminate/Support/DateFactory.php so they get pulled into the Facade docblocks. I'll open a PR for it.

@fdalcin

fdalcin commented Apr 1, 2025

Copy link
Copy Markdown
Contributor Author

Oh, I see. I missed that file. Thanks for catching that.

@AndrewMast

Copy link
Copy Markdown
Contributor

Hopefully #55243 will fix this haha

@AndrewMast

Copy link
Copy Markdown
Contributor

Yay! After the merge, the github action created 5849cbb and fixed it!

@fdalcin

fdalcin commented Apr 1, 2025

Copy link
Copy Markdown
Contributor Author

Awesome! Thank you again for catching that. I missed that file earlier and focused on the facade itself.

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.

4 participants