-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
26 additions
and
91 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 was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
src/DependencyInjection/SymfonyCastsVerifyEmailExtension.php
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,22 +9,38 @@ | |
|
||
namespace SymfonyCasts\Bundle\VerifyEmail; | ||
|
||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
use SymfonyCasts\Bundle\VerifyEmail\DependencyInjection\SymfonyCastsVerifyEmailExtension; | ||
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symfony\Component\HttpKernel\Bundle\AbstractBundle; | ||
|
||
/** | ||
* @author Jesse Rushlow <[email protected]> | ||
* @author Ryan Weaver <[email protected]> | ||
*/ | ||
class SymfonyCastsVerifyEmailBundle extends Bundle | ||
class SymfonyCastsVerifyEmailBundle extends AbstractBundle | ||
{ | ||
public function getContainerExtension(): ?ExtensionInterface | ||
protected string $extensionAlias = 'symfonycasts_verify_email'; | ||
|
||
public function configure(DefinitionConfigurator $definition): void | ||
{ | ||
$definition->rootNode() /** @phpstan-ignore method.notFound */ | ||
->children() | ||
->integerNode('lifetime') | ||
->defaultValue(3600) | ||
->info('The length of time in seconds that a signed URI is valid for after it is created.') | ||
->end() | ||
; | ||
} | ||
|
||
/** @param array<mixed> $config */ | ||
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void | ||
{ | ||
if (!$this->extension) { | ||
$this->extension = new SymfonyCastsVerifyEmailExtension(); | ||
} | ||
$container->import('../config/verify_email_services.xml'); | ||
|
||
return $this->extension; | ||
$container->services() | ||
->get('symfonycasts.verify_email.helper') | ||
->arg(3, $config['lifetime']) | ||
; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.