Skip to content

Commit

Permalink
BlockMacros: removed deprecation warning for {includeblock}, it is de…
Browse files Browse the repository at this point in the history
…precated silently
  • Loading branch information
dg committed Jan 19, 2017
1 parent 05187e9 commit 58b94ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Latte/Macros/BlockMacros.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function macroInclude(MacroNode $node, PhpWriter $writer)
*/
public function macroIncludeBlock(MacroNode $node, PhpWriter $writer)
{
trigger_error('Macro {includeblock} is deprecated, use similar macro {import}.', E_USER_DEPRECATED);
//trigger_error('Macro {includeblock} is deprecated, use similar macro {import}.', E_USER_DEPRECATED);
$node->replaced = FALSE;
if ($node->modifiers) {
throw new CompileException('Modifiers are not allowed in ' . $node->getNotation());
Expand Down
4 changes: 2 additions & 2 deletions tests/Latte/BlockMacros.includeblock.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ $latte->setLoader(new Latte\Loaders\StringLoader([

Assert::matchFile(
__DIR__ . '/expected/BlockMacros.includeblock.phtml',
@$latte->compile('main') // @ false temporary warning for {includeblock}
$latte->compile('main')
);
Assert::matchFile(
__DIR__ . '/expected/BlockMacros.includeblock.html',
@$latte->renderToString('main') // @ false temporary warning for {includeblock}
$latte->renderToString('main')
);
Assert::matchFile(
__DIR__ . '/expected/BlockMacros.includeblock.inc.phtml',
Expand Down
4 changes: 2 additions & 2 deletions tests/Latte/BlockMacros.inheritance.child1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ $latte->setLoader(new Latte\Loaders\StringLoader([

Assert::matchFile(
__DIR__ . '/expected/BlockMacros.inheritance.child1.phtml',
@$latte->compile('main') // @ false temporary warning for {includeblock}
$latte->compile('main')
);
Assert::matchFile(
__DIR__ . '/expected/BlockMacros.inheritance.child1.html',
@$latte->renderToString('main', ['people' => ['John', 'Mary', 'Paul']]) // @ false temporary warning for {includeblock}
$latte->renderToString('main', ['people' => ['John', 'Mary', 'Paul']])
);
Assert::matchFile(
__DIR__ . '/expected/BlockMacros.inheritance.child1.parent.phtml',
Expand Down
5 changes: 1 addition & 4 deletions tests/Latte/contentType.compatibility.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,7 @@ Assert::same(' <>', $latte->renderToString('context2'));

Assert::error(function () use ($latte) {
$latte->renderToString('context3');
}, [
[E_USER_DEPRECATED, ''],
[E_USER_WARNING, "Including 'ical.latte' with content type ICAL into incompatible type HTML."],
]);
}, E_USER_WARNING, "Including 'ical.latte' with content type ICAL into incompatible type HTML.");

Assert::same(' <>', $latte->renderToString('context4'));

Expand Down

0 comments on commit 58b94ad

Please sign in to comment.