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

Appearance settings

Commit a235568

Browse filesBrowse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Security] Add example with PHP attributes for login link
2 parents 9d3dc70 + 8c70d45 commit a235568
Copy full SHA for a235568

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed

‎security/login_link.rst

Copy file name to clipboardExpand all lines: security/login_link.rst
+17Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.