-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add PHP 8.2 to CI #448
Add PHP 8.2 to CI #448
Conversation
tests/Endpoints/IndexTest.php
Outdated
sort($results); | ||
sort($expected); | ||
|
||
$this->assertSame($results, $expected); |
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.
sort
always returns true, so phpstan complained about that: Call to method PHPUnit\Framework\Assert::assertSame() with true and true will always evaluate to true.
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.
And voila, now tests fails because the expectations were wrong :D
1) Tests\Endpoints\IndexTest::testGetTasks
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 (
0 => 'index_2b37af8be3c1639bd46d3d8b08a16f'
+ 1 => 'other-index'
)
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.
Not sure what this code is supposed to test so waiting for feedback
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.
Hi @norkunas thanks for pointing this out.
The idea was to test the ability to compose a getTasks
request from an index instance where I could also use the value defined inside the instance.
In this case, we want to get all the tasks from both $this->index
and other-index
. And we just want to ensure the presence of both indexUids in the response. They don't need to respect the order in the array btw.
When I implemented this test I didn't realize that sort()
affects the value instead of creating a new array 🤦.
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.
There was a bug :)
@@ -18,7 +18,8 @@ jobs: | |||
- name: Install PHP | |||
uses: shivammathur/setup-php@v2 | |||
with: | |||
php-version: 8.0 | |||
php-version: 8.1 | |||
coverage: none |
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.
By default when non setting coverage: none
xdebug is installed, so this just avoids
@@ -32,7 +33,8 @@ jobs: | |||
- name: Install PHP | |||
uses: shivammathur/setup-php@v2 | |||
with: | |||
php-version: 8.0 | |||
php-version: 8.2 | |||
coverage: none |
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.
Same here
name: integration-tests (PHP ${{ matrix.php-versions }}) | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none |
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.
Later we could introduce coverage if needed, but currently also disabled to avoid installing xdebug
1a30939
to
6eee219
Compare
All green, if you want I can split a bugfix into separate PR |
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.
bors merge
Thanks for your contribution @norkunas 🤘
Pull Request
Related issue
Fixes #<issue_number>
What does this PR do?
Index->getTasks()
where the custom setindexUids
are not properly merged into payload.PR checklist
Please check if your PR fulfills the following requirements: