简体   繁体   English

找不到Eclipse Symfony 2环境

[英]Eclipse Symfony 2 environments not found

I am experiencing a problem: Eclipse doesn't detect the environments of my Symfony 2 project. 我遇到一个问题:Eclipse无法检测到我的Symfony 2项目的环境。

This means I can't configure the "Launch Configuration". 这意味着我无法配置“启动配置”。 I have no idea why... I use the Plugin from here: http://symfony.dubture.com/ 我不知道为什么...我从这里使用插件: http : //symfony.dubture.com/

This is how it looks on my PC (empty dropdown menu for the environments): http://abload.de/image.php?img=eclipsesymfony2env0lu66.png 这是它在我的PC上的外观(环境的空白下拉菜单): http : //abload.de/image.php?img=eclipsesymfony2env0lu66.png

This is how it should look like: http://symfony.dubture.com/images/screenshots/configuration_tab.png 它应该是这样的: http : //symfony.dubture.com/images/screenshots/configuration_tab.png

In the folder app/config , there are a config.yml and config_dev.yml , config_prod.yml and config_test.yml among some other files. 在文件夹app/config ,有config.ymlconfig_dev.ymlconfig_prod.ymlconfig_test.yml一些其他文件中。

Versions: 版本:
Symfony 2.7 Symfony 2.7
Eclipse 4.4.2 (PHP Plugin and the Symfony 2 plugin are up to date) Eclipse 4.4.2(PHP插件和Symfony 2插件是最新的)
PHP 5.6 VC11 x86 Thread Safe PHP 5.6 VC11 x86线程安全
Apache 2.4.10 VC11 x86 Apache 2.4.10 VC11 x86
Win 7 SP 1 x64 (admin account) Win 7 SP 1 x64(管理员帐户)

Greetings 问候

  1. Make sure that routing code assist works (for ex. source -> insert symfony route). 确保路由代码辅助有效(例如,源->插入symfony路由)。 If not, make sure "Dumped container" path is set correctly (project properties -> symfony) 如果没有,请确保正确设置了“转储容器”路径(项目属性-> symfony)
  2. Create launch profile and select web/app(_dev)?.php file 创建启动配置文件并选择web / app(_dev)?. php文件
  3. Go to symfony tab ;) 转到symfony选项卡;)

In order to find environments, plugin Symfony Dubture needs web folder added to Include Path (Project Properties -> PHP -> Include Path -> Source tab -> Add Folder button -> web folder should be checked). 为了找到环境,插件Symfony Dubture需要将Web文件夹添加到“包含路径”(应检查“项目属性”->“ PHP”->“包含路径”->“源”选项卡->“添加文件夹”按钮->“ Web文件夹”)。

Current version of the Symfony Feature (1.1.1) has all controls disabled in Symfony tab in launch configuration dialog. 当前版本的Symfony功能(1.1.1)在启动配置对话框的Symfony选项卡中禁用了所有控件。 Code which obtained environments and routes stopped working correctly and hence this tab is now turned off and should not be used. 获得环境和路由的代码停止正常工作,因此此选项卡现在已关闭,不应使用。

In order to run/debug Symfony app, launch configuration should be configured manually . 为了运行/调试Symfony应用,应手动配置启动配置。 It can be done in the following steps: 可以通过以下步骤完成:

  • In Debug/Run Configuration dialog, create new PHP Web Application configuration. 在“调试/运行配置”对话框中,创建新的PHP Web应用程序配置。
  • In File field enter text in the format: \\<projectName>\\web\\app_dev.php . 在“文件”字段中,输入格式为\\<projectName>\\web\\app_dev.php
  • In the Server box, select Configure button to open Edit Server dialog. 在“服务器”框中,选择“配置”按钮以打开“编辑服务器”对话框。
  • In the Server tab, Document Root field should point to the project parent folder. 在“服务器”选项卡中,“文档根目录”字段应指向项目的父文件夹。
  • Prior to use of the created launch configuration, start the php built-in web server using the command: php -S localhost -t path/to/project/parent/folder 在使用创建的启动配置之前,请使用以下命令启动php内置的Web服务器: php -S localhost -t path/to/project/parent/folder

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM