beberlei/doctrine2-symfony2-workshop
Composer 安装命令:
composer require beberlei/doctrine2-symfony2-workshop
包简介
A Doctrine2 Workshop application in combination with Symfony2
README 文档
README
This repository hosts a Symfony2 application used for Doctrine2 workshops. It is a derivation of the Symfony Standard Distribution that is explicitly build for teaching Doctrine2 in a Symfony2 application.
Installation
When you have trouble intalling this application before a workshop, send
an email to contact@qafoo.com with your errors/problems and we try to help you.
If you don't have Composer installed, go to: http://getcomposer.org/download/ Install Composer as described.
If you have Composer installed on your machine, go into your working directory and call depending on:
composer create-project beberlei/doctrine2-symfony2-workshop doctrine-ws dev-master --prefer-dist
or
php composer.phar create-project beberlei/doctrine2-symfony2-workshop doctrine-ws dev-master --prefer-dist
This will create a new project with this application and download all the dependencies.
Composer during Workshop and Github Limitations
If you are executing the composer installation during the workshop, it is possible Github limits the amount of calls through Composer by IP address. You have to create an OAuth token to continue:
-
Create a Github account if you don't have one yet
-
From the Commandline call:
curl -u 'your_github_user' -d '\{"note":"Workshop"\}' https://api.github.com/authorizations -
Update your composer.json with the Token in the result:
{ "config": { "github-oauth": { "github.com":"tokenhere" } } }
Database Configuration
By default this example application will use SQLite as a database. To configure
another database to use during the workshop go to app/config/config.yml
and change the configuration as explained in the file. You can uncomment
the specific sections for MySQL or PostgreSQL to change the database.
Setup Webserver
Unless you have PHP 5.4 installed, you have to setup a webserver like Apache or Nginx to serve your project.
With PHP 5.4 starting your Symfony application is as simple as calling:
php app/console server:run
If you don't have PHP 5.4 yet make sure to change your /etc/hosts
file to contain a rule 127.0.0.1 sf2demo
Apache
Put the following into /etc/apache2/sites-enabled/sf2demo or
the Windows equivalent folder where your Apache Vhosts are located:
<VirtualHost *:80>
ServerName sf2demo
DocumentRoot /path/to/project/web
<Directory /path/to/project/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow From all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
Nginx
Put the following into /etc/nginx/sites-enabled/sf2demo:
server {
listen *:80;
server_name sf2demo;
set $index "index.php";
root /path/tp/project/web;
index $index;
if (-f $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /$index$1 last;
break;
}
}
Important Note
This application is only for workshop purposes, it is neither secure nor sanely configured production usage.
beberlei/doctrine2-symfony2-workshop 适用场景与选型建议
beberlei/doctrine2-symfony2-workshop 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 45 次下载、GitHub Stars 达 0, 最近一次更新时间为 2012 年 11 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 beberlei/doctrine2-symfony2-workshop 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 beberlei/doctrine2-symfony2-workshop 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 45
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-10