mozart icon indicating copy to clipboard operation
mozart copied to clipboard

Removal of #[\ReturnTypeWillChange] Attribute by Mozart After Scooping

Open mostafasoufi opened this issue 1 year ago • 2 comments

It appears that after running the Mozart package, the #[\ReturnTypeWillChange] attribute is being removed from the methods in my code.

This attribute is important for maintaining compatibility with certain PHP versions and ensuring the proper functioning of my methods.

Any idea?

mostafasoufi avatar Jul 08 '24 17:07 mostafasoufi

@mostafasoufi Do you have an example of a package that includes this attribute, that it is removing it from? Or do you use it in your own code and Mozart removes this for you? Can you give me some more context please?

coenjacobs avatar Jul 22 '24 13:07 coenjacobs

Yep! Take a look at this repository https://github.com/wp-statistics/wp-statistics

PS. I added the attribute #[\ReturnTypeWillChange] manually after running mozart compose

mostafasoufi avatar Jul 22 '24 13:07 mostafasoufi