Commit Graph

2835 Commits

Author SHA1 Message Date
Sam Minnée
5062bb8ff5 Merge pull request #533 from halkyon/supress_mkdir_temp
BUGFIX Supress mkdir() when attempting to create a temp folder, instead
2012-06-14 16:53:54 -07:00
Sean Harvey
105986392b BUGFIX Supress mkdir() when attempting to create a temp folder, instead
of the variable. This gives a nicer error in the installer.
2012-06-15 11:48:42 +12:00
Marcus Nyeholt
77099ddf9d BUGFIX Moved initialisation of injector to the start of Core.php to make sure that it is initialised correctly before additional code blocks reference it (in particular some of the code introduced by Sam that is triggered during add_extension). 2012-06-14 20:28:20 +10:00
Sam Minnee
114ebb6953 API CHANGE: Don't have any instance caching in singleton(), rely on Injector for this. 2012-06-11 22:41:12 +12:00
Sam Minnee
f65a7c6b21 API CHANGE: Remove dodgy DataObject::destroy() behaviour, opting instead for using PHP5.3's garbage collector. 2012-06-11 22:41:12 +12:00
Sam Minnée
f8921f7c9f Merge pull request #500 from nyeholt/injector_strong_create
RECOMMIT This is a recommit of a previously merged, but reverted, commit...
2012-06-04 15:32:19 -07:00
Marcus Nyeholt
82a1e7d282 MINOR Use injector for creating Member_GroupSet object
MINOR Use injector for creating many many list objects

MINOR Use injector for creating objects from within the DataList

MINOR Use Injector::inst() for creating objects; cannot rely on this->injector being present due to many classes being created with 'new', so use inst() directly

MINOR Remove injector autoset property for now; automatically setting it breaks a few test cases that don't know about it for now, and it's not needed just yet
2012-06-05 01:33:44 +10:00
Marcus Nyeholt
ae7fc6f4d2 RECOMMIT This is a recommit of a previously merged, but reverted, commit. The initial commit had problems when running "tests/all flush=all" when dev/build would re-analyse a bunch of stuff; fixes to address this went into https://github.com/silverstripe/sapphire/pull/487, but for some reason the actual base changes didn't, so I'm re-submitting them in a separate pull.
BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through

CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-06-03 20:41:00 +10:00
Sean Harvey
c3eabffcb9 MINOR Use shorthand {class}::get() syntax instead of DataList::create()
in core code.
2012-05-28 21:13:42 +12:00
Sean Harvey
29e04a1049 Revert "BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through"
This reverts commit 5eaca340b4.
2012-05-23 09:52:57 +12:00
Marcus Nyeholt
5eaca340b4 BUGFIX Versioned's constructor doesn't provide suitable defaults. Previously a bug/feature in singleton, where it would pass null,true as params to strong_create, which would then get passed through as params to Versioned's constructor, meant that the code still executed fine (as was set to something that wasn't an array, so the null and true were instead taken as args). The fact that the usage of singleton(Versioned) never really used the classes code, purely for value lookup, meant that this never propagated errors. I've now switched singleton() to use the injector for retrieving values, which means these dud values are no longer passed through
CHANGE Given that Config::inst is an implementation of the singleton pattern itself, I've removed the extra call to singleton(). A side effect of this is that it gets around a possibly nasty circular reference with the dependency injector (which relies on the config object); in future, this dependency structure should really be structured from the DI directly.

