Skip to content

Commit 9c35f31

Browse files
authored
Merge branch '2.x' into command-name
2 parents f606a6f + 303811a commit 9c35f31

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="2.1.17" installed="2.1.17" location="./tools/phpstan" copy="false"/>
3+
<phar name="phpstan" version="2.1.33" installed="2.1.33" location="./tools/phpstan" copy="false"/>
44
</phive>

README.md

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

1010
This plugin allows you to use the [Twig Templating Language](https://twig.symfony.com/doc/) for your views.
1111

12-
It provides wrappers for common View opertions and many helpful extensions that expose CakePHP functions and `jasny/twig-extensions` helpers.
12+
It provides wrappers for common View operations and many helpful extensions that expose CakePHP functions and `jasny/twig-extensions` helpers.
1313

1414
## Installation
1515

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"cakephp/debug_kit": "^5.0",
3434
"michelf/php-markdown": "^1.9",
3535
"mikey179/vfsstream": "^1.6.10",
36-
"phpunit/phpunit": "^10.5.5 || ^11.1.3 || ^12.0"
36+
"phpunit/phpunit": "^11.5.3 | ^12.1.3"
3737
},
3838
"conflict": {
3939
"wyrihaximus/twig-view": "*"

src/Command/CompileCommand.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ class CompileCommand extends BaseCommand
1818
*/
1919
protected TwigView $twigView;
2020

21+
/**
22+
* @return string
23+
*/
24+
public static function getDescription(): string
25+
{
26+
return 'Compile Twig templates for caching.';
27+
}
28+
2129
/**
2230
* @inheritDoc
2331
*/

tests/TestCase/Twig/FileLoaderTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
namespace Cake\TwigView\Test\TestCase\Twig;
2020

21+
use Cake\Routing\Router;
2122
use Cake\TestSuite\TestCase;
2223
use Cake\TwigView\Twig\FileLoader;
2324
use Twig\Error\LoaderError;
@@ -36,6 +37,7 @@ public function setUp(): void
3637
{
3738
parent::setUp();
3839

40+
Router::reload();
3941
$this->loadPlugins(['TestTwigView']);
4042

4143
$this->loader = new FileLoader(['.twig']);
@@ -81,7 +83,7 @@ public function testGetCacheKeyPluginNonExistingFile()
8183

8284
public function testIsFresh()
8385
{
84-
file_put_contents(TMP . 'TwigViewIsFreshTest', 'TwigViewIsFreshTest');
86+
file_put_contents(TMP . 'TwigViewIsFreshTest', 'is fresh test');
8587
$time = filemtime(TMP . 'TwigViewIsFreshTest');
8688

8789
$this->assertTrue($this->loader->isFresh(TMP . 'TwigViewIsFreshTest', $time + 5));

tests/bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@
5858
'default' => [
5959
'engine' => 'File',
6060
],
61+
'_cake_core_' => [
62+
'className' => 'File',
63+
'prefix' => '_cake_translations_',
64+
'path' => CACHE . 'persistent/',
65+
'serialize' => true,
66+
'duration' => '+10 seconds',
67+
],
6168
'_cake_translations_' => [
6269
'className' => 'File',
6370
'prefix' => '_cake_translations_',

0 commit comments

Comments
 (0)