Skip to content

Commit

Permalink
Merge pull request #64 from asgoodasnu/feature/DEV-3585_symfony-update
Browse files Browse the repository at this point in the history
DEV-3585: update dependencies
  • Loading branch information
RandomHumanoidFromEarth authored Nov 27, 2024
2 parents da7d8ba + 6a62acb commit 3135d3e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PHPStan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@master
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
tools: pecl
extensions: gd
coverage: xdebug
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PHPUnit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
- uses: actions/checkout@v1
- uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
tools: pecl
extensions: amqp
coverage: xdebug
- uses: php-actions/composer@v5
with:
php_version: '8.2'
php_version: '8.3'
- name: PHPUnit
run: |
php vendor/bin/phpunit -v --coverage-clover clover-coverage.xml --coverage-html coverage_html --log-junit coverage_html/junit.xml
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 3135d3e

Please sign in to comment.