Am 03.10.2011 14:08, schrieb Ivan Habunek:
I have removed the offending line in trunk.
Regards,
Ivan
2011/10/3 Ivan Habunek<[email protected]>:
On 3.10.2011. 7:54, Christian Grobmeier wrote:
The only thing to think about is backwards compatibility. Two options:
1) don't care on bc and remove the line
2) add an optional param to createObject, like: createObject($class,
[$usingNamespace]);
3) Stop using createObject because it only obfuscates code? :)
I'm not a fan of that method. Why is:
$obj = ReflectionUtils::createObject($class);
better than:
$obj = new $class();
?
And it can silently do nothing if $class is empty (as twitter users would
say: #fail). :)
I would prefer #1, b/c would introduce a param for a php version we
currently don't support.
Ivan, what do you think?
I agree that we can do #1 right away. All tests pass without problem.
Anyway, basename() is meant to be used on file paths, not on class names.
The only reason it works is because "\" is the delimiter for both namespaces
and the windows file system.
Florian, just a heads-up. I'm in the middle of rewriting the whole
configurator part of log4php. In other words, there will be substantial
changes, and soon. If you're interested in a preview have a look here:
https://svn.apache.org/repos/asf/logging/log4php/branches/experimental/config-adapters
Regards,
Ivan
thanks for this preview.
I think I will create an experimental branch for the log4php-bundle too.
FYI:
Master branch on GitHub: https://github.com/floriansemm/Log4PhpBundle
FS