Symfony 5 fast track book bug when migrating databases - symfony

This is my first step to symfony world, and I follow tutorial from Symfony fast track book. By executing the command below, my migration failed:
symfony new --version=5.0-3 --book guestbook --debug
Everything is OK expect "Migrating the database", this is the error:
Or symfony book:check-requirements says everything is OK.
For information: pdo_pgsql is already enabled in php.ini
Any trick to solve this issue?
I have moved to PHP 7.3.12 version to solve my issue.
By staying with PHP 7.4.0 version, you cannot add property when you execute the command: php bin/console make:entity MyEntity

I started Potencier's book two days ago. I faced several problems, which I have been able to solve, but I did not find this problem. I think you should give us more information. For example: What hardware are you using? What operating system? Where did the command giving the error run from? Did you run the command from Symfony CLI?

Related

Symfony deployment problem on hostinger, impossible to download dependencies

I have been trying for several days to deploy a Symfony site. All the files are well in the public folder with the .htaccess, I only need the dependencies for the site to be functional. The problem is that when I run the command
php composer.phar update
I get several error messages concerning my version of PHP.
The host is hostinger. I know the problem comes from the composer.json file and the version of the bundles but I don't know how to solve the problem.
Thanks
you need php version 8.1 as the message says. Normally, for a deployment you should not launch a composer update. It would rather be a composer install.
I contacted hostinger, and the problem is that the server was in PHP7 after changing to PHP8 it worked. Thank you all for your responses

Fail to create a controller file with make command in Symfony

I'm learning Symfony now and I ran into a problem trying to create a controller file with the make command. The path of the project is "E:\web_dev\testproject". When I ran the command
php bin/console make:controller
and then entered the name of the controller, it returns an error "Failed to create "E:\web_dev\testproject//E:\web_dev\testproject\vendor\composer/../../src/Controller"". What is the problem?
I have the same problem.
I have found this Thread and it seems that the problem is in the Maker Bundle. After running "composer remove maker" and "composer require maker 1.0.2" it works by me.
In the other Thread they used Maker Version 1.0.0 but in Symfony4 the generated AbstactController do not Functionaly so I use Version 1.0.2.
Hope it help you.

PHP Xdebug, Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found in /

i am noob and i am trying to run xdebug under phpstorm, everytime i get this error:
PHP Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Controller\Controller' not found in /home/.../..../src/Acme/DemoBundle/Controller/DemoController.php on line 15.
In the beginnig i was thinking that is related windows 7+ uniformserver, because i was using this combination. Later i have installed ubuntu linux, lamp, latest xdebug and phpstorm. After this i have tried debugging default symfony project Acme (so i did not change any files), but nothing changed.
Have you ever encountered problem like this? If yes, can you please tell me how can i solve this?
Thank you.
Have you tried File | Invalidate caches and restart and then start the new Composer project?
I have used two javascript methods

symfony can't build schema (propel)

I've been trying symfony 1.2.12, using xampp 3.1.0 over windows XP (the jobeet tutorial). When I try to run php symfony propel:build-schema I've got the following error (over and over):
Propel Running "reverse" phing task
[taskdef] Error importing propel/phing/PropelDataModelTemplateTask.php
[phing] Error reading project file [Wrapped: Error importing propel/phing/PropelDataModelTemplateTask.php]
Some problems ocurred when executing the task: If the exception is not clear enough read the output.
(I've checked the phing version and it's 2.5.0, the latest available.)
I've searched for the PropelDataModelTemplateTask.php and is not in the project (the entire path doesn't exists!). I've created another symfony project and the file isn't there either. It looks like it's not included whit the symfony-1.2.12.tgz.
Is there something wrong within this version or should I install or update any extra component?
Thanks in advance!

Can't generate bootstrap file in Symfony 2.1.1

I've got an application written for Symfony 2.0 and I've started migrating it into Symfony 2.1. I've successfully installed all the dependencies with composer but a script fails...
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when generating the bootstrap file.
Any clue? I'm completely lost and I've googled it but I've only found a post in a forum with people having the same problem as me...
The problem is that the manual is not clear. It tells you to execute composer.phar install before telling that symfony-standard files need to be replaced.
So now you have to replace
AppKernel.php,
AppCache.php and
autoload.php (and remove odd files)
and update your config.yml file with the given tips.

Resources