Skip to content

Commit

Permalink
Move CannotRoute to web package, removing web.routing package alltoge…
Browse files Browse the repository at this point in the history
…ther
  • Loading branch information
thekid committed Mar 30, 2024
1 parent 13926e8 commit 0813ad6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace web\routing;
<?php namespace web;

class CannotRoute extends \web\Error {
class CannotRoute extends Error {

public function __construct($request) {
parent::__construct(404, 'Cannot route request to '.$request->uri()->path());
Expand Down
1 change: 0 additions & 1 deletion src/main/php/web/Routing.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php namespace web;

use web\handler\Call;
use web\routing\CannotRoute;

/**
* Routing takes care of directing the request to the correct target
Expand Down
3 changes: 1 addition & 2 deletions src/test/php/web/unittest/RoutingTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

use test\{Assert, Expect, Test, Values};
use web\io\{TestInput, TestOutput};
use web\routing\{CannotRoute, Target};
use web\{Application, Environment, Filters, Handler, Request, Response, Route, Routing};
use web\{Application, Environment, Filters, Handler, Request, Response, CannotRoute, Routing};

class RoutingTest {
private $handlers;
Expand Down

0 comments on commit 0813ad6

Please sign in to comment.