* 'develop' of git://github.com/phpbb/phpbb3:
[ticket/10392] Alter parent namespace stripping.
[ticket/10392] Test for magic loop variables with nested namespaces.
[ticket/10392] Missed fix for S_BLOCK_NAME.
[ticket/10392] Fix access to nested special block variables.
Most template variables can now have their PHP variable name resolved instead
of only compiling directly. This allows for the use of block vars in INCLUDE
statements. This does not work for language variables since they require
multiple checks. Added tests for the new types of allowed INCLUDEs.
PHPBB3-10322
When template tests are skipped because cache directory is not
writable, include path to the cache directory into the message
saying it is not writable.
PHPBB3-10354
Template locator is responsible for maintaining mapping from template
handles to filenames and paths, and provides resolution services
using these mappings.
Template locator is aware of template inheritance and is capable of
checking template file existence on the filesystem.
PHPBB3-9726
The template stream filter no longer depends on the $config global.
Instead it uses a 'allow_php' param that is passed via
stream_bucket_append's last argument.
Tests also adjusted.
PHPBB3-9726
When testing eval code path, compiled templates may not be written
to the file system, and unconditionally trying to copy them
breaks tests.
PHPBB3-9726
compile_tag_if had the flawed approach of adding an isset statement for
all variables to the beginning of the if. This fails for negative
expressions, and checking those takes a considerable effort.
The easier solution is to make the variable expression itself
conditional, defaulting to null if it is not set.
Thanks to naderman for the solution.
PHPBB3-9726
This currently does not pass, thus it is commented out.
The reuse appears implausible in the same file, however it may be
also done across template files where it is much harder to detect.
PHPBB3-9726
This error resulted in a dot from the namespace being placed into
variable reference in compiled template code, thus creating bogus
compiled template code.
PHPBB3-9726
This currently fails.
This test is a reduced version of permission_mask template in acp, which
is not correctly compiled by the current template engine code.
PHPBB3-9726
phpbb_template_compile is now much simpler. It takes complete file paths
as inputs, either source template path or source template path and output
compiled template path. The number of methods also went down to two -
compile template and returned compiled text or compile and write to file.
phpbb_compile class is responsible for determining source and compiled
paths. It already had all the data necessary for this, now the code is
in the same place as the data it uses.
PHPBB3-9726
Do not change $recompile from true to false - any recompilation
condition alone is sufficient to force recompilation.
Also uncomment the nonexistent file test which passes with this fix.
PHPBB3-9726
Due to the usage of `__DIR__` for the file includes the tests can't
be ran on systems with PHP < 5.3. Replace all occurances of
`__DIR__` with `dirname(__FILE__)`.
PHPBB3-10011
The template tests disable NOTICEs for the duration of template execution since
the current version of the template engine does not generate sufficiently clean
code. The error level is reset aftwards, however that part is skipped when
trigger_error is called which is converted into a regular exception by PHPUnit
and passed down until caught. Such exceptions are now caught to reset the error
level, and then the exception is rethrown.
This uncovered another issue in the template tests which only passed because
NOTICEs were unintentionally disabled at this point. assign_display is also
required to operate without NOTICEs. The respective code has been added around
its callee as well. However no handling of exceptions takes place there. If
another test checking for errors in that function is ever added similar catch
logic will have to be added there.
PHPBB3-9701