I am trying to install the yii framework. I already had a composer installed.
so i run the command to install composer assset plugin:
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
the command runs for sometimes and gives an error:
Fatal error:Call to undefined method
composer\package\Loader\ArrayLoader::praseLinks<>
but, new project is created with:
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.8
Try this
php composer.phar update
or else
php composer.phar self-update
Composer version is old. You will need to update composer.
Run the following command -
php composer.phar self-update
This should resolve the error
Related
the error that I encountered when I wanted to run my website
You can try to run composer install or composer update to install all libraries first
You cloned it from Github so it does not have any vendor folder in it
so just run
composer install
or
composer update
I am new in Php and start working on laravel based project but facing one issue when installing composer on project level (I am using Phpstrom Ide).
composer install --no-interaction --ansi Loading composer
repositories with package information Installing dependencies
(including require-dev) from lock file Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize Script php artisan optimize handling the post-install-cmd event returned with error code 1 Failed to install
packages for ./composer.json.
Process :-
Install composer and wamp server
Hit this command in order to create laravel project
composer create-project laravel/laravel --prefer-dist
and project is created with this error and no vendor folder is created
Installing laravel/laravel (v5.4.30)
- Installing laravel/laravel (v5.4.30): Downloading (100%) Created project in C:\wamp64\www\laravel
php -r "file_exists('.env') || copy('.env.example', '.env');" Script php -r "file_exists('.env') || copy('.env.example', '.env');" handling
th e post-root-package-install event returned with error code 1
I hit the composer command for Install and get first issue in this post
Composer -v
PHP temp directory (D:\mysql\temp) does not exist or is not writable
to Composer . Set sys_temp_dir in your php.ini
Composer version 1.6.5 2018-05-04 11:44:59
composer -version
PHP temp directory (D:\mysql\temp) does not exist or is not writable
to Composer . Set sys_temp_dir in your php.ini
[Symfony\Component\Console\Exception\RuntimeException] The "-e"
option does not exist.
Exception trace: () at
phar://C:/composer/composer.phar/vendor/symfony/console/Input/ArgvInput.p
hp:124
Symfony\Component\Console\Input\ArgvInput->parseShortOptionSet() at
phar://C:/c
omposer/composer.phar/vendor/symfony/console/Input/ArgvInput.php:105
Symfony\Component\Console\Input\ArgvInput->parseShortOption() at
phar://C:/comp
oser/composer.phar/vendor/symfony/console/Input/ArgvInput.php:84
Symfony\Component\Console\Input\ArgvInput->parse() at
phar://C:/composer/compos
er.phar/vendor/symfony/console/Input/Input.php:54
Symfony\Component\Console\Input\Input->bind() at
phar://C:/composer/composer.ph
ar/vendor/symfony/console/Command/Command.php:200
Symfony\Component\Console\Command\Command->run() at
phar://C:/composer/composer
.phar/vendor/symfony/console/Application.php:843
Symfony\Component\Console\Application->doRunCommand() at
phar://C:/composer/com
poser.phar/vendor/symfony/console/Application.php:193
Symfony\Component\Console\Application->doRun() at
phar://C:/composer/composer.p
har/src/Composer/Console/Application.php:251
Composer\Console\Application->doRun() at
phar://C:/composer/composer.phar/vendo
r/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at
phar://C:/composer/composer.pha
r/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at
phar://C:/composer/composer.phar/bin/com poser:59 require() at
C:\composer\composer.phar:24
list [--xml] [--raw] [--format FORMAT] [--] []
[Symfony\Component\Console\Exception\RuntimeException] The "-e" option does not exist.
Above error comes because of options shortcuts… here composer - version means composer -v… and which is not working in your case. That's the reason behind the last error stack.
Refer this link to see GitHub issue.
the -e option does not exist
instead of running composer -version try to run
composer --version
and see it shows composer version or not...if not then the composer is not installed properly.
Then run
laravel --version
if you don't see version there. install composer and laravel again. Below link will be helpful for step by step installation.
laravel new doesn't work
It seems that composer is not properly installed on your environment...
Follow the official documentation and try again to install your dependencies.
Let me know if this solution worked.
01.composer self-update --rollback
02.composer self-update --clean-backups
When I try to install Laravel 5.5 with laravel new project --dev
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected '<<' (T_SL), expecting ']'
It is just me or because it is not release yet?
EDIT:
Btw, it is when I try to make php artisan key:generate... If I put any key in .env it works...
Thanks
composer create-project laravel/laravel blog "5.5.*" --prefer-dist
To install Laravel 5.5 you need launch composer create-project as usual and you need to set the “dev-develop” version of the laravel/laravel package:
composer create-project --prefer-dist laravel/laravel blog dev-develop
Where:
laravel/laravel: is the package for Laravel installation;
blog: is the new directory for your new project (you can change it);
dev-develop: is the next version of Laravel.
Yuo can find more information here
https://medium.com/#robertodev/how-to-install-laravel-5-5-dev-d721873a8c89
I had the same problem.
For me even
php artisan
did not work.
I fixed it with a simple
cd /my/project/folder
composer update
php artisan key:generate
in the console.
Hope this helps.
This is happening because of your Laravel Installer version. I have faced the same problem.
Run following command:
composer global update (it will update your Laravel Installer)
If you don't want to install again, then fix by following command:
composer update (from your project directory and it will update your project files)
Additional:
Sometimes, it may cause of Composer version. You can update your composer version by following command:
composer self-update
Then you can update your project files.
Hope this answer will help you.
I've downloaded a Symfony application and then checked it using php -f ./app/check.php. However, I get:
[ERROR]
Your system is not ready to run Symfony projects
Fix the following mandatory requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Vendor libraries must be installed
> Vendor libraries are missing. Install composer following
> instructions from http://getcomposer.org/. Then run "php
> composer.phar install" to install them.
However, there is no composer.phar file in this application. e.g.
php composer.phar install
Could not open input file: composer.phar
Note: I already have composer installed.
Any suggestions?
The answer is right there in the error message you received.
Install composer following instructions from http://getcomposer.org/
Instead of composer.phar run:
php composer install
I think that's what you need. If you install Composer, then you probably renamed it to composer, and that's the bin you run.
Running a CI build on codeship.io returns into an unexplainable error. The last lines of the debug text is:
[..]
Clearing the cache for the dev environment with debug true
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets handling the post-install-cmd event terminated with an exception
[ErrorException]
Undefined property: Composer\Script\CommandEvent::$getIO
The codeship documentation doesn't say much about deploying/building a Symfony application. It seems like it is impossible to create the bootstrap.php.cache file.
EDIT:
I'm using Symfony 2.4.3-DEV, composer is unable to finish the post-install-cmd scripts, so it looks like composer has no i/o interface at Codeship. Adding composer self-update to the install script at Codeship does result in the same error.
The codeship configuration is:
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# Install dependencies through Composer
composer selfupdate
composer install --prefer-source --no-interaction --optimize-autoloader
Have you specified PHP in the Select your technology to prepopulate basic commands field ? What are your Setup Commands ?
Mine are :
phpenv local 5.5
composer install --prefer-source --no-interaction
php app/console assetic:dump --env=prod