Repository navigation
Support Laravel 12 - #207
LukeTowers wants to merge 228 commits into
Conversation
Release v1.2.1
Co-authored-by: Luke Towers <git@luketowers.ca>
Co-authored-by: Wim Verhoogt <wim@verbant.nl> Co-authored-by: Ben Thomson <git@alfreido.com>
|
@LukeTowers any idea why this isn't working anymore ? |
Agreed, stripping the extra quotes is needed: some databases report a column's default as a quoted SQL literal, so a default copied back from Your Here's your current override run on Laravel 12.69.3, next to the same override with the inner quotes unescaped as well:
Suggested change, which keeps your tests passing: $value = str_replace("''", "'", substr($value, 1, -1));and a test case with I checked that SQLite's 🤖 Generated with Claude Code |
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
@LukeTowers @JonasPardon I don't think we need to override Or is there something special about our MailFake maybe that we need ? We should at least drop the argument, it's not needed and Laravel doesn't have it either. |
@mjauvin It does differ, even though the body mirrors Laravel's:
I checked 1 and 2 by removing the override on |
|
@JonasPardon I agree with your answer above. But I think we can drop the mailmanager argument. |
Add Laravel's InvokeDeferredCallbacks middleware to the HTTP kernel so callbacks registered with defer() run after the response is sent.
# Conflicts: # composer.json
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> With a non-UTC app.timezone, a UNIX timestamp assigned to a date attribute is stored shifted by the UTC offset on wip/1.3: // app.timezone = 'Europe/Brussels' $model->published_at = 1700000000; // 2023-11-14 22:13:20 UTC // 1.2: stored as '2023-11-14 23:13:20' // wip/1.3: stored as '2023-11-14 22:13:20', which reads back an hour earlier Model::asDateTime() calls Argon::createFromTimestamp($value) without a timezone. Carbon 2 used PHP's default timezone for that, which Storm sets from app.timezone. Carbon 3 uses UTC instead. Laravel hit the same regression and fixed it the same way in laravel/framework@8c61f50 (#50751), which is still how HasAttributes::asDateTime() reads on 12.x. Projects on the default UTC timezone are not affected. Pass date_default_timezone_get(), like Laravel. Add a test that assigns a timestamp with Europe/Brussels as the default timezone and checks that the stored value and the timestamp read back are correct. It fails without the change. asDateTime() is the only numeric-timestamp cast in Storm. Laravel's commit also covered its other createFromTimestamp() call sites; the equivalent ones in Winter core are fixed in wintercms/winter#1579.
Replaces #173, continuing the work done by @mjauvin @bennothommo & @wverhoogt
Summary by CodeRabbit
New Features
Bug Fixes