This course is archived!
This tutorial uses Symfony 3, but all the concepts around PHP 7 are still ?valid.
01.
This course is archived!
This tutorial uses Symfony 3, but all the concepts around PHP 7 are still ?valid.
Whoops, an error! Please, try again later.
13 Comments
Project link : https://knpuniversity.com/s...
Hi, I have some "problems/warnings/errors" with php 7.3, but after "composer update", everything is perfect, hope it helps,
Petr
Hi, I tried to follow the setup instructions for this course but hit a problem trying to run the server. When I run php bin/console server:run after running composer install, I get
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "server" namespace.
And running php bin/console shows no server commands.
What should I do? I am taking this tutorial to learn PHP7 - I do not have much knowledge of Symfony (yet...).
Hey Griff P.
I guess you're on Symfony5, if that's the case, the webserver-bundle does not come by default, you can whether install it or spin up the webserver by using the Symfony CLI. If you already have it installed, then just run
symfony --helpto check all the commands (you'll have to runsymfony serve -d)Cheers!
Hi Diego - I have unpacked the supplied course code into an empty directory, and so the version of Symfony I am running is the one that results from running 'composer install' in the /start directory that was provided as part of the course materials. Running bin/console about after the Composer install tells me I am running Version 3.3.18. Try it yourself - unpack the course code from the website into an empty directory, run 'composer install' and then try running 'bin/console server run', as given in the instructions in the README file. Does it work for you, or do you get the same error that I reported (and am still seeing)? Would it be possible for you to give me some more detailed instructions on how to get the server running, please? (I am running PHP 7.4.5 on OSX Mojave.)
Hey Griff P.
The course code was missing the web-server-bundle dependency. I just fixed that. If you download again the course code, the
bin/console server:runcommand should work. If you don't want to do that, you can require that dependency by yourself, just follow this steps1) run
composer require symfony/web-server-bundle "3.3.*" --dev2) Add this line
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();inside the fileapp/AppKernel.php``// app/AppKernel.php
class AppKernel extends Kernel
{
}
Hi MolloKhan
Thank you so much for taking the time to make this fix. It works great now. Very much appreciated. I love SymfonyCasts - it's a fantastic resource. Cheers!
Hi, after typing php bin/console server:run, I get this error message on my terminal:
unable to find file @frameworkbundle/resources/config/router_dev.php
Hi @Flo
Can you please provide more information about your environment: Operation System name, PHP version?
Cheers!
Hi @sadikoff ,
thanks for your reply. I use Windows 8.1 and PHP 7.1.16
My other Symfony project that I created from scratch or downloaded are working. Only that one from the tutorial is not.
Cheers!
Can you please:
vendor/directorycomposer installphp bin/console server:runif there is still an issue than:
startdirectorycomposer installphp bin/console server:runCheers!
Thanks, I tried but still the same error. I can view the webpage for 2mins and then it shows me the error.
Hm, this is really weird! Could you please say which PHP extensions have you activated?
"Houston: no signs of life"
Start the conversation!