Skip to content

Commit

Permalink
Twig dep constraints updated
Browse files Browse the repository at this point in the history
Other commits:
- update gitignore
- display strict errors, since travis does this also
- fix method declaration
- fixed unknown tests not throwing errors
  • Loading branch information
tolry authored and asm89 committed Jul 29, 2015
1 parent 4f23c9f commit 5b74dc5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
box.phar
composer.phar
composer.lock
twig-lint.phar
vendor
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"require": {
"symfony/console": "~2.1",
"symfony/finder": "~2.1",
"twig/twig": "~1.12"
"twig/twig": ">=1.16.2,<2.0"
},
"autoload": {
"psr-0": { "Asm89\\Twig\\Lint\\": "src/" }
Expand Down
11 changes: 10 additions & 1 deletion src/Asm89/Twig/Lint/Extension/StubbedCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ class StubbedCore extends \Twig_Extension_Core
*
* @return string
*/
protected function getTestNodeClass(\Twig_Parser $parser, $name, $line)
protected function getTestNodeClass(\Twig_Parser $parser, $name)
{
return 'Twig_Node_Expression_Test';
}

protected function getTestName(\Twig_Parser $parser, $line)
{
try {
return parent::getTestName($parser, $line);
} catch (\Twig_Error_Syntax $exception) {
return 'null';
}
}
}
2 changes: 2 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* file that was distributed with this source code.
*/

error_reporting(E_ALL | E_STRICT);

if (file_exists($file = __DIR__.'/../vendor/autoload.php')) {
$autoload = require_once $file;
} else {
Expand Down

0 comments on commit 5b74dc5

Please sign in to comment.