-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from nucleos/dev
Add noop driver to allow flex recipe
- Loading branch information
Showing
19 changed files
with
187 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the NucleosUserBundle package. | ||
* | ||
* (c) Christian Gripp <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nucleos\UserBundle\Noop\Exception; | ||
|
||
use Exception; | ||
use RuntimeException; | ||
|
||
final class NoDriverException extends RuntimeException | ||
{ | ||
public function __construct(?string $message = null, int $code = 0, Exception $previous = null) | ||
{ | ||
parent::__construct( | ||
null === $message ? 'The child node "db_driver" at path "nucleos_user" must be configured.' : $message, | ||
$code, | ||
$previous | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the NucleosUserBundle package. | ||
* | ||
* (c) Christian Gripp <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nucleos\UserBundle\Noop; | ||
|
||
use Nucleos\UserBundle\Model\GroupInterface; | ||
use Nucleos\UserBundle\Model\GroupManager as BaseGroupManager; | ||
use Nucleos\UserBundle\Model\GroupTemplate; | ||
use Nucleos\UserBundle\Noop\Exception\NoDriverException; | ||
|
||
/** | ||
* @phpstan-template GroupTemplate of \Nucleos\UserBundle\Model\GroupInterface | ||
* @phpstan-extends \Nucleos\UserBundle\Model\GroupManager<GroupTemplate> | ||
*/ | ||
final class GroupManager extends BaseGroupManager | ||
{ | ||
public function deleteGroup(GroupInterface $group): void | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function findGroupBy(array $criteria): GroupInterface | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function findGroups(): array | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function getClass(): string | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function updateGroup(GroupInterface $group, bool $andFlush = true): void | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the NucleosUserBundle package. | ||
* | ||
* (c) Christian Gripp <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nucleos\UserBundle\Noop; | ||
|
||
use Doctrine\Common\EventSubscriber; | ||
|
||
final class UserListener implements EventSubscriber | ||
{ | ||
public function getSubscribedEvents(): array | ||
{ | ||
return [ | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the NucleosUserBundle package. | ||
* | ||
* (c) Christian Gripp <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nucleos\UserBundle\Noop; | ||
|
||
use Nucleos\UserBundle\Model\UserInterface; | ||
use Nucleos\UserBundle\Model\UserManager as BaseUserManager; | ||
use Nucleos\UserBundle\Noop\Exception\NoDriverException; | ||
|
||
final class UserManager extends BaseUserManager | ||
{ | ||
public function deleteUser(UserInterface $user): void | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function findUserBy(array $criteria): ?UserInterface | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function findUsers(): array | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function getClass(): string | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function reloadUser(UserInterface $user): void | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
|
||
public function updateUser(UserInterface $user, bool $andFlush = true): void | ||
{ | ||
throw new NoDriverException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="nucleos_user.user_manager.default" class="Nucleos\UserBundle\Noop\UserManager"> | ||
<argument type="service" id="nucleos_user.util.password_updater"/> | ||
<argument type="service" id="nucleos_user.util.canonical_fields_updater"/> | ||
</service> | ||
<service id="nucleos_user.user_listener" class="Nucleos\UserBundle\Noop\UserListener"> | ||
</service> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<services> | ||
<service id="nucleos_user.group_manager.default" class="Nucleos\UserBundle\Noop\GroupManager"> | ||
</service> | ||
</services> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters