From 8429157ab5478408606ee29e118c5f7db74c8afe Mon Sep 17 00:00:00 2001 From: nikic Date: Thu, 27 Mar 2014 12:51:13 +0100 Subject: [PATCH] Deprecate templating functionality Other projects cover this a lot better. --- CHANGELOG.md | 6 ++++++ doc/4_Code_generation.markdown | 2 ++ lib/PHPParser/Template.php | 3 +++ lib/PHPParser/TemplateLoader.php | 3 +++ 4 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a4d2b..58d0dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,14 @@ Version 0.9.5-dev * Add `NodeTraverser::removeVisitor()` method, which removes a visitor from the node traverser. This also modifies the corresponding `NodeTraverserInterface`. +* Deprecated `PHPParser_Template` and `PHPParser_TemplateLoader`. This functionality does not belong in the main project + and - as far as I know - nobody is using it. + * Fix alias resolution in `NameResolver`: Class names are now correctly handled as case-insensitive. +* The undefined variable error, which is used to the lexer to reset the error state, will no longer interfere with + custom error handlers. + Version 0.9.4 (25.08.2013) -------------------------- * [PHP 5.5] Add support for `ClassName::class`. This is parsed as an `Expr_ClassConstFetch` with `'class'` being the diff --git a/doc/4_Code_generation.markdown b/doc/4_Code_generation.markdown index 9541573..10c6c60 100644 --- a/doc/4_Code_generation.markdown +++ b/doc/4_Code_generation.markdown @@ -63,6 +63,8 @@ abstract class SomeClass extends SomeOtherClass implements A\Few, Interfaces Templates --------- +> **DEPRECATED**: This feature is deprecated and will be removed in PHP-Parser 1.0. + Additionally it is possible to generate code from reusable templates. As an example consider the following template, which defines a general getter/setter skeleton in terms of a property diff --git a/lib/PHPParser/Template.php b/lib/PHPParser/Template.php index 506b0d5..750dcf2 100644 --- a/lib/PHPParser/Template.php +++ b/lib/PHPParser/Template.php @@ -1,5 +1,8 @@