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

**URL:** <https://forum.shopware.com/t/make-sure-there-is-a-loader-supporting-the-annotation-type/103580>\
**Category:** Programmierung\
**Created:** [6. April 2024 um 13:55 UTC](https://forum.shopware.com/t/make-sure-there-is-a-loader-supporting-the-annotation-type/103580 "2024-04-06T13:55:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zlep](https://avatars.discourse-cdn.com/v4/letter/z/9de0a6/32.png) [@zlep](https://forum.shopware.com/u/zlep)\
**Post date:** [6. April 2024 um 13:55 UTC](https://forum.shopware.com/t/make-sure-there-is-a-loader-supporting-the-annotation-type/103580/1 "2024-04-06T13:55:54Z")

</div>

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:

```auto
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:

```auto
// <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

---

<div class="post-metadata">

**Author:** ![zlep](https://avatars.discourse-cdn.com/v4/letter/z/9de0a6/32.png) [@zlep](https://forum.shopware.com/u/zlep)\
**Post date:** [6. April 2024 um 14:08 UTC](https://forum.shopware.com/t/make-sure-there-is-a-loader-supporting-the-annotation-type/103580/2 "2024-04-06T14:08:47Z")

</div>

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

```auto
// <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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [6. Mai 2024 um 14:09 UTC](https://forum.shopware.com/t/make-sure-there-is-a-loader-supporting-the-annotation-type/103580/3 "2024-05-06T14:09:31Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
