Skip to content

Commit

Permalink
Symfony 7 compatibility. (#28)
Browse files Browse the repository at this point in the history
Updated psalm.
Minimal required PHP version is now 8.2.
  • Loading branch information
sakulb authored Jan 3, 2024
1 parent bf05d29 commit e2fd5ee
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ jobs:
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
platform: [ubuntu-latest]
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Tests/Transport/GpsConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testResolve(string $dsn, array $options, GpsConfigurationInterfa
$this->assertEquals($expectedConfiguration, $configuration);
}

public function dataProvider(): array
public static function dataProvider(): array
{
return [
'Empty default' => [
Expand Down
2 changes: 1 addition & 1 deletion Tests/Transport/GpsTransportFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testSupports(bool $expected, string $dsn): void
$this->assertSame($expected, $this->subject->supports($dsn, []));
}

public function dsnProvider(): array
public static function dsnProvider(): array
{
return [
[true, 'gps://defaults/messages?client_config[apiEndpoint]=0.0.0.0:8432'],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Transport/GpsTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public function testGet(): void
public function testAck(): void
{
$this->expectException(TransportException::class);
$this->expectErrorMessage('No GpsReceivedStamp found on the Envelope.');
$this->expectExceptionMessage('No GpsReceivedStamp found on the Envelope.');

$this->subject->ack(new Envelope(new stdClass()));
}

public function testReject(): void
{
$this->expectException(TransportException::class);
$this->expectErrorMessage('No GpsReceivedStamp found on the Envelope.');
$this->expectExceptionMessage('No GpsReceivedStamp found on the Envelope.');

$this->subject->reject(new Envelope(new stdClass()));
}
Expand Down
1 change: 1 addition & 0 deletions Transport/GpsTransportFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

/**
* @author Ronald Marfoldi <ronald.marfoldi@petitpress.sk>
* @implements TransportFactoryInterface<GpsTransport>
*/
final class GpsTransportFactory implements TransportFactoryInterface
{
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
}
],
"require": {
"php": ">=7.4.0",
"php": ">=8.2",
"ext-json": "*",
"psr/cache": "^1.0|^2.0|^3.0",
"symfony/config": "^4.4|^5.1|^6.0",
"symfony/dependency-injection": "^4.4|^5.1|^6.0",
"symfony/http-kernel": "^4.4|^5.1|^6.0",
"symfony/messenger": "^4.4|^5.1|^6.0",
"symfony/options-resolver": "^4.4|^5.1|^6.0",
"symfony/config": "^5.1|^6.0|^7.0",
"symfony/dependency-injection": "^5.1|^6.0|^7.0",
"symfony/http-kernel": "^5.1|^6.0|^7.0",
"symfony/messenger": "^5.1|^6.0|^7.0",
"symfony/options-resolver": "^5.1|^6.0|^7.0",
"google/cloud-pubsub": "^1.29"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.26",
"symfony/yaml": "^4.4|^5.1|^6.0",
"vimeo/psalm": "^5.0",
"symfony/yaml": "^5.1|^6.0|^7.0",
"symplify/easy-coding-standard": "^11.1"
},
"autoload": {
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedCode="false"
findUnusedBaselineEntry="false"
>
<projectFiles>
<directory name="Tests" />
Expand Down

0 comments on commit e2fd5ee

Please sign in to comment.