Skip to content

Commit f98d569

Browse files
authored
Merge pull request #8 from bckp/chroe-symfony
chore: added support for symfony/console:7
2 parents 77246c8 + d934ab9 commit f98d569

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Mac
2+
.DS_Store
3+
14
# Editor
25
/.idea
36

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
}
3636
},
3737
"require": {
38-
"php": "^8.0",
38+
"php": ">=8.0 <8.4",
3939
"ext-pcntl": "*",
4040
"bunny/bunny": "^0.5",
41-
"symfony/console": "~3.3 || ^4.0 || ^5.0 || ^6.0",
41+
"symfony/console": "~3.3 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
4242
"nette/di": "^3.1.0",
4343
"nette/schema": "^1.2"
4444
},
@@ -48,7 +48,7 @@
4848
"nette/neon": "^2.4.3 || ^3.2.1",
4949
"mockery/mockery": "^1.3.3",
5050
"tracy/tracy": "^2.5",
51-
"vimeo/psalm": "^4.9",
51+
"vimeo/psalm": "^5.0",
5252
"ninjify/nunjuck": "^0.4",
5353
"phpstan/phpstan": "^1.8"
5454
},

psalm.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<psalm
33
errorLevel="2"
44
resolveFromConfigFile="true"
5+
findUnusedBaselineEntry="false"
6+
findUnusedCode="false"
57
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
68
xmlns="https://getpsalm.org/schema/config"
79
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
@@ -10,6 +12,7 @@
1012
<directory name="src" />
1113
<ignoreFiles>
1214
<directory name="vendor" />
15+
<file name="src/Connection/Client.php" />
1316
</ignoreFiles>
1417
</projectFiles>
1518
</psalm>

src/Connection/Api.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public function createFederation(
7171
'exchange' => $name,
7272
];
7373

74-
if ($messageTTL) {
74+
if ($messageTTL !== null && $messageTTL > 0) {
7575
$federationParamsPrototype['message-ttl'] = $messageTTL;
7676
}
77-
if ($expires) {
77+
if ($expires !== null && $expires > 0) {
7878
$federationParamsPrototype['expires'] = $expires;
7979
}
8080

@@ -167,7 +167,7 @@ private function request(string $method, string $url, array $params = []): array
167167

168168
return [
169169
'status' => $info['http_code'],
170-
'data' => $response ? json_decode((string) $response, flags: JSON_THROW_ON_ERROR) : '',
170+
'data' => $response !== false ? json_decode((string) $response, flags: JSON_THROW_ON_ERROR) : '',
171171
];
172172
}
173173

0 commit comments

Comments
 (0)