Installing Symfony2
4.1 (115 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
5,226 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Installing Symfony2 to your Wishlist.

Add to Wishlist

Installing Symfony2

Learn how to set up easily your Mac, Linux or Windows development environment for Symfony.
4.1 (115 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
5,226 students enrolled
Created by David Morales
Last updated 6/2016
English
Price: Free
Includes:
  • 32 mins on-demand video
  • 4 Articles
  • 3 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Install the latest version of PHP
  • Install and set up the coding standards
  • Install Symfony2 and create your first project
  • Configure the PhpStorm IDE to be ready for Symfony2
  • Start the web server to develop easily in your operating system
View Curriculum
Requirements
  • Opening your operating system command line
  • Introducing and copying commands in the command line
  • Editing text files
Description

2016 Update: re-recorded for Symfony 2.8 LTS and ready for Symfony 3.0

With this course you will learn how to set up easily your Mac, Linux or Windows development environment for Symfony.

You will learn to:

- Install PHP

- Configure the Symfony coding standards

- Create a project

- Configure the PhpStorm IDE for Symfony

- Start the web server to start programming

Who is the target audience?
  • Developers that know PHP and want to learn to use the most popular framework
  • Developers that want to improve their development environment for Symfony2
Students Who Viewed This Course Also Viewed
Curriculum For This Course
+
Installing Symfony2 on OS X
9 Lectures 10:42
Introduction (OS X)
00:50

Documentation (OS X)
00:08

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
Installing Homebrew (OS X)
00:24

Install PHP:

brew tap homebrew/dupes

brew tap homebrew/versions

brew tap homebrew/homebrew-php

brew install php56

Install debug and intl:

brew install php56-xdebug

brew install php56-intl

Installing PHP (OS X)
01:50

Install PHP Code Sniffer:

brew install php-code-sniffer

Clone repository in /usr/local/Cellar/php-code-sniffer/1.4.7/CodeSniffer/Standards:

git clone git://github.com/escapestudios/Symfony2-coding-standard.git /usr/local/etc/php-code-sniffer/Standards/Symfony2

Add repository to CodeSniffer routes:

phpcs --config-set installed_paths /usr/local/etc/php-code-sniffer/Standards/Symfony2-coding-standard/

Check installation:

phpcs -i

Coding standards (OS X)
01:22

sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
symfony new symfony2test 2.7

Add time zone in /usr/local/etc/php/5.6/php.ini:

date.timezone = Europe/Madrid (replace it with your time zone)

Install Zend OpCache:

brew install php56-opcache

Configure OpCache in /usr/local/etc/php/5.6/conf.d/ext-opcache.ini:

opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.fast_shutdown = 1

Creating a project (OS X)
02:34

Disable spelling

Search spelling

Go to Inspections

Disable Spelling

Ignore directories

Clear the search box

Go to Directories

Ignore app/cache

Ignore app/logs

Configure the PHP interpreter

Go to PHP

Add a new interpreter

Specify other route

Write the route —> /usr/local/bin/php

Click on OK

Configure PHP Code Sniffer

Search sniffer

Click the configuration button

Write the route —> /usr/local/bin/phpcs

Click on Validate

Apply changes

Go to Inspections

Enable PHP Code Sniffer validation

Update the standards list

Select Symfony2

Configuring PhpStorm (OS X)
02:01

Run the console:

php app/console

Start the web server:

php app/console server:run

Starting the web server (OS X)
01:05

Although Composer is not required to use Symfony, if you ever want to include a third party bundle you will need it.

Bonus lecture: Installing Composer (OS X)
00:28
+
Installing Symfony2 on Ubuntu
8 Lectures 09:58
Introduction (Ubuntu)
00:37

Documentation (Ubuntu)
00:08

sudo apt-get install php5
sudo apt-get install php5-xdebug
sudo apt-get install php5-intl

Installing PHP (Ubuntu)
00:35

Install PHP Code Sniffer:

sudo apt-get install php-codesniffer

Install git:

sudo apt-get install git

Clone repository in /usr/share/php/PHP/CodeSniffer/Standards:

sudo git clone git://github.com/escapestudios/Symfony2-coding-standard.git /usr/share/php/PHP/CodeSniffer/Standards

Add repository to CodeSniffer routes:

sudo phpcs --config-set installed_paths /usr/share/php/PHP/CodeSniffer/Standards/Symfony2-coding-standard/

Check installation:

phpcs -i

Coding standards (Ubuntu)
01:46

sudo apt-get install curl sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
symfony new symfony2test 2.7

Add time zone in /etc/php5/cli/php.ini:

date.timezone = Europe/Madrid (replace it with your time zone)

Install PDO controller:

sudo apt-get install php5-mysqlnd

Creating a project (Ubuntu)
02:33

Install JDK:

sudo apt-get install openjdk-8-jdk

Disable spelling

Search spelling

Go to Inspections

Disable Spelling

Ignore directories

Clear the search box

Go to Directories

Ignore app/cache

Ignore app/logs

Configure the PHP interpreter

Go to PHP

Add a new interpreter

Choose the default route /usr/bin/php

Write the name PHP

Click on OK

Configure PHP Code Sniffer

Search sniffer

Click the configuration button

Write the route —> /usr/bin/phpcs

Click on Validate

Click on OK

Go to Inspections

Enable PHP Code Sniffer validation

Update the standards list

Select Symfony2

Configuring PhpStorm (Ubuntu)
02:00

Run the console:

php app/console

Start the web server:

php app/console server:run

Starting the web server (Ubuntu)
01:01

Although Composer is not required to use Symfony, if you ever want to include a third party bundle you will need it.

Bonus lecture: Installing Composer (Ubuntu)
01:18
+
Installing Symfony2 on Windows
8 Lectures 11:32
Introduction (Windows)
00:36

Documentation (Windows)
00:08

Installing PHP (Windows)
00:13

Create pear.ini:

pear config-create / c:\xampp\php\pear.ini

Configure directories:

pear -c pear.ini config-set doc_dir c:\xampp\php\pear\docs

pear -c pear.ini config-set bin_dir c:\xampp\php

pear -c pear.ini config-set ext_dir c:\xampp\php\ext

pear -c pear.ini config-set php_dir c:\xampp\php\pear

pear -c pear.ini config-set cache_dir c:\xampp\php\cache

pear -c pear.ini config-set cfg_dir c:\xampp\php\cfg

pear -c pear.ini config-set data_dir c:\xampp\php\data

pear -c pear.ini config-set download_dir c:\xampp\php\download

pear -c pear.ini config-set php_bin c:\xampp\php\php.exe

pear -c pear.ini config-set php_prefix \php.exe

pear -c pear.ini config-set temp_dir c:\xampp\php\tmp

pear -c pear.ini config-set test_dir c:\xampp\php\pear\tests

pear -c pear.ini config-set www_dir c:\xampp\php\pear\www

Configure auto discover:

pear -c pear.ini config-set auto_discover 1

Clear cache:

pear -c pear.ini clear-cache

Install PHP Code Sniffer:

pear -c pear.ini install —alldeps PHP_CodeSniffer

Clone repository in C:\xampp\php\pear\PHP\CodeSniffer\Standards:

git clone git://github.com/escapestudios/Symfony2-coding-standard.git

Add repository to CodeSniffer routes:

phpcs --config-set installed_paths Symfony2 C:\xampp\php\pear\PHP\CodeSniffer\Standards\Symfony2-coding-standard

Check installation:

phpcs -i

Coding standards (Windows)
03:16

php -r "readfile('http://symfony.com/installer');" > symfony php
symfony new symfony2test 2.7

Enable xdebug in php.ini:

Uncomment XDebug's zend_extension

Enable intl in php.ini:

Uncomment extension=php_intl.dll

Add xdebug's max nesting level:

xdebug.max_nesting_level = 250

Configure OpCache:
[Opcache]
zend_extension = "C:\xampp\php\ext\php_opcache.dll"
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.fast_shutdown = 1

Creating a project (Windows)
02:53

Disable spelling

Search spelling

Go to Inspections

Disable Spelling

Ignore directories

Clear the search box

Go to Directories

Ignore app\cache

Ignore app\logs

Configure the PHP interpreter

Go to PHP

Add a new interpreter

Choose the default route C:\xampp\php\php.exe

Click on OK

Configure PHP Code Sniffer

Search sniffer

Click the configuration button

Select C:\xampp\php\phpcs.bat

Click on Validate

Click on OK

Go to Inspections

Enable PHP Code Sniffer validation

Update the standards list

Select Symfony2

Configuring PhpStorm (Windows)
02:02

Run the console:

php app\console

Start the web server:

php app\console server:run

Install assets:

php app\console assets:install web

Starting the web server (Windows)
01:21

Although Composer is not required to use Symfony, if you ever want to include a third party bundle you will need it.

Bonus lecture: Installing Composer (Windows)
01:03
+
Bonus: Learning to develop with Symfony2
1 Lecture 00:20
Bonus lecture: Introduction to web development with Symfony2
00:20
About the Instructor
David Morales
4.1 Average rating
406 Reviews
11,103 Students
6 Courses
Computer Engineer and IT Teacher

Since the year 2000 I have been teaching to public and private companies from Barcelona, mainly about Unix and Linux systems, and web technologies such as PHP, Javascript and Java.

In 2005 I completed my B.S. in Computer Science at the University of Barcelona.

I have worked for several startups using PHP and the Symfony framework since 2006. In 2011 I switched to Ruby on Rails as my main framework to continue building big complex web sites.