-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Step 4 Upgrade] Bump requirement to php 8.1 #127
Conversation
Hello, @samsonasik! You are doing great work, I really appreciate your effort and your help on this 👍 |
Please ping me, once it will be ready for merge and tests are green |
@lisachenko yes, I need more time on this |
@lisachenko its 2 errors to go 👍 There were 2 failures:
1) Go\ParserReflection\ReflectionParameterTest::testGeneralInfoGetters with data set "PHP5.5" ('/home/runner/work/parser-refl...55.php')
isDefaultValueAvailable() for parameter Go\ParserReflection\Stub\miscParameters:arrayParamWithDefault should be equal
Failed asserting that true is identical to false.
/home/runner/work/parser-reflection/parser-reflection/tests/ReflectionParameterTest.php:61
2) Go\ParserReflection\ReflectionParameterTest::testGeneralInfoGetters with data set "PHP7.0" ('/home/runner/work/parser-refl...70.php')
isDefaultValueAvailable() for parameter Go\ParserReflection\Stub\miscScalarParameters:acceptsFloat should be equal
Failed asserting that true is identical to false.
/home/runner/work/parser-reflection/parser-reflection/tests/ReflectionParameterTest.php:61 It somehow probably related with autoload, as manually create namespace before test make it work, but load the file and parse it cause invalid original I will look more... |
implemented 🎉 @lisachenko Ready to merge 👍 |
The inspection completed: No new issues |
if ($this->parameterNode->default instanceof Array_) { | ||
$this->parameterNode->default->setAttribute('kind', Array_::KIND_SHORT); | ||
$printer = new Standard(['shortArraySyntax' => true]); | ||
$defaultValue = $printer->prettyPrintExpr($this->parameterNode->default); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: using Printer should pass the transformed default value on ___toString()
, eg; transformed array with magic const: [___FUNCTION___ . "test"]
which should equivalent to [namespaced\functiontest]
but that may need separate PR
Nothing to add here - great job @samsonasik! It's my pleasure to merge this good work ) |
@lisachenko here the 4th step 👍 , bump to php 8.1