Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
"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/commonmark": "^2.10.2",
"league/csv": "~9.1",
"nesbot/carbon": "^3.0",
"scssphp/scssphp": "~1.0",
Expand All @@ -58,13 +59,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": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion src/Database/Traits/ArraySource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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(
Expand Down Expand Up @@ -79,6 +90,10 @@ public function getRecords()
*/
public static function resolveConnection($connection = null)
{
if (static::$arraySourceConnection === null) {
static::arraySourceBootConnection();
}

return static::$arraySourceConnection;
}

Expand Down
17 changes: 16 additions & 1 deletion tests/fixtures/markdown/simple_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,22 @@
<hr />
<p>Not a table.header 1:-------cell 1.1cell 2.1</p>
<hr />
<p>Not a table.header 1-------|cell 1.1cell 2.1</p>
<p>Is a table.</p>
<table>
<thead>
<tr>
<th>header 1</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell 1.1</td>
</tr>
<tr>
<td>cell 2.1</td>
</tr>
</tbody>
</table>
<hr />
<p>Is a table.</p>
<table>
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/markdown/simple_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cell 2.1

---

Not a table.
Is a table.
header 1
-------|
cell 1.1
Expand Down
Loading