Intervention Image - Could not open input file: composer.phar - laravel

When I install the php composer.phar require intervention/image this,
I got the one error:
Could not open input file: composer.phar
I follow this step but I can't find the solution to my error: Intervention Image

To install the most recent version, run the following command
composer require intervention/image
OR
Add to composer.json file:
"require": {
"intervention/image": "^2.5",
},
After, Run this command in the command prompt: composer update
More info: intervention/image

use just
composer require intervention/image
instead of
php composer.phar require intervention/image

If you added composer to your system environment variables. you can call composer globally like this:
composer require intervention/image
How to add composer to system environment variables
Search "Edit the system environment variables" in start menu.
Click on "Environment variables"
Find "PATH" variable and edit it.
Add your composer installation folder path. C:\ProgramData\ComposerSetup\bin
Find your composer installation folder
You can find where composer is installed by this command:
which composer

Related

composer require could find package

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

how to install illuminate/mail via composer in Lumen

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.

Class 'BeyondCode\DumpServer\DumpServerServiceProvider' not found when I make composer install --optimize-autoloader --no-dev

I'm deploying my Laravel application and want to optimize the autoload, normally I would run the command
composer install --optimize-autoloader --no-dev
This is an application that runs Laravel 5.8. I am getting the following error:
In Application.php line 662:
Class 'BeyondCode\DumpServer\DumpServerServiceProvider' not found
Script #php artisan package:discover --ansi handling the
post-autoload-dump event returned with error code 1
If you do not have development dependencies on the laravel-dump-server, remove the following line from composer.json.
"beyondcode/laravel-dump-server": "^1.0".
Then run the following command.
composer install
Or, even easier, just run the following.
composer remove --dev beyondcode/laravel-dump-server
In my case I have done below steps
Delete vendor folder
Run: composer self-update --1
And again run: composer install
Then you can run any command you want
A detail around this issue has been written in one of the GitLab issues on
https://github.com/GoogleCloudPlatform/php-docs-samples/issues/736
This issue explain why this dev package creates problem on your build server.
For me, The issue resolved after I've added this in composer.json
{
"scripts": {
"gcp-build": [
"composer install --no-dev"
]
}
}
This will remove all the dev dependencies
I simply do
composer update
and then I redo again
like myself I run
php artisan migrate
Solution 1
composer install --optimize-autoloader --no-dev
if this not work try and getting error undefine index: Name
Solution 2
Step1: `composer self-update --1`
Step2: composer install
Bingo...!!!
You may need to run composer update with the --no-plugins option.
composer update --no-plugins

Update global composer on Ubuntu 16.04

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.

How to install PhpUnit with XAMPP using composer?

Im trying to install PHPUnit on Xampp using Composer.I have followed the steps from the following link
http://woeiyu.com/software/php/installing-phpunit/
but im got the error "proc_open(NUL): failed to open stream: No such file or directory" while executing composer update
I suggest you skip XAMPP and use Git. Much easier. But you actually don't need those two to install it.
Put this in your composer.json
{
"require-dev": {
"phpunit/phpunit": "5.0.*"
}
}
Run it like this in Git or XAMPP composer update after that composer install
and that's it. You successfully downloaded and installed PHPUnit. It's located in your root vendor/
You can install phpunit with composer globally using
$ composer global require phpunit/phpunit
For reference see https://getcomposer.org/doc/03-cli.md#global.

Resources