Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Bundles] Rename getPublicPath() as getPublicDir()#32452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedJul 9, 2019
One difference though is that |
javiereguiluz commentedJul 9, 2019
linaori commentedJul 9, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As
|
src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fair enough
src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| @trigger_error('Not defining "getPublicPath()" method is deprecated since Symfony 4.4 and will not be supported in 5.0.',E_USER_DEPRECATED); | ||
| $publicPath ='Resources/public'; | ||
| if (!method_exists($bundle,'getPublicDir')) { | ||
| @trigger_error(sprintf('Not defining "getPublicDir()" methodin the "%s" classis deprecated since Symfony 4.4 and will not be supported in 5.0.',get_class($bundle)),E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
\get_class, as reported by fabbot
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
GTM once fabbot is green :)
fabpot commentedJul 12, 2019
Thank you@javiereguiluz. |
…ereguiluz)This PR was squashed before being merged into the 4.4 branch (closes#32452).Discussion----------[Bundles] Rename getPublicPath() as getPublicDir()| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | -| License | MIT| Doc PR | I'll add this if approvedWhile documenting#31975 (seesymfony/symfony-docs#11930) I realized that the `getPublicPath()` method name is not consistent with the rest of Symfony.In Symfony, "path" is usually associated to routes and we use "dir" for things similar to this:* `getCacheDir()` and `getLogdir()` to override Symfony structure (https://symfony.com/doc/current/configuration/override_dir_structure.html)* `binDir`, `configDir`, `srcDir`, `varDir`, `publicDir` in Symfony Flex recipes (https://github.com/symfony/recipes) to override the dir structureSo, this PR proposes to rename `getPublicPath()` as `getPublicDir()`Commits-------4ab2f99 [Bundles] Rename getPublicPath() as getPublicDir()

While documenting#31975 (seesymfony/symfony-docs#11930) I realized that the
getPublicPath()method name is not consistent with the rest of Symfony.In Symfony, "path" is usually associated to routes and we use "dir" for things similar to this:
getCacheDir()andgetLogdir()to override Symfony structure (https://symfony.com/doc/current/configuration/override_dir_structure.html)binDir,configDir,srcDir,varDir,publicDirin Symfony Flex recipes (https://github.com/symfony/recipes) to override the dir structureSo, this PR proposes to rename
getPublicPath()asgetPublicDir()