Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Chg #50: Do not throw exception on file delete when file not found (fix for high concurrency load) (@sartor)
- Chg #52: Do not throw exception on change mode and modification time of cache file (fix for high
concurrency load) (@sartor)
- Chg #56: Adapt configuration group names to Yii conventions (@vjik)

## 2.0.1 September 18, 2022

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"roave/infection-static-analysis-plugin": "^1.16",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.6",
"yiisoft/aliases": "^1.1|^2.0"
"yiisoft/aliases": "^2.0",
"yiisoft/di": "^1.2"
},
"autoload": {
"psr-4": {
Expand All @@ -51,7 +52,7 @@
"source-directory": "config"
},
"config-plugin": {
"common": "common.php",
"di": "di.php",
"params": "params.php"
}
},
Expand Down
File renamed without changes.
52 changes: 52 additions & 0 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

declare(strict_types=1);

namespace Yiisoft\Cache\File\Tests;

use Yiisoft\Aliases\Aliases;
use Yiisoft\Cache\File\FileCache;
use Yiisoft\Di\Container;
use Yiisoft\Di\ContainerConfig;

final class ConfigTest extends TestCase
{
public function testBase(): void
{
$container = $this->createContainer();

$fileCache = $container->get(FileCache::class);

$this->assertInstanceOf(FileCache::class, $fileCache);
}

private function createContainer(): Container
{
return new Container(
ContainerConfig::create()->withDefinitions(
$this->getDiConfig()
+
[
Aliases::class => [
'__construct()' => [
[
'@runtime' => __DIR__ . '/environment',
],
],
],
]
)
);
}

private function getDiConfig(): array
{
$params = $this->getParams();
return require dirname(__DIR__) . '/config/di.php';
}

private function getParams(): array
{
return require dirname(__DIR__) . '/config/params.php';
}
}
2 changes: 2 additions & 0 deletions tests/environment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore