Make sure there is a loader supporting the "annotation" type

Hallo,

ich habe heute meinen Testshop von der letzten aktuellen 6.5 Version auf 6.6.0.2 geupdatet.
Nun erhalte ich folgende Fehlermeldung aus meinem eigenen Plugin:

Cannot load resource ".../custom/plugins/MeinPlugin/src/Storefront/  
  Controller/MeinPluginController.php". Make sure there is a loader supporting the "annotation" type.  

Das Anpassen der Route entsprechend diesem Beispiel hilft leider auch nicht:

// <plugin root>/src/Storefront/Controller/ExampleController.php
<?php declare(strict_types=1);

namespace Swag\BasicExample\Storefront\Controller;

use Shopware\Storefront\Controller\StorefrontController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

#[Route(defaults: ['_routeScope' => ['storefront']])]
class ExampleController extends StorefrontController
{
    #[Route(path: '/example', name: 'frontend.example.example', methods: ['GET'], defaults: ['_routeScope' => 'storefront'])]
    public function showExample(): Response
    {
        ...
    }
}

Was kann ich noch tun?
Danke

Ok, sorry, hat sich erledigt. Auch die routes.xml sieht nun anders aus:

// <plugin root>/src/Resources/config/routes.xml
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://symfony.com/schema/routing
        https://symfony.com/schema/routing/routing-1.0.xsd">

    <import resource="../../Storefront/Controller/**/*Controller.php" type="attribute" />
</routes>

So geht alles wieder :slight_smile:

1 „Gefällt mir“