Skip to content

Rector wants to remove assigning to the property when working with DateTimeImmutable #6769

Closed
rectorphp/rector-src
#1060
@Maxell92

Description

Bug Report

Subject Details
Rector version Rector 0.11.60 (07736c1)

Rector wants to remove property when working with DateTimeImmutable object.

Minimal PHP Code Causing Issue

https://getrector.org/demo/1ec35998-872a-65c0-b82c-1fff5d3ab6d8

There is an Composer error in the demo, but this is my output:

Screenshot 2021-10-25 at 15 52 09

I use /~https://github.com/briannesbitt/Carbon library and the problem is the same.

Expected Behaviour

Rector should Skip it, otherwise, time is not set in the returned object.

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