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

kernel.project_dir (getProjectDir()) silently returns incorrect path without composer.json #23950

Copy link
Copy link
Closed
@spaivaras

Description

@spaivaras
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
Symfony version 3.3.x

Currently in symfony 3.3.x parameter kernel.project_dir silently returns kernel_dir if composer.json is not found at all. IMHO it shouldn't be related with composer.json as in prod environment, composer is typically not needed at all, so files could be discarded from build artifacts. So even an error or a warning would be better here compared to option that you can get 2 different paths depending on that you have or not have a 3rd party file.

even cache:clear fails with missing files errors, if project_dir is used without composer.json file

PHP Fatal error:  Uncaught Symfony\Component\Config\Exception\FileLocatorFileNotFoundException: The file "/var/www/releases/20170822132058/app/vendor/willdurand/geocoder/Dumper" does not exist. in /var/www/releases/20170822132058/vendor/symfony/config/FileLocator.php:46
111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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