From 904e72c7367910490941131391d80d0d11cd0288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Turan=20Karatu=C4=9F?= Date: Thu, 10 Oct 2024 15:50:46 +0300 Subject: [PATCH 1/5] Check if constant is already defined before. --- src/EasyPdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EasyPdf.php b/src/EasyPdf.php index 539d54b..40e7267 100755 --- a/src/EasyPdf.php +++ b/src/EasyPdf.php @@ -45,7 +45,7 @@ class EasyPdf */ public function __construct(?string $imagePath = null) { - if ($imagePath !== null) { + if ($imagePath !== null && !defined('K_PATH_IMAGES')) { define('K_PATH_IMAGES', $imagePath); } From 2ab619df163d4ed8c7b01398719bf036ec71d7ce Mon Sep 17 00:00:00 2001 From: Faruk Can Date: Thu, 10 Oct 2024 15:51:14 +0300 Subject: [PATCH 2/5] Apply fixes from StyleCI (#23) --- src/EasyPdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EasyPdf.php b/src/EasyPdf.php index 40e7267..04fcbfc 100755 --- a/src/EasyPdf.php +++ b/src/EasyPdf.php @@ -45,7 +45,7 @@ class EasyPdf */ public function __construct(?string $imagePath = null) { - if ($imagePath !== null && !defined('K_PATH_IMAGES')) { + if ($imagePath !== null && ! defined('K_PATH_IMAGES')) { define('K_PATH_IMAGES', $imagePath); } From afded76cc79700c58d4746b2a8e97b2fe6348428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Turan=20Karatu=C4=9F?= Date: Thu, 10 Oct 2024 15:52:41 +0300 Subject: [PATCH 3/5] Update changelog. --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b662d57..9654b65 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to `easy-pdf` will be documented in this file. ## [Unreleased] +## 3.0.1 - 2024-10-10 +- Fix re-defining `K_PATH_IMAGES` constant bug. + ## 3.0.0 - 2024-04-08 - Laravel 11 and PHP 8.3 support added. From c891c0f87c5114005f4b62f19968e11fab4f95fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Turan=20Karatu=C4=9F?= Date: Thu, 10 Oct 2024 16:02:07 +0300 Subject: [PATCH 4/5] Update version numbers in changelog. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9654b65..8a8e20f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,10 @@ All notable changes to `easy-pdf` will be documented in this file. ## [Unreleased] -## 3.0.1 - 2024-10-10 +## 2.10.1 - 2024-10-10 - Fix re-defining `K_PATH_IMAGES` constant bug. -## 3.0.0 - 2024-04-08 +## 2.10.0 - 2024-04-08 - Laravel 11 and PHP 8.3 support added. ## 2.9.0 - 2023-08-16 From 7883c4284824367851d25f1042626b26089f9e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Turan=20Karatu=C4=9F?= Date: Thu, 10 Oct 2024 16:03:59 +0300 Subject: [PATCH 5/5] Add laravel 11 version to the introduction section in readme file. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9691875..b294c1b 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. +easy-pdf is a [tcpdf](https://tcpdf.org/) wrapper for Laravel 6.x, 7.x, 8.x, 9.x, 10.x, 11.x. ## Installation