I have tried to install html2text via composer to my laravel application. Here is a link to the html2text repository. https://github.com/mtibben/html2text
I have tried composer require mtibben/html2text giving this error:
[InvalidArgumentException]
Could not find package mtibben/html2text at any version for your
minimum-stability (stable). Check the package spel ling or your
minimum-stability
Also I have tried composer require https://github.com/mtibben/html2text.git giving this error:
[UnexpectedValueException]
Could not parse version constraint //github.com/mtibben/html2text.git:
Invalid version string "//github.com/mtibben /html2text.git"
How do I install html2text?
Its a php package, u can't install with composer require
U may want to read this tutorial
http://laraveldaily.com/how-to-use-external-classes-and-php-files-in-laravel-controller/
Do you already have a composer.json file in your directory? If not, this could be the error, because in this file you will configure which version of the package you want to install in to your project.
The second exception gives a hint to that missing version!
If you have a composer.json file please add its content to your question, so that we can take a look at it.
Here you can find further informations:
https://getcomposer.org/doc/01-basic-usage.md#composer-json-project-setup
i faced the same problem.
And neither the creation of releases, nor any tags helped.
The solution for me turned out to be updating the composer from last version.
it's for composer, nothing else. If you already installed composer and composer version is 2 then convert it to version 1.easy way to solve this problem is ,delete the composer folder from your system and re install it. download from here: https://getcomposer.org/
Related
An important security release for laravel-query-builder was launched.
Since I use it in my project, I want to check what version I am using. But I couldn't find it. I already searched in my composer.json file. Laravel version that is being used is "laravel/framework": "5.8.*".
Where is it located?
To check if this package is installed in your installation, type in your terminal:
composer show
It will show all your installed packages.
If you not installed this package with the command:
composer require spatie/laravel-query-builder
That package will not exist in your Laravel folder, because it's not a default package. And you do not have to worry.
Execute composer info | grep laravel-query-builder on your project root folder.
That will give you your installed version of the package, if the output is empty you don't have it installed.
I'm running Laravel 5.5.
While trying to install jacquestvanzuydam/laravel-firebird via Composer,
but it fails. The Composer shows me:
[InvalidArgumentException]
Could not find a version of package jacquestvanzuydam/laravel-firebird matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
This package does not have any stable release. You need to specify branch in constrait directly:
composer require jacquestvanzuydam/laravel-firebird:dev-master
This will install version from master branch. List of available branches you can find or right column on https://packagist.org/packages/jacquestvanzuydam/laravel-firebird.
You may also report this issue (no stable release of this package) to package maintainer. Using branch instead of regular constraint may give unexpected compatibility breaks, you should really avoid it where possible.
Adding "minimum-stability": "dev" to composer.json before installation worked for me.
I installed laravel and composer and created my first project in laravel. I want to integrate stripe using PHP. When I try to execute my first project in localhost I take this message:
Fatal error: Class 'Stripe\Stripe' not found in C:\xampp\htdocs\laravel\stripe\public\elda.php on line 21
To include the stripe libraries, I inserted inside the composer.json file the code from the API library for PHP. Here is an image of my composer.json file:
I run composer install in cmd and this is the output:
You may be getting outdated dependencies. Run update to update them.
I run composer update and the output is the error in the image below:
Can someone help me to solve this error?
Well, sorry did not make a comment of your post, but I have not enough points to do so. But you need to run composer install in the terminal after that includes a new package.
I had the same issue, but when I ran this command my issue is resolved.
composer require stripe/stripe-php
I hope this may help you, after you update your composer.
I got error message when install fuelphp
No composer autoloader found. Please run composer to install the FuelPHP framework dependencies first!
Also i my composer is updated.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
I am using PHP7 with a Vagrant environment.
Any idea about this error ?
It is not able to find installation of fuelphp. Most common issue is that index.php("public" or "public_html" folder) does not have the fuelphp's app, core and packages path set properly.
change DIR.'../ to DIR.'/../../(goes back one folder level)
There should be three of them.
I'm trying to make composer update only newly added packages to composer.json i.e when I manually add a package dependency to the composer.json file, it should update the composer.lock file only for the new package; the rest of the packages should be at the same version as before. I tried running composer update --lock but I don't think it does what I'm trying to achieve and it took a lot of time to finish. I checked the commands on composer's documentation but can't find one to achieve my wish. Any advice or workaround will be appreciated.
Note: I'm using Laravel Forge, so there is a 2 minutes deployment limit.
In order to install only new packages with composer you should run
composer install
Because composer update will install your new packages but will update and all the other already installed packages.
You can specify the name of the package as an argument to the update command. This will perform a partial update: composer update the-package/you-want-to-update
I think your question is related to your (guessed) current workflow: To add a new package you edit the composer.json file and then run composer update - wishing to only add/update that new file.
If that is true, here is the solution:
composer require new/package will add the newest possible version (taking into account the currently installed packages) of the new package. Benefits: Only one command line, and no fiddling with JSON content.
If you already know which version you want, you could also run composer require new/package:^2.1.25#beta (or whatever version and stability level you want - this example is exaggerating a bit). If this version is incompatible with existing packages, nothing will get installed, everything will get rolled back, and you get an error message.