Symfony interview questions For Freshers & Experienced

  • Question 1) What is Symfony?
  • Question 2) Enlist major features of Symfony?
  • Question 3) Which template engine Symfony uses?
  • Question 4) What is minimum requirement to install Symfony?
  • Question 5) How to check installed version of Symfony?
  • Question 6) What are bundles in Symfony?
  • Question 7) What are Descriptors in Symfony?
  • Question 8) What is a controller in Symfony?
  • Question 9) Enlist few form helper functions of Symfony?
  • Question 10) How to set and get Session in Symfony2?
  • Sharad Jaiswal
  • 08th Dec, 2019
  • 922 Followers

Symfony interview questions
Updated ON

08th Dec, 2019

No. of Questions

10

Posted In

PHP Frameworks

Author

Sharad Jaiswal

Key Features of Symfony

Below are few major features of Symfony

User-Friendly URLs

Opensource

Stable and Sustainable

Easy Testing

Better security

Faster development

Long-term support

Big community

Good documentation

Q1. What is Symfony?

Symfony is PHP based web framework and set of reusable components.It was authored by Fabien Potencier and released under MIT license.

Q2. Enlist major features of Symfony?

Below are the few major features and improvements done in Symfony 4.3

  • New Components (HttpClient, Mailer, and Mime)
  • Redis stream transport
  • Security improvement
  • Add Timezones and Simplify API
  • New Validator (JSON, Timezone, number constraints and more)
  • Workflow, Translator, and Serializer

Read more from Symfony 4.3 curated new features

Q3. Which template engine Symfony uses?

Symfony uses twig template engine. Twig is a flexible, fast, and secure and opensource template engine for PHP and originates its syntax from Jinja and Django templates. It is licensed under a BSD License and maintained by Fabien Potencier.

Q4. What is minimum requirement to install Symfony?

The minimum requirement to install Symfony Framework is

  • PHP version 7.1.3 or above
  • Must Enable following PHP extensions
    • Ctype
    • iconv
    • JSON
    • PCRE
    • Session
    • SimpleXML
    • Tokenizer
  • var/cache/ and var/log/ directories must be writable.

Q5. How to check installed version of Symfony?

If you have access to the command line then you can use php bin/console about command to view the installed version of the Symfony framework.

You can get the version of Symfony in symfony/src/Symfony/Component/HttpKernel/Kernel.php file.

Q6. What are bundles in Symfony?

The Symfony bundle is a collection of organized files and folders that are modeled in a specified structure. Bundles can be reused in multiple applications. Everything in Symfony is a bundle.

Q7. What are Descriptors in Symfony?

Descriptors are objects in Symfony that are used to render documentation and information on Console.

Q8. What is a controller in Symfony?

Controller in Symfony is class which accepts requests and return a Response object.DefaultController class in Symfony is located in the src/AppBundle/Controller directory.

Q9. Enlist few form helper functions of Symfony?

Below we have listed some form helper functions of Symfony Framework

  • createFormBuilder()
  • createForm()
  • form_tag()
  • submit_image_tag()
  • input_date_tag()
  • select_language_tag()
  • options_for_select()
  • object_input_tag()

Q10. How to set and get Session in Symfony2?

Below is sample code to set and get Session in Symfony2

use Symfony\Component\HttpFoundation\Session\Session;

$session = new Session();
$session->start();

// set and get session attributes
$session->set('name', 'Drak');
$session->get('name');

About Author :

  • Author of Symfony interview questions

    Sharad Jaiswal

    Sharad Jaiswal is Sr. Web Developer from Noida area. He have rich experience in PHP, Angular Js, React, javascript and Node .If you any query or project on these programming you can drop your enquiry in comment section.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.