Skip to content

Commit

Permalink
Merge branch 'ntr/5.7/fix-php-8-ci-failures' into '5.7'
Browse files Browse the repository at this point in the history
NTR - Fix PHP 8 CI failures

See merge request shopware/5/product/shopware!460
  • Loading branch information
philipreinken committed Nov 10, 2020
2 parents 18779de + a9a9f48 commit 70a03f1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ PHP 7.4:
PHP 8.0:
extends: .phpunit_base
image: gitlab.shopware.com:5005/shopware/5/product/image/continuous:8.0
allow_failure: true
stage: Unit
services:
- name: mysql:5.7
Expand Down
2 changes: 1 addition & 1 deletion engine/Shopware/Core/sAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function sGetPaymentMeanById($id, $user = false)
$sEsd = $this->moduleManager->Basket()->sCheckForESD();
$isMobile = $this->front->Request()->getDeviceType() === 'mobile';

if (!count($user)) {
if (!is_array($user)) {
$user = [];
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Api/ArticleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public function testPutArticlesShouldBeSuccessful(string $id): void
static::assertCount(2, $article['related']);

// Similar should be removed
static::assertEquals(0, count($article['similar']));
static::assertCount(0, $article['similar'] ?? []);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@
use Exception;
use PHPUnit\Framework\TestCase;
use Shopware\Bundle\AttributeBundle\Service\ConfigurationStruct;
use Shopware\Tests\Functional\Traits\DatabaseTransactionBehaviour;

class SchemaOperatorTest extends TestCase
{
use DatabaseTransactionBehaviour;

public function testDefaultValues(): void
{
$types = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class CustomerAttributeConditionHandlerTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$service = Shopware()->Container()->get(\Shopware\Bundle\AttributeBundle\Service\CrudServiceInterface::class);
$service->update('s_user_attributes', 'test', 'integer');
parent::setUp();
}

protected function tearDown(): void
Expand Down

0 comments on commit 70a03f1

Please sign in to comment.