Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@ symfonycasts_reset_password:
enable_garbage_collection: true
```

If using PHP configuration files:

<details>
<summary>config/packages/reset_password.php</summary>

```php
use App\Repository\ResetPasswordRequestRepository;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('symfonycasts_reset_password', [
'request_password_repository' => ResetPasswordRequestRepository::class,
'lifetime' => 3600,
'throttle_limit' => 3600,
'enable_garbage_collection' => true,
]);
};
```
</details>


The 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.

```yaml
Expand All @@ -68,6 +89,24 @@ when@prod:
default_uri: '<your project's root URI>'
```

If using PHP configuration files:

<details>
<summary>config/packages/routing.php</summary>

```php
if ($containerConfigurator->env() === 'prod') {
$containerConfigurator->extension('framework', [
'router' => [
# ...
'default_uri' => '<your project’s root URI>'
],
]);
}
```
</details>


### Parameters:

#### `request_password_repository`
Expand Down