我有一个Symfony 2项目,由于某些原因我无法重命名web目录.我试图将其重命名为public.
根据手册,我想更改composer.json并确保app.php和app_dev.php中的链接是正确的.
但是,当我运行app/console服务器时:运行,它显示
The given document root directory "C:/xampp/htdocs/xxx/app/../web" does nto exists.
Run Code Online (Sandbox Code Playgroud)
我已经更改了composer.json,运行composer install和composer update但仍然没有运气.这是我的composer.json,你可以看到我已经在文件中添加了"symfony-web-dir":"public".
如果我将我的公共文件夹重命名为web,那么一切都很好,但由于某些原因我不能这样做.
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"richsage/rms-push-notifications-bundle": "dev-master",
"friendsofsymfony/user-bundle": "~1.3",
"ircmaxell/password-compat": "~1.0.3"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" …Run Code Online (Sandbox Code Playgroud)