Author: fabien
Date: 2010-01-19 20:30:04 +0100 (Tue, 19 Jan 2010)
New Revision: 26900
Modified:
branches/2.0/src/Symfony/Components/DependencyInjection/Container.php
branches/2.0/src/Symfony/Components/DependencyInjection/Loader/YamlFileLoader.php
branches/2.0/src/Symfony/Foundation/UniversalClassLoader.php
Log:
Merge branch 'master' of git://github.com/symfony/symfony
Modified: branches/2.0/src/Symfony/Components/DependencyInjection/Container.php
===================================================================
--- branches/2.0/src/Symfony/Components/DependencyInjection/Container.php
2010-01-19 19:29:10 UTC (rev 26899)
+++ branches/2.0/src/Symfony/Components/DependencyInjection/Container.php
2010-01-19 19:30:04 UTC (rev 26900)
@@ -189,6 +189,11 @@
*/
public function getService($id, $invalidBehavior =
self::EXCEPTION_ON_INVALID_REFERENCE)
{
+ if (!is_string($id))
+ {
+ throw new \InvalidArgumentException(sprintf('A service id should be a
string (%s given).', str_replace("\n", '', var_export($id, true))));
+ }
+
if (isset($this->services[$id]))
{
return $this->services[$id];
Modified:
branches/2.0/src/Symfony/Components/DependencyInjection/Loader/YamlFileLoader.php
===================================================================
---
branches/2.0/src/Symfony/Components/DependencyInjection/Loader/YamlFileLoader.php
2010-01-19 19:29:10 UTC (rev 26899)
+++
branches/2.0/src/Symfony/Components/DependencyInjection/Loader/YamlFileLoader.php
2010-01-19 19:30:04 UTC (rev 26900)
@@ -95,7 +95,7 @@
else
{
// try to detect loader with the extension
- switch (pathinfo((string) $import['resource'], PATHINFO_EXTENSION))
+ switch (pathinfo($import['resource'], PATHINFO_EXTENSION))
{
case 'xml':
$class =
'Symfony\\Components\\DependencyInjection\\Loader\\XmlFileLoader';
Modified: branches/2.0/src/Symfony/Foundation/UniversalClassLoader.php
===================================================================
--- branches/2.0/src/Symfony/Foundation/UniversalClassLoader.php
2010-01-19 19:29:10 UTC (rev 26899)
+++ branches/2.0/src/Symfony/Foundation/UniversalClassLoader.php
2010-01-19 19:30:04 UTC (rev 26900)
@@ -36,7 +36,7 @@
* ));
*
* // register a library using the PEAR naming convention
- * $loader->registerClasses(array(
+ * $loader->registerPrefixes(array(
* 'Swift_' => __DIR__.'/Swift',
* ));
*
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.