Search for:
01s Agency
Please answer each of the questions below to the best of your knowledge. Thank you.
X/Twitter
This field is for validation purposes and should be left unchanged.
Date
MM slash DD slash YYYY
Name
(Required)
First
Last
Email
(Required)
Upwork / Freelancer / Malt / etc... profile link
(Required)
Test begins...
In Symfony, which represents the structure of our business entities?
Model
Controller
Helper
View
Which class no longer exists in the Symfony 5 version?
Symfony\Bundle\FrameworkBundle\AbstractController
Symfony\Bundle\FrameworkBundle\Controller
Symfony\Component\Security\Core\User\UserInterface
Symfony\Component\Security\Core\User\EquatableInterface
Symfony default template engine is
Twig
Mustache
Blade
Plates
How do you avoid running out of memory when executing bulk inserts with Doctrine? (Doctrine\ORM\EntityManager $em)
Use $em->exit();
Use $em->flush();
Use $em->refresh();
Use $em->clear();
How to read the value of a form field in a template branch?
{{ form.FIELDNAME.widget.value }}
{{ form.FIELDNAME.vars.value }}
{{ form.FIELDNAME.value }}
{{ form.FIELDNAME.widget.vars.value }}
Which of these Symfony components does not exist?
Ldap
Lock
VarDumper
FileHandler
What are the best settings for folders security in UNIX environment ?
444
644
664
666
What is default value of cookie lifetime
0
48810
3600
60
1800
What must a Symfony Controller return?
Response object
DataResponse
ResponseArray
HTMLResponse
What is the minimum PHP version for Symfony 5?
7.2.5
7.1.5
8.0
6.0
What are the best settings for files security in UNIX environment ?
775
557
755
555
What is the comment syntax for Twig?
{{- Comment Text -}}
{[ Comment Text ]}
{{# Comment Text #}}
{[- Comment Text -]}
{# Comment Text #}
Which of following console commands checks for syntax errors in Twig templates?
None of the above
twig:lint
twig:check
twig:error
Which of the following default filters doesn't exist in Twig?
join
unescape
split
length
strtolower
How to create a Twig extension?
extend AbstractTwigExtension
implement ExtendableInterface
extend AbstractExtension
implement TwigExtensionInterface
Which of the following Twig codes is valid to check if a variable has the same value and the same type as another ?
{% if a == b %}
{% if a is sameas(b)) %}
{% if a same as b %}
{% if a === b %}
Which base class extend to symfony default test classes ?
DefaultTestCase
WebTestCase
UnitTestCase
BaseTestCase
How can you print a random value from an array with Twig?
It is not possible.
{{ random([1,2,3]) }}
{{ [1,2,3]|random}}
{{ randomize() }}
{{ [1,2,3]|randomize}}
What is the 1st Event dispatched by Symfony?
ControllerEvent
ControllerArgumentsEvent
RoutingEvent
RequestEvent
What's the output of the following snippet? {{ {name: "Xavier", lastName: "Nemo", first: false, address: "P Sherman, 42 Wallaby Way, Sydney"} | first }}
False
The filter “first” does not exist at Twig
Xavier
name
Error: Array to string conversion
Which class to use to inject Twig into a Service?
\Twig_Environment
Twig\Environment
Template\Twig
Template\TwigInterface
How to override the vendor directory?
Define the getVendor method in Kernel.php
Define the getVendor method in index.php
It is not possible
Set the vendor-dir option in the composer.json
What is the signature of Kernel :: terminate()?
terminate(Response response,Requestrequest, $debug = false)
terminate(Request request,Responseresponse, $debug = true)
terminate(Request request,Responseresponse)
terminate(Response response,Requestrequest)
Which command to use to verify that the arguments injected into a service match their type declaration
php bin/console lint: container --check
php bin/console debug: container --check
php bin/console debug: container
php bin/console lint: container
What is the output of the following snippet? {{ app.username|default('User is not logged in') }}
User is not logged in
Variable "app" does not exist.
The filter “default” does not exist at Twig
Key "User is not logged in" for array does not exist.
Key "username" for array does not exist.
The Output Escaping in Twig
is necessary to prevent XSS attacks.
is enabled by default.
is disabled by default.
Twig is not able to escape the output.
can be disabled specifically in some variable with the raw filter.
When displaying a URL inside an anchor tag (<a>), which function should be used to escape the URL before displaying it?
esc_html()
esc_url()
esc_attr()
esc_js()
attribute_escape()
What is the fully functional application that contains Symfony2 core libraries a selection of useful bundles and default configuration?
binaries
distributions
core libs
composer
How can you write the routing configuration in Symfony?
.XML
.YAML
PHP
All the above
Which of the following will hash a string/password to its md5 equivalent?
password_md5()
wp_generate_md5()
md5()
wp_generate_password()
When configuring a service, in which case should the shared option be set to false?
When returning a new instance of the service
When returning the same instance of the service
When defining the service as final
When defining the service as private
Which format respects the good naming practices of a TWIG file?
Formcreateproduct.html.twig
FormCreateProduct.html.twig
form_create_product.html.twig
Form_Create_Product.html.twig
What is the default routing configuration file in Symfony2 application?
app/config/routing.xml
app/config/routing.yml
app/config/routing.php
None of the above
Which configuration format is powerful but less readable than standard configuration formats?
PHP
XML
HAML
YAML
Which of the command is used to run AcmeHelloBundle in Symfony?
.$ php app/console generate:bundle –namespace=AcmeHelloBundle/HelloBundle –format=yml
.$ php app/console generate:bundle –namespace=”/HelloBundle –format=yml
.$ php app/console generate:bundle –namespace=Acme/HelloBundle –format=yml
.$ php app/console generate:bundle –namespace=Acme –format=yml
Symfony core web-framework is a bundle called?
CacheBundle
FrameworkBundle
SymfonyBundle
ExtraBundle
Which one is the Symfony framework applications?
Drupal 8
Dailymotion
Thelia
All the above
Which is not a form helper functions in Symfony?
Get_user
Form_start
Input_password_tag
Checkbox
When designing for mobile devices, it is best to:
Use percentage measurements for formatting to adjust dynamically
Use fixed measurements to accommodate the smaller screens
Not specify measurements because there are so many different models and sizes
What constraint does not exist?
DivisibleBy
Uuid
DomainName
UserPassword
In the ContainerInterface which method does not exist?
set
hasParameter
initialized
all
Which class is not part of Symfony?
DataCollector
AdvancedUserInterface
ExpressionCacheWarmer
Fullstack
Which statement is wrong?
Symfony is a set of PHP components
Symfony is a framework for web projects
Symfony is tightly based on the HTTP request-response paradigm
Symfony is just an MVC framework
What does the 'composer dump-env prod' command do?
This command does not exist
It parses all the .env and dumps their values into an .env.local.php file
It displays the missing environment variables used in the application
It reads .env files
How to use the denyAccessUnlessGranted method of the AbstractController?
this−>denyAccessUnlessGranted( token, $ post, 'view');
this−>denyAccessUnlessGranted(′view′, post);
this−>denyAccessUnlessGranted( post, 'view');
this−>denyAccessUnlessGranted( post, 'view', $ token);
What is the use of FlashBag?
FlashBag is used to fetch data from database time of redirections pages
FlashBag is used to store JSON data of user login.
None of these
FlashBag is used to hold the data during the page redirections
To apply the render() method in Symfony what controller you must extend?
Render Class
Config Class
Router Class
Controller class
In which year was the first version of Symfony released?
2009
2015
2012
2005
___ methods to simply create the request object in Symphony.
request=this->getRequest();
None of the above
Both A & B
$request = Request::createFromGlobals();
It's possible to use the same PHP constants in Twig by default?
No, it is not possible.
Yes, using the get_constant_value filter.
Yes, wrapping the constant name with triple brackets and single quotes.
No, you would need to create a custom extension.
Yes, using the constant function.
I confirm that I am conversant with
(Required)
Git
Plesk
Comments.?
If you have anything to add, please write it here...