Skip to content

Commit

Permalink
Merge pull request #8 from bckp/chroe-symfony
Browse files Browse the repository at this point in the history
chore: added support for symfony/console:7
  • Loading branch information
bckp authored Mar 14, 2024
2 parents 77246c8 + d934ab9 commit f98d569
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Mac
.DS_Store

# Editor
/.idea

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
}
},
"require": {
"php": "^8.0",
"php": ">=8.0 <8.4",
"ext-pcntl": "*",
"bunny/bunny": "^0.5",
"symfony/console": "~3.3 || ^4.0 || ^5.0 || ^6.0",
"symfony/console": "~3.3 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"nette/di": "^3.1.0",
"nette/schema": "^1.2"
},
Expand All @@ -48,7 +48,7 @@
"nette/neon": "^2.4.3 || ^3.2.1",
"mockery/mockery": "^1.3.3",
"tracy/tracy": "^2.5",
"vimeo/psalm": "^4.9",
"vimeo/psalm": "^5.0",
"ninjify/nunjuck": "^0.4",
"phpstan/phpstan": "^1.8"
},
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<psalm
errorLevel="2"
resolveFromConfigFile="true"
findUnusedBaselineEntry="false"
findUnusedCode="false"
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"
Expand All @@ -10,6 +12,7 @@
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
<file name="src/Connection/Client.php" />
</ignoreFiles>
</projectFiles>
</psalm>
6 changes: 3 additions & 3 deletions src/Connection/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function createFederation(
'exchange' => $name,
];

if ($messageTTL) {
if ($messageTTL !== null && $messageTTL > 0) {
$federationParamsPrototype['message-ttl'] = $messageTTL;
}
if ($expires) {
if ($expires !== null && $expires > 0) {
$federationParamsPrototype['expires'] = $expires;
}

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

return [
'status' => $info['http_code'],
'data' => $response ? json_decode((string) $response, flags: JSON_THROW_ON_ERROR) : '',
'data' => $response !== false ? json_decode((string) $response, flags: JSON_THROW_ON_ERROR) : '',
];
}

Expand Down

0 comments on commit f98d569

Please sign in to comment.