Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer.json - Relax psr/log constraint. Improve D8 compatibility. #16471

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

totten
Copy link
Member

@totten totten commented Feb 5, 2020

Overview

This addresses a composer conflict that's reported when trying to install
on Drupal 8.7. For example, run these commands:

drush8 dl drupal-8.7.x
cd drupal-8*
composer require civicrm/civicrm-core:5.22.x-dev

This is a port of #16470 for master.

Before

The install fails because civicrm-core requires psr/log:~1.1, and something else
is prodding us to use psr/log:1.0.2.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for civicrm/civicrm-core 5.22.x-dev -> satisfiable by civicrm/civicrm-core[5.22.x-dev].
    - Conclusion: remove psr/log 1.0.2
    - Conclusion: don't install psr/log 1.0.2
    - civicrm/civicrm-core 5.22.x-dev requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.1, 1.1.2, 1.1.x-dev].
    - Can only install one of: psr/log[1.1.0, 1.0.2].
    - Can only install one of: psr/log[1.1.1, 1.0.2].
    - Can only install one of: psr/log[1.1.2, 1.0.2].
    - Can only install one of: psr/log[1.1.x-dev, 1.0.2].
    - Installation request for psr/log (locked at 1.0.2) -> satisfiable by psr/log[1.0.2].

Installation failed, reverting ./composer.json to its original content.

After

It should work. However, this is hard to demonstrate via r-run without merging.

Comments

The substantive differences between psr/log in v1.0 and v1.1 relate to LoggerInterfaceTest and TestLogger:

php-fig/log@1.0.2...1.1.2

However, civicrm-core does not use LoggerInterfaceTest or TestLogger, so it shouldn't matter.

For the standard tarballs which use composer.lock, this does have the side-effect of bumping up from 1.1.0 to 1.1.2.

Overview
--------

This addresses a composer conflict that's reported when trying to install
on Drupal 8.7. For example, run these commands:

```
drush8 dl drupal-8.7.x
cd drupal-8*
composer require civicrm/civicrm-core:5.22.x-dev
```

This is a port of civicrm#16470 for `master`.

Before
------

The install fails because `civicrm-core` requires `psr/log:~1.1`, and something else
is prodding us to use `psr/log:1.0.2`.

```
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for civicrm/civicrm-core 5.22.x-dev -> satisfiable by civicrm/civicrm-core[5.22.x-dev].
    - Conclusion: remove psr/log 1.0.2
    - Conclusion: don't install psr/log 1.0.2
    - civicrm/civicrm-core 5.22.x-dev requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.1, 1.1.2, 1.1.x-dev].
    - Can only install one of: psr/log[1.1.0, 1.0.2].
    - Can only install one of: psr/log[1.1.1, 1.0.2].
    - Can only install one of: psr/log[1.1.2, 1.0.2].
    - Can only install one of: psr/log[1.1.x-dev, 1.0.2].
    - Installation request for psr/log (locked at 1.0.2) -> satisfiable by psr/log[1.0.2].

Installation failed, reverting ./composer.json to its original content.
```

After
-----

It should work.  However, this is hard to demonstrate via `r-run` without merging.

Comments
--------

The substantive differences between `psr/log` in v1.0 and v1.1 relate to `LoggerInterfaceTest` and `TestLogger`:

php-fig/log@1.0.2...1.1.2

However, `civicrm-core` does not use `LoggerInterfaceTest` or `TestLogger`, so it shouldn't matter.

For the standard tarballs which use `composer.lock`, this does have the side-effect of bumping up from 1.1.0 to 1.1.2.
@civibot
Copy link

civibot bot commented Feb 5, 2020

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Seems fine for master - not sure why it's against 5.22 though?

@totten
Copy link
Member Author

totten commented Feb 5, 2020

Seems fine for master - not sure why it's against 5.22 though?

Yeah, this is not a regression AFAIK, but it is an installability issue. So I wouldn't put it against the stable - but the RC is a maybe.

I'll be OK if it's just master.

Merging into 5.22 as well would mean that there's one less crufty bit in some of the CI scripts.

@eileenmcnaughton
Copy link
Contributor

Well master will be the rc tomorrow .... & then it will get a full cycle of testing etc

@seamuslee001
Copy link
Contributor

Yeh i'm good for master i don't think its crucial for 5.22 tbh merging this and reviewed the changes and i don't think we will be harmed by relaxing the requirements here

@seamuslee001 seamuslee001 merged commit e0b8aec into civicrm:master Feb 5, 2020
@totten totten deleted the master-psr-log branch February 5, 2020 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants