diff --git a/composer.json b/composer.json index 669fc9f..6594780 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "easycorp/easyadmin-bundle": "^3", "imagine/imagine": "^1.2", "mjaschen/phpgeo": "^3.2", + "presta/sitemap-bundle": "^3.2", "samayo/bulletproof": "4.0.1", "sensio/framework-extra-bundle": "^6.1", "symfony/asset": "5.4.*", diff --git a/composer.lock b/composer.lock index 28f1860..ddb2cec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ec2a4f1eba6f8f15d154da64a0495d08", + "content-hash": "0cf6e60682a00711078e84db847b1f3b", "packages": [ { "name": "composer/package-versions-deprecated", @@ -2037,6 +2037,74 @@ }, "time": "2021-11-30T19:35:32+00:00" }, + { + "name": "presta/sitemap-bundle", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/prestaconcept/PrestaSitemapBundle.git", + "reference": "341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/prestaconcept/PrestaSitemapBundle/zipball/341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b", + "reference": "341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": ">=7.1.3", + "symfony/console": "^4.4|^5.0|^6.0", + "symfony/framework-bundle": "^4.4|^5.0|^6.0" + }, + "require-dev": { + "doctrine/annotations": "^1.0", + "phpstan/phpstan": "^0.12.82", + "phpunit/phpunit": "^7.5|^8.0", + "sensio/framework-extra-bundle": "^5.5|^6.1", + "squizlabs/php_codesniffer": "^3.5", + "symfony/browser-kit": "^4.4|^5.0|^6.0", + "symfony/messenger": "^4.4|^5.0|^6.0", + "symfony/phpunit-bridge": "^4.4|^5.0|^6.0", + "symfony/yaml": "^4.4|^5.0|^6.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "3.x": "3.x-dev", + "2.x": "2.x-dev", + "1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Presta\\SitemapBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Prestaconcept", + "homepage": "http://www.prestaconcept.net/" + } + ], + "description": "A Symfony bundle that provides tools to build your application sitemap.", + "keywords": [ + "Sitemap", + "bundle", + "prestaconcept", + "symfony", + "xml" + ], + "support": { + "issues": "https://github.com/prestaconcept/PrestaSitemapBundle/issues", + "source": "https://github.com/prestaconcept/PrestaSitemapBundle/tree/v3.2.1" + }, + "time": "2021-12-16T08:09:53+00:00" + }, { "name": "psr/cache", "version": "2.0.0", diff --git a/config/bundles.php b/config/bundles.php index 4ddfac0..8ac013d 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -16,4 +16,5 @@ return [ Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true], + Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true], ]; diff --git a/config/routes/presta_sitemap.yaml b/config/routes/presta_sitemap.yaml new file mode 100644 index 0000000..980969c --- /dev/null +++ b/config/routes/presta_sitemap.yaml @@ -0,0 +1,2 @@ +presta_sitemap: + resource: "@PrestaSitemapBundle/config/routing.yml" \ No newline at end of file diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index 117acd4..cbdefde 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -10,19 +10,19 @@ use Twig\Environment; class AppController extends AbstractController { - #[Route('/', name: 'homepage')] + #[Route('/', name: 'homepage', options: ["sitemap" => true])] public function index(): Response { return $this->render('app/index.html.twig'); } - #[Route('/imprint', name: 'imprint')] + #[Route('/imprint', name: 'imprint', options: ["sitemap" => true])] public function imprint(): Response { return $this->render('app/imprint.html.twig'); } - #[Route('/faq', name: 'faq')] + #[Route('/faq', name: 'faq', options: ["sitemap" => true])] public function faq(): Response { return $this->render('app/faq.html.twig'); diff --git a/src/Controller/OfferController.php b/src/Controller/OfferController.php index 3130dba..e7aab0a 100644 --- a/src/Controller/OfferController.php +++ b/src/Controller/OfferController.php @@ -32,7 +32,7 @@ class OfferController extends AbstractController $this->photoresizer = $photoresizer; } - #[Route('/offers', name: 'offers')] + #[Route('/offers', name: 'offers', options: ["sitemap" => true])] public function showAll(Environment $twig, Request $request, OfferingRepository $offerRepository, PlzToCoordinate $plzconverter, DistanceCalculator $distanceCalculator): Response { $form = $this->createForm(OfferFilterFormType::class); diff --git a/src/Controller/RegistrationController.php b/src/Controller/RegistrationController.php index 2f71767..b32c65d 100644 --- a/src/Controller/RegistrationController.php +++ b/src/Controller/RegistrationController.php @@ -26,7 +26,7 @@ class RegistrationController extends AbstractController $this->emailVerifier = $emailVerifier; } - #[Route('/register', name: 'app_register')] + #[Route('/register', name: 'app_register', options: ["sitemap" => true])] public function register(Request $request, UserPasswordHasherInterface $passwordEncoder, CaptchaVerifier $captchaVerifier): Response { $user = new User(); diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index ed5a595..d7d05ed 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -10,7 +10,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; class SecurityController extends AbstractController { /** - * @Route("/login", name="app_login") + * @Route("/login", name="app_login", options={"sitemap"=true}) */ public function login(AuthenticationUtils $authenticationUtils): Response { diff --git a/symfony.lock b/symfony.lock index 3370817..c1325ee 100644 --- a/symfony.lock +++ b/symfony.lock @@ -118,6 +118,9 @@ "nikic/php-parser": { "version": "v4.10.4" }, + "presta/sitemap-bundle": { + "version": "v3.2.1" + }, "psr/cache": { "version": "2.0.0" },