定制 beberlei/acme-pizza 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

beberlei/acme-pizza

Composer 安装命令:

composer require beberlei/acme-pizza

包简介

README 文档

README

This is a test-bundle for the experimental form support.

It is very early status and will be finalized as a demo example over the weekend.

Distribution: Best used with Symfony Standard Edition

Requirements

Symfony(https://github.com/symfony/symfony) obviously.

Installation

Add the deps for the needed bundles

[AcmePizzaBundle]
    git=https://github.com/beberlei/AcmePizzaBundle.git
    target=/bundles/Acme/PizzaBundle

[doctrine-fixtures]
    git=http://github.com/doctrine/data-fixtures.git

[DoctrineFixturesBundle]
    git=http://github.com/symfony/DoctrineFixturesBundle.git
    target=/bundles/Symfony/Bundle/DoctrineFixturesBundle

Next, run the vendors script to download the bundles:

$ php bin/vendors install

Add to autoload.php

$loader->registerNamespaces(array(
    'Acme'             => __DIR__.'/../vendor/bundles',
    // ...

Register AcmePizzaBundle to Kernel

<?php

    # app/AppKernel.php
    //...
    $bundles = array(
        //...
        new Acme\PizzaBundle\AcmePizzaBundle(),
    );
    //...

Create database and schema

$ php app/console doctrine:database:create
$ php app/console doctrine:schema:create

Enable routing configuration

# app/config/routing.yml
AcmePizzaBundle:
    resource: "@AcmePizzaBundle/Controller/"
    type:     annotation
    prefix:   /acme-pizza

Refresh asset folder

$ php app/console assets:install web/

Data fixtures (optional)

First, make sure that your db parameters are correctly set in app/config/parameters.ini. You'll need to install Doctrine Data Fixtures (don't forget to add the path to AppKernel.php) and then run:

$ php app/console doctrine:fixtures:load

You can read about install instructions in the Symfony2 Cookbook(http://symfony.com/doc/2.0/cookbook/doctrine/doctrine_fixtures.html#setup-and-configuration)

Usage

Go to app_dev.php/acme-pizza/pizza/list and start selling pizzas.

Testing

You can launch functional tests with Selenium RC server running with the following steps:

  • download selenium server
  • edit app/phpunit.xml.dist:
    • add php's server variable to match your configuration
    • add the selenium's browser configuration. I added Google Chrome Portable because it's faster than ie or even firefox.

app/phpunit.xml.dist

# app/phpunit.xml.dist
<!-- ... -->
<php>
    <server
        name  = "KERNEL_DIR"
        value = "/var/www/AcmePizza/app/" />
    <server
        name  = "HTTP_HOST"
        value = "localhost" />
    <server
        name  = "SCRIPT_NAME"
        value = "/AcmePizza/web/app_dev.php" />
</php>
<!-- ... -->

<!-- ... -->
<selenium>
    <browser
        name    = "Google Chrome Portable"
        browser = "*custom c:\bin\GoogleChromePortable\GoogleChromePortable.exe -disable-popup-blocking -proxy-server=127.0.0.1:4444"
        host    = "127.0.0.1" /> <!-- ip of selenium RC server -->
</selenium>
<!-- ... -->

Now you can run test (assuming that Selenium RC is running java -jar selenium-server-standalone-2.2.0.jar) with phpunit -c app/ src/Acme/PizzaBundle/Tests/ If you want you can submit other missing tests.

beberlei/acme-pizza 适用场景与选型建议

beberlei/acme-pizza 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 357 次下载、GitHub Stars 达 131, 最近一次更新时间为 2012 年 01 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 beberlei/acme-pizza 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 beberlei/acme-pizza 我们能提供哪些服务?
定制开发 / 二次开发

基于 beberlei/acme-pizza 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 357
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 131
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 131
  • Watchers: 4
  • Forks: 27
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-01-23