Skip to content

Commit 0b18778

Browse files
[9.x] Fix master CI (#40329)
* wip * wip * wip * wip * wip * fix builder * fix Co-authored-by: Taylor Otwell <[email protected]>
1 parent f42aaa5 commit 0b18778

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ jobs:
6262
command: composer require guzzlehttp/guzzle:^7.2 --no-interaction --no-update
6363
if: matrix.php >= 8
6464

65+
- name: Set Minimum PHP 8.1 Versions
66+
uses: nick-invision/retry@v1
67+
with:
68+
timeout_minutes: 5
69+
max_attempts: 5
70+
command: composer require ramsey/collection:^1.2 brick/math:^0.9.3 --no-interaction --no-update
71+
if: matrix.php >= 8.1
72+
6573
- name: Install dependencies
6674
uses: nick-invision/retry@v1
6775
with:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"egulias/email-validator": "^3.1",
2424
"laravel/serializable-closure": "^1.0",
2525
"league/commonmark": "^2.0.2",
26-
"league/flysystem": "^2.0",
26+
"league/flysystem": "^2.3.1",
2727
"monolog/monolog": "^2.0",
2828
"nesbot/carbon": "^2.53.1",
2929
"psr/container": "^1.1.1|^2.0.1",

src/Illuminate/Database/Query/Builder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Database\Query;
44

55
use BackedEnum;
6+
use Carbon\CarbonPeriod;
67
use Closure;
78
use DateTimeInterface;
89
use Illuminate\Contracts\Database\Query\Builder as BuilderContract;
@@ -927,6 +928,10 @@ public function whereBetween($column, iterable $values, $boolean = 'and', $not =
927928
{
928929
$type = 'between';
929930

931+
if ($values instanceof CarbonPeriod) {
932+
$values = $values->toArray();
933+
}
934+
930935
$this->wheres[] = compact('type', 'column', 'values', 'boolean', 'not');
931936

932937
$this->addBinding(array_slice($this->cleanBindings(Arr::flatten($values)), 0, 2), 'where');

src/Illuminate/Database/Query/Grammars/Grammar.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ protected function whereBetween(Builder $query, $where)
358358
{
359359
$between = $where['not'] ? 'not between' : 'between';
360360

361-
$min = $this->parameter(reset($where['values']));
361+
$min = $this->parameter(is_array($where['values']) ? reset($where['values']) : $where['values'][0]);
362362

363-
$max = $this->parameter(end($where['values']));
363+
$max = $this->parameter(is_array($where['values']) ? end($where['values']) : $where['values'][1]);
364364

365365
return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max;
366366
}
@@ -376,9 +376,9 @@ protected function whereBetweenColumns(Builder $query, $where)
376376
{
377377
$between = $where['not'] ? 'not between' : 'between';
378378

379-
$min = $this->wrap(reset($where['values']));
379+
$min = $this->wrap(is_array($where['values']) ? reset($where['values']) : $where['values'][0]);
380380

381-
$max = $this->wrap(end($where['values']));
381+
$max = $this->wrap(is_array($where['values']) ? end($where['values']) : $where['values'][1]);
382382

383383
return $this->wrap($where['column']).' '.$between.' '.$min.' and '.$max;
384384
}

src/Illuminate/Encryption/Encrypter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function encrypt($value, $serialize = true)
109109
}
110110

111111
$iv = base64_encode($iv);
112-
$tag = base64_encode($tag);
112+
$tag = base64_encode($tag ?? '');
113113

114114
$mac = self::$supportedCiphers[strtolower($this->cipher)]['aead']
115115
? '' // For AEAD-algoritms, the tag / MAC is returned by openssl_encrypt...

src/Illuminate/Filesystem/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"suggest": {
3535
"ext-ftp": "Required to use the Flysystem FTP driver.",
3636
"illuminate/http": "Required for handling uploaded files (^7.0).",
37-
"league/flysystem": "Required to use the Flysystem local driver (^2.0).",
37+
"league/flysystem": "Required to use the Flysystem local driver (^2.3.1).",
3838
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^2.0).",
3939
"league/flysystem-ftp": "Required to use the Flysystem FTP driver (^2.0).",
4040
"league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^2.4).",

tests/Support/SupportHelpersTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPUnit\Framework\TestCase;
1414
use RuntimeException;
1515
use stdClass;
16+
use Traversable;
1617

1718
class SupportHelpersTest extends TestCase
1819
{
@@ -836,7 +837,7 @@ public function __construct($items = [])
836837
$this->items = $items;
837838
}
838839

839-
public function getIterator()
840+
public function getIterator(): Traversable
840841
{
841842
return new ArrayIterator($this->items);
842843
}

0 commit comments

Comments
 (0)