Skip to content

Commit dfda7ab

Browse files
authored
Merge branch 'main' into fix/invalid-closing-tag-commented-out-code
2 parents a979101 + e34e120 commit dfda7ab

File tree

137 files changed

+9804
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+9804
-399
lines changed

.github/workflows/isolated-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
coverage: pcov
6060

6161
- name: Install PHPUnit
62-
run: composer global require phpunit/phpunit:^11.5.17
62+
run: composer global require phpunit/phpunit:^12.2.3
6363

6464
- name: Setup problem matchers
6565
run: |

bin/release

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use Composer\Semver\VersionParser;
1818
use Tempest\Console\Console;
1919
use Tempest\Console\ConsoleApplication;
2020
use Tempest\Console\Exceptions\InterruptException;
21+
2122
use function Tempest\get;
2223
use function Tempest\Support\arr;
2324
use function Tempest\Support\str;
@@ -282,10 +283,10 @@ function ensureTagDoesNotExist(string $version): void
282283
}
283284

284285
/*
285-
|--------------------------------------------------------------------------
286-
| Script starts here.
287-
|--------------------------------------------------------------------------
288-
*/
286+
* |--------------------------------------------------------------------------
287+
* | Script starts here.
288+
* |--------------------------------------------------------------------------
289+
*/
289290

