Monday 21 October 2019

Symfony2 Interview Questions and Answers for Beginners

Symfony2 Interview Questions and Answers for Beginners

Question: What is Symfony?
Symfony is a PHP web application framework for MVC applications.

Question: Is Symfony Open Source?
Yes, It is Open Source.

Question: What is current Stable version of Symfony?
Version: 5.0.4, Dated: 31 Jan 2020

Question: What is offical website of Symfony?

Question: What is minimum PHP Version requirement for Symfony?
PHP 7.2.5

Question: What are benefits of Symfony?
  1. Fast development
  2. MVC Pattern
  3. Unlimited flexibility
  4. Expandable
  5. Stable and sustainable
  6. Ease of use.

Question: How to concatenate strings in twig?
{{ 'http://' ~ }}

Question: How to get current route in Symfony 2?
$request = $this->container->get('request');
$currentRouteName = $request->get('_route');

Question: How to render a DateTime object in a Twig template?
{{ game.gameDate|date('Y-m-d') }}

Question: How to var_dump variables in twig templates?
{{ dump(user) }}

Question: How to get the request parameters in symfony2?

Question: How to get list of all installed packages in composer?
composer global show