Closed tancnle closed 1 year ago
Hey @tancnle, nice work you did here! Wouldn't be great to have syntax highlight inside PHP attributes like VSCode does?
By the way, if an attribute is multiline (see example bellow), it identifies the attribute class name as a function name.
#[ApiResource(
operations: [
new GetCollection(),
new Post(processor: UserPasswordHasher::class, validationContext: ['groups' => ['Default', 'user:create']]),
new Get(
uriTemplate: '/users/me',
security: "is_granted('ROLE_USER') and object == user",
provider: CurrentUserProvider::class,
openapi: new Operation(
summary: 'Retrieves the current user',
)
),
],
)]
This PR adds highlight for PHP Attributes.
Resolves https://github.com/rouge-ruby/rouge/issues/1759