Download the PHP package waffle-commons/routing without Composer

On this page you can find all versions of the php package waffle-commons/routing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package routing

Discord PHP Version Require PHP CI codecov Latest Stable Version Latest Unstable Version Total Downloads Packagist License

Waffle Routing Component

Release: 0.1.0-beta6  |  CHANGELOG.md

Attribute-driven router. No YAML, no XML β€” routes live next to the controller code via the #[Route] attribute and are discovered by scanning the configured controller directory at boot time. The compiled route table is then cached.

πŸ†• Beta-2 highlights β€” HTTP method correctness

Beta-1 inheritance

πŸ“¦ Installation

🧱 Surface

Class Role
Waffle\Commons\Routing\Router RouterInterface implementation. Boots from a ContainerInterface, sorts the table by descending priority, and returns a ?MatchedRoute from matchRequest().
Waffle\Commons\Routing\RouteDiscoverer Walks the controller directory and builds a list<MatchedRoute> from each controller's #[Route] attributes.
Waffle\Commons\Routing\ControllerFinder Filesystem traversal of *.php controller files.
Waffle\Commons\Routing\RouteParser Builds a MatchedRoute from a Route attribute + native reflection metadata (ReflectionClass/ReflectionMethod). A method-level priority overrides the class-level default.
Waffle\Commons\Contracts\Routing\Attribute\Route The #[Route(path, methods, name, arguments, priority)] attribute (defined in contracts).
Waffle\Commons\Routing\Attribute\Argument The #[Argument(classType, paramName, required)] attribute for routes that auto-resolve container services.
Waffle\Commons\Routing\Trait\RequestTrait Helpers for extracting routing data from a PSR-7 request (_controller, _route_params).

πŸš€ #[Route] attribute β€” exact signature

From Waffle\Commons\Contracts\Routing\Attribute\Route (the attribute lives in contracts, so every component reads the same definition):

Argument (from src/Attribute/Argument.php):

πŸš€ Declaring routes on a controller

πŸ”Ž Matching a request

null means no route matched β€” the kernel converts that into RouteNotFoundException (which the error handler renders as RFC 7807 404). Routes are evaluated in descending priority order, so a catch-all (priority: -1000) is only reached after every specific route has failed.

πŸ”€ HTTP method filtering

🐘 PHP 8.5 features used

🧭 Architectural boundary (mago guard)

An active dependency perimeter is enforced on every CI run by vendor/bin/mago guard (bundled into composer mago; zero baselines). The rules live in mago.toml under [guard.perimeter] β€” a forbidden use statement fails the build, not a reviewer.

Production code under Waffle\Commons\Routing may depend only on:

Test code under WaffleTests\Commons\Routing is unrestricted (@all). Structural rules are guarded too: interfaces must be named *Interface, Exception\** classes must end in *Exception, and any Enum\** namespace may hold only enum declarations.

Contract-first, component-agnostic by construction: components compose through waffle-commons/contracts (plus the explicitly-permitted utils), never ad-hoc through one another.

πŸ§ͺ Testing

πŸ“š Documentation

Full guides live in the central DiΓ‘taxis documentation tree:

πŸ“„ License

MIT β€” see LICENSE.md.


All versions of routing with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
waffle-commons/contracts Version self.version
waffle-commons/utils Version self.version
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package waffle-commons/routing contains the following files

Loading the files please wait ...