From cbf0a9b0eab961d2859997e3f47e24848fd762d1 Mon Sep 17 00:00:00 2001 From: Bill Date: Thu, 14 Dec 2017 15:56:12 -0800 Subject: [PATCH 1/2] updates for php 7.2 --- src/Attachment.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Attachment.php b/src/Attachment.php index c2c29ab..ef09869 100644 --- a/src/Attachment.php +++ b/src/Attachment.php @@ -2,14 +2,14 @@ namespace Codesleeve\Stapler; -use Codesleeve\Stapler\Interfaces\Attachment as AttachmentInterface; -use Codesleeve\Stapler\Interfaces\Interpolator as InterpolatorInterface; -use Codesleeve\Stapler\Interfaces\Resizer as ResizerInterface; -use Codesleeve\Stapler\Interfaces\Storage as StorageInterface; +use DateTime; +use JsonSerializable; use Codesleeve\Stapler\ORM\StaplerableInterface; use Codesleeve\Stapler\Factories\File as FileFactory; -use JsonSerializable; -use DateTime; +use Codesleeve\Stapler\Interfaces\Resizer as ResizerInterface; +use Codesleeve\Stapler\Interfaces\Storage as StorageInterface; +use Codesleeve\Stapler\Interfaces\Attachment as AttachmentInterface; +use Codesleeve\Stapler\Interfaces\Interpolator as InterpolatorInterface; class Attachment implements AttachmentInterface, JsonSerializable { @@ -386,7 +386,7 @@ public function originalFilename() */ public function getInstanceClass() { - return get_class($this->instance); + return is_null($this->instance) ? null : get_class($this->instance); } /** From d4ce11f8e33c2e3c3587cd7a0b3741f0fffd8f13 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 10 Jul 2018 18:55:24 -0700 Subject: [PATCH 2/2] add support for symfony/http-foundation 4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5c696ef..45df16f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "require": { "php": ">=5.4", - "symfony/http-foundation": "~2.3|~3.0", + "symfony/http-foundation": "~2.3|~3.0|~4.0", "imagine/imagine": "~0.6.2", "doctrine/inflector": "~1" },