MINOR Change singleton and strong_create to use dependency injector
2012-05-22 19:09:35 +10:00
Hamish Friedlander
18ddae3375 BUGFIX: Make config yaml fragments merge following the same rules as other config sources 2012-05-19 14:37:32 +12:00
Sam Minnee
1e47b0fbd3 BUGFIX: Don't include ._-prefixed config files. 2012-05-18 16:15:14 +12:00
Marcus Nyeholt
b269badfbe FEATURE: Added dependency injector for managing creation of new objects and their dependencies.
API CHANGE: Pass Object::create() calls to Injector::create().
API CHANGE: Add "RequestProcessor" injection point in Director, that Director will call preRequest() and postRequest() on.
2012-05-18 12:39:57 +12:00
Sean Harvey
6f672e5f36 MINOR Fixing use of <% control %> with <% with %> or <% loop %> as necessary. 2012-05-11 13:49:20 +12:00
Ingo Schommer
1671b9c65c BUGFIX Checking for mbstring PHP extension support in installer, as it has been a documented installation requirement for a while. Removing method_exists() checks from mbstring usage in core for the same reasons 2012-05-09 10:25:31 +02:00
Sean Harvey
051d9de482 API CHANGE Deprecated internal access to SQLQuery properties, update core code to reflect these changes.
Using set/add instead in accessor methods, and use Database::sql*ToString() to allow easier per-database adapter SQL overloading.
2012-05-07 14:21:44 +12:00
Sean Harvey
5702007da1 MINOR Fixing comment to be more concise. 2012-05-04 11:11:36 +12:00
Ingo Schommer
20a837947f MINOR Using PHP version constants rather than version_compare() in Object::static_lookup(), since its called 10k times on an average CMS load that makes a difference of about 3% (with APC) 2012-05-04 00:26:09 +02:00
Ingo Schommer
431b9589b6 BUGFIX Fixed arguments in global _t() function, added check for $returnValue fallback that its not the injection array as second parameter 2012-05-01 22:17:01 +02:00
Julian Seidenberg
523c19e88a BUGFIX: fixing core error that occurs when there are two or more proxy servers in front of the SilverStripe application server 2012-04-27 11:03:05 +02:00
Julian Seidenberg
e486ec41e0 MINOR: updating documentation to use "Simple" theme 2012-04-24 15:57:27 +12:00
Will Rossiter
585417d141 Merge pull request #343 from halkyon/object_static_remove_deprecation
BUGFIX Remove calls to deprecated Object static methods, update ConfigTest
2012-04-19 14:41:45 -07:00
Sean Harvey
4cf8db3ee4 ENHANCEMENT Remove use of deprecated extraStatics in core files 2012-04-19 08:37:51 +12:00
Sean Harvey
4c6be2931b BUGFIX Removing use of deprecated Object static functions like
get_static(), set_static(), uninherited() etc. Replace with equivalent
Config system get(), update()
2012-04-18 23:10:57 +12:00
Andrew O'Neil
14c0796617 MINOR: Remove checks for PHP < 5.3.2, as it's no longer supported 2012-04-18 10:38:09 +12:00
Sam Minnee
cc7a012139 BUGFIX: Use the copy of symfony-yaml bundled with Zend_Translate to prevent class conflicts. Remove now-unnecessary symonfy-yaml thirdparty lib. 2012-04-18 09:34:57 +12:00
Mateusz Uzdowski
705a29d00a BUGFIX: fix the ClassInfo::allClasses to fetch manifest data directly 2012-04-17 14:46:07 +12:00
Sean Harvey
5f73643e3f BUGFIX Hardcoding locales in installer, because we can't include i18n
properly, and including core/Core.php is too much.
2012-04-17 11:02:18 +12:00
Sean Harvey
ad2a21cc92 API CHANGE getSysTempDir() is now deprecated, use sys_get_temp_dir()
instead!
2012-04-17 10:53:41 +12:00
Sean Harvey
3ff6002936 ENHANCEMENT Always use sys_get_temp_dir() which will return the system
temp folder for PHP 5.2+, since we don't support older versions we don't
need to patch around this any longer.
2012-04-17 10:53:40 +12:00
Mateusz Uzdowski
b34be8190e BUGFIX: normalise the config file, PCRE does not handle Windows/Mac linebreaks (os7133) 2012-04-16 14:32:37 +12:00
Ingo Schommer
d44f6b3e1f MINOR Removed deprecated usage of $priority argument in _t() calls 2012-04-15 17:17:17 +02:00
Ingo Schommer
bd23a07bba API CHANGE Using Zend_Translate with YAML translation files, replacing the $lang global and PHP files in the /lang folders. 2012-04-15 17:17:15 +02:00
Ingo Schommer
0a0be63ee2 ENHANCEMENT Added $exclusive flag to SS_ClassLoader->pushManifest() to allow for multiple manifests co-existing (useful for tests which rely on core classes but also want to test their own manifests) 2012-04-15 17:17:15 +02:00
Stig Lindqvist
5e79e81b31 MINOR ConfigManifest cache fixes
- Do not skip the cache if there are currently no environmental specific spec, just use the an empty variantKeySpec.
- When doing a regeneration of the config, clear the previous values from the array before regeneration.
2012-04-15 17:13:28 +02:00
Simon Welsh
f07258f3cf MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Simon Welsh
3a6341a251 API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
Simon Welsh
f8082e4814 MINOR Add newline to end of files without one 2012-04-15 10:50:19 +12:00
Sean Harvey
6db8f85450 API CHANGE Enable E_STRICT, but include DebugView, Log classes as these are not always guaranteed to be loaded by ClassLoader at the time a strict error is issued. 2012-04-13 13:23:26 +12:00
Sean Harvey
aa14a5191e MINOR Temporarily disabled E_STRICT until we can solve Debug issues with
SS error handler
2012-04-13 12:03:01 +12:00
Sean Harvey
4c1aba8542 BUGFIX Object::get_extensions() is now declared as static, as it was
never an instance method
2012-04-12 12:02:13 +12:00
Sean Harvey
630bfcc823 MINOR error_reporting() now defaults to E_ALL | E_STRICT which means
strict errors are now reported *unless* the site is in live mode (which
supresses everything except fatal errors and warnings)
2012-04-12 12:01:15 +12:00
Ingo Schommer
e045ffeb29 Merge pull request #205 from AngryPHPNerd/sapphire
---

In SS-2.4 you can prefix files with an underscore to exclude them from manifest this can be useful for backups of old classes or huge data files.

I think this behaviour should be readded.

(I will add a unit test for this ...)
2012-04-11 17:32:34 +02:00
Sam Minnee
213a08aac7 BUGFIX: Ensure site works if executed in a chrooted enviornment where BASE_PATH is '/'. (#4069) 2012-04-11 10:30:34 +12:00
Sean Harvey
2f1b7c1c71 MINOR Removed references to ereg as comments 2012-04-10 22:19:17 +12:00
Ingo Schommer
40d73127ae MINOR Using late static binding instead of Object::create() calls 2012-04-04 17:10:31 +02:00
Ingo Schommer
6517f4496b Merge pull request #273 from ajoneil/sapphire
---

This allows DataList::create(SiteTree) as equivalent to Object::create(DataList, SiteTree), without
having to have a create() function on DataList.

Required for E_STRICT compliance, as child classes cant override create() if they change the arguments.

DBField::create() is also renamed to DBField::create_field(), as this does not just call the constructor, which all other cases of create() do.

Conflicts:
	tests/model/DateTest.php
	tests/model/DatetimeTest.php
2012-04-04 16:48:16 +02:00
Sean Harvey
dbc4be3e94 API CHANGE Removed Services_JSON library, as we use the built-in json functions instead. 2012-03-31 13:20:19 +13:00
Sean Harvey
8ae474b182 API CHANGE Remove use of Services_JSON and replace with json_encode() and json_decode()
API CHANGE Convert::json2array() will convert nested JSON structures to array as well for easier traversal, instead of array with nested objects.
2012-03-31 13:17:36 +13:00