290291
try {
291292
ConsoleApplication::boot();
@@ -313,7 +314,7 @@ try {
313314

314315
if (! $console->confirm("The next tag will be <em>{$tag}</em>. Release?")) {
315316
$console->error('Cancelled.');
316-
exit;
317+
exit();
317318
}
318319

319320
// Bump PHP packages
@@ -364,6 +365,6 @@ try {
364365
$tag,
365366
));
366367

367-
exit;
368+
exit();
368369
} catch (InterruptException) {
369370
}

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
"symfony/uid": "^7.1",
3636
"symfony/var-dumper": "^7.1",
3737
"symfony/var-exporter": "^7.1",
38+
"symfony/yaml": "^7.3",
3839
"tempest/highlight": "^2.11.4",
3940
"vlucas/phpdotenv": "^5.6",
4041
"voku/portable-ascii": "^2.0.3"
4142
},
4243
"require-dev": {
43-
"aidan-casey/mock-client": "dev-master",
4444
"carthage-software/mago": "0.24.1",
4545
"guzzlehttp/psr7": "^2.6.1",
4646
"illuminate/view": "~11.7.0",
@@ -59,7 +59,7 @@
5959
"phpat/phpat": "^0.11.0",
6060
"phpbench/phpbench": "84.x-dev",
6161
"phpstan/phpstan": "^2.0",
62-
"phpunit/phpunit": "^11.5.17",
62+
"phpunit/phpunit": "^12.2.3",
6363
"rector/rector": "^2.0-rc2",
6464
"spatie/phpunit-snapshot-assertions": "^5.1.8",
6565
"spaze/phpstan-disallowed-calls": "^4.0",
@@ -83,6 +83,7 @@
8383
"tempest/generation": "self.version",
8484
"tempest/http": "self.version",
8585
"tempest/http-client": "self.version",
86+
"tempest/intl": "self.version",
8687
"tempest/log": "self.version",
8788
"tempest/mapper": "self.version",
8889
"tempest/reflection": "self.version",
@@ -117,6 +118,7 @@
117118
"Tempest\\Generation\\": "packages/generation/src",
118119
"Tempest\\HttpClient\\": "packages/http-client/src",
119120
"Tempest\\Http\\": "packages/http/src",
121+
"Tempest\\Intl\\": "packages/intl/src",
120122
"Tempest\\Log\\": "packages/log/src",
121123
"Tempest\\Mapper\\": "packages/mapper/src",
122124
"Tempest\\Reflection\\": "packages/reflection/src",
@@ -137,6 +139,8 @@
137139
"packages/datetime/src/functions.php",
138140
"packages/debug/src/functions.php",
139141
"packages/event-bus/src/functions.php",
142+
"packages/intl/src/Number/functions.php",
143+
"packages/intl/src/functions.php",
140144
"packages/mapper/src/functions.php",
141145
"packages/reflection/src/functions.php",
142146
"packages/router/src/functions.php",
@@ -145,11 +149,9 @@
145149
"packages/support/src/Filesystem/functions.php",
146150
"packages/support/src/Html/functions.php",
147151
"packages/support/src/Json/functions.php",
148-
"packages/support/src/Language/functions.php",
149152
"packages/support/src/Math/constants.php",
150153
"packages/support/src/Math/functions.php",
151154
"packages/support/src/Namespace/functions.php",
152-
"packages/support/src/Number/functions.php",
153155
"packages/support/src/Path/functions.php",
154156
"packages/support/src/Random/functions.php",
155157
"packages/support/src/Regex/functions.php",
@@ -174,6 +176,7 @@
174176
"Tempest\\Generation\\Tests\\": "packages/generation/tests",
175177
"Tempest\\HttpClient\\Tests\\": "packages/http-client/tests",
176178
"Tempest\\Http\\Tests\\": "packages/http/tests",
179+
"Tempest\\Intl\\Tests\\": "packages/intl/tests",
177180
"Tempest\\Log\\Tests\\": "packages/log/tests",
178181
"Tempest\\Mapper\\Tests\\": "packages/mapper/tests",
179182
"Tempest\\Reflection\\Tests\\": "packages/reflection/tests",
@@ -202,6 +205,7 @@
202205
"phpstan": "vendor/bin/phpstan analyse src tests --memory-limit=1G",
203206
"rector": "vendor/bin/rector process --no-ansi",
204207
"merge": "php -d\"error_reporting = E_ALL & ~E_DEPRECATED\" vendor/bin/monorepo-builder merge",
208+
"intl:plural": "./packages/intl/bin/plural-rules.php",
205209
"release": [
206210
"composer qa",
207211
"./bin/release"

packages/console/src/Middleware/ResolveOrRescueMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private function getSimilarCommands(ImmutableString $search): ImmutableArray
8484
$currentName = str($consoleCommand->getName());
8585

8686
// Already added to suggestions
87-
if ($suggestions->contains($currentName->toString())) {
87+
if ($suggestions->hasValue($currentName->toString())) {
8888
continue;
8989
}
9090

packages/console/src/Middleware/ValidateNamedArgumentsMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __invoke(Invocation $invocation, ConsoleMiddlewareCallable $next
2929

3030
$invalidInput = arr($invocation->argumentBag->arguments)
3131
->filter(fn (ConsoleInputArgument $argument) => $argument->name !== null)
32-
->filter(fn (ConsoleInputArgument $argument) => ! $allowedParameterNames->contains(ltrim($argument->name, '-')))
32+
->filter(fn (ConsoleInputArgument $argument) => ! $allowedParameterNames->hasValue(ltrim($argument->name, '-')))
3333
->filter(fn (ConsoleInputArgument $argument) => ! in_array($argument->name, GlobalFlags::values(), strict: true));
3434

3535
if ($invalidInput->isNotEmpty()) {

packages/database/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"tempest/container": "dev-main",
1010
"tempest/event-bus": "dev-main",
1111
"tempest/mapper": "dev-main",
12+
"tempest/intl": "dev-main",
1213
"tempest/support": "dev-main"
1314
},
1415
"autoload": {

packages/database/src/Mappers/SelectModelMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function normalizeRow(ModelInspector $model, array $row, MutableArray $da
103103

104104
$originalKey .= $relation->name . '.';
105105

106-
if (! $data->has(trim($originalKey, '.'))) {
106+
if (! $data->hasKey(trim($originalKey, '.'))) {
107107
$data->set(trim($originalKey, '.'), []);
108108
}
109109

packages/database/tests/Tables/PluralizedSnakeCaseStrategyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Tempest\Container\GenericContainer;
1010
use Tempest\Database\Migrations\Migration;
1111
use Tempest\Database\Tables\PluralizedSnakeCaseStrategy;
12-
use Tempest\Support\Pluralizer\PluralizerInitializer;
12+
use Tempest\Intl\Pluralizer\PluralizerInitializer;
1313

1414
/**
1515
* @internal

packages/datetime/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"minimum-stability": "dev",
66
"require": {
77
"php": "^8.4",
8+
"tempest/intl": "dev-main",
89
"tempest/support": "dev-main"
910
},
1011
"autoload": {

packages/datetime/src/DateTime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use DateTimeInterface as NativeDateTimeInterface;
88
use IntlCalendar;
9-
use Tempest\Support\Language\Locale;
9+
use Tempest\Intl\Locale;
1010

1111
/**
1212
* Represents a date and time in a specific timezone.

0 commit comments

Comments
 (0)