Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed internal error with attributes referencing self::
- Loading branch information
1 parent
78b00d0
commit b5e44f7
Showing
4 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php declare(strict_types = 1); // lint >= 8.0 | ||
|
||
namespace Bug5951; | ||
|
||
#[\Attribute] | ||
class Route | ||
{ | ||
|
||
/** @param string[] $methods */ | ||
public function __construct(public string $path, public string $name, public array $methods) | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
class Response | ||
{ | ||
|
||
} | ||
|
||
final class SomeController | ||
{ | ||
public const ROUTE_INDEX = 'some_index'; | ||
|
||
#[Route('/some', name: self::ROUTE_INDEX, methods: ['GET'])] | ||
public function index(): Response | ||
{ | ||
return new Response(); | ||
} | ||
} |