New Symfony 3 installation: Could not open input file: app/console in composer install

前端 未结 4 962
深忆病人
深忆病人 2020-12-07 00:13

I installed a fresh symfony3-instance via the official symfony-installer (http://symfony.com/download). After doing the first things, I commited the project to Git and clone

4条回答
  •  有刺的猬
    2020-12-07 00:53

    I have been running into the same problem. The script uses the existance of the var directory to decide whether to use the new directory structure or the old one. If var exists, the new directory structure is used. Otherwise it uses the old structure.

    The default .gitignore file prevents both the var directory and the bin directory from being added to git.

    What I did to solve the problem for me was to edit .gitignore in the project directory so that it looks like this:

    /app/config/parameters.yml
    /bin/*
    /build/
    /composer.phar
    /vendor/
    /web/bundles/
    /var/*
    !var/cache
    /var/cache/*
    !var/cache/.gitkeep
    !var/logs
    /var/logs/*
    !var/logs/.gitkeep
    !var/sessions
    /var/sessions/*
    !var/sessions/.gitkeep
    !bin/console
    !bin/symfony_requirements
    /phpunit.xml
    

    I do not pretend to be an expert on .gitignore, so I'm not sure that is the most elegant way of doing it, but it is what worked for me.

提交回复
热议问题