diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md deleted file mode 100644 index a1c3826..0000000 --- a/CHANGELOG-2.x.md +++ /dev/null @@ -1,84 +0,0 @@ -# Change Log for OXID Twig engine component - -## v2.6.0 - Unreleased - -### Added -- Twig ^v3.14 support -- PHPUnit v11 support - -### Removed -- PHPUnit v10 support - -## v2.5.0 - 2024-10-14 - -### Removed -- PHP v8.1 support - -### Fixed -- Ifcontent will parse body even if content not existing [#0007231](https://bugs.oxid-esales.com/view.php?id=7231) - -## v2.4.0 - 2024-03-15 - -### Added -- PHPUnit v10 support - -### Removed -- PHP v8.0 support - -### Deprecated -- Appending missing file extensions (`".html.twig"`) to template names will be discontinued. -Since v3, the component will support only full template names. - -## v2.3.0 - 2024-03-11 - -### Changed -- Getting cache configuration parameter using templating cache service instead of context - -## v2.2.0 - 2023-11-16 - -### Deprecated -- `SmartyCycleExtension` will be removed - -## v2.1.0 - 2023-05-04 - -### Added -- Service Parameter to disable template caching `oxid_esales.templating.disable_twig_template_caching` - -### Removed -- Dependency to `webmozart/path-util` - -### Fixed -- Loading of shop templates when a theme inheritance is used -- Can't extend ` include_dynamic` template [#0007418](https://bugs.oxid-esales.com/view.php?id=7418) - -### Changed -- `Loader\FilesystemLoader` reloads template directories on admin mode change -- `TwigContext::getActiveThemeId()` throws exception instead of type error when no theme is configured -- License updated - -## v2.0.1 - 2022-11-23 - -### Fixed -- Warnings reported with stricter `error_reporting` level - -## v2.0.0 - 2022-10-28 - -### Added -- Twig templates multi inheritance for modules -- Support for PHP v8 -- `{{ content() }}` function to load content from DB -- `{% include_content %}` tag which includes template from DB - -### Changed -- Switched to Twig v3 - -### Removed -- Support for PHP v7 -- Support for `assign_adv` plugin -- `Resolver\TemplateNameResolver` -- `TwigContextInterface::getCacheDir()`, `TwigContextInterface::getTemplateDirectories()` and `TwigEngine::getDefaultFileExtension()` -- Redundant `is_safe` from extension initiation options - -### Deprecated -- `Loader\CmsLoader`, -- `Loader\CmsTemplateNameParser` diff --git a/CHANGELOG-3.x.md b/CHANGELOG-3.x.md index eb6f0cb..9290f57 100644 --- a/CHANGELOG-3.x.md +++ b/CHANGELOG-3.x.md @@ -2,6 +2,10 @@ ## v3.0.0 - unreleased +### Added +- PHPUnit v11 support + ### Removed - `SmartyCycleExtension` was removed - Short template names (without file extensions `".html.twig"`) are not longer supported. +- PHPUnit v10 support diff --git a/tests/Integration/Extensions/SmartyCycleExtensionTest.php b/tests/Integration/Extensions/SmartyCycleExtensionTest.php deleted file mode 100644 index 5e4e97e..0000000 --- a/tests/Integration/Extensions/SmartyCycleExtensionTest.php +++ /dev/null @@ -1,78 +0,0 @@ -extension = new SmartyCycleExtension(); - } - - #[DataProvider('getStaticCycle')] - public function testStaticCycle(string $template, string $expected, array $variables = []): void - { - $this->assertEquals($expected, $this->getTemplate($template)->render($variables)); - } - - public static function getStaticCycle(): array - { - return [ - [ - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values) }}", - "aba", - ['values' => ["a", "b"]], - ], - [ - "{{ smarty_cycle(values, { name: \"cycleName\" }) }}" . - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values, { name: \"cycleName\" }) }}", - "aab", - ['values' => ["a", "b"]], - ], - [ - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values, { reset: true }) }}" . - "{{ smarty_cycle(values) }}", - "aab", - ['values' => ["a", "b"]], - ], - [ - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle() }}" . - "{{ smarty_cycle() }}", - "aba", - ['values' => ["a", "b"]], - ], - [ - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values, { advance: false }) }}" . - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values) }}", - "abba", - ['values' => ["a", "b"]], - ], - [ - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values, { print: false }) }}" . - "{{ smarty_cycle(values) }}" . - "{{ smarty_cycle(values) }}", - "aab", - ['values' => ["a", "b"]], - ], - ]; - } -} diff --git a/tests/Integration/Resolver/TemplateFileResolverTest.php b/tests/Integration/Resolver/TemplateFileResolverTest.php deleted file mode 100644 index f48b98a..0000000 --- a/tests/Integration/Resolver/TemplateFileResolverTest.php +++ /dev/null @@ -1,42 +0,0 @@ -get(TemplateFileResolverInterface::class)->getFilename($templateName); - - $this->assertEquals($expectedFilename, $filename); - } - - public static function templateNameFileDataProvider(): array - { - return [ - [ - 'template', - 'template.html.twig' - ], - [ - 'some/path/template_name.html.twig', - 'some/path/template_name.html.twig' - ], - ]; - } -}