File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,27 @@ symfonycasts_reset_password:
5757 enable_garbage_collection : true
5858` ` `
5959
60+ If using PHP configuration files:
61+
62+ <details>
63+ <summary>config/packages/reset_password.php</summary>
64+
65+ ` ` ` php
66+ use App\Repository\ResetPasswordRequestRepository;
67+ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
68+
69+ return static function (ContainerConfigurator $containerConfigurator) : void {
70+ $containerConfigurator->extension('symfonycasts_reset_password', [
71+ ' request_password_repository' => ResetPasswordRequestRepository::class,
72+ ' lifetime' => 3600,
73+ ' throttle_limit' => 3600,
74+ ' enable_garbage_collection' => true,
75+ ]);
76+ };
77+ ```
78+ </details >
79+
80+
6081The production environment may require the ` default_uri ` to be defined in the ` config/packages/routing.yaml ` to prevent the URI in emails to point to localhost.
6182
6283``` yaml
@@ -68,6 +89,24 @@ when@prod:
6889 default_uri : ' <your project' s root URI>'
6990` ` `
7091
92+ If using PHP configuration files:
93+
94+ <details>
95+ <summary>config/packages/routing.php</summary>
96+
97+ ` ` ` php
98+ if ($containerConfigurator->env() === 'prod') {
99+ $containerConfigurator->extension('framework', [
100+ ' router' => [
101+ # ...
102+ ' default_uri' => '<your project’s root URI>'
103+ ],
104+ ]);
105+ }
106+ ```
107+ </details >
108+
109+
71110### Parameters:
72111
73112#### ` request_password_repository `
You can’t perform that action at this time.
0 commit comments