I'm new on symfony, after following instruction to install it, it said i have to run:
bin/console server:run
i type it on my symfony instalation folder. but i got error:
Could not open input file: bin/console
and then i'm searching the answer in here and it told me to run app/console
bin/console server:run
but it just got the same problem. is it i miss some bin folder here or something? since i can't see bin folder or app folder on my project root folder. here's my project folder structure:
You obviously cloned a Git repo, which does not contain all Symfony framework components.
You have to create symfony project through
symfony installer http://symfony.com/doc/current/setup.html
or
with composer composer create-project symfony/framework-standard-edition my_project_name.
Related
I want to create new laravel project by composer. I use composer create-project laravel/laravel new-project command for create new project. then, my project is created following this picture.
I start Laravel's local development server using the Laravel's Artisan CLI serve command (first cd new-project and then php artisan serve command). But I got the following error.
Why is there no vendor folder in this project?!!!
How do I fix this error?
(I used PHP 8.1.10)
You need to issue composer install to install packages which creates the vendor/ folder
Everywhere I look in the Symfony documentation for Symfony 4.2, it says that to clear the cache, I run:
php bin/console cache:clear
However, this bin/console is a relative path. I can't find bin/console anywhere. I've done a find on my composer vendor directory. Nothing.
Where is bin/console?
I'm running php 7.2.
Symfony 4.x structures in like this (From CoderSkills)
If you don't have the same after your installation, remove your project folder and create a new ones by running composer create-project symfony/website-skeleton myNewProject
Here is a guide to start a new Symfony project
I am new to Laravel and PHP programming. I am building a web application using laravel framework. When I create project using composer create-project it creates laravel files inside the laravel folder and I move all the files out of laravel folder and delete the empty laravel folder as belo.
-root folder
--app
--bootstrap
--config
--database
--public
-----------
After, I pushed the project to github and clone it from another computer and to add laravel files I execute composer install. Now laravel framework files are created inside a laravel folder instead of root directory.
-root folder
--app
--bootstrap
--config
--database
--public
--laravel
----app
----bootstrap
----config
----database
----public
How can I change the location, composer create the laravel framework files?
If you want to install laravel with composer then you should follow bellow this way:
Firstly install Composer according to your operating system.And then if you use xampp then create a project folder or run a command composer create-project --prefer-dist laravel/laravel blog this will create a root folder and a sub-folder named laravel.
Your problem is that when you secondly clone git form github that time you mixed up the main root folder that's why its duplicated.
I think you should re-install again according the given procedure.Hope this will solve your problem.
Another way: if in your pc have installed composer then you just clone the git and after that in the root folder (cloned git folder) run the command composer update.It should solve your problem.
Tricks: For opening root folder with command for windows operating system. Press select the root folder and Ctrl + Shift + right button of mouse then click the options Open command window here .
LARAVEL DOC.
Thanks.
Use this to create Laravel project
composer create-project laravel/laravel YourProjectName
I am using Symfony2 on my MacBook in local. So I have Symfony2 installed, MAMP installed and composer installed. But not sure if I installed them where I should install it. Would be very nice to have an overall files and folder plans to do it properly.
Here where I install Symfony and where I have composer:
My symfony2 is here:
Applications/MAMP/htdocs/Symfony/
this file: composer.json is in Symfony
Applications/MAMP/htdocs/Symfony/composer.json
And composer.phar and again composer.json is in here:
username/MyWebSite/bin/composer/composer.phar
-------------------------------/path/composer.json
(where should I put my symfony file and my composer files? What should I change (configuration) so that my website still working on localhost if I change something?
Try to put composer.json and composer.phar at the root of your Symfony folder (Applications/MAMP/htdocs/Symfony/).
Then "php composer.phar update" in the Command Line Interface.
Hoping someone could help me out with this one please.
My project (on github https://github.com/irvingswiftj/iceMarkt ) when running composer install, seems to run without a hitch, until running the post update commands. In which I end up with the following error (when adding param -vvv):
Updating the "app/config/parameters.yml" file
Could not open input file: bin/console
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
If I now browse my project directory, I can see that bin/console is never created!
I had deleted the bin directory assuming that the executable console file would be created in my next composer install. I was wrong! Don't gitignore your bin/composer file and also make sure that if you are using the symfony 3 folder structure, you don't have .gitignore for the symfony 2 folder structure.
I had the same problem because I was accostumed to add the bin directory to my .gitignore file, because in Symfony2 all bin files (including the ones from other vendors) where placed in that folder, but that is not the case in Symfony3, so we can add the bin directory to our code repositories.
You can solve problem installing a new application (using the symfony installer) and copying the bin directory from this new project to your own project.
Using Symfony 4 / Symfony Flex, you need to install the symfony/console package:
composer require symfony/console
Then use from your project dir:
./bin/console
As the file itself is starting with a shebang #!/usr/bin/env php you can execute it right away without php infront.
With newer versions of Symfony and Flex installed,
composer --force recipes:install symfony/console
This will bring bin/console into existence.
If it's already there but you need to update it, use
composer recipes:update symfony/console
composer recipes
Just lists your recipes.