Problem/Motivation

In preparation to expose Drupal Components outside of Drupal we added a composer.json file to every component.
But right now Symfony requirement declarations are out of date/ conflicting: drupal/core requires ~2.8 and has a replace section declaring that it fulfills the requirements for the drupal components which is a lie right now because it's impossible with the two conflicting requirements.

Examples:

- drupal/core-event-dispatcher declares "symfony/event-dispatcher": "2.7.*"; drupal/core requires "symfony/event-dispatcher": "~2.8"
- drupal/core-dependency-injection declares "symfony/dependency-injection": "2.7.*"; drupal/core requires "symfony/dependency-injection": "~2.8".
- drupal/core-dependency-injection declares "symfony/expression-language": "2.7.*"

Proposed resolution

- Update the components composer.json to not conflict with drupal/core symfony requirements in this respect.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eric_A created an issue. See original summary.

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

Title: drupal/core-* components Symfony dependencies are out of date » drupal/core-* components Symfony requirements are out of date
Issue summary: View changes
chishah92’s picture

FileSize
50.18 KB

The components are already updated , PFA Screenshot

rajeshwari10’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
1.7 KB

updated composer.json.

Status: Needs review » Needs work

The last submitted patch, 5: 2744357-5.patch, failed testing.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
1.69 KB

resolving issue.

Status: Needs review » Needs work

The last submitted patch, 7: 2744357-7.patch, failed testing.

Eric_A’s picture

Title: drupal/core-* components Symfony requirements are out of date » drupal/core-* components Symfony requirements are out of date (2.7.*)
Issue summary: View changes

@chishah92, @rajeshwari10,

This issue is about drupal/core-* components, which are located at core/lib/Drupal/Component/.
Any symfony/* 2.7.* requirement needs to be updated to ~2.8.

chishah92’s picture

Assigned: Unassigned » chishah92

Thanks Eric , i will adding a patch for this .

chishah92’s picture

Assigned: chishah92 » Unassigned
rajeshwari10’s picture

Assigned: Unassigned » rajeshwari10
Status: Needs work » Needs review
FileSize
2.45 KB
rajeshwari10’s picture

Adding the patch with appropriate changes.

Thanks!

Eric_A’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

I think it would be logical to commit this bug fix now to both branches. (And it also does not conflict with #2712647: Update Symfony components to ~3.2.)
After this 2.7.* to ~2.8 bug fix is in 8.2.x and 8.1.x, we can either expand the 8.2.x patch in #2712647: Update Symfony components to ~3.2 (most logical if you ask me) or wait for that to get into 8.2.x and bug fix after the fact again.

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

Issue summary: View changes
alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Discussed with @bojanz in IRC.

16:11 alexpott
catch: obviously 2.7.* is wrong but maybe it should be ~2.7 and not ~2.8
16:11 alexpott
bojanz: ^
16:13 bojanz
alexpott: ~2.7 still results in 2.8 being downloaded when available, no?
16:13 alexpott
bojanz: yes
16:13 bojanz
alexpott: the question is just about what the lower bound is
16:13 bojanz
(do we need 2.8 at least or 2.7 at least)
16:13 alexpott
bojanz: atm we have 2.7.* but core is getting 2.8
16:13 alexpott
bojanz: so that is nonsense
16:14 bojanz
alexpott: right. No reason not to do ~2.8 if we assume it's gonna be there
16:15 alexpott
bojanz: well apart from forcing anyone to upgrade or dealing with incompatibilities for no reason if 2.7.* works (which is should given the relationship between 2.7 and 2.8)
16:17 alexpott
bojanz: OTOH of course now the components are not tested on 2.7 so we have no guarentees
16:17 bojanz
alexpott: I'm conflicted. 2.7 is the LTS one, so keeping the requirements there is a better idea theoretically
16:17 bojanz
but in practise we've seen that moving from branch to branch is never bug free
16:17 bojanz
and we can't guarantee compatibility with multiple
16:17 bojanz
(== anything might break if the testbot isn't ensuring that tests pass on each one)
16:18 alexpott
bojanz: aka untested code is broken code

I think we should try to have our components on the minimum version for as long as possible. Given #2611816: Update to symfony 2.8 only changed the dependency injection component I think that is the only one that requires ~2.8 - the others should be changed to ~2.7. In #2712647: Update Symfony components to ~3.2 we should discuss updating the components that have been changed to something for Symfony 3 and the other unchanged components to maybe >= 2.7.

pashupathi nath gajawada’s picture

Hi @Eric_A,

I have updated the patch with as suggested.
Only updated the dependency injection component to ~2.8

Please find the attached patch.

Thanks,

pashupathi nath gajawada’s picture

Eric_A’s picture

Title: drupal/core-* components Symfony requirements are out of date (2.7.*) » drupal/core-* components Symfony requirements conflict with drupal/core
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

bojanz: well apart from forcing anyone to upgrade or dealing with incompatibilities for no reason if 2.7.* works

At first I did not grok this, but I guess the point is that there could be 2.7.* projects out there that require component replacement packages out there that require 2.7.* instead of the ~2.8 from drupal/core.

Anyway, let's just fix the conflicts and the one proven ~2.8 dependency here and have separate issues for the other stuff.

Eric_A’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c4b8088 and pushed to 8.1.x and 8.2.x. Thanks!

  • alexpott committed 310145e on 8.2.x
    Issue #2744357 by rajeshwari10, pashupathi nath gajawada, chishah92,...

Status: Fixed » Needs work
alexpott’s picture

Status: Needs work » Fixed
rajeshwari10’s picture

Status: Fixed » Needs review
FileSize
2.45 KB
2.32 KB

adding new patch for 8.1.x. along with the changes said in #17.

Thanks!!

Status: Needs review » Needs work

The last submitted patch, 26: 2744357-25.patch, failed testing.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
1.01 KB

changing ~2.7 to 2.7.*

Status: Needs review » Needs work

The last submitted patch, 28: 2744357-28.patch, failed testing.

rajeshwari10’s picture

@Eric_A

Don't know why the patch is failing please guide

Thanks!!

Eric_A’s picture

Status: Needs work » Fixed

@rajeshwari10, the fix is already pushed to 8.1.x and 8.2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.