8000 feature #32845 [HttpKernel][FrameworkBundle] Add alternative conventi… · symfony/http-kernel@9f08dce · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f08dce

Browse files
feature #32845 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32845). Discussion ---------- [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#32453 | License | MIT | Doc PR | TODO We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures. The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure. We have recently added the `getPublicDir()` method in symfony/symfony#31975, here I'm removing it in favor of hardcoding a new convention. I've added some functional tests in which I've changed everything to this structure: ``` -- ModernBundle |-- config/ |-- public/ |-- src/ |-- ModernBundle.php |-- templates/ |-- translations/ ``` WDYT? Commits ------- 6996e1c [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
2 parents 215fab2 + a725d83 commit 9f08dce

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

Bundle/Bundle.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ public function registerCommands(Application $application)
135135
{
136136
}
137137

138-
public function getPublicDir(): string
139-
{
140-
return 'Resources/public';
141-
}
142-
143138
/**
144139
* Returns the bundle's container extension class.
145140
*

Bundle/BundleInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* BundleInterface.
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
22-
*
23-
* @method string getPublicDir() Returns relative path for the public assets directory
2422
*/
2523
interface BundleInterface extends ContainerAwareInterface
2624
{

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ CHANGELOG
44
4.4.0
55
-----
66

7-
* Implementing the `BundleInterface` without implementing the `getPublicDir()` method is deprecated.
8-
This method will be added to the interface in 5.0.
97
* The `DebugHandlersListener` class has been marked as `final`
8+
* Added new Bundle directory convention consistent with standard skeletons
109

1110
4.3.0
1211
-----

0 commit comments

Comments
 (0)
0