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 222325f

Browse filesBrowse files
committed
minor #22843 use getProjectDir() when possible (xabbuh)
This PR was merged into the 3.3 branch. Discussion ---------- use getProjectDir() when possible | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | continues #22315 | License | MIT | Doc PR | Commits ------- a8e298a use getProjectDir() when possible
2 parents 82ec56b + a8e298a commit 222325f
Copy full SHA for 222325f

File tree

4 files changed

+7
-10
lines changed
Filter options

4 files changed

+7
-10
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
4646

4747
/** @var $kernel KernelInterface */
4848
$kernel = $this->getContainer()->get('kernel');
49-
$baseDir = realpath($kernel->getRootDir().DIRECTORY_SEPARATOR.'..');
5049

5150
$io->table(array(), array(
5251
array('<info>Symfony</>'),
@@ -62,9 +61,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
6261
array('Environment', $kernel->getEnvironment()),
6362
array('Debug', $kernel->isDebug() ? 'true' : 'false'),
6463
array('Charset', $kernel->getCharset()),
65-
array('Root directory', self::formatPath($kernel->getRootDir(), $baseDir)),
66-
array('Cache directory', self::formatPath($kernel->getCacheDir(), $baseDir).' (<comment>'.self::formatFileSize($kernel->getCacheDir()).'</>)'),
67-
array('Log directory', self::formatPath($kernel->getLogDir(), $baseDir).' (<comment>'.self::formatFileSize($kernel->getLogDir()).'</>)'),
64+
array('Root directory', self::formatPath($kernel->getRootDir(), $kernel->getProjectDir())),
65+
array('Cache directory', self::formatPath($kernel->getCacheDir(), $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($kernel->getCacheDir()).'</>)'),
66+
array('Log directory', self::formatPath($kernel->getLogDir(), $kernel->getProjectDir()).' (<comment>'.self::formatFileSize($kernel->getLogDir()).'</>)'),
6867
new TableSeparator(),
6968
array('<info>PHP</>'),
7069
new TableSeparator(),

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8282
$targetArg = rtrim($input->getArgument('target'), '/');
8383

8484
if (!is_dir($targetArg)) {
85-
$appRoot = $this->getContainer()->getParameter('kernel.root_dir').'/..';
86-
87-
$targetArg = $appRoot.'/'.$targetArg;
85+
$targetArg = $this->getContainer()->getParameter('kernel.project_dir').'/'.$targetArg;
8886

8987
if (!is_dir($targetArg)) {
9088
throw new \InvalidArgumentException(sprintf('The target directory "%s" does not exist.', $input->getArgument('target')));

‎src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/Resources/config/webserver.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<defaults public="false" />
99

1010
<service id="web_server.command.server_run" class="Symfony\Bundle\WebServerBundle\Command\ServerRunCommand">
11-
<argument>%kernel.root_dir%/../web</argument>
11+
<argument>%kernel.project_dir%/web</argument>
1212
<argument>%kernel.environment%</argument>
1313
<tag name="console.command" />
1414
</service>
1515

1616
<service id="web_server.command.server_start" class="Symfony\Bundle\WebServerBundle\Command\ServerStartCommand">
17-
<argument>%kernel.root_dir%/../web</argument>
17+
<argument>%kernel.project_dir%/web</argument>
1818
<argument>%kernel.environment%</argument>
1919
<tag name="console.command" />
2020
</service>

‎src/Symfony/Bundle/WebServerBundle/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebServerBundle/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=5.5.9",
2020
"symfony/console": "~2.8.8|~3.0.8|~3.1.2|~3.2",
21-
"symfony/http-kernel": "~2.8|~3.0",
21+
"symfony/http-kernel": "~3.3",
2222
"symfony/process": "~2.8|~3.0"
2323
},
2424
"autoload": {

0 commit comments

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