Skip to content

v1.8.2 caused package/config/routes.php to stop registering with the router automatically #2142

@iturgeon

Description

@iturgeon

We've been lagging behind in updating, so I apologize for the tardiness. The following commit 7fc6286 causes any packages that were previously using a config/routes.php to create routes to break.

Reading the docs, perhaps this wasn't an intended feature in the first place?

I'm mostly making a comment here to make the maintainers aware of the change and leave a trail for others that may have the same issue.

Our current workaround is to use the package's bootstrap.php file to load the config and manually add it's routes to the Fuel Router:

// Load and register routes for this package
$package_routes = \Config::load(__DIR__.'/config/routes');
\Router::add($package_routes);

This does change the order that the routes are registered (package routes came after app routes before), which may which pattern matches first in the router?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions