can't not install doctrine/annotations (Symfony 6.2.4) - php

(https://i.stack.imgur.com/HizsX.png)
1: i try to run this command: composer require doctrine/annotations
2: i also try to run first : composer require sensio/framework-extra-bundle, and then composer require doctrine/annotations. but it still conflict.

Related

Symfony 6.1 - Installation of "hwi/oauth-bundle" throws "Your requirements could not be resolved to an installable set of packages."

I run the following command in a PHP 8.1 / Symfony 6.1 project:
compose require hwi/oauth-bundle
I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- hwi/oauth-bundle[1.4.0, ..., 1.4.5] require symfony/framework-bundle ^4.4|^5.1 -> found symfony/framework-bundle[v4.4.0, ..., v4.4.46, v5.1.0, ..., v5.4.13] but it conflicts with your root composer.json require (6.1.5).
- Root composer.json requires hwi/oauth-bundle ^1.4 -> satisfiable by hwi/oauth-bundle[1.4.0, ..., 1.4.5].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require hwi/oauth-bundle:*" to figure out if any version is installable, or "composer require hwi/oauth-bundle:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
According to issue hwi/HWIOAuthBundle#1880 there is no official support for Symfony 6 (yet).
Symfony 6 support will be added in version 2.x of the bundle.
Until there is an official v2.x release release you can use the following command to install the 2.x beta versions of hwi/oauth-bundle with Symfony 6.x.
compose require hwi/oauth-bundle:2.0.x-dev
You can verify it quickly in a temporay directory with the Symfony CLI:
symfony new --version=6.1 /tmp/symfony-6.1
cd /tmp/symfony-6.1
composer require template
composer require hwi/oauth-bundle:2.0.x-dev
rm -rf /tmp/symfony-6.1
Installs fine.

Error list while installing laravel package

Hello i am tying to install laravel package called Voyager Frontend once i used the command composer require pvtl/voyager-frontend i received the following error list
Any ideas on how to solve this issue ?
I would suggest starting from scratch using a supported version of Laravel
$ composer create-project laravel/laravel projectName "5.5.*"
$ cd projectName
$ composer require tcg/voyager
$ composer require pvtl/voyager-frontend

Download composer packages before install

I want to force to composer to download all packages before to install it and to speedup the dependencies installation on projects.
On production environment, I don't want to wait to packages download, it must be installed from cache.
Something like:
$> composer download-install # Currently not exists
$> composer install # Install from previously cached packages.
There are any composer option to do it?
Thanks!
There's a composer package that does exactly that!
Require it globally like this:
$ composer global require hirak/prestissimo
Then just a regular composer install will prefetch all the packages first and then install them as if they're from cache.
$ composer install
Read more at https://github.com/hirak/prestissimo

Composer is broken: Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist

I can't get composer to work. It also fails when I try to deploy to Heroku.
$ composer update
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
$ rm -r ~/.composer
$ composer global require fxp/composer-asset-plugin --no-plugins
Changed current directory to /home/Chloe/.composer
Using version ^1.1 for fxp/composer-asset-plugin
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing fxp/composer-asset-plugin (v1.1.4)
Downloading: 100%
Writing lock file
Generating autoload files
$ composer update
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
I tried the steps in Composer throws [ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist and Updating composer throws exception Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist, but it still fails.
I also ran composer self-update and it still doesn't work.
PHP 5.6.19, Composer version 1.1-dev, Composer version 1.0.2 2016-04-21 12:30:18
The problem is that you require a version of fxp/composer-asset-plugin that's now broken with composer >= 1.0.
"fxp/composer-asset-plugin": "^1.0",
Since you've installed it globally, you can remove it from your composer.json.
I had a similar error. Try
composer global require fxp/composer-asset-plugin --no-plugins
this worked for me

Composer is not working

I am new to Composer and trying to install a package via composer as
$ php composer require intervention/image
but i am getting
Could not open input file: composer
error since i have just run my last composer command 10 mins ago.
I don't now what is causing that problem.
Any help would be appreciated.
Try the following, then execute your command again.
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
Then you can use composer instead of php composer ...
Source
Most probably in your case Composer was installed globally, as a stanalone application.
Instead of
php composer require intervention/image
run
composer require intervention/image

Categories