Skip to content

Commit

Permalink
Tweaking things for my local and travis environments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremeamia committed May 25, 2013
1 parent dbcc58a commit e32ab51
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
@@ -1,12 +1,8 @@
language: php

php:
- 5.3
- 5.4

before_script:
- wget --quiet http://getcomposer.org/composer.phar # Install Composer
- php composer.phar install --install-suggests # Install dependencies
- cp phpunit.xml.dist phpunit.xml # Setup PHPUnit config

script: sudo phpunit --coverage-text
- composer install --dev
- cp phpunit.xml.dist phpunit.xml
script: phpunit --coverage-text
3 changes: 3 additions & 0 deletions composer.json
Expand Up @@ -14,6 +14,9 @@
"php": ">=5.3.3",
"nikic/php-parser": "0.9.*@dev"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": { "Jeremeamia\\SuperClosure": "src/" }
}
Expand Down
5 changes: 2 additions & 3 deletions phpunit.xml.dist
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="./tests/bootstrap.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
Expand All @@ -13,13 +12,13 @@

<testsuites>
<testsuite name="SuperClosure">
<directory>./tests/SuperClosure/Test</directory>
<directory>./tests/Jeremeamia/SuperClosure/Test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">./src/SuperClosure</directory>
<directory suffix=".php">./src/Jeremeamia/SuperClosure</directory>
</whitelist>
</filter>

Expand Down
2 changes: 1 addition & 1 deletion src/Jeremeamia/SuperClosure/ClosureFinderVisitor.php
Expand Up @@ -2,9 +2,9 @@

namespace Jeremeamia\SuperClosure;

use PHPParser_NodeVisitorAbstract;
use PHPParser_Node;
use PHPParser_Node_Expr_Closure;
use PHPParser_NodeVisitorAbstract;

class ClosureFinderVisitor extends PHPParser_NodeVisitorAbstract
{
Expand Down
10 changes: 5 additions & 5 deletions src/Jeremeamia/SuperClosure/ClosureParser.php
Expand Up @@ -2,12 +2,12 @@

namespace Jeremeamia\SuperClosure;

use PHPParser_Parser;
use PHPParser_Lexer;
use PHPParser_Node_Expr_Closure;
use PHPParser_Node;
use PHPParser_Error;
use PHPParser_Lexer_Emulative;
use PHPParser_Parser;
use PHPParser_PrettyPrinter_Default;
use PHPParser_Node;
use PHPParser_Node_Expr_Closure;
use PHPParser_Node_Name;
use PHPParser_NodeTraverser;
use PHPParser_NodeVisitor_NameResolver;
Expand Down Expand Up @@ -63,7 +63,7 @@ public function getReflection()
public function getClosureAbstractSyntaxTree()
{
if (!$this->abstractSyntaxTree) {
$parser = new PHPParser_Parser(new PHPParser_Lexer);
$parser = new PHPParser_Parser(new PHPParser_Lexer_Emulative);
$traverser = new PHPParser_NodeTraverser();
$closureFinder = new ClosureFinderVisitor($this->reflection);
$traverser->addVisitor(new PHPParser_NodeVisitor_NameResolver);
Expand Down
4 changes: 2 additions & 2 deletions src/Jeremeamia/SuperClosure/SerializableClosure.php
Expand Up @@ -70,8 +70,8 @@ public function serialize()
/**
* Unserializes the closure data and recreates the closure. Attempts to recreate the closure's context as well by
* extracting the used variables into the scope. Variables names in this method are surrounded with underlines in
* order to prevent collisions with the variables in the context. There be dragons here! Both `eval` and `extract`
* are used in this method
* order to prevent collisions with the variables in the context. NOTE: There be dragons here! Both `eval` and
* `extract` are used in this method
*
* @param string $__serialized__
*/
Expand Down
1 change: 1 addition & 0 deletions tests/bootstrap.php
@@ -1,3 +1,4 @@
<?php

date_default_timezone_set('America/Los_Angeles');
require __DIR__ . '/../vendor/autoload.php';

0 comments on commit e32ab51

Please sign in to comment.