Skip to content

Commit

Permalink
Merge pull request #2804 from kdambekalns/task/php-74-compatibility
Browse files Browse the repository at this point in the history
TASK: PHP 7.4 compatibility
  • Loading branch information
kdambekalns committed Jan 15, 2020
2 parents dafab53 + 5d8c84f commit 10f17ad
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
37 changes: 22 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: php
dist: bionic
branches:
only:
- /(master|\d+\.\d+)/
Expand All @@ -10,34 +11,40 @@ matrix:
addons:
mariadb: '10.2'
- php: 7.1
env: DB=pgsql
sudo: required
env: DB=mysql BEHAT=true
addons:
postgresql: "9.4"
- php: 7.1
env: DB=pgsql
sudo: required
mariadb: '10.2'
- php: 7.2
env: DB=mysql
addons:
postgresql: "9.5"
- php: 7.1
mariadb: '10.2'
- php: 7.2
env: DB=mysql BEHAT=true
addons:
mariadb: '10.2'
- php: 7.1
env: DB=pgsql BEHAT=true
- php: 7.3
env: DB=mysql
addons:
mariadb: '10.2'
- php: 7.3
env: DB=mysql BEHAT=true
addons:
mariadb: '10.2'
- php: 7.4
env: DB=pgsql
sudo: required
addons:
postgresql: "9.4"
- php: 7.1
postgresql: "9.5"
- php: 7.4
env: DB=pgsql BEHAT=true
sudo: required
addons:
postgresql: "9.5"
- php: 7.2
- php: 7.4
env: DB=mysql
addons:
mariadb: '10.2'
- php: 7.2
- php: 7.4
env: DB=mysql BEHAT=true
addons:
mariadb: '10.2'
Expand All @@ -48,7 +55,7 @@ before_install:
- export NEOS_TARGET_REPOSITORY=neos/neos-development-collection
- export NEOS_TARGET_VERSION=4.3
- if [ "$DB" = "pgsql" ]; then sudo mount -o remount,size=25% /var/ramfs ; fi
- phpenv config-rm xdebug.ini
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- env
- sudo add-apt-repository ppa:git-core/ppa -y
- sudo apt-get update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ protected function setNodeProperties($nodeLike, NodeType $nodeType, array $prope
}
}

if (is_string($nodePropertyValue) && $this->objectManager->isRegistered($innerType) && $nodePropertyValue !== '') {
if (is_string($nodePropertyValue) && is_string($innerType) && $this->objectManager->isRegistered($innerType) && $nodePropertyValue !== '') {
$nodePropertyValue = $this->propertyMapper->convert(json_decode($nodePropertyValue, true), $nodePropertyType, $configuration);
}
$nodeLike->setProperty($nodePropertyName, $nodePropertyValue);
Expand Down
2 changes: 1 addition & 1 deletion Neos.Fusion/Classes/Core/Runtime.php
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ protected function setPropertiesOnFusionObject(AbstractArrayFusionObject $fusion
{
foreach ($fusionConfiguration as $key => $value) {
// skip keys which start with __, as they are purely internal.
if ($key[0] === '_' && $key[1] === '_' && in_array($key, Parser::$reservedParseTreeKeys, true)) {
if (is_string($key) && $key[0] === '_' && $key[1] === '_' && in_array($key, Parser::$reservedParseTreeKeys, true)) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
*/
class CropImageAdjustmentTest extends UnitTestCase
{
public function setUp()
{
parent::setUp();
if (!extension_loaded('gd')) {
self::markTestSkipped('ext-gd is not available, skipping test');
}
}

/**
* @test
*/
Expand Down
2 changes: 2 additions & 0 deletions Neos.Neos/Tests/Unit/Fusion/PluginImplementationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public function evaluateSetHeaderIntoParent($message, $input, $expected)
$this->_setHeadersIntoResponse($response, $input['plugin']);
}));

$this->mockRuntime->expects($this->any())->method('getCurrentContext')->willReturn(['node' => null, 'documentNode' => null]);

$this->pluginImplementation->evaluate();

foreach ($expected as $expectedKey => $expectedValue) {
Expand Down

0 comments on commit 10f17ad

Please sign in to comment.