diff --git a/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php b/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php index b401a71a0efa5..217d564dcbc1c 100755 --- a/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php +++ b/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php @@ -241,6 +241,9 @@ public function ormLoad(array $configs, ContainerBuilder $container) protected function mergeOrmConfig(array $configs, $container) { $supportedEntityManagerOptions = array( + 'proxy_dir' => 'proxy_dir', + 'proxy_namespace' => 'proxy_namespace', + 'auto_generate_proxy_classes' => 'auto_generate_proxy_classes', 'metadata_cache_driver' => 'metadata_cache_driver', 'query_cache_driver' => 'query_cache_driver', 'result_cache_driver' => 'result_cache_driver', diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index 6dac07ec4a2e9..66e32c366fb31 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -70,6 +70,6 @@ public function dump(array $options = array()) $regexes[] = sprintf("%sRewriteCond %%{PATH_INFO} %s\nRewriteRule .* %s [QSA,L,%s]", $conditions, $regex, $options['script_name'], $variables); } - return implode("\n\n", $regexes); + return implode("\n\n", $regexes)."\n"; } } diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index f7387b5fff060..c87364dd7078d 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -101,7 +101,7 @@ public function getOptions() public function setOptions(array $options) { $this->options = array_merge(array( - 'segment_separators' => array('/', '.'), + 'segment_separators' => array('/', '.', '-'), 'text_regex' => '.+?', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ), $options); diff --git a/tests/Symfony/Tests/Component/Routing/CompiledRouteTest.php b/tests/Symfony/Tests/Component/Routing/CompiledRouteTest.php index ad189624c35e6..21c0d18317168 100644 --- a/tests/Symfony/Tests/Component/Routing/CompiledRouteTest.php +++ b/tests/Symfony/Tests/Component/Routing/CompiledRouteTest.php @@ -37,7 +37,7 @@ public function testgetPatterngetDefaultsgetOptionsgetRequirements() $this->assertEquals(array('foo' => 'bar'), $compiled->getDefaults(), '->getDefaults() returns the route defaults'); $this->assertEquals(array('foo' => '\d+'), $compiled->getRequirements(), '->getRequirements() returns the route requirements'); $this->assertEquals(array_merge(array( - 'segment_separators' => array('/', '.'), + 'segment_separators' => array('/', '.', '-'), 'text_regex' => '.+?', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ), array('foo' => 'bar')), $compiled->getOptions(), '->getOptions() returns the route options'); diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache index e9c70c03c33f4..1183cbc66935b 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.apache @@ -2,5 +2,5 @@ RewriteCond %{PATH_INFO} ^/foo/(baz|symfony)$ RewriteRule .* app.php [QSA,L,E=_ROUTING__route:foo,E=_ROUTING_bar:%1,E=_ROUTING_def:test] RewriteCond %{REQUEST_METHOD} ^(GET|head) [NC] -RewriteCond %{PATH_INFO} ^/bar/([^/\.]+?)$ -RewriteRule .* app.php [QSA,L,E=_ROUTING__route:bar,E=_ROUTING_foo:%1] \ No newline at end of file +RewriteCond %{PATH_INFO} ^/bar/([^/\.\-]+?)$ +RewriteRule .* app.php [QSA,L,E=_ROUTING__route:bar,E=_ROUTING_foo:%1] diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php index 303fbdfb09b38..605ea31b634d4 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php @@ -25,7 +25,7 @@ public function match($url) return array_merge($this->mergeDefaults($matches, array ( 'def' => 'test',)), array('_route' => 'foo')); } - if (isset($this->context['method']) && preg_match('#^(GET|head)$#xi', $this->context['method']) && 0 === strpos($url, '/bar') && preg_match('#^/bar/(?P[^/\.]+?)$#x', $url, $matches)) { + if (isset($this->context['method']) && preg_match('#^(GET|head)$#xi', $this->context['method']) && 0 === strpos($url, '/bar') && preg_match('#^/bar/(?P[^/\.\-]+?)$#x', $url, $matches)) { return array_merge($this->mergeDefaults($matches, array ()), array('_route' => 'bar')); } diff --git a/tests/Symfony/Tests/Component/Routing/RouteCompilerTest.php b/tests/Symfony/Tests/Component/Routing/RouteCompilerTest.php index 9421e469d5bd3..231f3593c37ba 100644 --- a/tests/Symfony/Tests/Component/Routing/RouteCompilerTest.php +++ b/tests/Symfony/Tests/Component/Routing/RouteCompilerTest.php @@ -45,7 +45,7 @@ public function provideCompileData() array( 'Route with a variable', array('/foo/{bar}'), - '/foo', '#^/foo/(?P[^/\.]+?)$#x', array('bar' => '{bar}'), array( + '/foo', '#^/foo/(?P[^/\.\-]+?)$#x', array('bar' => '{bar}'), array( array('variable', '/', '{bar}', 'bar'), array('text', '/', 'foo', null), )), @@ -53,7 +53,7 @@ public function provideCompileData() array( 'Route with a variable that has a default value', array('/foo/{bar}', array('bar' => 'bar')), - '/foo', '#^/foo(?:/(?P[^/\.]+?))?$#x', array('bar' => '{bar}'), array( + '/foo', '#^/foo(?:/(?P[^/\.\-]+?))?$#x', array('bar' => '{bar}'), array( array('variable', '/', '{bar}', 'bar'), array('text', '/', 'foo', null), )), @@ -61,7 +61,7 @@ public function provideCompileData() array( 'Route with several variables', array('/foo/{bar}/{foobar}'), - '/foo', '#^/foo/(?P[^/\.]+?)/(?P[^/\.]+?)$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( + '/foo', '#^/foo/(?P[^/\.\-]+?)/(?P[^/\.\-]+?)$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( array('variable', '/', '{foobar}', 'foobar'), array('variable', '/', '{bar}', 'bar'), array('text', '/', 'foo', null), @@ -70,7 +70,7 @@ public function provideCompileData() array( 'Route with several variables that have default values', array('/foo/{bar}/{foobar}', array('bar' => 'bar', 'foobar' => 'foobar')), - '/foo', '#^/foo(?:/(?P[^/\.]+?) (?:/(?P[^/\.]+?) )?)?$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( + '/foo', '#^/foo(?:/(?P[^/\.\-]+?) (?:/(?P[^/\.\-]+?) )?)?$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( array('variable', '/', '{foobar}', 'foobar'), array('variable', '/', '{bar}', 'bar'), array('text', '/', 'foo', null), @@ -79,7 +79,7 @@ public function provideCompileData() array( 'Route with several variables but some of them have no default values', array('/foo/{bar}/{foobar}', array('bar' => 'bar')), - '/foo', '#^/foo/(?P[^/\.]+?)/(?P[^/\.]+?)$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( + '/foo', '#^/foo/(?P[^/\.\-]+?)/(?P[^/\.\-]+?)$#x', array('bar' => '{bar}', 'foobar' => '{foobar}'), array( array('variable', '/', '{foobar}', 'foobar'), array('variable', '/', '{bar}', 'bar'), array('text', '/', 'foo', null), @@ -88,7 +88,7 @@ public function provideCompileData() array( 'Route with a custom token', array('/=foo', array(), array(), array('compiler_class' => 'Symfony\\Tests\\Component\\Routing\\RouteCompiler')), - '', '#^/foo/(?P[^/\.]+?)$#x', array('foo' => '=foo'), array( + '', '#^/foo/(?P[^/\.\-]+?)$#x', array('foo' => '=foo'), array( array('label', '/', '=foo', 'foo'), )), ); diff --git a/tests/Symfony/Tests/Component/Routing/RouteTest.php b/tests/Symfony/Tests/Component/Routing/RouteTest.php index b484dd544da8d..6f2c38d207bb6 100644 --- a/tests/Symfony/Tests/Component/Routing/RouteTest.php +++ b/tests/Symfony/Tests/Component/Routing/RouteTest.php @@ -41,7 +41,7 @@ public function testOptions() $route = new Route('/{foo}'); $route->setOptions(array('foo' => 'bar')); $this->assertEquals(array_merge(array( - 'segment_separators' => array('/', '.'), + 'segment_separators' => array('/', '.', '-'), 'text_regex' => '.+?', 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler', ), array('foo' => 'bar')), $route->getOptions(), '->setOptions() sets the options');