Skip to content

DeprecatedAnnotationToDeprecatedAttributeRector sometimes doesn't put quotes around message #9252

@hackel

Description

@hackel

Bug Report

Subject Details
Rector version 2.1.0

I just experienced a Rector error which was caused by DeprecatedAnnotationToDeprecatedAttributeRector converting a @deprecated message to an Attribute without quoting the message. See reproduction.

I've been fixing a bunch more of these errors throughout my code and the common aspect seems to be when the message begins with "use" followed by "X::class" or "X::method()".

Minimal PHP Code Causing Issue

https://getrector.com/demo/33982d80-689f-4656-bc02-3635e6233f3a

Expected Behaviour

The deprecation message should be a quoted string.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions