Skip to content

Commit 8c70d45

Browse files
committed
minor #16112 [Security] Add example with PHP attributes for login link (misaert)
This PR was merged into the 5.3 branch. Discussion ---------- [Security] Add example with PHP attributes for login link Hi, I added the example with PHP attributes. Commits ------- 57edf91 [Security] Add example with PHP attributes for login link
2 parents a5e066c + 57edf91 commit 8c70d45

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

security/login_link.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,23 @@ intercept requests to this route:
108108
throw new \LogicException('This code should never be reached');
109109
}
110110
}
111+
112+
.. code-block:: php-attributes
113+
114+
// src/Controller/SecurityController.php
115+
namespace App\Controller;
116+
117+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
118+
use Symfony\Component\Routing\Annotation\Route;
119+
120+
class SecurityController extends AbstractController
121+
{
122+
#[Route('/login_check', name: 'login_check')]
123+
public function check()
124+
{
125+
throw new \LogicException('This code should never be reached');
126+
}
127+
}
111128
112129
.. code-block:: yaml
113130

0 commit comments

Comments
 (0)