From 906745196469b13ceefa6523ef04851a78ad10f4 Mon Sep 17 00:00:00 2001 From: flack Date: Sun, 1 Sep 2019 19:49:46 +0200 Subject: [PATCH] Define constants via autoloader, otherwise instantiating creator classes can be unreliable --- composer.json | 3 ++- lib/UniversalFeedCreator.php | 10 ---------- lib/constants.php | 10 ++++++++++ 3 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 lib/constants.php diff --git a/composer.json b/composer.json index de395b4..57b1b0c 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "php": ">=5.0" }, "autoload": { - "classmap": ["lib"] + "classmap": ["lib"], + "files": ["lib/constants.php"] }, "require-dev": { "phpunit/phpunit": "*" diff --git a/lib/UniversalFeedCreator.php b/lib/UniversalFeedCreator.php index 3095640..4b7afe6 100644 --- a/lib/UniversalFeedCreator.php +++ b/lib/UniversalFeedCreator.php @@ -1,14 +1,4 @@