From aba4424406e6309d1a923ab62b71b48eb9385084 Mon Sep 17 00:00:00 2001 From: Taka Oyama Date: Mon, 24 Jun 2024 11:59:52 +0900 Subject: [PATCH 1/2] fix: phpstan error for string('column', 'MAX') --- phpstan.neon | 3 +++ src/Schema/Blueprint.php | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index 614a3a0..3e27bf3 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -45,3 +45,6 @@ parameters: - message: "#^Cannot access offset 'requestTag' on mixed\\.$#" count: 1 path: src/Connection.php + - message: "#^Parameter \\#2 \\$length of method Illuminate\\\\Database\\\\Schema\\\\Blueprint\\:\\:string\\(\\) expects int\\|null, int\\|string\\|null given\\.$#" + count: 1 + path: src/Schema/Blueprint.php diff --git a/src/Schema/Blueprint.php b/src/Schema/Blueprint.php index 7289910..9477e8c 100644 --- a/src/Schema/Blueprint.php +++ b/src/Schema/Blueprint.php @@ -111,6 +111,15 @@ public function tinyIncrements($column) return $this->increments($column); } + /** + * @inheritDoc + * @param int|'max'|null $length add support for 'max' + */ + public function string($column, $length = null) + { + return parent::string($column, $length); + } + /** * @inheritDoc * @return UuidColumnDefinition From 288f348fcc84ddfabb10ecdeb5b1979cf4315cfa Mon Sep 17 00:00:00 2001 From: Taka Oyama Date: Mon, 24 Jun 2024 12:04:00 +0900 Subject: [PATCH 2/2] fix --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 180b646..7c12fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v8.1.3 (2024-06-24) + +Fixed +- phpstan error for string('column', 'MAX') (#223) + +# v8.1.2 (2024-06-10) + +Fixed +- updateOrInsert signature change in 11.10 (#216) + # v8.1.1 (2024-06-03) Fixed