Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1e4137b
feat: parser and formatter
innocenzi Jun 21, 2025
181e55e
feat: config, catalog and translator
innocenzi Jun 21, 2025
cb29109
style: apply fixes from mago
innocenzi Jun 21, 2025
64aa360
refactor: move `Locale`, `Number` and `Pluralizer` to `tempest/intl`
innocenzi Jun 21, 2025
294fe51
refactor: rename `IntlConfig`
innocenzi Jun 21, 2025
c37f193
chore: remove individual package dependency on phpunit
innocenzi Jun 21, 2025
5c1ddbe
fix: add event support to translator
innocenzi Jun 21, 2025
691fc63
feat: add intl insights
innocenzi Jun 21, 2025
709a1aa
feat: support yaml translation files
innocenzi Jun 21, 2025
339acdc
refactor: use more specific name for formatting functions
innocenzi Jun 21, 2025
b7ff1c6
feat: support selector functions
innocenzi Jun 22, 2025
12ea1aa
feat: support html, icon and custom markup
innocenzi Jun 22, 2025
74737b8
refactor: clean up translator
innocenzi Jun 22, 2025
180c73f
chore: upgrade phpunit
innocenzi Jun 22, 2025
ec44879
Merge branch 'main' into feat/i18n
innocenzi Jun 23, 2025
3421493
refactor: rename parser to `MessageFormatParser`
innocenzi Jun 23, 2025
34536d7
refactor: fix event listening syntax
innocenzi Jun 23, 2025
013436e
chore: comment what `plural-rules` does
innocenzi Jun 23, 2025
305f43c
Merge branch 'main' into feat/i18n
innocenzi Jun 23, 2025
419f02b
chore: remove http client dependency from tempest/view
innocenzi Jun 23, 2025
0779ea9
fix: rename intl test suite
innocenzi Jun 23, 2025
23e3f36
Merge branch 'main' into feat/i18n
innocenzi Jun 23, 2025
ed433c7
fix: update `has` call
innocenzi Jun 23, 2025
1aab007
Merge branch 'main' into feat/i18n
brendt Jun 24, 2025
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
13 changes: 7 additions & 6 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use Composer\Semver\VersionParser;
use Tempest\Console\Console;
use Tempest\Console\ConsoleApplication;
use Tempest\Console\Exceptions\InterruptException;

use function Tempest\get;
use function Tempest\Support\arr;
use function Tempest\Support\str;
Expand Down Expand Up @@ -282,10 +283,10 @@ function ensureTagDoesNotExist(string $version): void
}

/*
|--------------------------------------------------------------------------
| Script starts here.
|--------------------------------------------------------------------------
*/
* |--------------------------------------------------------------------------
* | Script starts here.
* |--------------------------------------------------------------------------
*/

