A typical Controller in Symfony may look like this :
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class HelloController extends AbstractController
{
#[Route(
path: '/hello/{name}',
name: 'app_hello',
requirements: ['name' => '[a-zA-Z-]+'],
methods: ['GET']
)]
public function index(string $name = 'Adrien'