Skip to content

Commit

Permalink
minor #57462 [FrameworkBundle] Lazy kernel.secret parameter resolvi…
Browse files Browse the repository at this point in the history
…ng (yceruto)

This PR was merged into the 7.2 branch.

Discussion
----------

[FrameworkBundle] Lazy `kernel.secret` parameter resolving

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | -
| License       | MIT

symfony/symfony#56985 and symfony/recipes#1317 following up

The goal of this PR is to fix the current compiler-errors about a missing `kernel.secret` parameter when it's not set at all. Thus, improving the first-time experience with minimalistic apps.

Commits
-------

0284011717 Lazy kernel.secret parameter resolving
  • Loading branch information
nicolas-grekas committed Jun 29, 2024
2 parents c2b3b01 + 81e893c commit 1c191cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Resources/config/security_authenticator_login_link.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Bundle\SecurityBundle\LoginLink\FirewallAwareLoginLinkHandler;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\Security\Core\Signature\ExpiredSignatureStorage;
use Symfony\Component\Security\Core\Signature\SignatureHasher;
use Symfony\Component\Security\Http\Authenticator\LoginLinkAuthenticator;
Expand Down Expand Up @@ -43,7 +44,7 @@
->args([
service('property_accessor'),
abstract_arg('signature properties'),
'%kernel.secret%',
new Parameter('kernel.secret'),
abstract_arg('expired signature storage'),
abstract_arg('max signature uses'),
])
Expand Down
3 changes: 2 additions & 1 deletion Resources/config/security_authenticator_remember_me.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Bundle\SecurityBundle\RememberMe\FirewallAwareRememberMeHandler;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\Security\Core\Signature\SignatureHasher;
use Symfony\Component\Security\Http\Authenticator\RememberMeAuthenticator;
use Symfony\Component\Security\Http\EventListener\CheckRememberMeConditionsListener;
Expand All @@ -30,7 +31,7 @@
->args([
service('property_accessor'),
abstract_arg('signature properties'),
'%kernel.secret%',
new Parameter('kernel.secret'),
null,
null,
])
Expand Down

0 comments on commit 1c191cf

Please sign in to comment.