From 16663d559e30e322910792a480ebba5d30a5c932 Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Wed, 25 Oct 2023 19:02:54 +0330 Subject: [PATCH 1/2] WIP --- src/Models/Resource.php | 1 + src/Services/AliciaService.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Models/Resource.php b/src/Models/Resource.php index 5ac7f6c..73930d0 100644 --- a/src/Models/Resource.php +++ b/src/Models/Resource.php @@ -37,6 +37,7 @@ */ class Resource extends Model { + // TODO: model attributes is not documented use FFMpegPreConfig; /** diff --git a/src/Services/AliciaService.php b/src/Services/AliciaService.php index 3a3b187..0d80ac4 100644 --- a/src/Services/AliciaService.php +++ b/src/Services/AliciaService.php @@ -51,7 +51,7 @@ public function batch(array $files): self * * @param UploadedFile $file * - * @throws AliciaException () + * @throws AliciaException * * @return self */ @@ -67,7 +67,7 @@ public function upload(UploadedFile $file): self * * @param string $file * - * @throws AliciaException () + * @throws AliciaException * * @return self */ @@ -83,7 +83,7 @@ public function external(string $file): self * * @param array|null $resolutions * - * @throws AliciaException|InvalidManipulation + * @throws InvalidManipulation * * @return AliciaService */ @@ -107,7 +107,7 @@ public function export(array $resolutions = null): self } /** - * Make a internal resource to external using given link. + * Make an internal resource to external using given link. * * @param resource $model * @param string $url From cd6dc720d902e6d41668a4e3e331e5934e7cefde Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Wed, 25 Oct 2023 19:06:22 +0330 Subject: [PATCH 2/2] Update php.yml --- .github/workflows/php.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 20252d9..26cb7dc 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -1,10 +1,6 @@ name: PHP Composer -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] +on: [push, pull_request] permissions: contents: read @@ -12,15 +8,23 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + php: [ 8.1, 8.2, 8.3 ] + dependency-version: [ prefer-stable ] + + name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: ${{ matrix.php }} extensions: xdebug ini-values: xdebug.mode="coverage" coverage: xdebug @@ -34,14 +38,16 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate --strict - - name: Cache Composer packages + - name: Get Composer cache directory id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache Composer packages uses: actions/cache@v3 with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- + path: ${{ steps.composer-cache.outputs.dir }} + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Install dependencies run: composer install --prefer-dist --no-progress @@ -54,6 +60,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml - flags: unittests - name: alicia-codecov fail_ci_if_error: true