Please update this issue with more.
Must-haves:
- Delete the
html_* plugins for good, because they're scary
- Delete the
count_* plugins, because they're mostly unused
- Delete the
strip_tags plugin, since it's most likely not safe
- Delete all plugins banned in strict mode
- Delete the following plugins, because they violate web best practices:
capitalize: Use text-transform in CSS instead.
truncate: Use overflow and text-overflow in CSS instead.
date_format: Does not support proper localization, out of scope of Brainy.
- Remove the
make_timestamp and escape_special_chars shared plugins, as they're only depended on by the plugins being removed above.
- Remove
$smarty->template, which is banned in strict mode.
- Remove syntax features banned by strict mode.
- Remove support for built-in functions with side effects that are banned in strict mode:
reset(), current(), etc.
- Remove
SmartyBC.
- Remove the
inline param from {include}.
{* set stricter *} that requires all included templates to be strict
Nice-to-haves:
- AST-based parser and compiler
- Make it impossible to
{include} or fetch a file outside of one of the recognized template directories.
- Mode that reports which assigned variables were not accessed
- API should be similar to
fetchedTemplate() overridable method
- Should be enabled with a static flag
- May be possible to implement by making the scope array inside
TemplateData be an object implementing PHP's ArrayAccess interface with zero overhead while mode is off (no new code branches)
- Make
buildFilepath not be insane.
Stretch:
- 80% code coverage
- ~100% code coverage for bundled plugins
- Cut compilation times by 25%
- Reduce IO-related PHP calls (
filemtime, getcwd, etc.) by 25%
Please update this issue with more.
Must-haves:
html_*plugins for good, because they're scarycount_*plugins, because they're mostly unusedstrip_tagsplugin, since it's most likely not safecapitalize: Usetext-transformin CSS instead.truncate: Useoverflowandtext-overflowin CSS instead.date_format: Does not support proper localization, out of scope of Brainy.make_timestampandescape_special_charsshared plugins, as they're only depended on by the plugins being removed above.$smarty->template, which is banned in strict mode.reset(),current(), etc.SmartyBC.inlineparam from{include}.{* set stricter *}that requires all included templates to be strictNice-to-haves:
{include}or fetch a file outside of one of the recognized template directories.fetchedTemplate()overridable methodTemplateDatabe an object implementing PHP'sArrayAccessinterface with zero overhead while mode is off (no new code branches)buildFilepathnot be insane.Stretch:
filemtime,getcwd, etc.) by 25%