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

Add PHP 8.2 to CI #448

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
runs-on: ubuntu-latest
name: linter-check
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
Copy link
Collaborator Author

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

- name: Install dependencies
run: composer update --prefer-dist --no-progress
- name: Run linter
Expand All @@ -28,11 +29,12 @@ jobs:
runs-on: ubuntu-latest
name: phpstan-tests
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.2
coverage: none
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

- name: Install dependencies
run: composer update --prefer-dist --no-progress
- name: Run types tests with PHPStan
Expand All @@ -45,14 +47,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['7.4', '8.0', '8.1', '8.2']
name: integration-tests (PHP ${{ matrix.php-versions }})
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
Copy link
Collaborator Author

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

- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
Expand Down
3 changes: 2 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ status = [
'phpstan-tests',
'integration-tests (PHP 7.4)',
'integration-tests (PHP 8.0)',
'integration-tests (PHP 8.1)'
'integration-tests (PHP 8.1)',
'integration-tests (PHP 8.2)'
]
# 1 hour timeout
timeout-sec = 3600
2 changes: 1 addition & 1 deletion src/Endpoints/Indexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function getTasks(TasksQuery $options = null): TasksResults
{
$options = $options ?? new TasksQuery();

if (0 == \count($options->getIndexUids())) {
if (\count($options->getIndexUids()) > 0) {
$options->setIndexUids(array_merge([$this->uid], $options->getIndexUids()));
} else {
$options->setIndexUids([$this->uid]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Endpoints/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function testGetTasks(): void
$results = array_unique($allIndexUids);
$expected = [$this->index->getUid(), 'other-index'];

$this->assertSame(sort($results), sort($expected));
$this->assertSame($expected, $results);
}

public function testWaitForTaskDefault(): void
Expand Down