Skip to content

Commit

Permalink
Dropped symfony/framework-extra-bundle usage
Browse files Browse the repository at this point in the history
  • Loading branch information
evertharmeling committed Dec 13, 2023
1 parent 1315b07 commit 08806d3
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 41 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"doctrine/annotations": "^1.0",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^7.5|^8.0",
"sensio/framework-extra-bundle": "^5.5|^6.1",
"squizlabs/php_codesniffer": "^3.5",
"symfony/messenger": "^5.4|^6.0|^7.0",
"symfony/browser-kit": "^5.4|^6.0|^7.0",
Expand Down
3 changes: 0 additions & 3 deletions tests/Integration/config/5.4/routes/annotations.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions tests/Integration/config/5.4/routes/controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
archive:
path: /archive
controller: Presta\SitemapBundle\Tests\Integration\Controller\ArchivesController::archive

blog_read:
path: /blog
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::read
options:
sitemap:
section: blog

blog_post:
path: /blog/{slug}
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::post

dispatch_message:
path: /dispatch-message
controller: Presta\SitemapBundle\Tests\Integration\Controller\MessengerController::dispatch

home:
path: /
controller: Presta\SitemapBundle\Tests\Integration\Controller\StaticController::home
options:
sitemap:
section: static

6 changes: 0 additions & 6 deletions tests/Integration/config/5.4/special/annotations.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions tests/Integration/config/6.1/routes/annotations.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions tests/Integration/config/6.1/routes/controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
archive:
path: /archive
controller: Presta\SitemapBundle\Tests\Integration\Controller\ArchivesController::archive

blog_read:
path: /blog
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::read
options:
sitemap:
section: blog

blog_post:
path: /blog/{slug}
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::post

dispatch_message:
path: /dispatch-message
controller: Presta\SitemapBundle\Tests\Integration\Controller\MessengerController::dispatch

home:
path: /
controller: Presta\SitemapBundle\Tests\Integration\Controller\StaticController::home
options:
sitemap:
section: static
3 changes: 0 additions & 3 deletions tests/Integration/config/6.3/routes/annotations.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions tests/Integration/config/6.3/routes/controllers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
archive:
path: /archive
controller: Presta\SitemapBundle\Tests\Integration\Controller\ArchivesController::archive

blog_read:
path: /blog
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::read
options:
sitemap:
section: blog

blog_post:
path: /blog/{slug}
controller: Presta\SitemapBundle\Tests\Integration\Controller\BlogController::post

dispatch_message:
path: /dispatch-message
controller: Presta\SitemapBundle\Tests\Integration\Controller\MessengerController::dispatch

home:
path: /
controller: Presta\SitemapBundle\Tests\Integration\Controller\StaticController::home
options:
sitemap:
section: static

2 changes: 1 addition & 1 deletion tests/Integration/config/6.4/routes/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
controllers:
resource: ../../../src/Controller/
type: 'attribute'
type: attribute
3 changes: 0 additions & 3 deletions tests/Integration/src/Controller/ArchivesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

final class ArchivesController
{
/**
* @Route("/archive", name="archive")
*/
#[Route(path: '/archive', name: 'archive')]
public function archive(): Response
{
Expand Down
6 changes: 0 additions & 6 deletions tests/Integration/src/Controller/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@

final class BlogController
{
/**
* @Route("/blog", name="blog_read", options={"sitemap"={"section"="blog"}})
*/
#[Route(path: '/blog', name: 'blog_read', options: ['sitemap' => ['section' => 'blog']])]
public function read(): Response
{
return new Response(__FUNCTION__);
}

/**
* @Route("/blog/{slug}", name="blog_post")
*/
#[Route(path: '/blog/{slug}', name: 'blog_post')]
public function post(string $slug): Response
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Integration/src/Controller/MessengerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

final class MessengerController
{
/**
* @Route("/dispatch-message", name="dispatch_message")
*/
#[Route(path: '/dispatch-message', name: 'dispatch_message')]
public function dispatch(Request $request, MessageBusInterface $bus): Response
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Integration/src/Controller/StaticController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

final class StaticController
{
/**
* @Route("", name="home", options={"sitemap"={"section"="static"}})
*/
#[Route(path: '', name: 'home', options: ['sitemap' => ['section' => 'static']])]
public function home(): Response
{
Expand Down
9 changes: 0 additions & 9 deletions tests/Integration/src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ private function configureContainer(
$version = sprintf('%s.%s', BaseKernel::MAJOR_VERSION, BaseKernel::MINOR_VERSION);
$container->import('../config/' . $version . '/*.yaml');
$container->import('../config/services.yaml');
if (\PHP_VERSION_ID < 80000) {
$container->import('../config/' . $version . '/special/annotations.yaml');
}
}

private function configureRoutes(RoutingConfigurator $routes): void
Expand All @@ -63,9 +60,6 @@ public function registerBundles(): iterable
{
yield new \Symfony\Bundle\FrameworkBundle\FrameworkBundle();
yield new \Presta\SitemapBundle\PrestaSitemapBundle();
if (\PHP_VERSION_ID < 80000) {
yield new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle();
}
}

public function boot()
Expand Down Expand Up @@ -123,9 +117,6 @@ public function registerBundles(): iterable
{
yield new \Symfony\Bundle\FrameworkBundle\FrameworkBundle();
yield new \Presta\SitemapBundle\PrestaSitemapBundle();
if (\PHP_VERSION_ID < 80000) {
yield new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle();
}
}

public function boot()
Expand Down

0 comments on commit 08806d3

Please sign in to comment.