Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
roave_bc_check:
uses: yiisoft/actions/.github/workflows/bc.yml@master
with:
php: '["8.4"]'
php: '["8.5"]'
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@ jobs:
- 11
- 12
- 13
include:
- os: ubuntu-latest
php: 7.4
pgsql: 13
- os: ubuntu-latest
php: 8.0
pgsql: 13
- os: ubuntu-latest
php: 8.2
pgsql: 13
- os: ubuntu-latest
php: 8.3
pgsql: 13
- os: ubuntu-latest
php: 8.4
pgsql: 13
- os: ubuntu-latest
php: 8.5
pgsql: 13
- os: ubuntu-latest
php: 8.6
pgsql: 13

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer-dependency-analyser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
uses: yiisoft/actions/.github/workflows/composer-dependency-analyser.yml@master
with:
php: >-
['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.2.1 under development

- Chg #60: Replace Psalm with PHPStan (@vjik)
- Chg #61: Change PHP constraint in `composer.json` to `7.4.* || 8.0 - 8.6` (@vjik)

## 1.2.0 November 13, 2026

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This library provides a PostgreSQL mutex implementation for [yiisoft/mutex](http

## Requirements

- PHP 7.4 or higher.
- PHP 7.4 - 8.6.
- `PDO` PHP extension.

## Installation
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "7.4.* || 8.0 - 8.6",
"ext-pdo": "*",
"yiisoft/mutex": "^1.1"
},
Expand Down
13 changes: 9 additions & 4 deletions tests/PgsqlMutexKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ public function testAcquireAndReleaseUseFullWidthKeys(string $name, int $key1, i
$statement->expects($this->exactly(2))->method('fetchColumn')->willReturn(true);
$connection = $this->createMock(PDO::class);
$connection->method('getAttribute')->with(PDO::ATTR_DRIVER_NAME)->willReturn('pgsql');
$connection->expects($this->exactly(2))->method('prepare')->willReturnMap([
['SELECT pg_try_advisory_lock(:key1, :key2)', [], $statement],
['SELECT pg_advisory_unlock(:key1, :key2)', [], $statement],
]);
$connection->expects($this->exactly(2))->method('prepare')->willReturnCallback(
function (string $query) use ($statement): PDOStatement {
$this->assertContains($query, [
'SELECT pg_try_advisory_lock(:key1, :key2)',
'SELECT pg_advisory_unlock(:key1, :key2)',
]);
return $statement;
},
);
$mutex = new PgsqlMutex($name, $connection);

$this->assertTrue($mutex->acquire());
Expand Down
Loading