Rules for static analysis of Latte templates and Latte render() methods
- See Rules Overview
composer require symplify/phpstan-latte-rules --dev
@todo
LatteCompleteCheckRule can check usage of all default latte filters. If you use some additional filters, register them in your phpstan.neon as latteFilters
parameter. Use array [className, methodName]
for static and dynamic method calls, and simple string for function calls:
parameters:
latteFilters:
someStaticFilter: [SomeFilterClass, processStatic]
someDynamicFilter: [SomeFilterClass, processDynamic]
someFunctionFilter: some_function
With application mapping registered in phpstan.neon LatteCompleteCheckRule can also check if your links are correct:
parameters:
presenterFactoryMapping:
*: App\*Module\*Presenter
In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker
The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.