From 9bd56a93d6ba1f33cb2c95122db65495f5486814 Mon Sep 17 00:00:00 2001 From: frkcn Date: Thu, 20 Feb 2025 15:50:10 +0300 Subject: [PATCH] Add support for Laravel 12 and PHP 8.4; update workflows and dependencies --- .github/workflows/tests.yml | 60 +++++++++++++++++++++++++++++++------ .gitignore | 2 ++ .phpunit.cache/test-results | 1 - CHANGELOG.md | 3 ++ README.md | 2 +- composer.json | 6 ++-- 6 files changed, 60 insertions(+), 14 deletions(-) delete mode 100644 .phpunit.cache/test-results diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b8d90f..02df587 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,46 +4,88 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-latest + strategy: fail-fast: true matrix: - php: [7.3, 7.4, '8.0', 8.1, 8.2, 8.3] - laravel: [6, 7, 8, 9, 10, 11] + php: [7.3, 7.4, '8.0', 8.1, 8.2, 8.3, 8.4] + laravel: [6, 7, 8, 9, 10, 11, 12] exclude: - php: 7.3 laravel: 9 - php: 7.3 laravel: 10 + - php: 7.3 + laravel: 11 + - php: 7.3 + laravel: 12 - php: 7.4 laravel: 9 - php: 7.4 laravel: 10 + - php: 7.4 + laravel: 11 + - php: 7.4 + laravel: 12 - php: '8.0' laravel: 10 + - php: '8.0' + laravel: 11 + - php: '8.0' + laravel: 12 - php: 8.1 laravel: 6 - php: 8.1 laravel: 7 + - php: 8.1 + laravel: 11 + - php: 8.1 + laravel: 12 - php: 8.2 laravel: 6 - php: 8.2 laravel: 7 - php: 8.2 laravel: 8 + - php: 8.3 + laravel: 6 + - php: 8.3 + laravel: 7 + - php: 8.3 + laravel: 8 + - php: 8.3 + laravel: 9 + - php: 8.4 + laravel: 6 + - php: 8.4 + laravel: 7 + - php: 8.4 + laravel: 8 + - php: 8.4 + laravel: 9 + - php: 8.4 + laravel: 10 - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} steps: - - name: Checkout the code - uses: actions/checkout@v1 + - name: Checkout the code + uses: actions/checkout@v4 - - name: Disable Xdebug - run: sudo phpdismod xdebug + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, pcntl, zip + ini-values: error_reporting=E_ALL + tools: composer:v2 + coverage: none - name: Install dependencies - run: composer install --no-progress --no-ansi --profile --no-interaction --no-scripts --no-suggest --prefer-dist + run: | + composer require "illuminate/support:${{ matrix.laravel }}" --no-update + composer update --prefer-dist --no-interaction --no-progress --no-suggest - name: Execute tests run: vendor/bin/phpunit --testdox --colors=always --exclude-group skipped diff --git a/.gitignore b/.gitignore index a70fee8..70b1a4a 100755 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ coverage /.idea /phpunit.xml .phpunit.result.cache +/.phpunit.cache +.DS_Store diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results deleted file mode 100644 index f1eff96..0000000 --- a/.phpunit.cache/test-results +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"defects":[],"times":{"TarfinLabs\\EasyPdf\\Tests\\MergeTest::it_can_merge_multiple_files_into_one_file":0.1,"TarfinLabs\\EasyPdf\\Tests\\MergeTest::it_can_add_watermark_into_the_file":0.109,"TarfinLabs\\EasyPdf\\Tests\\ParserTest::it_can_return_pdf_page_count":0.003,"TarfinLabs\\EasyPdf\\Tests\\ParserTest::it_can_use_pdf_content_as_a_parameter":0.001,"TarfinLabs\\EasyPdf\\Tests\\ParserTest::it_can_parse_pdf_by_page":0.003,"TarfinLabs\\EasyPdf\\Tests\\ParserTest::it_can_return_pdf_content":0.003,"TarfinLabs\\EasyPdf\\Tests\\ParserTest::it_can_split_one_file_to_multiple_files":0.011,"TarfinLabs\\EasyPdf\\Tests\\PdfTest::it_can_convert_html_to_pdf":0.004}} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a8e20f..e3d39b9 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to `easy-pdf` will be documented in this file. ## [Unreleased] +## 2.11.0 - 2025-02-10 +- Laravel 12 and PHP 8.4 support added. + ## 2.10.1 - 2024-10-10 - Fix re-defining `K_PATH_IMAGES` constant bug. diff --git a/README.md b/README.md index b294c1b..bf953ec 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Total Downloads](https://img.shields.io/packagist/dt/tarfin-labs/easy-pdf.svg?style=flat-square)](https://packagist.org/packages/tarfin-labs/easy-pdf) ## Introduction -easy-pdf is a [tcpdf](https://tcpdf.org/) wrapper for Laravel 6.x, 7.x, 8.x, 9.x, 10.x, 11.x. +easy-pdf is a [tcpdf](https://tcpdf.org/) wrapper for Laravel 6.x, 7.x, 8.x, 9.x, 10.x, 11.x., 12.x. ## Installation diff --git a/composer.json b/composer.json index 8822e29..6acc891 100755 --- a/composer.json +++ b/composer.json @@ -21,15 +21,15 @@ } ], "require": { - "php": "^7.3|^8.0|^8.1|^8.2|^8.3", - "illuminate/support": "6.11.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "php": "^7.3|^8.0|^8.1|^8.2|^8.3|^8.4", + "illuminate/support": "6.11.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", "setasign/fpdi-tcpdf": "^2.2", "tecnickcom/tcpdf": "^6.3", "ext-fileinfo": "*" }, "require-dev": { "mockery/mockery": "^1.3", - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0", "phpunit/phpunit": "^9.0|^10.0" }, "autoload": {