类似symfony1.4的symfony2安装
symfony1.x 遵循一个良好的标准,即整个框架位于外部并且可用于任何项目。今天我开始阅读 symfony2 文档,并实际下载了下载页面上显示的“with sellers”2.0.1 软件包。打开包装后,我对所看到的感到有点惊讶。但在查看了包之后,我发现我需要的唯一文件夹是“vendors”文件夹 - 所以我将其内容复制到我的“...\lib\vendor\symfony2”文件夹(靠近“...\lib\vendor\”) symfony' 和 '...\lib\vendor\ext')。我添加它以包含路径并继续阅读文档。然后我发现了一个问题 - 列出“php app/console generated:bundle --namespace=Acme/HelloBundle --format=yml”的命令产生了简单的问题。他们是否错过了解释如何生成项目(结构、预配置、命令行文件等)?那么“.bat”和“.sh”文件呢?
symfony1.x followed a good standart that the whole framework lies somewhere outside and is available to any project. Today I started to read symfony2 documentation and actually downloaded the 'with vendors' 2.0.1 package which is presented on download page. After opening the package I was a bit surprised of what I've seen. But after looking around the package I found that the only folder I need is 'vendors' one - so I copied its content to my '...\lib\vendor\symfony2' folder (near '...\lib\vendor\symfony' and '...\lib\vendor\ext'). I added it to include path and proceed reading documentation. And then I found a problem - a command listed 'php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml' produced simple questions. Did they miss to explain how to generate a project (structure, preconfiguration, command-line files, etc)? And what about '.bat' and '.sh' files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Symfony2 与 symfony 1 非常非常不同——尤其是在目录结构方面。您不能简单地放入供应商目录并期望它能够工作。 此页面介绍了如何设置新的 Symfony2 项目。
Symfony2 is very, very different than symfony 1 - especially when it comes to the directory structure. You can't simply drop in the vendors dir and expect it to work. This page explains how to setup a new Symfony2 project.
我建议你忘记 Symfony...并用 Symfony2 思考另一种与 S1 完全不同的想法。
安装非常简单,您需要一些高级 PHP 知识才能理解它是如何工作的...但是如果您使用过 S1,我希望您不会遇到太多问题:)
I recommend you to forget Symfony... and to think with Symfony2 about another think completely different than S1.
Installation is really simple and you will need some advanced PHP knowledge just to understand how it works... But if you have worked with S1, I expect you will have not much problems :)