![]()
Table of Contents
Symfony2 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The Symfony Framework â Installation and Configuration
Key reasons to choose Symfony2
The history of Symfony
Installation
Installing Symfony2 using an installer
The Symfony2 directory structure
What is a bundle?
Composer
The configuration files
The Symfony2 console
Summary
2. Your First Pages
Everything is a bundle
The configuration format
Cleanups
Recreating AppBundle
Routing
Templates â the View layer
Entities â the Model layer
Migrations
Fixtures
Summary
3. Twig Templating and Assets Handling
The Twig templating engine
Assets management
Assetic
Handling third-party bundle assets
Handling your application assets
Creating a list of tasks
Summary
4. Forms
Form creation
Validation and form processing
Theming form elements
Transforming data
Summary
5. Security and Handling Users
Security handling
Installing the user manager bundle
User registration
Summary
6. Translation
Translations
Using translations in a controller
Translation file formats
Variables and pluralization
The translation strategy
Using translation keys
Database translations
Summary
7. AJAX
Installing and configuring REST features
FOSRestBundle
NelmioApiDocBundle
FOSJSRoutingBundle
Refactoring the existing code
Adding a new controller
Setting up routing and JavaScript
Summary
8. Command-line Operations
Creating the console command
Swiftmailer
Logging
Summary
9. Symfony2 Profiler and Debugger
The Web Debug Toolbar
The Symfony2 profiler
The profiler sections
VarDumper
The AJAX requests
Data collectors
The stopwatch component
Summary
10. Preparing an Application for Production
Preparing an application
Checking the code against debug code
Customizing error pages
Verifying the production server requirements
Security check
Updating the basic assets and metadata
Changing the web root directory
Deployment strategies
FTP
The rsync deployment
Continuous integrations
Deployment tools
Platform as a Service deployment
Summary
Index
![]()
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2015
Production reference: 1040915
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-876-7
www.packtpub.com
![]()
Author
Wojciech Bancer
Reviewers
Cristian Bujoreanu
Olivier Pons
Commissioning Editor
Usha Iyer
Acquisition Editor
Reshma Raman
Content Development Editor
Arwa Manasawala
Technical Editor
Shiny Poojary
Copy Editor
Kausambhi Majumdar
Project Coordinator
Shweta H Birwatkar
Proofreader
Safis Editing
Indexer
Tejal Soni
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph
![]()
Wojciech Bancer has a master's degree in computer science. He has over 10 years of experience in web application development. In 2007, after passing the Zend exam, he received a Zend Certified Engineer for PHP5 certificate. He started his career as a freelancer and consultant by developing web applications in PHP 4 and PHP 5. He has led many IT projects for clients in Europe and USA. Currently, Wojciech is a managing partner of a software organization and is in charge of the R&D structure of one of the fastest growing iBeacon projects in Europe.
![]()
Cristian Bujoreanu is a web developer originally from Romania and is currently based in ZĂŒrich, Switzerland. He specializes in web development and has a solid understanding of web application development processes, right from layout / user interface to relational database structures. He creates usable, professional, and user-friendly web applications according to the latest standards and innovative technologies.
Cristian has been in this field for nearly 7 years. He loves his work and enjoys every new project that he's involved in. After spending 4 years working for two web agencies in Romania, he moved to Switzerland in early 2012. He joined joiz, a social TV station with headquarters in ZĂŒrich. In February 2015, he started a new venture at Teamup Solutions AG.
Olivier Pons is a senior developer who has been building websites since 1997. He's a teacher at the University of Sciences (IUT) in Aix-en-Provence in France, ISEN (Institut SupĂ©rieur de l'Ălectronique et du NumĂ©rique), G4 Marseille, and Ăcole d'IngĂ©nieurs des Mines de Gardanne. He teaches state-of-the-art web techniques in NodeJS, big data / NoSQL, the fundamentals of MVC, the basics of Symfony, WordPress, PHP, HTML, CSS, jQuery and jQuery Mobile, AngularJS, Apache, the basics of Linux, and advanced VIM techniques. He has already done some technical reviews, including the Packt Publishing books Learning ExtJS, Ext JS 4 First Look, jQuery hotshot, jQuery Mobile Web Development Essentials, Wordpress 4.x Complete, and jQuery 2.0 for Designers Beginner's Guide, among others. In 2011, Olivier left a full-time job as a Delphi developer and PHP expert to concentrate on his own company, HQF Development (http://hqf.fr). He runs a number of websites, including http://krystallopolis.fr, http://artsgaleries.com, http://www.battlesoop.fr, http://www.livrepizzas.fr, http://www.papdevis.fr, and http://olivierpons.fr, his own web development blog. Currently, he's learning Unity and building a game on his own. He works as a consultant, teacher, and project manager. Sometimes, he also helps big companies as a senior and highly skilled developer.
![]()
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Di...