Skip to content

Commit

Permalink
DEV-3585: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomHumanoidFromEarth committed Nov 8, 2024
1 parent da7d8ba commit 6cec1c6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .php-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.2
8.3
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.3",
"ext-json": "*",
"symfony/config": "^6.2.0",
"symfony/dependency-injection": "^6.2.0",
"symfony/http-kernel": "^6.2.0",
"symfony/cache": "^6.2.0",
"symfony/http-client": "^6.2.0"
"symfony/config": "^7.1.0",
"symfony/dependency-injection": "^7.1.0",
"symfony/http-kernel": "^7.1.0",
"symfony/cache": "^7.1.0",
"symfony/http-client": "^7.1.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/AkeneoApiAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
string $apiUser,
string $apiPassword,
string $authToken,
HttpClientInterface $client
HttpClientInterface $client,
) {
$this->baseUrl = $baseUrl;
$this->apiUser = $apiUser;
Expand Down Expand Up @@ -51,7 +51,7 @@ public function getToken(): string
$this->buildUrl('/api/oauth/v1/token'), [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => sprintf('Basic %s', $this->authToken),
'Authorization' => \sprintf('Basic %s', $this->authToken),
],
'body' => $body,
]
Expand All @@ -72,6 +72,6 @@ public function getToken(): string

protected function buildUrl(string $endpoint): string
{
return sprintf('%s%s', $this->baseUrl, $endpoint);
return \sprintf('%s%s', $this->baseUrl, $endpoint);
}
}
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treebuilder = new TreeBuilder('asgoodasnew_akeneo_api');

Expand Down
12 changes: 6 additions & 6 deletions src/SymfonyHttpClientAkeneoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
string $baseUrl,
HttpClientInterface $client,
AkeneoApiAuthenticator $akeneoApiAuthenticator,
CategoryTreeBuilder $categoryTreeBuilder
CategoryTreeBuilder $categoryTreeBuilder,
) {
$this->baseUrl = $baseUrl;
$this->client = $client;
Expand All @@ -39,7 +39,7 @@ public function __construct(
*/
public function getProduct(string $identifier): array
{
$url = $this->buildUrl(sprintf('/api/rest/v1/products/%s', $identifier));
$url = $this->buildUrl(\sprintf('/api/rest/v1/products/%s', $identifier));

try {
$response = $this->client->request(Request::METHOD_GET, $url, $this->getDefaultHeaders());
Expand Down Expand Up @@ -90,7 +90,7 @@ public function triggerUpdate(string $identifier, ?string $message = null): void
try {
$response = $this->client->request(
Request::METHOD_PATCH,
$this->buildUrl(sprintf('/api/rest/v1/products/%s', $identifier)),
$this->buildUrl(\sprintf('/api/rest/v1/products/%s', $identifier)),
$options
);

Expand All @@ -112,14 +112,14 @@ private function getDefaultHeaders(): array
return [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => sprintf('Bearer %s', $this->token),
'Authorization' => \sprintf('Bearer %s', $this->token),
],
];
}

private function buildUrl(string $endpoint): string
{
return sprintf('%s%s', $this->baseUrl, $endpoint);
return \sprintf('%s%s', $this->baseUrl, $endpoint);
}

/**
Expand All @@ -137,7 +137,7 @@ private function assertProductExists(string $identifier): void

private function getTriggerUpdateBody(string $identifier, ?string $message): string
{
$value = sprintf(
$value = \sprintf(
'%s - %s',
(new \DateTime())->format('Y-m-d H:i:s'),
$message ?? 'update from AkeneoApiBundle'
Expand Down

0 comments on commit 6cec1c6

Please sign in to comment.