Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: maintenance - compatibility with Symfony 7 - minor fixes #100

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
use flake github:loophp/nix-auto-changelog
use flake github:loophp/nix-shell#env-php81 --impure
use flake github:loophp/nix-shell#env-php83 --impure
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019-2023, European Union.
Copyright (c) 2019-2024, European Union.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
18 changes: 8 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
],
"require": {
"php": ">= 8.1",
"ext-filter": "*",
"ext-simplexml": "*",
"ecphp/cas-lib": "^3",
"loophp/psr-http-message-bridge-bundle": "^1.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0",
"symfony/framework-bundle": "^6.1 || ^7.0"
"psr/http-message": "^1.0 || ^2.0",
"symfony/framework-bundle": "^6.4 || ^7"
},
"require-dev": {
"ext-pcov": "*",
Expand All @@ -31,12 +29,12 @@
"nyholm/psr7": "^1.8",
"phpspec/phpspec": "^7",
"phpstan/phpstan-symfony": "^1.1",
"symfony/cache": "^6.1 || ^7.0",
"symfony/dependency-injection": "^6.1 || ^7.0",
"symfony/http-client": "^6.1 || ^7.0",
"symfony/routing": "^6.1 || ^7.0",
"symfony/security-bundle": "^6.1 || ^7.0",
"veewee/xml": "^2.6"
"symfony/cache": "^6.4 || ^7",
"symfony/dependency-injection": "^6.4 || ^7",
"symfony/http-client": "^6.4 || ^7",
"symfony/routing": "^6.4 || ^7",
"symfony/security-bundle": "^6.4 || ^7",
"veewee/xml": "^2.6 || ^3"
},
"suggest": {
"loophp/unaltered-psr-http-message-bridge-bundle": "A drop-in replacement for symfony/psr-http-message-bridge, that does not alter query parameters.",
Expand Down
2 changes: 2 additions & 0 deletions src/Security/CasAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
use Throwable;

use function sprintf;

final class CasAuthenticator extends AbstractAuthenticator implements AuthenticationEntryPointInterface
{
public function __construct(
Expand Down
4 changes: 3 additions & 1 deletion src/Security/Core/User/CasUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
use Symfony\Component\Security\Core\User\UserInterface;
use Throwable;

use function sprintf;

final class CasUserProvider implements CasUserProviderInterface
{
public function __construct(
private readonly CasResponseBuilderInterface $casResponseBuilder,
private readonly HttpMessageFactoryInterface $httpMessageFactory
) {}

public function loadUserByIdentifier($identifier): UserInterface
public function loadUserByIdentifier(string $identifier): UserInterface
{
throw new UnsupportedUserException('Unsupported operation.');
}
Expand Down
3 changes: 3 additions & 0 deletions src/Security/Core/User/CasUserProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\User\UserProviderInterface;

/**
* @template-extends UserProviderInterface<CasUserInterface>
*/
interface CasUserProviderInterface extends UserProviderInterface
{
public function loadUserByResponse(Response $response): CasUserInterface;
Expand Down
Loading