Skip to content
Snippets Groups Projects
Commit 752ed7bc authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Update dependencies

symfony now requires framework.secret to be set
the person entity is gone from the core bundle, so no need to implement it.
parent 03da2a47
No related branches found
No related tags found
No related merge requests found
Pipeline #51437 passed
......@@ -14,6 +14,7 @@
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
APP_ENV=dev
APP_SECRET=
# KEYCLOAK
KEYCLOAK_SERVER_URL=https://auth-dev.tugraz.at/auth
......
This diff is collapsed.
framework:
secret: '%env(APP_SECRET)%'
\ No newline at end of file
services:
App\Service\:
resource: '../src/Service'
autowire: true
# Replace the core one with our custom (dummy) implementation.
DBP\API\CoreBundle\Service\PersonProviderInterface: '@App\Service\MyCustomPersonProvider'
\ No newline at end of file
<?php
declare(strict_types=1);
namespace App\Service;
use DBP\API\CoreBundle\Entity\Person;
use DBP\API\CoreBundle\Service\PersonProviderInterface;
use Symfony\Component\Security\Core\Security;
class MyCustomPersonProvider implements PersonProviderInterface
{
private $security;
public function __construct(Security $security)
{
$this->security = $security;
}
public function getPersons(array $filters): array
{
return [$this->getCurrentPerson()];
}
public function getPersonsByNameAndBirthday(string $givenName, string $familyName, \DateTime $birthDay): array
{
return [];
}
public function getPerson(string $id): Person
{
$person = new Person();
$person->setIdentifier($id);
$person->setGivenName('John');
$person->setFamilyName('Doe');
$person->setEmail('john.doe@example.com');
return $person;
}
public function getCurrentPerson(): Person
{
$user = $this->security->getUser();
return $this->getPerson($user->getUsername());
}
public function getPersonForExternalService(string $service, string $serviceID): Person
{
return new Person();
}
public function getRolesForScopes(array $scopes): array
{
return [];
}
}
......@@ -181,6 +181,9 @@
"psr/http-client": {
"version": "1.0.1"
},
"psr/http-factory": {
"version": "1.0.1"
},
"psr/http-message": {
"version": "1.0.1"
},
......@@ -363,6 +366,9 @@
"symfony/options-resolver": {
"version": "v4.4.16"
},
"symfony/password-hasher": {
"version": "v5.3.3"
},
"symfony/phpunit-bridge": {
"version": "5.1",
"recipe": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment