Skip to content

Commit

Permalink
Symfony 7.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
a-menshchikov committed Nov 11, 2023
1 parent 32f84dd commit a688fca
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Audit
strategy:
matrix:
php-version: [ '8.1', '8.2' ]
php-version: [ '8.2' ]
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand Down
26 changes: 11 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,24 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"onelogin/php-saml": "^4",
"psr/log": "^1 || ^2 || ^3",
"symfony/config": "^6.4",
"symfony/dependency-injection": "^6.4",
"symfony/config": "^7",
"symfony/dependency-injection": "^7",
"symfony/deprecation-contracts": "^3",
"symfony/event-dispatcher-contracts": "^3",
"symfony/http-foundation": "^6.4",
"symfony/http-kernel": "^6.4",
"symfony/routing": "^6.4",
"symfony/security-bundle": "^6.4",
"symfony/security-core": "^6.4",
"symfony/security-http": "^6.4"
"symfony/http-foundation": "^7",
"symfony/http-kernel": "^7",
"symfony/routing": "^7",
"symfony/security-bundle": "^7",
"symfony/security-core": "^7",
"symfony/security-http": "^7"
},
"require-dev": {
"doctrine/orm": "^2.3 || ^3",
"symfony/event-dispatcher": "^6.4",
"symfony/phpunit-bridge": "^6.4"
},
"conflict": {
"symfony/http-kernel": "<6.2",
"symfony/security-core": "<6.2"
"symfony/event-dispatcher": "^7",
"symfony/phpunit-bridge": "^7"
},
"minimum-stability": "dev",
"autoload": {
Expand Down
29 changes: 0 additions & 29 deletions src/DependencyInjection/Compiler/ProxyVarsCompilerPass.php

This file was deleted.

1 change: 0 additions & 1 deletion src/DependencyInjection/Security/Factory/SamlFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function getKey(): string
return 'saml';
}

/** @psalm-suppress MixedArgument */
public function createAuthenticator(ContainerBuilder $container, string $firewallName, array $config, string $userProviderId): string
{
$authenticatorId = 'security.authenticator.saml.'.$firewallName;
Expand Down
2 changes: 2 additions & 0 deletions src/NbgrpOneloginSamlBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

/**
* @final
*
* @psalm-suppress MissingConstructor
*/
class NbgrpOneloginSamlBundle extends Bundle
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
use Symfony\Component\Security\Http\HttpUtils;

/**
* Returns value of RelayState request parameter (GET or POST) as target url
Expand All @@ -17,7 +16,6 @@ class SamlAuthenticationSuccessHandler extends DefaultAuthenticationSuccessHandl
{
public const RELAY_STATE = 'RelayState';

/** @psalm-suppress MixedArrayAccess */
protected function determineTargetUrl(Request $request): string
{
if ($this->options['always_use_default_target_path']) {
Expand All @@ -26,7 +24,7 @@ protected function determineTargetUrl(Request $request): string

/** @psalm-suppress InvalidArgument */
$relayState = $request->query->get(self::RELAY_STATE, $request->request->get(self::RELAY_STATE));
if ($relayState !== null && $this->httpUtils instanceof HttpUtils) {
if ($relayState !== null) {
/** @psalm-suppress RedundantCastGivenDocblockType */
$relayState = (string) $relayState;
if ($relayState !== $this->httpUtils->generateUri($request, (string) $this->options['login_path'])) {
Expand Down
43 changes: 0 additions & 43 deletions tests/DependencyInjection/Compiler/ProxyVarsCompilerPassTest.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function testDefaultConfiguration(): void
'success_handler' => SamlAuthenticationSuccessHandler::class,
'check_path' => '/login_check',
'use_forward' => false,
'require_previous_session' => false,
'login_path' => '/login',
'identifier_attribute' => null,
'use_attribute_friendly_name' => false,
Expand Down

0 comments on commit a688fca

Please sign in to comment.