Skip to content

Commit 7c1d15b

Browse files
committed
Merge branch 'main' into refactor/filesystem
# Conflicts: # composer.json # src/Tempest/Support/composer.json # src/Tempest/Support/src/Arr/functions.php
2 parents e4bfa4a + 76d70c1 commit 7c1d15b

File tree

131 files changed

+11052
-185
lines changed

Some content is hidden

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

131 files changed

+11052
-185
lines changed

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: shivammathur/setup-php@v2
2929
with:
3030
php-version: ${{ matrix.php }}
31-
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, ftp, zip
31+
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, intl, ftp, zip
3232
coverage: pcov
3333

3434
- name: Setup Bun
@@ -71,7 +71,7 @@ jobs:
7171
uses: shivammathur/setup-php@v2
7272
with:
7373
php-version: ${{ matrix.php }}
74-
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, ftp, zip
74+
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, pdo, sqlite, pdo_sqlite, pdo_mysql, intl, ftp, zip
7575
coverage: pcov
7676

7777
- name: Setup problem matchers

.github/workflows/isolated-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: shivammathur/setup-php@v2
5656
with:
5757
php-version: ${{ matrix.php }}
58-
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo
58+
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, intl
5959
coverage: pcov
6060

6161
- name: Install PHPUnit

.github/workflows/validate-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: shivammathur/setup-php@v2
1717
with:
1818
php-version: 8.4
19-
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo
19+
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo, intl
2020
coverage: none
2121

2222
- name: Validate framework composer file

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ tests/Unit/Log
1616
log/
1717
node_modules
1818
dist
19-
profile/
19+
profile/
20+
db-main.sqlite
21+
db-tenant-1.sqlite
22+
db-tenant-2.sqlite

