8000 Symfony Route annotation with default null is converted into string · Issue #6983 · rectorphp/rector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}
Symfony Route annotation with default null is converted into string #6983
Closed
@jokaorgua

Description

@jokaorgua

Bug Report

Subject Details
Rector version Rector 75c0b27

When a route has a parameter and it is set to null as default the null is converted into 'null' string

Minimal PHP Code Causing Issue

Route("/route/with/some/parameter/{parameter}", name="some.route", methods={"GET"}, defaults={"parameter": null})

is converted into

[Route(path: '"/route/with/some/parameter/{parameter}"', name: 'some.route', defaults: ['title' => 'null'], methods: ['GET'])]

Expected Behaviour

[Route(path: '"/route/with/some/parameter/{parameter}"', name: 'some.route', defaults: ['title' => null], methods: ['GET'])]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0