Skip to content
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

Merged
merged 38 commits into from
Jan 20, 2024

Conversation

samsonasik
Copy link
Contributor

@lisachenko here the 4th step 👍 , bump to php 8.1

rector.php Outdated Show resolved Hide resolved
@lisachenko
Copy link
Member

Hello, @samsonasik! You are doing great work, I really appreciate your effort and your help on this 👍

@lisachenko
Copy link
Member

Please ping me, once it will be ready for merge and tests are green

@samsonasik
Copy link
Contributor Author

@lisachenko yes, I need more time on this

@samsonasik
Copy link
Contributor Author

@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 \ReflectionParameter data.

I will look more...

@samsonasik samsonasik requested a review from lisachenko January 19, 2024 22:55
@samsonasik
Copy link
Contributor Author

implemented 🎉 @lisachenko Ready to merge 👍

@scrutinizer-notifier
Copy link

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);
Copy link
Contributor Author

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

@lisachenko
Copy link
Member

implemented 🎉 @lisachenko Ready to merge 👍

Nothing to add here - great job @samsonasik! It's my pleasure to merge this good work )

@lisachenko lisachenko merged commit bd12c88 into goaop:master Jan 20, 2024
2 checks passed
@samsonasik samsonasik deleted the step4-php81 branch January 20, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants