Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e540349

Browse filesBrowse files
committed
removed the need to define getNamespace() and getPath() in bundles
1 parent 523e652 commit e540349
Copy full SHA for e540349

File tree

Expand file treeCollapse file tree

30 files changed

+58
-409
lines changed
Filter options
Expand file treeCollapse file tree

30 files changed

+58
-409
lines changed

‎src/Symfony/Bundle/CompatAssetsBundle/CompatAssetsBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/CompatAssetsBundle/CompatAssetsBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,4 @@
2020
*/
2121
class CompatAssetsBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function getNamespace()
27-
{
28-
return __NAMESPACE__;
29-
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getPath()
35-
{
36-
return __DIR__;
37-
}
3823
}

‎src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/DoctrineBundle.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,4 @@ public function registerExtensions(ContainerBuilder $container)
3131

3232
$container->addCompilerPass(new RegisterEventListenersAndSubscribersPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION);
3333
}
34-
35-
/**
36-
* {@inheritdoc}
37-
*/
38-
public function getNamespace()
39-
{
40-
return __NAMESPACE__;
41-
}
42-
43-
/**
44-
* {@inheritdoc}
45-
*/
46-
public function getPath()
47-
{
48-
return __DIR__;
49-
}
5034
}

‎src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/AnnotationsBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/AnnotationsBundle.php
+1-16Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class AnnotationsBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
24-
}
9+
}

‎src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/Vendor/AnnotationsBundle/AnnotationsBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/Vendor/AnnotationsBundle/AnnotationsBundle.php
+1-16Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class AnnotationsBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
24-
}
9+
}

‎src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class XmlBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
249
}

‎src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class YamlBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
249
}

‎src/Symfony/Bundle/DoctrineMigrationsBundle/DoctrineMigrationsBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineMigrationsBundle/DoctrineMigrationsBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,4 @@
2121
*/
2222
class DoctrineMigrationsBundle extends Bundle
2323
{
24-
/**
25-
* {@inheritdoc}
26-
*/
27-
public function getNamespace()
28-
{
29-
return __NAMESPACE__;
30-
}
31-
32-
/**
33-
* {@inheritdoc}
34-
*/
35-
public function getPath()
36-
{
37-
return __DIR__;
38-
}
3924
}

‎src/Symfony/Bundle/DoctrineMongoDBBundle/DoctrineMongoDBBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineMongoDBBundle/DoctrineMongoDBBundle.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,4 @@ public function registerExtensions(ContainerBuilder $container)
3535
$container->addCompilerPass(new CreateProxyDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
3636
$container->addCompilerPass(new CreateHydratorDirectoryPass(), PassConfig::TYPE_BEFORE_REMOVING);
3737
}
38-
39-
/**
40-
* {@inheritdoc}
41-
*/
42-
public function getNamespace()
43-
{
44-
return __NAMESPACE__;
45-
}
46-
47-
/**
48-
* {@inheritdoc}
49-
*/
50-
public function getPath()
51-
{
52-
return __DIR__;
53-
}
5438
}

‎src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/AnnotationsBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/AnnotationsBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class AnnotationsBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
249
}

‎src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/XmlBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class XmlBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
249
}

‎src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/DoctrineMongoDBBundle/Tests/DependencyInjection/Fixtures/Bundles/YamlBundle/YamlBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class YamlBundle extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return __DIR__;
23-
}
249
}

‎src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplatePathsCacheWarmer.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function computeTemplatePaths()
6464
$prefix = '/Resources/views';
6565
$templates = array();
6666
foreach ($this->kernel->getBundles() as $name => $bundle) {
67-
if (!is_dir($dir = $bundle->getNormalizedPath().$prefix)) {
67+
if (!is_dir($dir = $bundle->getPath().$prefix)) {
6868
continue;
6969
}
7070

‎src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,4 @@ public function registerExtensions(ContainerBuilder $container)
8080
$container->addCompilerPass(new TranslatorPass());
8181
$container->addCompilerPass(new AddCacheWarmerPass());
8282
}
83-
84-
/**
85-
* {@inheritdoc}
86-
*/
87-
public function getNamespace()
88-
{
89-
return __NAMESPACE__;
90-
}
91-
92-
/**
93-
* {@inheritdoc}
94-
*/
95-
public function getPath()
96-
{
97-
return __DIR__;
98-
}
9983
}

‎src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/Bundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/Bundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,4 @@
66

77
class {{ bundle }} extends Bundle
88
{
9-
/**
10-
* {@inheritdoc}
11-
*/
12-
public function getNamespace()
13-
{
14-
return __NAMESPACE__;
15-
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function getPath()
21-
{
22-
return strtr(__DIR__, '\\', '/');
23-
}
249
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,4 @@ public function getParent()
2727
{
2828
return 'SensioFooBundle';
2929
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getNamespace()
35-
{
36-
return __NAMESPACE__;
37-
}
38-
39-
/**
40-
* {@inheritdoc}
41-
*/
42-
public function getPath()
43-
{
44-
return __DIR__;
45-
}
4630
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,4 @@
2020
*/
2121
class FooBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function getNamespace()
27-
{
28-
return __NAMESPACE__;
29-
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getPath()
35-
{
36-
return __DIR__;
37-
}
3823
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,4 @@
2020
*/
2121
class SensioCmsFooBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function getNamespace()
27-
{
28-
return __NAMESPACE__;
29-
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getPath()
35-
{
36-
return __DIR__;
37-
}
3823
}

‎src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,4 @@
2020
*/
2121
class SensioFooBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function getNamespace()
27-
{
28-
return __NAMESPACE__;
29-
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getPath()
35-
{
36-
return __DIR__;
37-
}
3823
}

‎src/Symfony/Bundle/SecurityBundle/SecurityBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/SecurityBundle.php
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,4 @@ public function registerExtensions(ContainerBuilder $container)
3030
$container->addCompilerPass(new AddSecurityVotersPass());
3131
$container->addCompilerPass(new AddAuthenticationProvidersPass());
3232
}
33-
34-
/**
35-
* {@inheritdoc}
36-
*/
37-
public function getNamespace()
38-
{
39-
return __NAMESPACE__;
40-
}
41-
42-
/**
43-
* {@inheritdoc}
44-
*/
45-
public function getPath()
46-
{
47-
return __DIR__;
48-
}
4933
}

‎src/Symfony/Bundle/SwiftmailerBundle/SwiftmailerBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SwiftmailerBundle/SwiftmailerBundle.php
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,4 @@
2020
*/
2121
class SwiftmailerBundle extends Bundle
2222
{
23-
/**
24-
* {@inheritdoc}
25-
*/
26-
public function getNamespace()
27-
{
28-
return __NAMESPACE__;
29-
}
30-
31-
/**
32-
* {@inheritdoc}
33-
*/
34-
public function getPath()
35-
{
36-
return __DIR__;
37-
}
3823
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.