Skip to content

Commit af4dee6

Browse files
Update dependencies (#259)
1 parent e9b27db commit af4dee6

4 files changed

Lines changed: 18 additions & 23 deletions

File tree

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"yiisoft/config": "^1.1",
3737
"yiisoft/csrf": "^1.2",
3838
"yiisoft/data-response": "^1.0",
39-
"yiisoft/definitions": "^2.0",
40-
"yiisoft/di": "^1.1",
39+
"yiisoft/definitions": "^3.0",
40+
"yiisoft/di": "^1.2",
4141
"yiisoft/error-handler": "^2.0",
4242
"yiisoft/factory": "^1.0",
4343
"yiisoft/files": "^2.0",
@@ -46,11 +46,10 @@
4646
"yiisoft/i18n": "^1.1",
4747
"yiisoft/log": "^2.0",
4848
"yiisoft/log-target-file": "^2.0",
49-
"yiisoft/router": "^1.2",
50-
"yiisoft/router-fastroute": "^1.1",
51-
"yiisoft/translator": "^1.1",
52-
"yiisoft/translator-formatter-intl": "^1.0",
53-
"yiisoft/translator-message-php": "^1.0",
49+
"yiisoft/router": "^2.0",
50+
"yiisoft/router-fastroute": "^2.0",
51+
"yiisoft/translator": "^2.0",
52+
"yiisoft/translator-message-php": "^1.1",
5453
"yiisoft/view": "^6.0",
5554
"yiisoft/yii-console": "^1.3",
5655
"yiisoft/yii-debug": "^3.0@dev",

config/common/translator.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44

55
use Yiisoft\Aliases\Aliases;
66
use Yiisoft\Translator\CategorySource;
7-
use Yiisoft\Translator\Formatter\Intl\IntlMessageFormatter;
7+
use Yiisoft\Translator\IntlMessageFormatter;
88
use Yiisoft\Translator\Message\Php\MessageSource;
99

1010
/** @var array $params */
1111

1212
return [
1313
// Configure application CategorySource
14-
'translation.app' => static function (Aliases $aliases) use ($params) {
15-
return new CategorySource(
16-
$params['yiisoft/translator']['defaultCategory'],
17-
new MessageSource($aliases->get('@messages')),
18-
new IntlMessageFormatter(),
19-
);
20-
},
14+
'translation.app' => [
15+
'definition' => static function (Aliases $aliases) use ($params) {
16+
return new CategorySource(
17+
$params['yiisoft/translator']['defaultCategory'],
18+
new MessageSource($aliases->get('@messages')),
19+
new IntlMessageFormatter(),
20+
);
21+
},
22+
'tags' => ['translation.categorySource'],
23+
],
2124
];

config/params.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@
5353
'locale' => 'en',
5454
'fallbackLocale' => 'en',
5555
'defaultCategory' => 'app',
56-
'categorySources' => [
57-
// You can add categories from your application and additional modules using `Reference::to` below
58-
// Reference::to(ApplicationCategorySource::class),
59-
Reference::to('translation.app'),
60-
],
6156
],
6257

6358
'yiisoft/yii-view' => [

config/routes.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
use Yiisoft\Router\Route;
77

88
return [
9-
Route::get('/')
10-
->action([SiteController::class, 'index'])
11-
->name('home'),
9+
Route::get('/')->action([SiteController::class, 'index'])->name('home'),
1210
];

0 commit comments

Comments
 (0)