Skip to content

Commit a6145d0

Browse files
authored
chore: update mago and remove some flaky tests (#1579)
1 parent b9e9de2 commit a6145d0

File tree

7 files changed

+10
-9
lines changed

7 files changed

+10
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"require-dev": {
4848
"aws/aws-sdk-php": "^3.338.0",
4949
"azure-oss/storage-blob-flysystem": "^1.2",
50-
"carthage-software/mago": "^1.0.0-beta.16",
50+
"carthage-software/mago": "1.0.0-beta.24",
5151
"guzzlehttp/psr7": "^2.6.1",
5252
"league/flysystem-aws-s3-v3": "^3.25.1",
5353
"league/flysystem-ftp": "^3.25.1",

mago.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ empty-line-after-opening-tag = false
3535
integrations = ["php-unit", "tempest"]
3636

3737
[linter.rules]
38-
yoda-conditions = { enabled = false }
3938
interface-name = { psr = false }
4039
trait-name = { psr = false }
4140
class-name = { psr = false }
@@ -62,6 +61,4 @@ halstead = { enabled = false }
6261
prefer-arrow-function = { enabled = false } # enable when references are fixed
6362
prefer-first-class-callable = { enabled = false } # enable when arguments are fixed
6463
strict-behavior = { allow-loose-behavior = true }
65-
66-
# [analyzer]
67-
# override-attribute = { enabled = false } # CONSIDER ENABLING
64+
yoda-conditions = { enabled = false }

packages/cryptography/tests/TimelockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function test_uses_clock_to_sleep(): void
8181

8282
$elapsed = $clock->timestamp()->getMilliseconds() - $ms;
8383

84-
// Even if we mock the clock, there's a `microtime` call that may be off by a few ms on Windows
85-
$this->assertEqualsToMoreOrLess(300, $elapsed, margin: 0, windowsMargin: 2);
84+
// Even if we mock the clock, there's a `microtime` call that may be off by a few ms
85+
$this->assertEqualsToMoreOrLess(300, $elapsed, margin: 2);
8686
}
8787
}

packages/support/src/Str/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function to_upper_case(Stringable|string $string): string
5151

5252
/**
5353
* Converts the given string to snake case.
54+
*
55+
* @mago-expect lint:require-preg-quote-delimiter
5456
*/
5557
function to_snake_case(Stringable|string $string, Stringable|string $delimiter = '_'): string
5658
{
@@ -63,7 +65,6 @@ function to_snake_case(Stringable|string $string, Stringable|string $delimiter =
6365

6466
$string = preg_replace('/(?<=\p{Ll}|\p{N})(\p{Lu})/u', $delimiter . '$1', $string);
6567
$string = preg_replace('/(?<=\p{Lu})(\p{Lu}\p{Ll})/u', $delimiter . '$1', $string);
66-
// @mago-expect lint:require-preg-quote-delimiter
6768
$string = preg_replace('![^' . preg_quote($delimiter) . '\pL\pN\s]+!u', $delimiter, mb_strtolower($string, 'UTF-8'));
6869
$string = preg_replace('/\s+/u', $delimiter, $string);
6970
$string = trim($string, $delimiter);

packages/support/tests/Random/FunctionsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public function test_is_ulid(): void
9696
$this->assertFalse(Random\is_ulid('0ec29141-3d58-4187-b664-2d93b7da0d31'));
9797
$this->assertFalse(Random\is_ulid('018dcc19-7e65-7c4b-9b14-9a11df3e0fdb'));
9898
$this->assertFalse(Random\is_ulid('foo'));
99-
$this->assertFalse(Random\is_ulid(Random\secure_string(26)));
10099
$this->assertFalse(Random\is_ulid(null));
101100
}
102101
}

tests/Integration/Console/Components/TaskComponentTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function test_no_task(): void
5252

5353
public function test_process_task(): void
5454
{
55+
$this->skipCI('Flaky on CI');
56+
5557
$this->console
5658
->withoutPrompting()
5759
->call(function (Console $console): void {
@@ -85,6 +87,8 @@ public function test_successful_task(): void
8587

8688
public function test_failing_task(): void
8789
{
90+
$this->skipCI('Flaky on CI');
91+
8892
$this->console
8993
->withoutPrompting()
9094
->call(function (Console $console): void {

tests/Integration/Vite/install/package-lock.json

Whitespace-only changes.

0 commit comments

Comments
 (0)