From e15297e1a7999db565e699de206fa1d2765f29cb Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 24 May 2014 00:21:25 +0200 Subject: [PATCH] MacroSet: removed static function install() (BC break) --- src/Latte/Macros/MacroSet.php | 6 ------ tests/Latte/macros.use.phpt | 7 ++++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Latte/Macros/MacroSet.php b/src/Latte/Macros/MacroSet.php index f1cc3dfcf..185795f6f 100644 --- a/src/Latte/Macros/MacroSet.php +++ b/src/Latte/Macros/MacroSet.php @@ -48,12 +48,6 @@ public function addMacro($name, $begin, $end = NULL, $attr = NULL) } - public static function install(Latte\Compiler $compiler) - { - return new static($compiler); - } - - /** * Initializes before template parsing. * @return void diff --git a/tests/Latte/macros.use.phpt b/tests/Latte/macros.use.phpt index 6426d038c..53d9d16c2 100644 --- a/tests/Latte/macros.use.phpt +++ b/tests/Latte/macros.use.phpt @@ -12,10 +12,11 @@ require __DIR__ . '/../bootstrap.php'; class MyMacros extends Latte\Macros\MacroSet { - public function __construct($compiler) + public static function install($compiler) { - parent::__construct($compiler); - $this->addMacro('my', 'echo "ok"'); + $me = new static($compiler); + $me->addMacro('my', 'echo "ok"'); + return $me; } }