Skip to content

Commit

Permalink
Bugfixes caused by the new versions of dependencies
Browse files Browse the repository at this point in the history
- Fixed "Undefined class constant 'NAMESPACE_SEPARATOR'" error caused by (now forked) rootpd/translation library.
- Fixed "use the addFilterLoader()" user deprecation present after the latest latte update.
  • Loading branch information
rootpd committed Jun 1, 2022
1 parent 201c3b1 commit 853c322
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"kdyby/autowired": "^2.1",
"twig/twig": "^2.4",
"league/event": "~2.1",
"rootpd/translation": "3.0.5",
"rootpd/translation": "^3.0.6",
"tomaj/nette-bootstrap-form": "^2.0",
"vlucas/phpdotenv": "^5.3",
"tomaj/hermes": "^4.0",
Expand Down
4 changes: 1 addition & 3 deletions src/Helpers/FilterLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class FilterLoader
*/
public function load(string $helper)
{
if (isset($this->filters[$helper])) {
return call_user_func_array($this->filters[$helper], array_slice(func_get_args(), 1));
}
return $this->filters[$helper] ?? null;
}

public function register(string $name, callable $callback)
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
# Latte filters
nette.latteFactory:
setup:
- addFilter(null, [@filterLoader, 'load'])
- addFilterLoader([@filterLoader, 'load'])

filterLoader:
factory: Crm\ApplicationModule\Helpers\FilterLoader
Expand Down

0 comments on commit 853c322

Please sign in to comment.