Показаны сообщения с ярлыком composer. Показать все сообщения
Показаны сообщения с ярлыком composer. Показать все сообщения

суббота, 26 ноября 2022 г.

Composer upgrade not working fix

When you want do single package upgrade like `composer update willdurand/hateoas --with-all-dependencies` and you have errors like this:

Your requirements could not be resolved to an installable set of packages:


  Problem 1

    - Root composer.json requires willdurand/hateoas ^3.8, found willdurand/hateoas[3.8.0] but these were not loaded, likely because it conflicts with another require.

  Problem 2

    - willdurand/hateoas-bundle 1.4.0 requires willdurand/hateoas ^2.10.0 -> found willdurand/hateoas[2.10.0, 2.11.0, 2.12.0] but it conflicts with your root composer.json require (^3.8).

    - sylius/resource-bundle v1.6.4 requires willdurand/hateoas-bundle ^1.2 -> satisfiable by willdurand/hateoas-bundle[1.4.0].

    - sylius/resource-bundle is locked to version v1.6.4 and an update of this package was not requested.


It means you need to go up by dependency tree and do `upgrade` manually. In my case I need to set "sylius/resource-bundle" to "^1.8", then run "composer update sylius/resource-bundle --with-all-dependencies" and finally run first command 

понедельник, 10 января 2022 г.

понедельник, 16 сентября 2019 г.

Symfony doesnt update minor version fix

If you cannot update your Symfony project to new minor version (for example, from 4.2 to 4.3), and your packages only checks packages only previous versions like this:

The requested package symfony/security-bundle 4.3.4 exists as symfony/security-bundle[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.
  Problem 2
    - The requested package symfony/translation ^4.3 exists as symfony/translation[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.
  Problem 3
    - The requested package symfony/twig-bundle ^4.3 exists as symfony/twig-bundle[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.

it means you should to change extra node in your composer.json file:
"extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.3.*"
        }
    }

четверг, 28 марта 2019 г.

composer vcs repository doesn't update package latest commit

Manually find package in composer.lock and replace old commit occurencies to new commit hash.

воскресенье, 10 февраля 2019 г.

How to fix "phpcr/phpcr-implementation no matching package found"

If you have error:

Using version ^1.4 for doctrine/phpcr-odm
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Your requirements could not be resolved to an installable set of packages.

 Problem 1
   - doctrine/phpcr-odm 1.4.4 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
   - doctrine/phpcr-odm 1.4.3 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
   - doctrine/phpcr-odm 1.4.2 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - doctrine/phpcr-odm 1.4.1 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - doctrine/phpcr-odm 1.4.0 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - Installation request for doctrine/phpcr-odm ^1.4 -> satisfiable by doctrine/phpcr-odm[1.4.0, 1.4.1, 1.4.2, 1.4.
3, 1.4.4].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
  see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.


You should add your project's composer.json these lines:
"provide": {
    "phpcr/phpcr-implementation": "2.1.0"},

Symfony 4.2.3.

вторник, 11 декабря 2018 г.

How to install omnipay-bridge & omnipay-neteller to payum

If you have problems with installing omnipay bridge to symfony 3.4, try these aliases in root composer.json in 'require' scope:

"omnipay/common": "3.0.2 as 2.5.2",
"payum/omnipay-bridge": "1.2.5 as 1.2.4"