Skip to content

Support Laravel 12 - #207

Open
LukeTowers wants to merge 215 commits into
developfrom
wip/1.3
Open

LukeTowers wants to merge 215 commits into
developfrom
wip/1.3

Conversation

@LukeTowers

@LukeTowers LukeTowers commented Feb 25, 2025 •

Copy link
Copy Markdown
Member

Replaces #173, continuing the work done by @mjauvin @bennothommo & @wverhoogt

Summary by CodeRabbit

  • New Features

    • Added PHP 8.2+ support and modern framework capabilities.
    • Added MariaDB connectivity and improved database support across major platforms.
    • Added configurable authentication password attributes and fluent authentication setup.
    • Added optional pagination totals and improved expression-based searching.
    • Added broader translation path and locale fallback handling.
    • Added customizable application path generation.
  • Bug Fixes

    • Improved schema column-change handling across database platforms.
    • Prevented invalid file records from producing malformed results.
    • Improved form value handling and month formatting.

…sh-prone rebuild (#239)

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
austinderrick added a commit to austinderrick/storm that referenced this pull request Aug 19, 2026
Builds on the Laravel 12 work (wintercms#207). Bumps to laravel/framework ^13,
PHP ^8.3, tinker ^3, carbon ^3.8.4, symfony ^7.4|^8.0, testbench ^11
(PHPUnit kept at ^11.5.50 pending phpunit 12 support in test helpers).

Code: defer ArraySource datasource setup out of the model boot cycle
(L13 forbids instantiating a model while booting); restate Builder<Model>
param on HasRelationships relation factories; fix Preferences::findRecord()
scope typing; drop the unsupported 2nd arg to DownCommand option('status');
update schedule:list invokable-class test expectation; prune stale phpstan
baseline entries; CI matrices to PHP 8.3/8.4.
# Conflicts:
#	composer.json

@austinderrick austinderrick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an approval flag from me because I've tested this quite extensively on our 1.3 deploys.

@mjauvin

mjauvin commented Oct 6, 2026

Copy link
Copy Markdown
Member

@LukeTowers @bennothommo CodeRabbit is right, why are we breaking the method signature here?

#207 (comment)

Copilot AI requested a review from mjauvin October 6, 2026 17:15
@mjauvin

mjauvin commented Oct 6, 2026

Copy link
Copy Markdown
Member

@LukeTowers any idea why this isn't working anymore ?

@mjauvin
mjauvin removed their request for review October 6, 2026 20:04
@JonasPardon

Copy link
Copy Markdown

"I don't understand the problem, striping the extra quotes was the whole reason to override getDefaultValue() in the first place."

— @mjauvin on Discord, about item 1 of my notes on wintercms/winter#1366

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 getColumns() would otherwise be quoted twice. My point was only about the old implementation, which removed every ', including apostrophes inside the value. So ->default("O'Brien") on a new column became 'OBrien', and on MySQL, which reports defaults unquoted, ->change() rewrote an existing O'Brien default to OBrien.

Your 0f69f95 fixes both. One case is still left: databases that report the default as an SQL literal also escape the quotes inside it, for example 'O''Brien'. Removing only the outer pair leaves O''Brien, which parent::getDefaultValue() escapes again.

Here's your current override run on Laravel 12.69.3, next to the same override with the inner quotes unescaped as well:

Input to getDefaultValue() Current (0f69f95) With str_replace("''", "'", …)
O'Brien (from a migration, or MySQL getColumns()) 'O''Brien' 'O''Brien'
'foo' (MariaDB/SQLite getColumns()) 'foo' 'foo'
'O''Brien' (MariaDB/SQLite getColumns()) 'O''''Brien', so the stored value becomes O''Brien 'O''Brien'
'O'Brian' (your test input) 'O''Brian' 'O''Brian'

Suggested change, which keeps your tests passing:

$value = str_replace("''", "'", substr($value, 1, -1));

and a test case with default("'O''Brian'") next to the existing "'O'Brian'" one.

I checked that SQLite's getColumns() returns 'O''Brien', but I haven't run MariaDB. Its information_schema documents the same escaped format. The SQLite ->change() path already keeps such a default intact, so this mainly matters for MariaDB through MySqlBasedGrammar::compileChange().

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that implement a new feature or substantial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants