Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] FirewallAwareTrait throws Critical Error instead of throwing Exception #43145

Closed
@fkropfhamer

Description

@fkropfhamer

Symfony version(s) affected: 5.3.7

Description

The Symfony/Bundle/SecurityBundle/Security/FirewallAwareTrait throws Critical Error instead of throwing the right Exception with helpfull Message.
The Error thrown is "Call to undefined function Symfony\Bundle\SecurityBundle\LoginLink\LoginLinkHandler()".
The right Error message, I assume, would be "Cannot determine the correct Symfony\Bundle\SecurityBundle\LoginLink\LoginLinkHandler to use: there is no active Request and so, the firewall cannot be determined. Try using a specific Symfony\Bundle\SecurityBundle\LoginLink\Logi
nLinkHandler service."

How to reproduce

  1. Create new Symfony project with php 7.4symfony new my_project_name --full
  2. Configure login link like describedhere
  3. Create new Command, inject LoginLinkHandlerInterface and try to call$this->loginLinkHandler->createLoginLink($user);
  4. Execute Command and take a look at the Error message.

Possible Solution

Change Symfony/Bundle/SecurityBundle/Security/FirewallAwareTrait line to
throw new \LogicException('Cannot determine the correct '.$serviceIdentifier.' to use: there is no active Request and so, the firewall cannot be determined. Try using a specific '.$serviceIdentifier.' service.');

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp