Skip to content

Commit

Permalink
Define constants via autoloader, otherwise instantiating creator clas…
Browse files Browse the repository at this point in the history
…ses can be unreliable
  • Loading branch information
flack committed Sep 1, 2019
1 parent 72c6af2 commit 9067451
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"php": ">=5.0"
},
"autoload": {
"classmap": ["lib"]
"classmap": ["lib"],
"files": ["lib/constants.php"]
},
"require-dev": {
"phpunit/phpunit": "*"
Expand Down
10 changes: 0 additions & 10 deletions lib/UniversalFeedCreator.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
<?php
// your local timezone, set to "" to disable or for GMT
if (!defined('TIME_ZONE')) {
define("TIME_ZONE", date("O", time()));
}

/**
* Version string.
*/
define("FEEDCREATOR_VERSION", "FeedCreator 1.8");

/**
* UniversalFeedCreator lets you choose during runtime which
* format to build.
Expand Down
10 changes: 10 additions & 0 deletions lib/constants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
// your local timezone, set to "" to disable or for GMT
if (!defined('TIME_ZONE')) {
define("TIME_ZONE", date("O", time()));
}

/**
* Version string.
*/
define("FEEDCREATOR_VERSION", "FeedCreator 1.8");

0 comments on commit 9067451

Please sign in to comment.