From 3943f2e994be8898d3e6a4c863cd61bf722ecce9 Mon Sep 17 00:00:00 2001 From: Derrick Austin Date: Wed, 23 Sep 2026 20:18:58 -0500 Subject: [PATCH 1/2] Support Laravel 13 alongside Laravel 12 - Allow laravel/framework ^13, laravel/tinker ^3 and orchestra/testbench ^11 next to the Laravel 12 versions. - ArraySource: build the SQLite datasource on first use instead of in bootArraySource(). Laravel 13 throws when a model is instantiated while it is booting. Boot still clears the connection, so clearBootedModels() rebuilds it. - PHPStan baseline: match the MailFake::queue() signature on both 12 and 13. - Clone the arraysubset-asserts VCS repo without the GitHub API, so fork PR CI can install. --- composer.json | 9 +++++---- phpstan-baseline.neon | 2 +- src/Database/Traits/ArraySource.php | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index b20f8985..c8806c66 100644 --- a/composer.json +++ b/composer.json @@ -38,8 +38,8 @@ "assetic/framework": "^3.2.2", "doctrine/dbal": "^3.0", "enshrined/svg-sanitize": "~0.16", - "laravel/framework": "^12.30.1", - "laravel/tinker": "^2.8.1", + "laravel/framework": "^12.30.1|^13.0", + "laravel/tinker": "^2.8.1|^3.0", "league/csv": "~9.1", "nesbot/carbon": "^3.0", "scssphp/scssphp": "~1.0", @@ -58,13 +58,14 @@ "meyfa/phpunit-assert-gd": "^4.2", "mockery/mockery": "^1.6|^2.0", "dms/phpunit-arraysubset-asserts": "dev-add-phpunit-11-support", - "orchestra/testbench": "^10.0", + "orchestra/testbench": "^10.0|^11.0", "larastan/larastan": "^3.6.0" }, "repositories": [ { "type": "vcs", - "url": "https://github.com/pieterocp/phpunit-arraysubset-asserts" + "url": "https://github.com/pieterocp/phpunit-arraysubset-asserts", + "no-api": true } ], "suggest": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 37a96bd5..6f5c3bb2 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1021,7 +1021,7 @@ parameters: path: src/Support/Testing/Fakes/MailFake.php - - message: '#^Parameter \#2 \$data \(array\) of method Winter\\Storm\\Support\\Testing\\Fakes\\MailFake\:\:queue\(\) should be compatible with parameter \$queue \(string\|null\) of method Illuminate\\Support\\Testing\\Fakes\\MailFake\:\:queue\(\)$#' + message: '#^Parameter \#2 \$data \(array\) of method Winter\\Storm\\Support\\Testing\\Fakes\\MailFake\:\:queue\(\) should be compatible with parameter \$queue \((BackedEnum\|)?string\|null\) of method Illuminate\\Support\\Testing\\Fakes\\MailFake\:\:queue\(\)$#' identifier: method.childParameterType count: 1 path: src/Support/Testing/Fakes/MailFake.php diff --git a/src/Database/Traits/ArraySource.php b/src/Database/Traits/ArraySource.php index 1c9e09fe..690e1c6e 100644 --- a/src/Database/Traits/ArraySource.php +++ b/src/Database/Traits/ArraySource.php @@ -29,7 +29,7 @@ trait ArraySource /** * Connection. to the SQLite datasource. */ - protected static \Illuminate\Database\Connection $arraySourceConnection; + protected static ?\Illuminate\Database\Connection $arraySourceConnection = null; /** * Boots the ArraySource trait. @@ -40,6 +40,17 @@ public static function bootArraySource(): void throw new ApplicationException('You must enable the SQLite PDO driver to use the ArraySource trait'); } + static::$arraySourceConnection = null; + } + + /** + * Creates the temporary SQLite datasource for this model. + * + * Laravel 13 throws a LogicException when a model is instantiated while it is booting, so this runs the first + * time the connection is resolved instead of in `bootArraySource()`. + */ + protected static function arraySourceBootConnection(): void + { $instance = new static; static::arraySourceSetDbConnection( @@ -79,6 +90,10 @@ public function getRecords() */ public static function resolveConnection($connection = null) { + if (static::$arraySourceConnection === null) { + static::arraySourceBootConnection(); + } + return static::$arraySourceConnection; } From 125a566da22d4f33f108755f7f1a1f8be368d5a5 Mon Sep 17 00:00:00 2001 From: Derrick Austin Date: Fri, 25 Sep 2026 20:52:41 -0500 Subject: [PATCH 2/2] Fix the simple_table Markdown test for league/commonmark 2.10.2 (#247) (cherry picked from commit c415db82159e83433347480d61243d93e63cf426) --- composer.json | 1 + tests/fixtures/markdown/simple_table.html | 17 ++++++++++++++++- tests/fixtures/markdown/simple_table.md | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c8806c66..bf804535 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ "enshrined/svg-sanitize": "~0.16", "laravel/framework": "^12.30.1|^13.0", "laravel/tinker": "^2.8.1|^3.0", + "league/commonmark": "^2.10.2", "league/csv": "~9.1", "nesbot/carbon": "^3.0", "scssphp/scssphp": "~1.0", diff --git a/tests/fixtures/markdown/simple_table.html b/tests/fixtures/markdown/simple_table.html index c42ff60a..241772bc 100644 --- a/tests/fixtures/markdown/simple_table.html +++ b/tests/fixtures/markdown/simple_table.html @@ -43,7 +43,22 @@

Not a table.header 1:-------cell 1.1cell 2.1


-

Not a table.header 1-------|cell 1.1cell 2.1

+

Is a table.

+ + + + + + + + + + + + + + +
header 1
cell 1.1
cell 2.1

Is a table.

diff --git a/tests/fixtures/markdown/simple_table.md b/tests/fixtures/markdown/simple_table.md index d6c3246b..a781c43c 100644 --- a/tests/fixtures/markdown/simple_table.md +++ b/tests/fixtures/markdown/simple_table.md @@ -27,7 +27,7 @@ cell 2.1 --- -Not a table. +Is a table. header 1 -------| cell 1.1