Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public function __construct(
* Create a new group instance.
*
* @param string|null $prefix URL prefix to prepend to all routes of the group.
*
* @deprecated Use `new Group()` instead.
*/
public static function create(?string $prefix = null): self
{
Expand Down
16 changes: 16 additions & 0 deletions src/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ public function __debugInfo()
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function get(string $pattern): self
{
Expand All @@ -150,6 +152,8 @@ public static function get(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function post(string $pattern): self
{
Expand All @@ -161,6 +165,8 @@ public static function post(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function put(string $pattern): self
{
Expand All @@ -172,6 +178,8 @@ public static function put(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function delete(string $pattern): self
{
Expand All @@ -183,6 +191,8 @@ public static function delete(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function patch(string $pattern): self
{
Expand All @@ -194,6 +204,8 @@ public static function patch(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function head(string $pattern): self
{
Expand All @@ -205,6 +217,8 @@ public static function head(string $pattern): self
*
* @param string $pattern URL pattern.
* @return self New route instance.
*
* @deprecated Use `new Router()` instead.
*/
public static function options(string $pattern): self
{
Expand All @@ -213,6 +227,8 @@ public static function options(string $pattern): self

/**
* @param string[] $methods
*
* @deprecated Use `new Router()` instead.
*/
public static function methods(array $methods, string $pattern): self
{
Expand Down
2 changes: 2 additions & 0 deletions src/RouteCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* Simple route collector that manages routes, groups, and middleware definitions.
*
* @deprecated Will be removed in the next major release.
*/
final class RouteCollector implements RouteCollectorInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/RouteCollectorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* Interface for route collectors that manage route registration.
*
* @deprecated Will be removed in the next major release.
*/
interface RouteCollectorInterface
{
Expand Down
Loading