try {
ConsoleApplication::boot();
Expand Down Expand Up @@ -313,7 +314,7 @@ try {

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

// Bump PHP packages
Expand Down Expand Up @@ -364,6 +365,6 @@ try {
$tag,
));

exit;
exit();
} catch (InterruptException) {
}
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"symfony/uid": "^7.1",
"symfony/var-dumper": "^7.1",
"symfony/var-exporter": "^7.1",
"symfony/yaml": "^7.3",
"tempest/highlight": "^2.11.4",
"vlucas/phpdotenv": "^5.6",
"voku/portable-ascii": "^2.0.3"
Expand Down Expand Up @@ -82,6 +83,7 @@
"tempest/generation": "self.version",
"tempest/http": "self.version",
"tempest/http-client": "self.version",
"tempest/intl": "self.version",
"tempest/log": "self.version",
"tempest/mapper": "self.version",
"tempest/reflection": "self.version",
Expand Down Expand Up @@ -116,6 +118,7 @@
"Tempest\\Generation\\": "packages/generation/src",
"Tempest\\HttpClient\\": "packages/http-client/src",
"Tempest\\Http\\": "packages/http/src",
"Tempest\\Intl\\": "packages/intl/src",
"Tempest\\Log\\": "packages/log/src",
"Tempest\\Mapper\\": "packages/mapper/src",
"Tempest\\Reflection\\": "packages/reflection/src",
Expand All @@ -136,6 +139,8 @@
"packages/datetime/src/functions.php",
"packages/debug/src/functions.php",
"packages/event-bus/src/functions.php",
"packages/intl/src/Number/functions.php",
"packages/intl/src/functions.php",
"packages/mapper/src/functions.php",
"packages/reflection/src/functions.php",
"packages/router/src/functions.php",
Expand All @@ -144,11 +149,9 @@
"packages/support/src/Filesystem/functions.php",
"packages/support/src/Html/functions.php",
"packages/support/src/Json/functions.php",
"packages/support/src/Language/functions.php",
"packages/support/src/Math/constants.php",
"packages/support/src/Math/functions.php",
"packages/support/src/Namespace/functions.php",
"packages/support/src/Number/functions.php",
"packages/support/src/Path/functions.php",
"packages/support/src/Random/functions.php",
"packages/support/src/Regex/functions.php",
Expand All @@ -173,6 +176,7 @@
"Tempest\\Generation\\Tests\\": "packages/generation/tests",
"Tempest\\HttpClient\\Tests\\": "packages/http-client/tests",
"Tempest\\Http\\Tests\\": "packages/http/tests",
"Tempest\\Intl\\Tests\\": "packages/intl/tests",
"Tempest\\Log\\Tests\\": "packages/log/tests",
"Tempest\\Mapper\\Tests\\": "packages/mapper/tests",
"Tempest\\Reflection\\Tests\\": "packages/reflection/tests",
Expand Down Expand Up @@ -201,6 +205,7 @@
"phpstan": "vendor/bin/phpstan analyse src tests --memory-limit=1G",
"rector": "vendor/bin/rector process --no-ansi",
"merge": "php -d\"error_reporting = E_ALL & ~E_DEPRECATED\" vendor/bin/monorepo-builder merge",
"intl:plural": "./packages/intl/bin/plural-rules.php",
"release": [
"composer qa",
"./bin/release"
Expand Down
1 change: 1 addition & 0 deletions packages/database/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"tempest/container": "dev-main",
"tempest/event-bus": "dev-main",
"tempest/mapper": "dev-main",
"tempest/intl": "dev-main",
"tempest/support": "dev-main"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Tempest\Container\GenericContainer;
use Tempest\Database\Migrations\Migration;
use Tempest\Database\Tables\PluralizedSnakeCaseStrategy;
use Tempest\Support\Pluralizer\PluralizerInitializer;
use Tempest\Intl\Pluralizer\PluralizerInitializer;

/**
* @internal
Expand Down
1 change: 1 addition & 0 deletions packages/datetime/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"minimum-stability": "dev",
"require": {
"php": "^8.4",
"tempest/intl": "dev-main",
"tempest/support": "dev-main"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use DateTimeInterface as NativeDateTimeInterface;
use IntlCalendar;
use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;

/**
* Represents a date and time in a specific timezone.
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/DateTimeConvenienceMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Tempest\DateTime;

use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;
use Tempest\Support\Math;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/DateTimeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Tempest\DateTime;

use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;

interface DateTimeInterface extends TemporalInterface
{
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/TemporalConvenienceMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

use DateTimeImmutable as NativeDateTimeImmutable;
use DateTimeInterface as NativeDateTimeInterface;
use Tempest\Intl\Locale;
use Tempest\Support\Comparison;
use Tempest\Support\Comparison\Order;
use Tempest\Support\Language\Locale;

/**
* @require-implements TemporalInterface
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/TemporalInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
use DateTimeInterface as NativeDateTimeInterface;
use JsonSerializable;
use Stringable;
use Tempest\Intl\Locale;
use Tempest\Support\Comparison\Comparable;
use Tempest\Support\Comparison\Equable;
use Tempest\Support\Comparison\Order;
use Tempest\Support\Language\Locale;

/**
* Represents a temporal object that can be manipulated and compared.
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/Timestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Tempest\Clock\Clock;
use Tempest\Container\GenericContainer;
use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;
use Tempest\Support\Math;
use Tempest\Support\Math\Exception\ArithmeticException;
use Tempest\Support\Math\Exception\DivisionByZeroException;
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Tempest\DateTime\Timestamp;
use Tempest\DateTime\TimeStyle;
use Tempest\DateTime\Timezone;
use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;

use function hrtime;
use function microtime;
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/tests/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Tempest\DateTime\TimeStyle;
use Tempest\DateTime\Timezone;
use Tempest\DateTime\Weekday;
use Tempest\Support\Language\Locale;
use Tempest\Intl\Locale;

use function Tempest\DateTime\create_intl_date_formatter;
use function time;
Expand Down
2 changes: 1 addition & 1 deletion packages/datetime/tests/TimestampTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Tempest\DateTime\SecondsStyle;
use Tempest\DateTime\Timestamp;
use Tempest\DateTime\Timezone;
use Tempest\Intl\Locale;
use Tempest\Support\Comparison\Order;
use Tempest\Support\Language\Locale;
use Tempest\Support\Math;

use function Tempest\DateTime\create_intl_date_formatter;
Expand Down
14 changes: 14 additions & 0 deletions packages/intl/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Exclude build/test files from the release
.github/ export-ignore
tests/ export-ignore
.gitattributes export-ignore
.gitignore export-ignore
phpunit.xml export-ignore
README.md export-ignore

# Configure diff output
*.view.php diff=html
*.php diff=php
*.css diff=css
*.html diff=html
*.md diff=markdown
9 changes: 9 additions & 0 deletions packages/intl/LICENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2024 Brent Roose brendt@stitcher.io

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Loading