Skip to content

[7.4 beta2] Error when using the new route attribute auto registration with the PHP config #62323

@COil

Description

@COil

Symfony version(s) affected

7.4.0 beta2

Description

I try to use the new default config for routes as mentionned in
https://symfony.com/blog/new-in-symfony-7-4-attribute-improvements#route-attribute-auto-registration

I use the PHP config. (see below)

I have the error :

Cannot load resource "routing.controllers".

How to reproduce

<?php

// config/routes.php

declare(strict_types=1);

use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

return static function (RoutingConfigurator $routingConfigurator): void {
//    $routingConfigurator->import([
//        'path' => '../src/Controller/',
//        'namespace' => 'App\Controller',
//    ], 'attribute');
    $routingConfigurator->import('routing.controllers');
};

Possible Solution

No response

Additional Context

  • PHP configuration files are used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions