From 4f4379eacdd8cb6a37e03cd5cb232eef83d0ad93 Mon Sep 17 00:00:00 2001 From: Spomky Date: Sat, 22 Aug 2020 15:37:56 +0200 Subject: [PATCH] Fix dev deps and config --- composer.json | 14 +-- phpunit.xml.dist | 98 +++++++++---------- .../Functional/Serializer/JWEEncoderTest.php | 2 +- .../Tests/config/config_test.yml | 6 +- src/Ecc/composer.json | 2 +- .../KeyEncryption/RSA/composer.json | 2 +- src/SignatureAlgorithm/RSA/composer.json | 2 +- 7 files changed, 58 insertions(+), 68 deletions(-) diff --git a/composer.json b/composer.json index 6f2970de..4b8924a7 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "brick/math": "^0.8.17", + "brick/math": "^0.8.17|^0.9", "fgrosse/phpasn1": "^2.0", "psr/event-dispatcher": "^1.0", "psr/http-client": "^1.0", @@ -76,17 +76,17 @@ "ext-gmp": "*", "bjeavons/zxcvbn-php": "^1.0", "blackfire/php-sdk": "^1.14", - "infection/infection": "^0.15|^0.16", + "infection/infection": "^0.15|^0.16|^0.17", "matthiasnoback/symfony-config-test": "^3.1|^4.0", "nyholm/psr7": "^1.0", "php-coveralls/php-coveralls": "^2.0", "php-http/httplug-bundle": "^1.7", "php-http/mock-client": "^1.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-deprecation-rules": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^8.0|^9.0", "symfony/browser-kit": "^4.2|^5.0", "symfony/framework-bundle": "^4.2|^5.0", "symfony/finder": "^4.2|^5.0", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index eae1fdbf..22e28ae8 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,56 +1,46 @@ - - - - ./tests/ - ./src/Bundle/*/Tests/ - ./src/Component/*/Tests/ - ./src/Ecc/*/Tests/ - ./src/SignatureAlgorithm/*/Tests/ - ./src/EncryptionAlgorithm/ContentEncryption/*/Tests/ - ./src/EncryptionAlgorithm/KeyEncryption/*/Tests/ - ./src/EncryptionAlgorithm/Experimental/Tests/ - ./src/Easy/Tests/ - - - - - - - - - - - - - - - ./ - - ./performance - ./vendor - ./tests - ./src/Bundle/*/Tests/ - ./src/Component/*/Tests/ - ./src/Ecc/*/Tests/ - ./src/EncryptionAlgorithm/ContentEncryption/*/Tests/ - ./src/EncryptionAlgorithm/KeyEncryption/*/Tests/ - ./src/EncryptionAlgorithm/Experimental/Tests/ - ./src - - - - - - + + + + ./ + + + ./performance + ./vendor + ./tests + ./src/Bundle/*/Tests/ + ./src/Component/*/Tests/ + ./src/Ecc/*/Tests/ + ./src/EncryptionAlgorithm/ContentEncryption/*/Tests/ + ./src/EncryptionAlgorithm/KeyEncryption/*/Tests/ + ./src/EncryptionAlgorithm/Experimental/Tests/ + ./src + + + + + ./tests/ + ./src/Bundle/*/Tests/ + ./src/Component/*/Tests/ + ./src/Ecc/*/Tests/ + ./src/SignatureAlgorithm/*/Tests/ + ./src/EncryptionAlgorithm/ContentEncryption/*/Tests/ + ./src/EncryptionAlgorithm/KeyEncryption/*/Tests/ + ./src/EncryptionAlgorithm/Experimental/Tests/ + ./src/Easy/Tests/ + + + + + + + + + + + + + + + diff --git a/src/Bundle/JoseFramework/Tests/Functional/Serializer/JWEEncoderTest.php b/src/Bundle/JoseFramework/Tests/Functional/Serializer/JWEEncoderTest.php index 0c20600f..ec220c47 100644 --- a/src/Bundle/JoseFramework/Tests/Functional/Serializer/JWEEncoderTest.php +++ b/src/Bundle/JoseFramework/Tests/Functional/Serializer/JWEEncoderTest.php @@ -117,7 +117,7 @@ public function jWEEncoderCanEncodeAllFormats(): void // Compact $loader = $jweLoaderFactory->create(['jwe_compact'], ['A256KW'], ['A256CBC-HS512'], []); $token = $serializer->encode($jwe, 'jwe_compact'); - static::assertRegExp('/(eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0)\.(.+?)\.(.+?)\.(.+?)\.(.+)/', $token); + static::assertMatchesRegularExpression('/(eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0)\.(.+?)\.(.+?)\.(.+?)\.(.+)/', $token); $loader->loadAndDecryptWithKey($token, $jwk, $recipient); // Flat $loader = $jweLoaderFactory->create(['jwe_json_flattened'], ['A256KW'], ['A256CBC-HS512'], []); diff --git a/src/Bundle/JoseFramework/Tests/config/config_test.yml b/src/Bundle/JoseFramework/Tests/config/config_test.yml index 9377d19f..0aa0d5d7 100644 --- a/src/Bundle/JoseFramework/Tests/config/config_test.yml +++ b/src/Bundle/JoseFramework/Tests/config/config_test.yml @@ -4,7 +4,7 @@ framework: session: storage_id: 'session.storage.mock_file' router: - resource: "%kernel.root_dir%/config/routing.yml" + resource: "%kernel.project_dir%/Tests/config/routing.yml" strict_requirements: ~ fragments: ~ http_method_override: true @@ -95,7 +95,7 @@ jose: is_public: true certificate1: certificate: - path: '%kernel.root_dir%/config/keys/google.crt' + path: '%kernel.project_dir%/Tests/config/keys/google.crt' additional_values: use: 'sig' alg: 'RS256' @@ -123,7 +123,7 @@ jose: is_public: true file1: file: - path: '%kernel.root_dir%/config/keys/private.encrypted.key' + path: '%kernel.project_dir%/Tests/config/keys/private.encrypted.key' password: 'tests' additional_values: use: 'enc' diff --git a/src/Ecc/composer.json b/src/Ecc/composer.json index 2e7552d9..e4fcc972 100644 --- a/src/Ecc/composer.json +++ b/src/Ecc/composer.json @@ -20,7 +20,7 @@ } }, "require": { - "brick/math": "^0.8.17" + "brick/math": "^0.8.17|^0.9" }, "require-dev": { "phpunit/phpunit": "^8.0" diff --git a/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json b/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json index d3a3d496..673ea3e5 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json +++ b/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json @@ -20,7 +20,7 @@ } }, "require": { - "brick/math": "^0.8.17", + "brick/math": "^0.8.17|^0.9", "ext-openssl": "*", "symfony/polyfill-mbstring": "^1.12", "web-token/jwt-encryption": "^2.1" diff --git a/src/SignatureAlgorithm/RSA/composer.json b/src/SignatureAlgorithm/RSA/composer.json index 6b2c4f01..32b82d72 100644 --- a/src/SignatureAlgorithm/RSA/composer.json +++ b/src/SignatureAlgorithm/RSA/composer.json @@ -20,7 +20,7 @@ } }, "require": { - "brick/math": "^0.8.17", + "brick/math": "^0.8.17|^0.9", "ext-openssl": "*", "web-token/jwt-signature": "^2.1" },