Skip to content

Commit

Permalink
fix an compatiblity issue with contao 4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Mar 21, 2024
1 parent 3f5d9bc commit 1b55029
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.2] - 20223-12-04
## [1.6.3] - 2023-03-21
- Fixed: compatibility with contao 4.13

## [1.6.2] - 2023-12-04
- Fixed: possible exception on cache warmup

## [1.6.1] - 20223-11-23
Expand Down
17 changes: 9 additions & 8 deletions src/Filesystem/TwigTemplateLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,15 @@ public function __construct()
$bundle,
['extension' => $extension]));

// Project template folder
foreach (['/contao/templates', '/templates',] as $subpath) {
if (!is_dir($dir = $this->kernel->getProjectDir().$subpath)) {
continue;
}

$twigFiles = array_merge_recursive($twigFiles, $this->getTemplatesInPath($dir, $bundle, ['extension' => $extension]));
}
// Project template folders
$twigFiles = array_merge_recursive(
$twigFiles,
$this->getTemplatesInPath($this->kernel->getProjectDir().'/contao/templates', $bundle, ['extension' => $extension])
);
$twigFiles = array_merge_recursive(
$twigFiles,
$this->getTemplatesInPath($this->kernel->getProjectDir().'/templates', null, ['extension' => $extension])
);

return $twigFiles;
}
Expand Down

0 comments on commit 1b55029

Please sign in to comment.