Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when the config_local.yml file is a symlink #7451

Closed
tameroski opened this issue Apr 27, 2018 · 7 comments
Closed

Error when the config_local.yml file is a symlink #7451

tameroski opened this issue Apr 27, 2018 · 7 comments

Comments

@tameroski
Copy link

tameroski commented Apr 27, 2018

If my config_local.yml file is a symlink (to a file in a shared directory, cos i'm deploying Bolt using Capistrano), i got the following error :

IOException in Filesystem.php line 571: Failed to get file's type

    in Filesystem.php line 571
    at Filesystem->doGetType('config_local.yml') in Filesystem.php line 501
    at Filesystem->get('config_local.yml', null) in Directory.php line 59
    at Directory->get('config_local.yml') in Config.php line 147
    at Config->parseConfigYaml('config_local.yml') in Config.php line 299
    at Config->parseGeneral() in Config.php line 278
    at Config->getConfig() in Config.php line 104
    at Config->initialize() in ConfigServiceProvider.php line 22
    at ConfigServiceProvider->Bolt\Provider\{closure}(object(Application)) in Pimple.php line 126
    at Pimple::{closure}(object(Application)) in Pimple.php line 83
    at Pimple->offsetGet('config') in ExtensionServiceProvider.php line 46
    at ExtensionServiceProvider->Bolt\Provider\{closure}(object(Application)) in Pimple.php line 126
    at Pimple::{closure}(object(Application)) in Pimple.php line 201
    at Pimple->{closure}(object(Application)) in Pimple.php line 126
    at Pimple::{closure}(object(Application)) in Pimple.php line 83
    at Pimple->offsetGet('extensions') in ExtensionServiceProvider.php line 150
    at ExtensionServiceProvider->boot(object(Application)) in Application.php line 197
    at Application->boot() in Application.php line 91
    at Application->run() in index.php line 12

Removing the link = site is working
Changing the link for a real file = site is working

Details

  • Relevant Bolt Version: 3.4
  • Install type: Composer install
  • PHP version: 7.1
  • Used web server: Apache

Reproduction

Add a config_local.yml file somewhere on your server, and add a symlink to it in your app/config/ directory.

@GwendolenLynch
Copy link
Contributor

Yes, this is a limitation in Flysystem and nothing we have control over.

See:
thephpleague/flysystem#474
thephpleague/flysystem#599

@bobdenotter
Copy link
Member

@tameroski What does work in some cases (it works for us when using deployer, but no guarantees), is making the app/config folder a symlink, that has "real" files inside.

@tameroski
Copy link
Author

tameroski commented Apr 28, 2018

Oh, that would be great! Will try that, thanks.
Not being able to deploy that way would be a massive disapoinment 😢

@bobdenotter
Copy link
Member

@tameroski We use Deployer ourselves, and it works nicely.. See this: https://github.com/jadwigo/bolt-deployer-recipe

@tameroski
Copy link
Author

Tried to make the whole app/config folder a symlink => working !

Thanks @bobdenotter

@baronvertigovongrahamthesecondofsealand

Hi. The symlink directory solution doesnt appear workable to me, as the files in the directory need to be committed to repo (in case of changes, which need to be deployed), with the exception of config_local.yml.

Is there a way of defining where the config_local.yml is located and loaded from?

@bobdenotter
Copy link
Member

@baronvertigovongrahamthesecondofsealand No, there isn't, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants