-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#6573 multiple "NEW" operator syntax #6574
#6573 multiple "NEW" operator syntax #6574
Conversation
I'm wondering how the tests could be passing when this behavior is not supported now... 😕 |
Big WTF indeed. @lzakrzewski did you expect this? :O |
Why is it so hard to understand? He wrote |
Meh, totally missed it =_= @lzakrzewski can you remove the "test skipped" blocks? |
Yep, I must be blind... 😶 |
The parser is really easy to implement, is made it check for token type T_NEW. The hydrator is a different story, I want to help but the issue also comes with the fact we don't know the nesting inside of the hydrator of somebody can help me with gathering this data I can continue to make an PR for this feature.
|
@TNAJanssen I implemented this but I not sure is this implementation is ok:
|
@fesor indeed like that, do you already have it working? |
Yep, this commit contains all the implementation. |
@fesor tests are also successful? I will test it tomorrow! |
@TNAJanssen tests successful but I didn't used test cases in this PR (Existing model already covers same cases). I also think that I need add few more test cases. |
Please create new PR for that and move discussion over there, it's not appropriate to discuss unrelated commits in this PR. |
Implementation for this PR: #6709 |
Implemented in #11576 |
In some cases, it will be good to use multiple
NewObjectExpression
.For example, I used money library for money calculations and I would like to return the price of each item in my bucket as a
Money
value object.See: #6573
Right now I committed the only test.