Navigation

Symfony2 framework,

Alternativy:
Laravel framework,
Phalcon framework,
Symfony2 framework,
Code Igniter framework

Install programs:
 

apt-get install mysql-server mysql-client apache2 php5 libapache2-mod-php5
apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
apt-get install php5-odbc php5-sybase tdsodbc
apt-get install openjdk-7-jdk
apt-get install phpunit

# chmod +x netbeans-8.0-php-linux.sh
apt-get install netbeans

Apache settings: nano /etc/apache2/sites-available/project.local.conf

<VirtualHost *:80>
ServerName www.project.local
ServerAlias project.local www.project.local project.local
DocumentRoot /var/www/project/web
CustomLog "/var/www/project/log/access_log" combined
ErrorLog "/var/www/project/log/error_log"
</VirtualHost>

a2ensite project.local.conf
 

ln -s /etc/apache2/sites-available/project.local.conf /etc/apache2/sites-enabled/project.local.conf
service apache2 restart

Install composer:
 

php -r "readfile('https://getcomposer.org/installer');" | php
cp composer.phar /usr/local/bin/composer

# GitHub Token needed
nano /home/duckd/.composer/auth.json

php app/console

Symfony version 2.5.0 - app/dev/debug

Usage:
  [options] command [arguments]

Options:
  --help           -h Display this help message.
  --quiet          -q Do not output any message.
  --verbose        -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  --version        -V Display this application version.
  --ansi              Force ANSI output.
  --no-ansi           Disable ANSI output.
  --no-interaction -n Do not ask any interactive question.
  --shell          -s Launch the shell.
  --process-isolation    Launch commands from shell as a separate process.
  --env            -e The Environment name.
  --no-debug          Switches off debug mode.

Available commands:
  help                                  Displays help for a command
  list                                  Lists commands
acme
  acme:hello                            Hello World example command
assetic
  assetic:dump                          Dumps all assets to the filesystem
assets
  assets:install                        Installs bundles web assets under a public web directory
cache
  cache:clear                           Clears the cache
  cache:warmup                          Warms up an empty cache
config
  config:debug                          Dumps the current configuration for an extension
  config:dump-reference                 Dumps the default configuration for an extension
container
  container:debug                       Displays current services for an application
doctrine
  doctrine:cache:clear-metadata         Clears all metadata cache for an entity manager
  doctrine:cache:clear-query            Clears all query cache for an entity manager
  doctrine:cache:clear-result           Clears result cache for an entity manager
  doctrine:database:create              Creates the configured databases
  doctrine:database:drop                Drops the configured databases
  doctrine:ensure-production-settings   Verify that Doctrine is properly configured for a production environment.
  doctrine:generate:crud                Generates a CRUD based on a Doctrine entity
  doctrine:generate:entities            Generates entity classes and method stubs from your mapping information
  doctrine:generate:entity              Generates a new Doctrine entity inside a bundle
  doctrine:generate:form                Generates a form type class based on a Doctrine entity
  doctrine:mapping:convert              Convert mapping information between supported formats.
  doctrine:mapping:import               Imports mapping information from an existing database
  doctrine:mapping:info                 Shows basic information about all mapped entities
  doctrine:query:dql                    Executes arbitrary DQL directly from the command line.
  doctrine:query:sql                    Executes arbitrary SQL directly from the command line.
  doctrine:schema:create                Executes (or dumps) the SQL needed to generate the database schema
  doctrine:schema:drop                  Executes (or dumps) the SQL needed to drop the current database schema
  doctrine:schema:update                Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
  doctrine:schema:validate              Validates the doctrine mapping files
generate
  generate:bundle                       Generates a bundle
  generate:controller                   Generates a controller
  generate:doctrine:crud                Generates a CRUD based on a Doctrine entity
  generate:doctrine:entities            Generates entity classes and method stubs from your mapping information
  generate:doctrine:entity              Generates a new Doctrine entity inside a bundle
  generate:doctrine:form                Generates a form type class based on a Doctrine entity
init
  init:acl                              Mounts ACL tables in the database
orm
  orm:convert:mapping                   Convert mapping information between supported formats.
router
  router:debug                          Displays current routes for an application
  router:dump-apache                    Dumps all routes as Apache rewrite rules
  router:match                          Helps debug routes by simulating a path info match
server
  server:run                            Runs PHP built-in web server
swiftmailer
  swiftmailer:debug                     Displays current mailers for an application
  swiftmailer:email:send                Send simple email message
  swiftmailer:spool:send                Sends emails from the spool
translation
  translation:debug                     Displays translation messages informations
  translation:update                    Updates the translation file
twig
  twig:debug                            Shows a list of twig functions, filters, globals and tests
  twig:lint                             Lints a template and outputs encountered errors
yaml
  yaml:lint                             Lints a file and outputs encountered errors

PHPUnit - The PHP Unit Testing framework - Test code:

phpunit 
phpunit --help
phpunit -c app/
phpunit -c src/Acme/DemoBundle/
phpunit -c src/Acme/DemoBundle/Tests/
phpunit -c src/Acme/DemoBundle/Tests/Controller/
phpunit -c src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php

php app/console

php app/console 
php app/console router:debug
php app/console router:debug _welcome
php app/console assets:install
php app/console help generate:bundle
php app/console generate:bundle help
php app/console help generate:bundle
php app/console generate:bundle -namespace=Skoleni/BlogBundle
php app/console generate:bundle --namespace=Skoleni/BlogBundle
php app/console help generate:bundle
php app/console doctrine:database:create
php app/console doctrine:generate:entity
php app/console doctrine:schema:update-force
php app/console doctrine:schema:update --force
php help app/console doctrine:query:sql
php app/console help doctrine:query:sql
php app/console assets:install
php app/console doctrine:generate:entity
php help app/console doctrine:query:sql
php app/console help doctrine:query:sql
php app/console generate:doctrine:crud
php app/console swiftmailer:email:send
php app/console swiftmailer:email:send --from="from@email.cz" --to="the.duckd@gmail.com" --subject="subject"
php app/console assets:install
history | grep app/console

http://www.project.czlocal/app_dev.php
http://www.project.czlocal/app_dev.php/_configurator/final
http://www.project.czlocal/app_dev.php/_profiler/430182/search/results?i...

 

cont