BUGFIX: Support `new <Class>` as default value in a method
This allows to use new in initializers, see https://www.php.net/releases/8.1/en.php#new_in_initializers
Upgrade instructions
None
Review instructions
Create a method with a instance of a class as default value. Expect a fatal error before adding the patch (see issue with example)
Checklist
- [x] Code follows the PSR-2 coding style
- [x] Tests have been created, run and adjusted as needed
- [x] The PR is created against the lowest maintained branch
- [ ] Reviewer - PR Title is brief but complete and starts with
FEATURE|TASK|BUGFIX - [ ] Reviewer - The first section explains the change briefly for change-logs
- [ ] Reviewer - Breaking Changes are marked wit
!!!and have upgrade-instructions
Resolved #2968
It would be super cool if you could provide a test together with that - so it cannot get broken by some enthusiastic refactoring at a later point. ;)
@fcool @mhsdesign Test applied :)
It should target 7.3 ^^
btw it seems that we currently support 8.2 at all :P https://docs.neos.io/guide/installation-development-setup/system-requirements#php but only on paper ^^
If neos 7.3 is otherwise ready for 8.2 lets merge it there, if there are bigger problems i would also be fine with 8.0 as base
@mhsdesign What is the smartest way to change base/branch in my fork - I love Flow to be more modern
you can cherry-pick all the commits (with HashA..HashB) on a fresh 7.3 ... or squash all the commits first and do only one cherry-pick ^^
@robertlemke Would that be something that goes well with the proxy refactoring for 9.0?
@robertlemke Would that be something that goes well with the proxy refactoring for 9.0?
If we merge this soonish, there should be no conflicts.
I'd consider this a feature, not a bug fix.
I'd consider this a feature, not a bug fix.
It creates an error when using a feature in PHP that Flow claims to support. So I'd be fine with a bugfix… 🤷♂️
NOTE: If we merge this to 7.0, we must upmerge EOL branches. So I changed the target branch to 7.3…