We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following array does not work.
'external_services' => [ 'hotel' => [ 'campaign_matcher' => static fn (?DeviceOutput $deviceOutput): string => match ($deviceOutput) { DeviceOutput::Mobile => 'a', DeviceOutput::App, DeviceOutput::TabletApp => 'b', default => 'c', }, ], ],
Error: Syntax error, unexpected T_DOUBLE_ARROW on line 14
Syntax error, unexpected T_DOUBLE_ARROW on line 14
The reason is that in the ClosureExporter the PHP-Parser is used for an old PHP version.
https://github.com/brick/varexporter/blob/master/src/Internal/ObjectExporter/ClosureExporter.php#L71
If this would be simply changed to it works.
$this->parser = (new ParserFactory)->createForHostVersion());
Any objections on changing this so it will understand new syntax easily?
The text was updated successfully, but these errors were encountered:
Hi, I think you're right, it should probably be createForHostVersion()!
createForHostVersion()
Can you open a PR with this change, and a test case?
Sorry, something went wrong.
Fixed in #38 and released in 0.6.0! Thank you.
No branches or pull requests
The following array does not work.
Error:
Syntax error, unexpected T_DOUBLE_ARROW on line 14
The reason is that in the ClosureExporter the PHP-Parser is used for an old PHP version.
https://github.com/brick/varexporter/blob/master/src/Internal/ObjectExporter/ClosureExporter.php#L71
If this would be simply changed to it works.
Any objections on changing this so it will understand new syntax easily?
The text was updated successfully, but these errors were encountered: