Skip to content

Commit

Permalink
Add support for nucleos/user-bundle 3
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Aug 10, 2023
1 parent 753fe54 commit 431fb36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -37,7 +37,7 @@
"require": {
"php": "^8.1",
"doctrine/persistence": "^2.2.2 || ^3.0.0",
"nucleos/user-bundle": "^2.0",
"nucleos/user-bundle": "^2.3 || ^3.0",
"symfony/config": "^5.4 || ^6.2",
"symfony/dependency-injection": "^5.4 || ^6.2",
"symfony/event-dispatcher": "^5.4 || ^6.2",
Expand Down
8 changes: 7 additions & 1 deletion tests/App/AppKernel.php
Expand Up @@ -20,6 +20,7 @@
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Exception\LoaderLoadException;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
Expand Down Expand Up @@ -66,7 +67,12 @@ public function getProjectDir(): string
protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->import('@NucleosUserBundle/Resources/config/routing/security.php');
$routes->import('@NucleosUserBundle/Resources/config/routing/change_password.php');

try {
$routes->import('@NucleosUserBundle/Resources/config/routing/update_security.php');
} catch (LoaderLoadException) {
$routes->import('@NucleosUserBundle/Resources/config/routing/change_password.php');
}
$routes->import('@NucleosUserBundle/Resources/config/routing/resetting.php')
->prefix('/resetting')
;
Expand Down

0 comments on commit 431fb36

Please sign in to comment.