Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laminas Router Laravel Package

laminas/laminas-router

Laminas Router provides flexible, composable routing for PHP applications, with HTTP/console route types, route matching and assembly, and integration points for Laminas MVC/Mezzio. Includes CI-tested components and configurable route stacks.

View on GitHub
Deep Wiki
Context7

Migrating from v2 to v3

laminas-router v3 makes a number of changes that may affect your application. This document details those changes, and provides suggestions on how to update your application to work with v3.

Query route removal

Laminas\Mvc\Router\Http\Query was deprecated starting in version 2.3.0. If you were using it previously, it no longer exists. Routing based on query strings is considered problematic, due to the fact that arbitrary keys may be specified, which could potentially lead to nefarious actions such as selection of an alternate controller or controller action.

If you relied on this route, you will need to update your code.

Namespace change

In laminas-router v2, the namespace used was Laminas\Mvc\Router, as it originated in the laminas-mvc component. With v3, the namespace was changed to Laminas\Router.

If you were referring to fully qualified class names or the Laminas\Mvc\Router namespace, you will need to update your code. You can do so by running a script such as the following (assumes *nix-based operating system such as Mac OS X or Linux):

$ for code in $(grep -rl 'Laminas.Mvc.Router' .);do
> sed --in-place -e 's/Laminas\\Mvc\\Router/Laminas\\Router/g' ${code}
> done

The above recursively lists files that use the old namespace, and then edits them in place to replace the old namespace with the new one.

(Make sure you don't do this at your project root, as that could also change the files under your vendor/ tree, which you almost certainly do not want to do!)

Console routes

Console routing was removed from laminas-router for version 3. If you use console routing, you will need to install the new laminas-mvc-console package:

$ composer require laminas/laminas-mvc-console
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle