Dano Manion

Symfony Programming Notes


  • Composer: is a dependency manager application that can be used to install PHP packages.
    • Composer is just a manager. It does not store any libraries or packages in itself. However, it works very closely with a package repository called Packagist to make sure that it gets the right packages with the correct dependencies.

Installing & Runnit it on your system

$ sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony

// Create a new project
$ symfony new mava

// OR
// $ composer create-project [package] [/path] [version]
$ composer create-project symfony/framework-standard-edition
$ composer install
$ composer update


  • PrestaShop - FOSS eCommerce store.


  1. “Do Something” - Whatever goes between {% %} should be executed
  2. “Say Something” - Whatever is expressed via {{ }} should be printed
  3. Whatever is enclosed by {# #} is just a comment

Notes Dump

  • We will use the request/response life cycle as a tool to discuss Model-View-Controller (MVC) in general and explore Symfony concepts such as routing, action (or controller, if you like), TWIG, Doctrine, and application setup.
  • I wonder if Custom Bundles is like custom Drupal modules, where it’s easier to do all of your feature like work in that folder then migrate it to new projects and make it easier to update the core source code?

Best Practices

  • http://symfony.com/doc/current/best_practices/index.html

request/response life cycle

  1. Firstly, you send your request by entering a URL in your browser.
  2. The server then responds with a page and message (success, failure, and so on) depending on your request. End of story.

  • The handle() method facilitates the flow between the browser and server


From the Author. Sohail Salehi

When he is not staring at his computer screen, he is watching sunsets and sunrises, swimming and surfing in the ocean, and putting his subconscious mind at work by asking creative questions while facing life’s ups and downs on a daily basis.