Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Symbolic vendor 2.0 #215

Closed
wants to merge 1 commit into from

2 participants

@mbontemps

Fix the path of the generated bootstrap.php.cache when using symbolic links

In SensioDistributionBundle, build_bootstrap.php uses its own path to determine
where it should genereate bootstrap.path.cache:
__DIR__.'/../../../../../../../'.'app/bootstrap.php.cache'

If your "vendor" path is just a symlink (this is the case if you use capifony
for example), this will generate bootstrap.php.cache in the wrong path.

This fix adds the root path as argument to build_bootstrap (based on the path of
bin/vendors).

@mbontemps mbontemps Fix the path of the generated bootstrap.php.cache when using symbolic…
… links

In SensioDistributionBundle, build_bootstrap.php uses its own path to determine
where it should genereate bootstrap.path.cache:
__DIR__.'/../../../../../../../'.'app/bootstrap.php.cache'

If your "vendor" path is just a symlink (this is the case if you use capifony
for example), this will generate bootstrap.php.cache in the wrong path.

This fix adds the root path as argument to build_bootstrap (based on the path of
bin/vendors).
831bbef
@fabpot fabpot referenced this pull request from a commit
@fabpot fabpot merged branch weaverryan/bin_vendor_root_dir_specify (PR #214)
Commits
-------

8686e87 Explicitly passing the project's root dir to the build_bootstrap.php script

Discussion
----------

Bin vendor root dir specify

Hey guys!

Explicitly passing the project's root dir to the build_bootstrap.php script

This takes advantage of a recent change in the SensioDistributionBundle which allows this. A specific situation this addresses is when the `vendor` dir is symlinked, and the build_bootstrap.php script mistakenly places the bootstrap.php.cache in ../app of the vendor dir's real location (instead of actually inside the project).

See: sensiolabs/SensioDistributionBundle#9

Thanks!

---------------------------------------------------------------------------

by stof at 2011/10/07 11:41:26 -0700

You should use ``escapeshellargs`` for the rootDir too

---------------------------------------------------------------------------

by stof at 2011/10/07 12:20:37 -0700

#215 does the same fix but with the call to escapeshellargs
60fb7b8
@fabpot fabpot closed this
@r2pq r2pq referenced this pull request in symfony/symfony
Closed

bootstrap.php.cache and Symlinks #8365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 7, 2011
  1. @mbontemps

    Fix the path of the generated bootstrap.php.cache when using symbolic…

    mbontemps authored
    … links
    
    In SensioDistributionBundle, build_bootstrap.php uses its own path to determine
    where it should genereate bootstrap.path.cache:
    __DIR__.'/../../../../../../../'.'app/bootstrap.php.cache'
    
    If your "vendor" path is just a symlink (this is the case if you use capifony
    for example), this will generate bootstrap.php.cache in the wrong path.
    
    This fix adds the root path as argument to build_bootstrap (based on the path of
    bin/vendors).
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  bin/vendors
View
2  bin/vendors
@@ -120,7 +120,7 @@ if ('update' === $command) {
$interpreter = PHP_OS == 'WINNT' ? 'php.exe' : '';
// Update the bootstrap files
-system(sprintf('%s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php')));
+system(sprintf('%s %s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'), escapeshellarg($rootDir)));
// Update assets
system(sprintf('%s %s assets:install %s', $interpreter, escapeshellarg($rootDir.'/app/console'), escapeshellarg($rootDir.'/web/')));
Something went wrong with that request. Please try again.