Skip to content

Commit f9111f2

Browse files
authored
Updated PHP compatibilit version range for ^7.4|^8.0 (#45)
1 parent e0f559c commit f9111f2

10 files changed

+45
-35
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
- php-version: 7.1
18-
symfony-version: 4.4.*
1917
- php-version: 7.4
2018
symfony-version: 4.4.*
21-
- php-version: 7.2
22-
symfony-version: 5.2.*
19+
- php-version: 8.0
20+
symfony-version: 4.4.*
2321
- php-version: 7.4
2422
symfony-version: 5.2.*
23+
- php-version: 8.0
24+
symfony-version: 5.2.*
2525

2626
steps:
2727
- name: "Checkout"
@@ -48,8 +48,7 @@ jobs:
4848
strategy:
4949
matrix:
5050
include:
51-
- php-version: 7.4
52-
symfony-version: 4.4.*
51+
- php-version: 8.0
5352

5453
steps:
5554
- name: "Checkout"
@@ -62,9 +61,7 @@ jobs:
6261
php-version: ${{ matrix.php-version }}
6362

6463
- name: "Install dependencies with composer"
65-
run: |
66-
composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
67-
composer update --no-interaction --no-progress --no-suggest
64+
run: composer update --no-interaction --no-progress --no-suggest
6865

6966
- name: "Run static analyzis with phpstan/phpstan"
7067
run: vendor/bin/phpstan analyze
@@ -76,8 +73,7 @@ jobs:
7673
strategy:
7774
matrix:
7875
include:
79-
- php-version: 7.4
80-
symfony-version: 4.4.*
76+
- php-version: 8.0
8177

8278
steps:
8379
- name: "Checkout"
@@ -90,9 +86,7 @@ jobs:
9086
php-version: ${{ matrix.php-version }}
9187

9288
- name: "Install dependencies with composer"
93-
run: |
94-
composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
95-
composer update --no-interaction --no-progress --no-suggest
89+
run: composer update --no-interaction --no-progress --no-suggest
9690

9791
- name: "Run checkstyle with squizlabs/php_codesniffer"
9892
run: vendor/bin/phpcs
@@ -104,8 +98,7 @@ jobs:
10498
strategy:
10599
matrix:
106100
include:
107-
- php-version: 7.4
108-
symfony-version: 4.4.*
101+
- php-version: 8.0
109102

110103
steps:
111104
- name: "Checkout"
@@ -118,9 +111,7 @@ jobs:
118111
php-version: ${{ matrix.php-version }}
119112

120113
- name: "Install dependencies with composer"
121-
run: |
122-
composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
123-
composer update --no-interaction --no-progress --no-suggest
114+
run: composer update --no-interaction --no-progress --no-suggest
124115

125116
- name: "Run tests with phpunit/phpunit"
126117
env:

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.1.3",
12+
"php": "^7.4|^8.0",
1313
"ext-openssl": "*",
1414
"symfony/framework-bundle": "^4.4|^5.0",
1515
"doctrine/orm": "^2.7",
1616
"doctrine/doctrine-bundle": "^2.0",
1717
"yokai/dependency-injection": "^1.0"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^7.0",
21-
"symfony/yaml": "^4.4|^5.0",
22-
"phpstan/phpstan": "^0.12.80",
23-
"squizlabs/php_codesniffer": "^3.5"
20+
"phpunit/phpunit": "^9.5",
21+
"phpspec/prophecy-phpunit": "^2.0",
22+
"symfony/yaml": "^4.4|^5.2",
23+
"phpstan/phpstan": "^0.12",
24+
"squizlabs/php_codesniffer": "^3.6"
2425
},
2526
"autoload": {
2627
"psr-4": { "Yokai\\SecurityTokenBundle\\": "src/" }

phpunit.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
backupGlobals="false"
45
backupStaticAttributes="false"
56
convertErrorsToExceptions="true"
67
convertNoticesToExceptions="true"
78
convertWarningsToExceptions="true"
89
processIsolation="false"
910
stopOnFailure="false"
1011
colors="true"
11-
bootstrap="vendor/autoload.php"
12-
>
13-
12+
bootstrap="vendor/autoload.php">
1413
<php>
1514
<server name="KERNEL_CLASS" value="Yokai\SecurityTokenBundle\Tests\Kernel"/>
1615
</php>
17-
1816
<testsuites>
1917
<testsuite name="YokaiSecurityTokenBundle Test Suite">
2018
<directory>./tests</directory>
2119
</testsuite>
2220
</testsuites>
23-
24-
<filter>
25-
<whitelist>
21+
<coverage>
22+
<include>
2623
<directory>./src</directory>
27-
</whitelist>
28-
</filter>
24+
</include>
25+
</coverage>
2926
</phpunit>

tests/Command/ArchiveTokenCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Yokai\SecurityTokenBundle\Tests\Command;
66

7+
use Prophecy\PhpUnit\ProphecyTrait;
78
use Prophecy\Prophecy\ObjectProphecy;
89
use Symfony\Bundle\FrameworkBundle\Console\Application;
910
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
@@ -18,6 +19,8 @@
1819
*/
1920
class ArchiveTokenCommandTest extends KernelTestCase
2021
{
22+
use ProphecyTrait;
23+
2124
/**
2225
* @var ArchivistInterface|ObjectProphecy
2326
*/

tests/DependencyInjection/DependencyInjectionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
1111
use Generator;
1212
use PHPUnit\Framework\TestCase;
13+
use Prophecy\PhpUnit\ProphecyTrait;
1314
use Prophecy\Prophecy\ProphecySubjectInterface;
1415
use Psr\Log\LoggerInterface;
1516
use Symfony\Component\Config\FileLocator;
@@ -37,6 +38,8 @@
3738
*/
3839
class DependencyInjectionTest extends TestCase
3940
{
41+
use ProphecyTrait;
42+
4043
/**
4144
* @var ContainerBuilder
4245
*/

tests/Factory/TokenFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use DateTime;
88
use PHPUnit\Framework\TestCase;
9+
use Prophecy\PhpUnit\ProphecyTrait;
910
use Prophecy\Prophecy\ObjectProphecy;
1011
use Yokai\SecurityTokenBundle\Configuration\TokenConfiguration;
1112
use Yokai\SecurityTokenBundle\Configuration\TokenConfigurationRegistry;
@@ -23,6 +24,8 @@
2324
*/
2425
class TokenFactoryTest extends TestCase
2526
{
27+
use ProphecyTrait;
28+
2629
/**
2730
* @var InformationGuesserInterface|ObjectProphecy
2831
*/

tests/Manager/ChainUserManagerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use InvalidArgumentException;
88
use PHPUnit\Framework\TestCase;
99
use Prophecy\Argument;
10+
use Prophecy\PhpUnit\ProphecyTrait;
1011
use Prophecy\Prophecy\ObjectProphecy;
1112
use Yokai\SecurityTokenBundle\Manager\ChainUserManager;
1213
use Yokai\SecurityTokenBundle\Manager\UserManagerInterface;
@@ -20,6 +21,8 @@
2021
*/
2122
class ChainUserManagerTest extends TestCase
2223
{
24+
use ProphecyTrait;
25+
2326
private function manager($managers): ChainUserManager
2427
{
2528
return new ChainUserManager($managers);

tests/Manager/DoctrineUserManagerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Doctrine\Persistence\Mapping\ClassMetadata;
1010
use Doctrine\Persistence\ObjectManager;
1111
use PHPUnit\Framework\TestCase;
12+
use Prophecy\PhpUnit\ProphecyTrait;
1213
use Prophecy\Prophecy\ObjectProphecy;
1314
use Yokai\SecurityTokenBundle\Manager\DoctrineUserManager;
1415

@@ -19,6 +20,8 @@
1920
*/
2021
class DoctrineUserManagerTest extends TestCase
2122
{
23+
use ProphecyTrait;
24+
2225
/**
2326
* @var ManagerRegistry|ObjectProphecy
2427
*/

tests/Manager/TokenManagerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use PHPUnit\Framework\TestCase;
88
use Prophecy\Argument;
9+
use Prophecy\PhpUnit\ProphecyTrait;
910
use Prophecy\Prophecy\ObjectProphecy;
1011
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
1112
use Yokai\SecurityTokenBundle\Entity\Token;
@@ -35,6 +36,8 @@
3536
*/
3637
class TokenManagerTest extends TestCase
3738
{
39+
use ProphecyTrait;
40+
3841
/**
3942
* @var TokenFactoryInterface|ObjectProphecy
4043
*/

tests/Repository/DoctrineORMTokenRepositoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Doctrine\ORM\EntityManager;
88
use Doctrine\ORM\EntityRepository;
99
use PHPUnit\Framework\TestCase;
10+
use Prophecy\PhpUnit\ProphecyTrait;
1011
use Prophecy\Prophecy\ObjectProphecy;
1112
use Yokai\SecurityTokenBundle\Entity\Token;
1213
use Yokai\SecurityTokenBundle\Exception\TokenConsumedException;
@@ -21,6 +22,8 @@
2122
*/
2223
class DoctrineORMTokenRepositoryTest extends TestCase
2324
{
25+
use ProphecyTrait;
26+
2427
/**
2528
* @var EntityManager|ObjectProphecy
2629
*/

0 commit comments

Comments
 (0)