Skip to content

Commit 9067451

Browse files
committed
Define constants via autoloader, otherwise instantiating creator classes can be unreliable
1 parent 72c6af2 commit 9067451

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"php": ">=5.0"
1616
},
1717
"autoload": {
18-
"classmap": ["lib"]
18+
"classmap": ["lib"],
19+
"files": ["lib/constants.php"]
1920
},
2021
"require-dev": {
2122
"phpunit/phpunit": "*"

lib/UniversalFeedCreator.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
<?php
2-
// your local timezone, set to "" to disable or for GMT
3-
if (!defined('TIME_ZONE')) {
4-
define("TIME_ZONE", date("O", time()));
5-
}
6-
7-
/**
8-
* Version string.
9-
*/
10-
define("FEEDCREATOR_VERSION", "FeedCreator 1.8");
11-
122
/**
133
* UniversalFeedCreator lets you choose during runtime which
144
* format to build.

lib/constants.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
// your local timezone, set to "" to disable or for GMT
3+
if (!defined('TIME_ZONE')) {
4+
define("TIME_ZONE", date("O", time()));
5+
}
6+
7+
/**
8+
* Version string.
9+
*/
10+
define("FEEDCREATOR_VERSION", "FeedCreator 1.8");

0 commit comments

Comments
 (0)