Skip to content

Commit a235568

Browse 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

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)