composer.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"egulias/email-validator": "^4.0.2",
88
"ext-dom": "*",
99
"ext-fileinfo": "*",
10+
"ext-intl": "*",
1011
"ext-libxml": "*",
1112
"ext-mbstring": "*",
1213
"ext-pdo": "*",
@@ -34,7 +35,7 @@
3435
"symfony/uid": "^7.1",
3536
"symfony/var-dumper": "^7.1",
3637
"symfony/var-exporter": "^7.1",
37-
"tempest/highlight": "^2.11.2",
38+
"tempest/highlight": "^2.11.4",
3839
"vlucas/phpdotenv": "^5.6",
3940
"voku/portable-ascii": "^2.0.3"
4041
},
@@ -75,6 +76,7 @@
7576
"tempest/container": "self.version",
7677
"tempest/core": "self.version",
7778
"tempest/database": "self.version",
79+
"tempest/datetime": "self.version",
7880
"tempest/debug": "self.version",
7981
"tempest/discovery": "self.version",
8082
"tempest/event-bus": "self.version",
@@ -107,6 +109,7 @@
107109
"Tempest\\Container\\": "src/Tempest/Container/src",
108110
"Tempest\\Core\\": "src/Tempest/Core/src",
109111
"Tempest\\Database\\": "src/Tempest/Database/src",
112+
"Tempest\\DateTime\\": "src/Tempest/DateTime/src",
110113
"Tempest\\Debug\\": "src/Tempest/Debug/src",
111114
"Tempest\\Discovery\\": "src/Tempest/Discovery/src",
112115
"Tempest\\EventBus\\": "src/Tempest/EventBus/src",
@@ -125,23 +128,31 @@
125128
"Tempest\\Vite\\": "src/Tempest/Vite/src"
126129
},
127130
"files": [
131+
"src/Tempest/Clock/src/functions.php",
128132
"src/Tempest/CommandBus/src/functions.php",
129133
"src/Tempest/Container/src/functions.php",
130134
"src/Tempest/Core/src/functions.php",
131135
"src/Tempest/Database/src/functions.php",
136+
"src/Tempest/DateTime/src/constants.php",
137+
"src/Tempest/DateTime/src/functions.php",
132138
"src/Tempest/Debug/src/functions.php",
133139
"src/Tempest/EventBus/src/functions.php",
134140
"src/Tempest/Mapper/src/functions.php",
135141
"src/Tempest/Reflection/src/functions.php",
136142
"src/Tempest/Router/src/functions.php",
137143
"src/Tempest/Support/src/Arr/functions.php",
144+
"src/Tempest/Support/src/Comparison/functions.php",
138145
"src/Tempest/Support/src/Filesystem/functions.php",
139146
"src/Tempest/Support/src/Html/functions.php",
147+
"src/Tempest/Support/src/Json/functions.php",
140148
"src/Tempest/Support/src/Language/functions.php",
149+
"src/Tempest/Support/src/Math/constants.php",
150+
"src/Tempest/Support/src/Math/functions.php",
141151
"src/Tempest/Support/src/Namespace/functions.php",
142152
"src/Tempest/Support/src/Path/functions.php",
143153
"src/Tempest/Support/src/Random/functions.php",
144154
"src/Tempest/Support/src/Regex/functions.php",
155+
"src/Tempest/Support/src/Str/constants.php",
145156
"src/Tempest/Support/src/Str/functions.php",
146157
"src/Tempest/Support/src/functions.php",
147158
"src/Tempest/View/src/functions.php",
@@ -158,6 +169,7 @@
158169
"Tempest\\Container\\Tests\\": "src/Tempest/Container/tests",
159170
"Tempest\\Core\\Tests\\": "src/Tempest/Core/tests",
160171
"Tempest\\Database\\Tests\\": "src/Tempest/Database/tests",
172+
"Tempest\\DateTime\\Tests\\": "src/Tempest/DateTime/tests",
161173
"Tempest\\Discovery\\Tests\\": "src/Tempest/Discovery/tests",
162174
"Tempest\\EventBus\\Tests\\": "src/Tempest/EventBus/tests",
163175
"Tempest\\Generation\\Tests\\": "src/Tempest/Generation/tests",

src/Tempest/Auth/src/CurrentUserInitializer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66

77
use Tempest\Container\Container;
88
use Tempest\Container\DynamicInitializer;
9+
use Tempest\Container\Tag;
910
use Tempest\Reflection\ClassReflector;
1011

1112
final readonly class CurrentUserInitializer implements DynamicInitializer
1213
{
13-
public function canInitialize(ClassReflector $class): bool
14+
public function canInitialize(ClassReflector $class, ?string $tag): bool
1415
{
1516
return $class->implements(CanAuthenticate::class);
1617
}
1718

18-
public function initialize(ClassReflector $class, Container $container): object
19+
public function initialize(ClassReflector $class, ?string $tag, Container $container): object
1920
{
2021
$user = $container->get(Authenticator::class)->currentUser();
2122

src/Tempest/Cache/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"psr/cache": "^3.0",
77
"symfony/cache": "^7.2",
88
"tempest/core": "dev-main",
9+
"tempest/clock": "dev-main",
910
"tempest/container": "dev-main"
1011
},
1112
"require-dev": {

src/Tempest/Cache/src/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
namespace Tempest\Cache;
66

77
use Closure;
8-
use DateTimeInterface;
98
use Psr\Cache\CacheItemInterface;
9+
use Tempest\DateTime\DateTimeInterface;
1010

1111
interface Cache
1212
{

src/Tempest/Cache/src/IsCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace Tempest\Cache;
66

77
use Closure;
8-
use DateTimeInterface;
98
use Psr\Cache\CacheItemInterface;
109
use Psr\Cache\CacheItemPoolInterface;
10+
use Tempest\DateTime\DateTimeInterface;
1111

1212
trait IsCache
1313
{
@@ -20,7 +20,7 @@ public function put(string $key, mixed $value, ?DateTimeInterface $expiresAt = n
2020
->set($value);
2121

2222
if ($expiresAt !== null) {
23-
$item = $item->expiresAt($expiresAt);
23+
$item = $item->expiresAt($expiresAt->toNativeDateTime());
2424
}
2525

2626
if ($this->isEnabled()) {

src/Tempest/Clock/composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
"description": "A clock component that handle few simple clock operations.",
44
"require": {
55
"php": "^8.4",
6-
"psr/clock": "^1.0.0"
6+
"psr/clock": "^1.0.0",
7+
"tempest/datetime": "dev-main"
78
},
89
"autoload": {
910
"psr-4": {
1011
"Tempest\\Clock\\": "src"
11-
}
12+
},
13+
"files": [
14+
"src/functions.php"
15+
]
1216
},
1317
"autoload-dev": {
1418
"psr-4": {

0 commit comments

Comments
 (0)