Skip to content

Commit

Permalink
change way to set the max phpunit version
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Jan 16, 2024
1 parent dff10c6 commit c259b2c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
SYMFONY_DEPRECATIONS_HELPER: weak
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch-version }}
SYMFONY_MAX_PHPUNIT_VERSION: ${{ matrix.max-phpunit-version }}

strategy:
fail-fast: false
Expand All @@ -28,6 +29,7 @@ jobs:
dependency-versions: 'lowest'
tools: 'composer:v1'
php-cs-fixer: false
matrix.max-phpunit-version: '7'

- php-version: '7.3'
elasticsearch-version: '2.4.6'
Expand All @@ -36,6 +38,7 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false
matrix.max-phpunit-version: '7'

- php-version: '7.4'
elasticsearch-version: '2.4.6'
Expand All @@ -44,6 +47,7 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: true
matrix.max-phpunit-version: '7'

- php-version: '8.0'
elasticsearch-version: '7.11.1'
Expand All @@ -52,6 +56,7 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false
matrix.max-phpunit-version: '7'

- php-version: '8.1'
elasticsearch-version: '7.11.1'
Expand All @@ -60,6 +65,7 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false
matrix.max-phpunit-version: '8'

- php-version: '8.1'
elasticsearch-version: '7.11.1'
Expand All @@ -68,6 +74,7 @@ jobs:
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false
matrix.max-phpunit-version: '8'

services:
elasticsearch:
Expand Down
9 changes: 9 additions & 0 deletions Tests/ProphecyTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the MassiveSearchBundle
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Prophecy\PhpUnit;

trait ProphecyTrait
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Command/ReindexCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testCheckpointAsk()
Argument::type(OutputInterface::class),
Argument::type(ConfirmationQuestion::class),
true
)->shouldBeCalled();
)->shouldBeCalled()->willReturn(true);
$this->execute('prod', []);
}

Expand Down
9 changes: 9 additions & 0 deletions Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the MassiveSearchBundle
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

require_once __DIR__ . '/../vendor/symfony-cmf/testing/bootstrap/bootstrap.php';

if (!\trait_exists('Prophecy\PhpUnit\ProphecyTrait')) {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
</coverage>

<php>
<env name="SYMFONY_MAX_PHPUNIT_VERSION" value="7"/>
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
<env name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
Expand Down

0 comments on commit c259b2c

Please sign in to comment.