Skip to content
Commits on Source (53)
......@@ -38,6 +38,12 @@ test-php8.0:
PHP: "php8.0"
<<: *test_defaults
test-php8.1:
stage: test
variables:
PHP: "php8.1"
<<: *test_defaults
linting:
stage: test
script:
......
......@@ -3,13 +3,13 @@
"type": "symfony-bundle",
"license": "AGPL-3.0-or-later",
"require": {
"php": "^7.3",
"php": ">=7.3",
"ext-json": "*",
"ext-gmp": "*",
"ext-curl": "*",
"dbp/relay-core-bundle": "^0.1.10",
"guzzlehttp/guzzle": "^7.0",
"kevinrob/guzzle-cache-middleware": "^3.3",
"kevinrob/guzzle-cache-middleware": "^3.3 | ^4.0",
"symfony/framework-bundle": "^5.2",
"symfony/security-core": "^5.2",
"symfony/yaml": "^5.2",
......@@ -19,8 +19,9 @@
"require-dev": {
"brainmaestro/composer-git-hooks": "^2.8",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^0.12.33",
"phpstan/phpstan-phpunit": "^0.12.13",
"phpstan/phpstan": "^1.0.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9",
"symfony/browser-kit": "^5.3",
"symfony/http-client": "^5.3",
"symfony/phpunit-bridge": "^5.2",
......@@ -53,14 +54,12 @@
"post-install-cmd": "cghooks add --ignore-lock",
"post-update-cmd": "cghooks update",
"test": [
"@php vendor/bin/simple-phpunit"
"@php vendor/bin/phpunit"
],
"phpstan": [
"@php vendor/bin/simple-phpunit --atleast-version 0",
"@php vendor/bin/phpstan analyze --ansi"
],
"psalm": [
"@php vendor/bin/simple-phpunit --atleast-version 0",
"@php vendor/bin/psalm"
],
"lint": [
......
This diff is collapsed.
......@@ -6,10 +6,7 @@ parameters:
level: 3
paths:
- src
- tests
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9-0/vendor/autoload.php
excludes_analyse:
excludePaths:
- tests/bootstrap.php
ignoreErrors:
- message: '#.*NodeDefinition::children.*#'
......
......@@ -11,8 +11,7 @@
<ini name="error_reporting" value="-1"/>
<server name="APP_ENV" value="test" force="true"/>
<server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value='max[direct]=0&amp;quiet[]=indirect'/>
<server name="KERNEL_CLASS" value="Dbp\Relay\AuthBundle\Tests\Kernel"/>
</php>
<testsuites>
......
......@@ -29,12 +29,12 @@ class BearerUser implements UserInterface
return $this->roles;
}
public function getPassword()
public function getPassword(): ?string
{
return null;
}
public function getSalt()
public function getSalt(): ?string
{
return null;
}
......
......@@ -9,7 +9,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('dbp_relay_auth');
$treeBuilder->getRootNode()
......
......@@ -34,9 +34,7 @@ class OIDCUserSession implements UserSessionInterface
public function getUserIdentifier(): ?string
{
assert($this->jwt !== null);
if (self::isServiceAccountToken($this->jwt)) {
if ($this->jwt === null || self::isServiceAccountToken($this->jwt)) {
return null;
}
......