...
 
Commits (3)
This diff is collapsed.
......@@ -19,7 +19,7 @@
},
"license": "GPL-2.0+",
"require": {
"typo3/cms-core": ">= 8.7.0, <= 8.7.99"
"typo3/cms-core": "^8.7 || ^9.5"
},
"autoload": {
"psr-4": {
......
......@@ -47,7 +47,7 @@ class ArrayAssurer extends \PhpParser\NodeVisitorAbstract
}
}
// We must not have another assignment
throw new \UnexpectedValueException();
return \PhpParser\NodeTraverser::REMOVE_NODE;
}
if (!(
$node instanceof Node\Name
......@@ -57,9 +57,10 @@ class ArrayAssurer extends \PhpParser\NodeVisitorAbstract
|| $node instanceof Expr\ArrayItem
|| $node instanceof Expr\ConstFetch
|| $node instanceof Expr\Variable
|| $node instanceof Node\Stmt\Expression
)
) {
return false;
return \PhpParser\NodeTraverser::REMOVE_NODE;
}
}
}
......@@ -73,10 +73,9 @@ class ArchiveUtilityTest extends \Nimut\TestingFramework\TestCase\UnitTestCase
/**
* @test
*/
public function extractEmConfReturnsSaveArrayOnlyForInvalidNodeFunction()
public function extractEmConfReturnsNullForInvalidNodeFunction()
{
$code = '<?php $EM_CONF[$_EXTKEY] = array(\'bar\' => \'baz\'); function foo() {} ?>';
$expected = ['bar' => 'baz'];
$subject = $this->getAccessibleMock(
\T3o\TerFe2\Utility\ArchiveUtility::class,
......@@ -84,8 +83,7 @@ class ArchiveUtilityTest extends \Nimut\TestingFramework\TestCase\UnitTestCase
);
$emConf = $subject->_call('extractEmConf', $code);
$this->assertNotNull($emConf);
$this->assertSame($expected, $emConf);
$this->assertNull($emConf);
}
/**
......
......@@ -19,7 +19,7 @@
},
"license": "GPL-2.0+",
"require": {
"typo3/cms-core": ">= 8.7.0, <= 8.7.99"
"typo3/cms-core": "^8.7 || ^9.5"
},
"autoload": {
"psr-4": {
......
......@@ -19,7 +19,7 @@
},
"license": "GPL-2.0+",
"require": {
"typo3/cms-core": ">= 8.7.0, <= 8.7.99"
"typo3/cms-core": "^8.7 || ^9.5"
},
"replace": {
"ter_layout": "self.version"
......