I'm trying to install Symfony and some bundles in a new computer.
I initialize the project and create a database.
However, I also want to download DoctrineFixturesBundle and ´DoctrineMigrationsBundle`.
I'm using XAMPP, so I do:
C:\xampp\htdocs>composer.phar require doctrine/doctrine-fixtures-bundle
And then it opens "composer.phar" in a notepad...
You forgot that you need to call composer from php interpreter.
C:\whateverthepathis\php.exe C:\xampp\htdocs>composer.phar require doctrine/doctrine-fixtures-bundle
Or just install composer globally using its installer.
Install Composer with this command;
php -r "readfile('https://getcomposer.org/installer');" | php
and you can use php composer require doctrine/doctrine-fixtures-bundle
Related
I have a MacBook with Catalina 10.15.6
I have PHP and Composer installed.
I use the command composer require "codeception/codeception" --dev
And it just sits and waits.
what are we waiting for?
You executed some other composer application that you had installed in your system.
To use composer.phar file you have to execute it with PHP php composer.phar require "codeception/codeception" --dev or make it executable and run ./composer.phar require "codeception/codeception" --dev
I am trying to install unideveloper/laravel-password in my laravel 5.8 project using:
composer require --dev "unicodeveloper/laravel-password": "1.0.*"
But, I get the following error:
[InvalidArgumentException]
Could not find package 1.0.*.
Did you mean one of these?
lastguest/ev
1032443065/pudge
appium/php-client
authbucket/oauth2
wicochandra/captcha
how to solve this please?
Instead of updating it into composer.json file ,
Install it directly using the following command .
composer require unicodeveloper/laravel-password
Which is worked for me .
If you are looking for particular version ,
Then you can install the particular version by using the command :
composer require unicodeveloper/laravel-password:1.0.*
That syntax is for composer.json file and is not correct for CLI command
composer require vendor/package:version
for example:
composer require --dev unicodeveloper/laravel-password:1.0.*
Hope this helps
A setting mail-in on lumen project, I should install illuminate\mail via composer, but show me an error:
Your requirements could not be resolved to an installable set of packages
You can install through composer using the following command in the terminal:
composer require illuminate/mail
Make sure you are in the project directory.
I'm trying to update the global composer but I can't do it.
I think I can do composer init and then make php composer.phar update but I prefer to update the global composer. If I run the latter, I get:
composer could not find a composer.json file
How can I make it? I try to find the composer files of installation and I can't find them and also I try to find information using composer but nothing.
I am trying to install laravel via composer ( http://laravel.com/docs/quick#installation ) and I got stuck at the point where it requires Mcrypt extension
Mcrypt PHP extension required.
I installed Mcrypt extension using brew. But still it throws the same requirement error.
I also tried changing the path as suggested here but my which php doesn't show anything other than
/usr/bin/php
Am I doing something wrong with assigning path at ~/.bash_profile? why is "which php" output still the same. and why is mcrypt installation not working on laravel workout?
What command did you use to install mcrypt? It is possible that you try to install the mcrypt extension for the wrong php version.
Try debugging the situation with
php -v
and
ls -al /usr/bin/php
There is a different install recipe for version 5.5 and 5.4 of PHP.
brew install php54-mcrypt
brew install php55-mcrypt
OK, I was fed up off all other solutions which weren't working, so finally downloading and compiling php from source itself worked.
So here's what I did:
Download php from official site
Follow following instructions
cd to/extracted/php/folder
cd /ext/mycript
phpize
./configure
make
make test
sudo make install
Add extension=mcrypt.so to /etc/php.ini file.
Now restart the server
sudo apachectl restart
You are good to go, Cheers! :)