Need help with AcmePizzaBundle?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

beberlei
135 Stars 27 Forks 167 Commits 4 Opened issues

Description

Acme Form Experimental Bundle

Services available

!
?

Need anything else?

Contributors list

# 4,365
GraphQL
formik
slimerj...
Symfony
115 commits
# 11,898
PHP
php7
pmd
Symfony
12 commits
# 233,717
PHP
C++
Symfony
symfony...
3 commits
# 378,127
Sass
Symfony
HTML
monolog
1 commit
# 22,881
PHP
Symfony
Compose...
curl
1 commit
# 582,297
PHP
Symfony
sonata
HTML
1 commit

Acme Pizza Bundle

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

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


    
    
    





     


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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.