Skip to content

Conversation

@fdalcin
Copy link
Contributor

@fdalcin fdalcin commented Apr 1, 2025

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
40 of 41 checks passed
@realodix
Copy link

realodix commented Apr 1, 2025

auto reverted 1d65895

@AndrewMast
Copy link
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
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
Copy link
Contributor Author

fdalcin commented Apr 1, 2025

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

@AndrewMast
Copy link
Contributor

Hopefully #55243 will fix this haha

@AndrewMast
Copy link
Contributor

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

@fdalcin
Copy link
Contributor Author

fdalcin commented Apr 1, 2025

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