Skip to content

Commit 9186fd4

Browse files
committed
refactor: Move to invoke routing
1 parent 36334aa commit 9186fd4

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

tests/App/Controller/TestController.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Laudis\Neo4j\Contracts\ClientInterface;
66
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
77
use Symfony\Component\HttpFoundation\Response;
8-
use Symfony\Component\Routing\Attribute\Route;
98

109
class TestController extends AbstractController
1110
{
@@ -15,12 +14,6 @@ public function __construct(
1514
}
1615

1716
public function __invoke(): Response
18-
{
19-
return $this->index();
20-
}
21-
22-
#[Route('/', methods: ['GET'])]
23-
public function index(): Response
2417
{
2518
$this->client->run('MATCH (n) RETURN n');
2619
$this->client->run('MATCH (n) RETURN n');

tests/App/config/routes.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
controllers:
2-
resource: '../Controller/'
3-
type: attribute
1+
test:
2+
path: /
3+
controller: Neo4j\Neo4jBundle\Tests\App\Controller\TestController

0 commit comments

Comments
 (0)