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

[BUG] Conflict with Drupal LDAP module #59

Closed
alxp opened this issue Feb 23, 2023 · 9 comments · Fixed by Islandora/islandora#936
Closed

[BUG] Conflict with Drupal LDAP module #59

alxp opened this issue Feb 23, 2023 · 9 comments · Fixed by Islandora/islandora#936
Labels

Comments

@alxp
Copy link

alxp commented Feb 23, 2023

What steps does it take to reproduce the issue?

Try to install the drupal/ldap package via Composer. The current version of drupal/ldap is 4.3, however, due to a constraint in islandora/crayfish-commons, Composer downgrades it to a 4.0.0@alpha release which is several years old and no longer works properly.

  • When does this issue occur?

When attempting to install the LDAP module on an Islandora site.

  • Which page does it occur on?

back end

  • What happens?

Composer will refuse to install drupal/ldap:^4.3 , due to a conflicting dependency.

The error is:

 composer require drupal/ldap:^4.3 grahl/ldap:^5.2
./composer.json has been updated
Running composer update drupal/ldap grahl/ldap
Loading composer repositories with package information
Updating dependencies                                 
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/ldap ^4.3 -> satisfiable by drupal/ldap[4.3.0, 4.x-dev].
    - drupal/ldap[4.3.0, ..., 4.x-dev] require grahl/ldap ^5.2 -> satisfiable by grahl/ldap[v5.2.0-BETA1, ..., 5.2.x-dev].
    - grahl/ldap[v5.2.0-BETA1, ..., 5.2.x-dev] conflict with symfony/security-core <5 (symfony/security v4.4.50 replaces symfony/security-core self.version).
    - islandora/crayfish-commons 2.0.1 requires symfony/security ^3.4 || ^4.4 -> satisfiable by symfony/security[v4.4.50].
    - islandora/crayfish-commons is locked to version 2.0.1 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
  • To whom does it occur (anonymous visitor, editor, administrator)?

Site owner

  • What did you expect to happen?

Which version of Islandora are you using?

2.6.x

Any related open or closed issues to this bug report?

Unsure if this conflict is resolved by islandora/crayfish-commons:^3 , but I forget what we are waiting for before we update islandora/islandora to depend on it.

Screenshots:

@alxp alxp added the bug label Feb 23, 2023
@whikloj
Copy link
Member

whikloj commented Feb 23, 2023

If you are using Crayfish version 3.x then you should already be using Crayfish-Commons 3.x, but it is still on the 4.4.* LTS version of Symfony. So I could start a migration to the 5.4.* LTS or just jump to 6.2.*, but someone has to review and merge it.

@alxp
Copy link
Author

alxp commented Feb 23, 2023

I am seeing this in the composer output:

   - islandora/islandora v2.6.3 requires islandora/crayfish-commons ^2 -> found islandora/crayfish-commons[2.0.0, 2.0.1, 2.x-dev] but it conflicts with your root composer.json require (^3).
```bash

Assuming upgrading to Crafish 3 is no problem, what would need to happen for islandora/islandora to be able to use crayfish-commons ^3 ? or was it planned to be able to drop the requirement?

@whikloj
Copy link
Member

whikloj commented Feb 23, 2023

Ohhhhhh sorry I was thinking about Crayfish, but I see what you mean.

So the only thing that is used between the two was the EntityMapper, and I realize that I tried to test it (I thought) in islandora-playbook when the original Symfony rewrite PRs were in review (https://github.com/Islandora/Crayfish-Commons/pull/49/files#r765036213)

Now that Drupal is built with profiles I'm not sure how this would be handled, but it would still have the problem identified here, so I would hold off until we update the symfony version.

@alxp
Copy link
Author

alxp commented Mar 1, 2023

In today's committers call @seth-shaw-asu mentioned this possibly related issue, putting here so I can find it again. Will test some time this week hopefully:

Islandora/documentation#1903

@alxp
Copy link
Author

alxp commented Mar 8, 2023

Tried the suggestion about deleting the lock file and it doesn't solve the problem.

I also tried in a brand new ISLE-DC install and got the same problem. I think it is due to the symfony version dependency in the version of crayfish-commons , 2.0, that islandora still requires.

psr-4
Islandora\Crayfish\Commons\ => src/

requires
doctrine/dbal ~2.2
islandora/chullo ^1
monolog/monolog ^1.22
namshi/jose ^7.2
pimple/pimple ~3.0
psr/log ^1.0.1
silex/silex ^2.0
symfony/http-foundation ^3.4 || ^4.4
symfony/security ^3.4 || ^4.4
symfony/yaml ^3.4 || ^4.4

requires (dev)
mikey179/vfsstream ^1.6
phpspec/prophecy-phpunit ^2.0
phpunit/phpunit ^9.0
sebastian/phpcpd ^6.0
squizlabs/php_codesniffer ^3.0



composer require drupal/ldap:^4.3
./composer.json has been updated
Running composer update drupal/ldap
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/ldap ^4.3 -> satisfiable by drupal/ldap[4.3.0].
    - drupal/ldap 4.3.0 requires drupal/authorization ^1.0 -> found drupal/authorization[dev-1.x, 1.0.0-beta1, ..., 1.x-dev (alias of dev-1.x)] but it does not match your minimum-stability.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

@alxp
Copy link
Author

alxp commented Mar 16, 2023

drupal/ldap depends on the package grahl/ldap:^5.2

grahl/ldap declares a conflict with symfony/security-core < 5.0.0
Drupal 9

Crayfish-Commons depends on symfony/security-bundle

The version of symfony/security-bundle compatible with symfony/security-core:^5 is also ^5, however, it also depends on several other symfony packages also with version ^5.

These conflict with Drupal 9 Core's requirements, among them:

symfony/dependency-injection ^4.4
symfony/event-dispatcher ^4.4
symfony/http-foundation ^4.4.7
symfony/http-kernel ^4.4

FWIW Drupal 10 updates these requirements to 6.x.

So for now it looks like Islandora sites won't be able to support LDAP unless we split out the component that Islandora uses.

@whikloj
Copy link
Member

whikloj commented Mar 16, 2023

I just hit this error, but sadly not before I made updates to Chullo, Crayfish-Commons, Crayfish and Islandora.

I agree. The actual code used by both Crayfish and Islandora is crazy small, but because we can upgrade Symfony in Crayfish-Commons but have to wait for Drupal to upgrade it's version we should avoid this overlap at all costs.

@whikloj
Copy link
Member

whikloj commented Mar 20, 2023

To separate Islandora and Crayfish-Commons I moved the EntityMapper into https://github.com/whikloj/islandora-fedora-entity-mapper is this an acceptable solution or would someone like to discuss a different one? If this is acceptable, can I move it to the Islandora org as testing needs this in packagist and I’d rather not do that under my name to then immediately abandon the project.

@alxp
Copy link
Author

alxp commented Mar 20, 2023

I support this sollution, and perhaps it could lead toward putting all the Fedora code into such a module eventually. But for the immediate problem I think this is a good solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants