Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 26, 2025

Syntax error found in 5 files

------------------------------------------------------------
Parse error: tests/PHPStan/Rules/Traits/data/trait-attributes.php:6
    4| 
    5| #[\Attribute]
  > 6| abstract class AbstractAttribute {}
    7| 
    8| #[AbstractAttribute]
Cannot apply #[\Attribute] to abstract class TraitAttributes\AbstractAttribute
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/Classes/data/non-class-attribute-class.php:6
    4| 
    5| #[\Attribute]
  > 6| interface Foo
    7| {
    8|
Cannot apply #[\Attribute] to interface NonClassAttributeClass\Foo
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/Classes/data/enum-cannot-be-attribute.php:6
    4| 
    5| #[\Attribute]
  > 6| enum Foo
    7| {
    8|
Cannot apply #[\Attribute] to enum EnumAsAttribute\Foo
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/Classes/data/class-attributes.php:72
    70| 
    71| #[\Attribute]
  > 72| abstract class AbstractAttribute
    73| {
    74|
Cannot apply #[\Attribute] to abstract class ClassAttributes\AbstractAttribute
------------------------------------------------------------
Parse error: tests/PHPStan/Rules/Classes/data/enum-attributes.php:30
    28| 
    29| #[\Attribute]
  > 30| enum EnumAsAttribute
    31| {
    32|
Cannot apply #[\Attribute] to enum EnumAttributes\EnumAsAttribute

@staabm staabm marked this pull request as ready for review August 26, 2025 07:15
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit edcce79 into phpstan:2.1.x Aug 26, 2025
263 of 275 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the lint85 branch August 26, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants