Development

Changeset 30266

You must first sign up to be able to contribute.

Changeset 30266

Show
Ignore:
Timestamp:
07/16/10 20:45:07 (3 years ago)
Author:
fabien
Message:

Merge branch 'master' of git://github.com/symfony/symfony

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/src/Symfony/Bundle/DoctrineMongoDBBundle/DependencyInjection/MongoDBExtension.php

    r30263 r30266  
    3939    public function mongodbLoad($config, ContainerBuilder $container) 
    4040    { 
    41         $loader = new XmlFileLoader($container, __DIR__.'/../Resources/config'); 
    42         $loader->load($this->resources['mongodb']); 
    43  
    4441        if (!$container->hasDefinition('doctrine.odm.mongodb.document_manager')) { 
     42            $loader = new XmlFileLoader($container, __DIR__.'/../Resources/config'); 
     43            $loader->load($this->resources['mongodb']); 
    4544 
    4645            $container->setParameter('doctrine.odm.mongodb.mapping_dirs', $this->findBundleSubpaths('Resources/config/doctrine/metadata', $container)); 
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/application/xml/Kernel.php

    r30181 r30266  
    66use Symfony\Components\DependencyInjection\Loader\XmlFileLoader as ContainerLoader; 
    77use Symfony\Components\Routing\Loader\XmlFileLoader as RoutingLoader; 
     8use Symfony\Components\DependencyInjection\ContainerBuilder; 
    89 
    910use Symfony\Framework\Bundle\KernelBundle; 
     
    5152    public function registerContainerConfiguration() 
    5253    { 
    53         $loader = new ContainerLoader($this->getBundleDirs()); 
     54        $container = new ContainerBuilder(); 
     55        $loader = new ContainerLoader($container, $this->getBundleDirs()); 
     56        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.xml'); 
    5457 
    55         return $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.xml')
     58        return $container
    5659    } 
    5760 
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/application/yaml/Kernel.php

    r30181 r30266  
    66use Symfony\Components\DependencyInjection\Loader\YamlFileLoader as ContainerLoader; 
    77use Symfony\Components\Routing\Loader\YamlFileLoader as RoutingLoader; 
     8use Symfony\Components\DependencyInjection\ContainerBuilder; 
    89 
    910use Symfony\Framework\Bundle\KernelBundle; 
     
    5152    public function registerContainerConfiguration() 
    5253    { 
    53         $loader = new ContainerLoader($this->getBundleDirs()); 
     54        $container = new ContainerBuilder(); 
     55        $loader = new ContainerLoader($container, $this->getBundleDirs()); 
     56        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 
    5457 
    55         return $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml')
     58        return $container
    5659    } 
    5760 
  • branches/2.0/src/Symfony/Components/BrowserKit/Client.php

    r29950 r30266  
    177177     * @param string  $uri           The URI to fetch 
    178178     * @param array   $parameters    The Request parameters 
    179      * @param array   $headers       The headers 
    180179     * @param array   $files         The files 
    181      * @param array   $server        The server parameters 
     180     * @param array   $server        The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does) 
    182181     * @param Boolean $changeHistory Whether to update the history or not (only used internally for back(), forward(), and reload()) 
    183182     * 
    184183     * @return Symfony\Components\DomCrawler\Crawler 
    185184     */ 
    186     public function request($method, $uri, array $parameters = array(), array $headers = array(), array $files = array(), array $server = array(), $changeHistory = true) 
     185    public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $changeHistory = true) 
    187186    { 
    188187        $uri = $this->getAbsoluteUri($uri); 
  • branches/2.0/src/Symfony/Components/Console/Input/InputDefinition.php

    r29558 r30266  
    6868    public function setArguments($arguments = array()) 
    6969    { 
    70         $this->arguments     = array(); 
    71         $this->requiredCount = 0; 
    72         $this->hasOptional   = false; 
     70        $this->arguments          = array(); 
     71        $this->requiredCount      = 0; 
     72        $this->hasOptional        = false; 
     73        $this->hasAnArrayArgument = false; 
    7374        $this->addArguments($arguments); 
    7475    } 
  • branches/2.0/src/Symfony/Components/DependencyInjection/Dumper/PhpDumper.php

    r30263 r30266  
    8787    { 
    8888        $class = $this->dumpValue($definition->getClass()); 
     89 
     90        if (0 === strpos($class, "'") && !preg_match('/^\'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\'$/', $class)) { 
     91            throw new \InvalidArgumentException(sprintf('"%s" is not a valid class name.', $class)); 
     92        } 
    8993 
    9094        $arguments = array(); 
  • branches/2.0/src/Symfony/Framework/Bundle/Bundle.php

    r30263 r30266  
    123123    public function registerCommands(Application $application) 
    124124    { 
    125         if (!is_dir($dir = $this->getPath().'/Command')) { 
     125        if (!$dir = realpath($this->getPath().'/Command')) { 
    126126            return; 
    127127        } 
     
    130130        $finder->files()->name('*Command.php')->in($dir); 
    131131 
    132         $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command\\'; 
     132        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command'; 
    133133        foreach ($finder as $file) { 
    134             $r = new \ReflectionClass($prefix.basename($file, '.php')); 
     134            $r = new \ReflectionClass($prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php')); 
    135135            if ($r->isSubclassOf('Symfony\\Components\\Console\\Command\\Command') && !$r->isAbstract()) { 
    136136                $application->addCommand($r->newInstance()); 
  • branches/2.0/src/Symfony/Framework/bootstrap.php

    r30263 r30266  
    7676    public function registerCommands(Application $application) 
    7777    { 
    78         if (!is_dir($dir = $this->getPath().'/Command')) { 
     78        if (!$dir = realpath($this->getPath().'/Command')) { 
    7979            return; 
    8080        } 
     
    8383        $finder->files()->name('*Command.php')->in($dir); 
    8484 
    85         $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command\\'; 
     85        $prefix = $this->namespacePrefix.'\\'.$this->name.'\\Command'; 
    8686        foreach ($finder as $file) { 
    87             $r = new \ReflectionClass($prefix.basename($file, '.php')); 
     87            $r = new \ReflectionClass($prefix.strtr($file->getPath(), array($dir => '', '/' => '\\')).'\\'.basename($file, '.php')); 
    8888            if ($r->isSubclassOf('Symfony\\Components\\Console\\Command\\Command') && !$r->isAbstract()) { 
    8989                $application->addCommand($r->newInstance());