Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-593 - added composer audit workflow implementation #63

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/composerAudit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on: [push]
name: Composer Audit Check
jobs:
composer-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read the current used PHP Version
id: get-php-version
run: echo "::set-output name=version $(head -n1 .php-version)"
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ steps.get-php-version.outputs.version }}
tools: pecl, composer:2

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-scripts --no-dev

- run: composer audit
2 changes: 1 addition & 1 deletion src/AkeneoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public function getCategories(string $rootCode): CategoryItem;
/**
* @throws AkeneoApiException
*/
public function triggerUpdate(string $identifier, string $message = null): void;
public function triggerUpdate(string $identifier, ?string $message = null): void;
}
2 changes: 1 addition & 1 deletion src/AkeneoApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class AkeneoApiException extends \Exception
{
protected function __construct(string $message = '', \Throwable $previous = null)
protected function __construct(string $message = '', ?\Throwable $previous = null)
{
parent::__construct($message, 0, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/CachedSymfonyHttpClientAkeneoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getCategories(string $rootCode): CategoryItem
return $item;
}

public function triggerUpdate(string $identifier, string $message = null): void
public function triggerUpdate(string $identifier, ?string $message = null): void
{
$this->decorated->triggerUpdate($identifier);
}
Expand Down
2 changes: 1 addition & 1 deletion src/SymfonyHttpClientAkeneoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function getCategories(string $rootCode): CategoryItem
/**
* @throws AkeneoApiException
*/
public function triggerUpdate(string $identifier, string $message = null): void
public function triggerUpdate(string $identifier, ?string $message = null): void
{
$this->assertProductExists($identifier);

Expand Down
Loading