Skip to content

Downgrade attributes? #11

@leoloso

Description

@leoloso

I'm using Symfony DependencyInjection, which uses attribute #[Required] to call a function when creating a service.

When transpiling to PHP 7.1, #[Required] is still there.

This is a problem, attributes should be removed from PHP 7, since it introduces a new syntax.

But instead of removing it, could it be converted into something that doesn't break the application?

For instance, for DependencyInjection, transforming it to phpdoc /** @required */ works.

And for other cases? How to downgrade custom attributes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions