Symfony2 Admin Generator error - symfony

I'm getting the following error while try to setup admin from console
php app/console admin:setup
symfony call to undefined method nodeBuilder::append();

#user654127 you must know which version you work with,for symfony 2.0 you use 2.0 branch and for symfony 2.1 you use the master branch,

Related

assert error in symfony/translations when dumping translations

I have recently updated my project from symfony 6.1 to symfony 6.2 and I'm experiencing issue while dumping translations
commend that I use:
bin/console translation:extract pl --force --format=yaml
results in:
exception trace points to
vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php:36
I've already updated all packages, especially symfont/translation to version 6.2.*
For now, only downgrading symfony back to 6.1 solves this for me.
This issue has been fixed in symfony 6.2.2. You can update your project and try again.
It has been resolved in my projects.
composer update "symfony/*"

Symfony 6, Can't create a controller

I've installed Php 8 and I try to start coding with Symfony but I can't even create a controller.
I've created my project with:
create-project symfony/website-skeleton covid
The project was created with the version 6.1.99.
Then, in VScode, I used
symfony console make:controller Home
and it give me an error:
Parse error: syntax error, unexpected '?' in D:\Bureau\dev\covid\vendor\autoload_runtime.php on line 15
I don't understand why it's happening. Any idea ?
Edit:
It works fine if I use
php bin/console make:controller home
It seems I just can't use the symfony commands.

symfony 4.4 + sonata deprecations like sonata.deprecated_text.twig.extension | sonata.twig.deprecated_template_extension

I've installed sonata + symfony 4.4 on new clean empty project.
Did everything according to https://symfony.com/doc/current/bundles/SonataAdminBundle/getting_started/installation.html
and executed the recipes , composer adviced me to apply.
But on pristine setup I'm having a few deprecations like:
User Deprecated: The "sonata.twig.deprecated_template_extension"
service is deprecated since sonata-project/twig-extensions 1.4.
User Deprecated: The "sonata.deprecated_text.twig.extension" service
is deprecated since sonata-project/admin-bundle 3.70. You should stop
using it, as it will be removed in 4.0.
The child node "legacy_twig_text_extension" at path
"sonata_admin.options" is deprecated since sonata-project/admin-bundle
3.70 and will be removed in 4.0.
Is it ok? I don't have any legacy I've just set up compeltely new project?
Can I somehow avoid these deprecations or is it just an expected behavior and I have to get used to it?

Symfony 4 production WebProfiler route

I try to change a Symfony 4.4 in production mode but after executing this command line from the documentation : APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear
I get this error :
Bundle "WebProfilerBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your App\Kernel.php file? in #WebProfilerBundle/Resources/config/routing/wdt.xml (which is being imported from "/home/admin/mercenaries/config/routes/dev/web_profiler.yaml")
The env is correct because the bundle is not loaded.
But how do I do for cancel this routes/dev repository to load ?

Cannot run the test example of sfPhpExcel

I have installed sfPhpExcelPlugin successfully and now I am trying to run an example as per the direction of symfony plugin's website.
I am getting this error, do you guys know how to solve it?
C:\wamp\www\orangehrm-3.01\symfony>php symfony plugins/sfPhpExcelPlugin/examples_1_2/01simple.php
Task "plugins/sfPhpExcelPlugin/examples_1_2/01simple.php" is not defined.
By using php symfony command you are trying to run Symfony task. Your example of sfPhpExcelPlugin is not a Symfony task. Try:
php plugins/sfPhpExcelPlugin/examples_1_2/01simple.php
And to see list of all available Symfony task type:
php symfony

Resources