Skip to content

Commit

Permalink
Fixed lang-deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinKlemp committed Apr 8, 2017
1 parent 6814b05 commit 249ba3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Expand Up @@ -2,14 +2,16 @@ language: php

sudo: false

cache:
directories:
- $HOME/.composer/cache/files

matrix:
include:
- php: 5.5
- php: 5.6
- php: hhvm
- php: 7
allow_failures:
- php: hhvm
- php: 7
fast_finish: true

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": ">=5.5.9 || ^7.0",
"nikic/php-parser": "~3.0",
"nikic/php-parser": "3.*",
"symfony/console": "^2.6 || ^3.0",
"symfony/finder": "^2.6 || ^3.0",
"phpdocumentor/reflection-docblock": "~2.0",
Expand Down
24 changes: 0 additions & 24 deletions tests/Visitor/Usage/FindLanguageDeprecationsTest.php
Expand Up @@ -8,30 +8,6 @@

class FindLanguageDeprecationsTest extends FindTestCase
{
// http://php.net/manual/en/migration53.deprecated.php
public function testAssignOfNewByReference()
{
$source = <<<'EOC'
<?php
$foo =& new Foo();
EOC;
$splFileInfo = $this->prophesize('Symfony\Component\Finder\SplFileInfo');
$phpFileInfo = $this->parsePhpFileFromStringAndTraverseWithVisitor(
$file = PhpFileInfo::create($splFileInfo->reveal()),
$source,
new FindLanguageDeprecations()
);

$this->assertEquals(
array(
new DeprecatedLanguageUsage('Assigning the return value of new by reference is now deprecated.', 'Since PHP 5.3 use normal assignment instead.', 3),
),
$phpFileInfo->getDeprecatedLanguageUsages()
);
}

public function testAssignByReference()
{
$source = <<<'EOC'
Expand Down

0 comments on commit 249ba3d

Please sign in to comment.