Problem/Motivation

Our embedded components have broken dependencies if we want them to be compatible with drupal/core.
We need better visiblity and testing of embedded Drupal components requirements in order to be able to actually maintain all our dependencies.

With #2712647: Update Symfony components to ~3.2 and #2871253: Update Symfony components to 3.2.8 we're locking drupal/core at symfony ~3.2 but the embedded components still declare just ~2.7 and ~2.8. In order to be compatible with drupal/core this should be something like ~2.7|~3.0 and ~2.8|~3.0.

In #2862254: Update non-Symfony dependencies before 8.3.0 doctrine/commons was updated from to 2.5.1 to 2.6.2. The version requirement declaration was changed from 2.5.* to ^2.5in core/composer.json but not in:
- core/lib/Drupal/Component/Annotation/composer.json
- core/lib/Drupal/Component/ClassFinder/composer.json

We have broken component name declarations for drupal/core-file-cache in:
- core/lib/Drupal/Component/Annotation/composer.json
- core/lib/Drupal/Component/Discovery/composer.json

We have broken component name declarations for drupal/core-utility in:
- core/lib/Drupal/Component/Diff/composer.json

And in #2776235: Cached autoloader misses cause failures when missed class becomes available drupal/core-class-finder was added, but we forgot to add it to ComposerIntegrationTest.

All this happened because embedded components within drupal/core don't have their composer.json files taken into account by composer. A future subtree split into separate repositories and actually requiring instead of replacing will solve this, but for now we need a different solution.

Proposed resolution

Components should not be tied to the requirements of drupal/core, unless there is an actual hard requirement within the component. This is because the component might be consumed by another project and they shouldn't be forced to upgrade from, for instance, symfony 2.8 to 3.2 just because we did, if the component doesn't actually need it.

So:

  • A patch to both 8.3.x and 8.4.x should fix obvious errors in components' composer.json files, and it should fix the omission from ComposerIntegrationTest.
  • The patch should also add the same version constraints to both 8.4.x and 8.3.x branches for components, which allows both branches to be built with composer. This would be an open-ended >= type constraint on the lowest version in core.
  • So that we can test whether this is working, we should allow for a recursive merge of components' composer.json files from core/composer.json. This will exercise the version constraints, but will not require them as dependencies since they are in the replace section.
  • Ideally, there would be a core branch test which performs composer update and then runs the tests. This would tell us if our component requirement constraints need work.

Remaining tasks

  • Add a change record mentioning that we're merging in the components' constraints.
  • Follow-up: Figure out how to put components into vendor (or not).

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#115 2867960_115_85x.patch6.37 KBMile23
#114 2867960-114.patch6.31 KBjofitz
#96 2867960-96-85x.patch6.26 KBmpdonadio
#96 2867960-96-84x.patch6.26 KBmpdonadio
#93 2867960-93.patch6.26 KBjofitz
#91 2867960-91.patch6.99 KBjofitz
#89 2867960-89.patch6.99 KBjofitz
#82 2867960_82_85x.patch8.03 KBMile23
#77 2867960_77_84x.patch8.03 KBMile23
#75 2867960_75_84x.patch8.03 KBMile23
#75 2867960_75_83x.patch8.03 KBMile23
#54 interdiff_84x.txt1.91 KBMile23
#54 interdiff_83x.txt1.91 KBMile23
#54 2867960_54_84x.patch8.03 KBMile23
#54 2867960_54_83x.patch8.03 KBMile23
#49 interdiff_84x.txt2.51 KBMile23
#49 interdiff_83x.txt2.51 KBMile23
#49 2867960_49_84x.patch8.03 KBMile23
#49 2867960_49_83x.patch8.03 KBMile23
#38 interdiff_84x.txt30.06 KBMile23
#38 interdiff_83x.txt45.96 KBMile23
#38 2867960_38_84x.patch7.91 KBMile23
#38 2867960_38_83x.patch7.91 KBMile23
#36 2867960_36_84x.patch37.86 KBMile23
#36 2867960_36_83x.patch53.68 KBMile23
#24 2867960-24-drupal-8.3.patch2.63 KBEric_A
#24 2867960-24.patch5.51 KBEric_A
#24 2867960-without-component-fixes-24.patch3.61 KBEric_A
#24 interdiff-17-24.txt507 bytesEric_A
#17 2867960-17.patch5.88 KBEric_A
#17 2867960-without-component-fixes-17.patch3.98 KBEric_A
#16 2867960-drupal-8.3.patch3.13 KBEric_A
#14 2867960-without-component-fixes-13.patch4.11 KBEric_A
#13 2867960-without-component-fixes-13.patch4.11 KBEric_A
#2 2867960-without-component-fixes-2.patch2.48 KBEric_A
#2 2867960-2.patch4.85 KBEric_A
#5 2867960-just-the-component-fixes-5.patch1.9 KBEric_A
#9 interdiff-2867960-2-9.txt1.69 KBEric_A
#9 2867960-without-component-fixes-9.patch0 bytesEric_A
#9 2867960-9.patch6.01 KBEric_A
#9 2867960-just-the-component-fixes-9.patch1.9 KBEric_A
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eric_A created an issue. See original summary.

Eric_A’s picture

Eric_A’s picture

Issue tags: +Composer

The last submitted patch, 2: 2867960-without-component-fixes-2.patch, failed testing.

Eric_A’s picture

Assigned: Eric_A » Unassigned
Issue summary: View changes
FileSize
1.9 KB

Here's the patch for 8.3 with just the five fixes for the three core component composer.json files.

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

Eric_A’s picture

Issue summary: View changes
Status: Needs review » Needs work
Related issues: +#2776235: Cached autoloader misses cause failures when missed class becomes available

Just noticed that drupal/core-class-finder is missing in action from the merge list. (And replace section and ComposerIntegrationTest).

Eric_A’s picture

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

The last submitted patch, 9: 2867960-without-component-fixes-9.patch, failed testing.

Eric_A’s picture

I made a typo and created a zero byte file 2867960-without-component-fixes-9.patch. Here's the correct file.

Note that this one is supposed to fail, even if it is real code and not a test.

Eric_A’s picture

Sigh, I now I tested it with the wrong branch. One more time...

The last submitted patch, 13: 2867960-without-component-fixes-13.patch, failed testing.

Eric_A’s picture

Issue summary: View changes
Status: Needs review » Needs work
FileSize
3.13 KB

Patch in #14 was not supposed to pass...

Also, the Drupal 8.3 patch needed to be expanded with ComposerIntegrationTest and to the composer replace section.

Eric_A’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
3.98 KB
5.88 KB

The last submitted patch, 17: 2867960-without-component-fixes-17.patch, failed testing.

Mixologic’s picture

Now that #2352091: Create (and maintain) a subtree split of Drupal core and #2513388: Create (and maintain) a subtree split of each Drupal Component are essentially fixed, these bugs in the composer.json are going to be more prominent and should be fixed soon.

Eric_A’s picture

Issue summary: View changes

Do you think it would be best to remove the replace section parts from this patch? Or perhaps even split off the composer.json fixes (8.3/8.4) from the embedded package merge plugin control (8.4 only?)?

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

Mile23’s picture

Status: Needs review » Needs work

Let's fix it so stuff is working without changing the replace-es. We should have a separate issue for that. I'd wager it's not going to be as easy as it could be.

Needs work because it doesn't apply to 8.3.x due to composer.lock having changed. I'll forgo the 'needs reroll' tag because it really just needs to be re-applied with --rej and then have the lock file rebuilt.

Eric_A’s picture

I've removed the replace section fix which broadened the scope to much, especially given the fix wasn't tested here.

Note that the 8.4 patches make a one line change to the root composer.json and add a merge section to core/composer.json as the control mechanism. The 8.3 patch contains just plain fixes in core/composer.json.

The last submitted patch, 24: 2867960-without-component-fixes-24.patch, failed testing.

Eric_A’s picture

Issue summary: View changes
Eric_A’s picture

Issue summary: View changes

This patch does not conflict with the patch in #2712647-355: Update Symfony components to ~3.2, but I haven't checked if that one would start failing due to possibly missing updates to embedded components version requirement declarations. If it does I'd be happy to help adding the component fixes to that patch.

Eric_A’s picture

Issue summary: View changes

Actually, looking at that patch it's clear that it does not update the symfony dependencies in the components, so yes, that patch is probably broken in this respect and will fail testing if this one goes in first.

Mile23’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs change record
+++ b/core/composer.json
@@ -172,6 +172,37 @@
+    "extra": {
+        "merge-plugin": {
+            "require": [
+                "core/lib/Drupal/Component/Annotation/composer.json",
+                "core/lib/Drupal/Component/Assertion/composer.json",
+                "core/lib/Drupal/Component/Bridge/composer.json",

So the idea here is that we merge these composer.json files so that they'll be exercised, and any dependencies they have are taken into account, as well as any errors that would break things.

We want to keep the replace section because we don't want to require and pull the components into vendor/. Yet. :-) That's definitely a follow-up.

The patches in #24 apply and allow for an install, and also survive a composer update.

Everything looks good, except the IS mentions a change record. I'm not sure one is needed, but it might be helpful.

Eric_A’s picture

Issue summary: View changes

Well, I don't think this is meant to be an actual change. It's all a temporary measure, but then again, I don't really know how the component split is going and if we're actually going to require these components any time soon.
Do we consider changing the recurse property from false to true in the root composer template an actual change? Will it actually affect any project, now or when 8.4.0 is released? And even if so, it's still a template if you ask me.

How long before we can actually require the components and ditch the component merging? Before 8.4.0? If so, then it's definitely a temporary measure to keep all the dependencies correct until we actually require the components...

The thing I've been pondering on is if we want the merging to be done in core/composer.json or in the root composer.json. The components are embedded in drupal/core but the merge plugin seems to be working on root level really, given that the file paths to merge are actually declared on root package level. If we move the merging to drupal/drupal then we don't have to recurse. But then the template isn't a clean example anymore. If that's a temporary 8.4.x thing then no problem at all, but otherwise I'm not sure.

Mile23’s picture

I'm coming from #2873101: Component version constraints are out-dated

The component split has occurred, but core isn't using it. Try going to an empty directory and typing composer require drupal/core-uuid and be amazed. :-)

There are problems with the declarations of dependencies in some of the component composer.json files. We can't at this point use some components because they have these problems. For instance, we'd like to use the plugin component in the testbot instead of having our own copy of the code, but we can't because of these problems: #2643110: Have drupalci_testbot require drupal/core-plugin in composer.json

We also need to update the integration test, because that's good to have.

By way of preventing regressions, it's nice to merge the component composer.json files. Even if we never directly require the components and only replace them in core/composer.json, then we're still getting the benefit of having Composer try to account for their dependencies.

And... We want these to be merged from core/composer.json (and not ./composer.json) because they're dependencies of drupal/core, not drupal/drupal. I'd rather not have the recursion, but we're only doing the recursion on core/composer.json anyway, and we're in control of the merges in that file.

If we change to requiring the components, it will happen in core/composer.json. And when that happens, even if someone's installed ./composer.json still has the recursion set to true due to being outdated or whatever, there won't be any merges in core/composer.json to recurse through.

Mile23’s picture

Eric_A’s picture

Title: Dependencies not managed for drupal/core-* components » Dependencies broken - not managed for drupal/core-* components
Issue summary: View changes
Related issues: +#2712647: Update Symfony components to ~3.2, +#2352091: Create (and maintain) a subtree split of Drupal core

So #2712647: Update Symfony components to ~3.2 went in and it and it did without addressing our embedded component dependency declarations. Which means the 8.4 patch here with the merge mechanism will fail now until we have those components with symfony dependencies declaring compatibility with both symfony 2 and 3.
We've had these problems before and until now the fixes went in without any tests or other controlling mechanism. It's a good thing to try to add such a mechanism now, but at the same time we need to get the dependencies declarations fixed ASAP, given that split off read-only repo's of all embedded components are now out there at GitHub and Packagist.

Eric_A’s picture

Eric_A’s picture

The 8.3 patch does not have the symfony problem though, does not have the merging mechanism, and no divergence with 8.4 so that one is ready to go into both 8.3 and 8.4. How to proceed?

Mile23’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
53.68 KB
37.86 KB

Components should not be tied to the requirements of drupal/core, unless there is an actual hard requirement within the component. This is because the component might be consumed by another project and they shouldn't be forced to upgrade from, for instance, symfony 2.8 to 3.2 just because we did, if the component doesn't actually need it.

So:

  • A patch to both 8.3.x and 8.4.x should fix obvious errors in components' composer.json files, and it should fix the omission from ComposerIntegrationTest.
  • The patch should also add the same version constraints to both 8.4.x and 8.3.x branches for components, which allows both branches to be built with composer. This would be an open-ended >= type constraint on the lowest version in core.
  • So that we can test whether this is working, we should allow for a recursive merge of components' composer.json files from core/composer.json. This will exercise the version constraints, but will not require them as dependencies since they are in the replace section.
  • Ideally, there would be a core branch test which performs composer update and then runs the tests. This would tell us if our component requirement constraints need work.

Unfortunately, there's no way to exercise these merged component composer.json files other than to just say composer update, which then updates all the dependencies. For instance, composer/installers is updated to 1.3.0 in the lock file for both patches. The testbot might tell us that this isn't a problem, but it might be inconsistent enough to make a maintainer unhappy.

In order to get around this, we might verify that the merge works and then go back to the old lock file, but that patch is not presented here. Maintainers could come up with a better idea, too. :-)

So here are two patches. The only difference between them is their updated composer.lock files.

The last submitted patch, 36: 2867960_36_83x.patch, failed testing.

Mile23’s picture

Here are the same patches where I verified that the merges work with composer update, and then did the following:

$ git checkout [dev] composer.lock
$ composer update --lock
# verify with:
$ composer install
Mile23’s picture

Title: Dependencies broken - not managed for drupal/core-* components » Merge Component composer.json files to account for them during build

Updating title and added change record.

Mile23’s picture

Issue tags: -Needs change record

The last submitted patch, 36: 2867960_36_84x.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 38: 2867960_38_84x.patch, failed testing.

Eric_A’s picture

Regarding the patch for drupal 8.3:

--- a/core/lib/Drupal/Component/EventDispatcher/composer.json
+++ b/core/lib/Drupal/Component/EventDispatcher/composer.json
@@ -6,8 +6,8 @@
   "license": "GPL-2.0+",
   "require": {
     "php": ">=5.5.9",
-    "symfony/dependency-injection": "~2.8",
-    "symfony/event-dispatcher": "~2.7"
+    "symfony/dependency-injection": ">=2.8",
+    "symfony/event-dispatcher": ">=2.8"
   },
   "autoload": {
     "psr-4": {
--- a/core/lib/Drupal/Component/HttpFoundation/composer.json
+++ b/core/lib/Drupal/Component/HttpFoundation/composer.json
@@ -6,7 +6,7 @@
   "license": "GPL-2.0+",
   "require": {
     "php": ">=5.5.9",
-    "symfony/http-foundation": "~2.7"
+    "symfony/http-foundation": ">=2.8"
   },
   "autoload": {
     "psr-4": {
--- a/core/lib/Drupal/Component/Plugin/composer.json
+++ b/core/lib/Drupal/Component/Plugin/composer.json
@@ -6,7 +6,7 @@
   "license": "GPL-2.0+",
   "require": {
     "php": ">=5.5.9",
-    "symfony/validator": "~2.7"
+    "symfony/validator": ">=2.8"
   },
   "autoload": {
     "psr-4": {
--- a/core/lib/Drupal/Component/Serialization/composer.json
+++ b/core/lib/Drupal/Component/Serialization/composer.json
@@ -6,7 +6,7 @@
   "license": "GPL-2.0+",
   "require": {
     "php": ">=5.5.9",
-    "symfony/yaml": "~2.7"
+    "symfony/yaml": ">=2.8"
   },
   "autoload": {
     "psr-4": {

Changing version requirement declarations (and syntax) for these components seems out of scope for the purposes of this issue.

Eric_A’s picture

I think we should do the minimum here to just get the composer merging to pass in 8.3 and 8.4. Anything beyond fixing the obvious errors will get us into discussions we'd better take to separate issues.

Mile23’s picture

See #36. The components don't have a hard dependency on any version other than being newer than the one we use in core for 8.3.x. Also, if we declare a version dependency of, say, ~2.8 in 8.3.x, and ~3.2 in 8.4.x, then we impose that raise in version constraint on any project using the component, even though the component itself doesn't need the newer version.

So, if we have a better way to express 'any version higher than 2.8.*' which satisfies the needs of both drupal/core and any other project that might use the components, then I'm all for it.

Eric_A’s picture

So, if we have a better way to express 'any version higher than 2.8.*' which satisfies the needs of both drupal/core and any other project that might use the components, then I'm all for it.

How about having symfony version requirements untouched in drupal 8.3 components and for drupal 8.4 components change them to something like >=2.8 < 4.0.0?

Eric_A’s picture

Ah, I only now see that drupal 8.3 components have some broken symfony component requirements as well, given that drupal/core requires ~2.8 which isn't compatible with ~2.7.
But then in drupal 8.3 it could become something like >=2.7 <3.0.0?

Eric_A’s picture

Sigh, ~2.7 is compatible with ~2.8. Still #46 seems like the way to go?

Mile23’s picture

Status: Needs work » Needs review
FileSize
8.03 KB
8.03 KB
2.51 KB
2.51 KB

OK, added <4.0.0 to all those symfony components.

The interdiffs for the different branches are identical, and the patches only differ on the composer.lock content hash. But they're both here so they have their own test run.

Status: Needs review » Needs work

The last submitted patch, 49: 2867960_49_84x.patch, failed testing.

Mile23’s picture

Status: Needs work » Needs review

I can't repro the fail of Drupal\node\Tests\Views\FrontPageTest locally, so I'm setting to NR and re-running the test. Also it's in the list of random fails: #2829040-35: [meta] Known intermittent, random, and environment-specific test failures

Eric_A’s picture

I believe that for the purposes of this issue it is out of scope to change minimum symfony version requirements from 2.7 to 2.8 for involved components, especially in Drupal 8.3.
I feel it's even out of scope for the 8.4 patch. Of course some (8.4) components will prove to be actually coupled to symfony 2.8 or even 3.0, but I fail to see why we should attempt to fix all that in this issue.

Eric_A’s picture

Issue summary: View changes
Mile23’s picture

You're right... We should be as wide in version constraints as we reasonably can.

I was using the version constraints that core has. Since we don't have tests of the core components themselves at minimum version constraints, it's kind of hard to account for changes to the components since core was using 2.7 versions of symfony components.

Here's a version with 2.7 restored.

mpdonadio’s picture

Mile23’s picture

@mpdonadio: Yes, but the components should cast a wider net, since they're supposed to be consumed by other projects. That's why the upper constraints on them for symfony components is <4.0.0.

mpdonadio’s picture

#56++ ... My bad.

Eric_A’s picture

With the introduction of Component composer.json merging we can't ignore incompatibilities with symfony 3 for drupal 8.4, but for 8.3 this is not an issue at all. I think that in this issue it's best to leave the symfony requirements alone for the components in 8.3.x.
As said before, some components will prove to be actually coupled to symfony >=2.8 or even >=3.0. Let's fix it in dedicated issues, be it 8.3 issues with (partial) forward port, or 8.4 issues with or without (partial) backport.

Eric_A’s picture

I've started with creating 8.4 issues for fixing the symfony requirements. See #2876669: Fix dependency version requirement declarations in components.

Eric_A’s picture

Mile23’s picture

Trying to figure out how to test some of these things led me here: #2876408: Update wikimedia/composer-merge-plugin to ~1.4 in composer.json to match composer.lock

Mile23’s picture

I made a travis-ci test of the components, which currently fails because of this issue. https://github.com/paul-m/drupal_component_tester

Travis results here: https://travis-ci.org/paul-m/drupal_component_tester

Eric_A’s picture

I made a travis-ci test of the components,

Nice!!!

How about we do #2876725: Fix trivial core component composer bugs before 8.4.0 first, to make current branch users happy? We'll still have 8.4.x with the broken symfony dependencies to keep us busy.

Mile23’s picture

A review here would be great. :-)

Eric_A’s picture

Well, I'd RTBC this if it weren't for the concerns I have regarding changing requirement declarations in drupal/core 8.3 and adding wikimedia/merge-plugin to 8.3. If those we're left out for 8.3 I would have RTBC'd this. Since you want to keep 8.3 and 8.4 fully in sync we'll need others to chime in. :-)

On a side note: I kind of consider the components in 8.3 major version 3 and the components in 8.4 major version 4.

Mile23’s picture

Patch in #54 keeps the current versions, just adds <4.0.0 for symfony components. This is in both 8.4 and 8.3, because the requirements for the components themselves probably haven't changed. We'll test this assumption in follow-ups.

We want to have version requirements that are general enough for the outside world, specific enough for core, and somehow testable.

We can't test until the dependencies are at least minimally correct and resolvable, so we add reasonable best-guess version boundaries now. Then we get more specific in #2876669: Fix dependency version requirement declarations in components and children.

How does that sound?

Eric_A’s picture

Indeed, moving away from the tilde operator allows us to keep the symfony version constraints in sync with regards to the scope of this issue! So we're fine within a drupal/core context. Independent consumers of drupal 8.3 components might suddenly get a higher version of symfony, but this was never supported yet, I guess.

What remains is introducing the merge declarations in drupal/core 8.3 with the changed recurse property in the drupal/drupal composer.json template. There's a chance that the latter will have composer suddenly start merging stuff it didn't merge before, right? If so, a little notice in the change record would be good?

Eric_A’s picture

Status: Needs review » Reviewed & tested by the community

Actually, I think the change notice is good enough as it is.

Mile23 has taken over significantly, so I think i can RTBC.

Mile23’s picture

There's a chance that the latter will have composer suddenly start merging stuff it didn't merge before, right?

It will only merge what we tell it to merge. Since we're merging the component composer files, the recurse will only go as far as those components require. It might be that some component dependency also has wikimedia merge directives, in which case we might need another strategy, but so far that's not the case.

Eric_A’s picture

It will only merge what we tell it to merge. Since we're merging the component composer files, the recurse will only go as far as those components require. It might be that some component dependency also has wikimedia merge directives, in which case we might need another strategy, but so far that's not the case.

I was thinking about required packages from vendors other than drupal. If any such package has a merge section like the one we're introducing in drupal/core then composer will merge embedded composer.json files whereas it doesn't do that right now.

Mile23’s picture

Well, if you apply the patch and run composer update -vv you'll see that currently we don't have that problem. There's really no way around assuming it won't be a problem, other than to not exercise the composer.json files for the components.

Eric_A’s picture

No, no, I mean packages *added* to the template composer.json, and dependencies of those packages.

Mile23’s picture

No, no, I mean packages *added* to the template composer.json, and dependencies of those packages.

wikimedia will only start merging the files we tell it to merge, under extra:merge-plugin:require. The only way for packages required by drupal/drupal to start recursively merging is if we also add its composer.json to extra:merge-plugin:require.

The only worrisome part is dependencies of core/composer.json, but for that we have this:

+++ b/core/composer.json
@@ -150,6 +150,37 @@
+            "recurse": false,

Also: DRUPAL_ROOT/composer.json isn't a template. It's the drupal/drupal package. It gets used every time a tarball is built, for instance.

We all look forward to the day when we can be free of this bailing-wire-and-spit type of dependency management, but that day is not near. :-)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 54: 2867960_54_84x.patch, failed testing.

Mile23’s picture

Status: Needs review » Needs work

The last submitted patch, 75: 2867960_75_84x.patch, failed testing. View results

Mile23’s picture

Reroll of 8.4.x patch.

8.3.x patch in #75 still applies and passes.

Mile23’s picture

Status: Needs work » Needs review

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

Mile23’s picture

This issue is to get the component composer.json files into shape so that we can use them.

We can then figure out more specific requirements in other issues. And since the composer.json files will actually work, we can write automated tests to help us figure that out.

Mile23’s picture

Status: Needs work » Needs review
FileSize
8.03 KB

Patch for 8.5.x.

The only difference is the lock file's content-hash. Either patch will apply to either branch using git apply --rej. Create a new lock file with composer update --lock.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

#81 makes sense to me so RTBC

The last submitted patch, 77: 2867960_77_84x.patch, failed testing. View results

Mile23’s picture

Would love to be able to require core components in the testbot before 8.5.0... #2643110: Have drupalci_testbot require drupal/core-plugin in composer.json

Mile23’s picture

The plan seems to be that we should stop using the wikimedia merge plugin: #2912387: Stop using wikimedia/composer-merge-plugin

Therefore we'll eventually need to figure out another way to account for the Components. We might end up requiring them into core's composer.json.

I won't change RTBC here in case this becomes a temporary measure to get things working.

The last submitted patch, 77: 2867960_77_84x.patch, failed testing. View results

Mile23’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
6.99 KB

Re-rolled.

Status: Needs review » Needs work

The last submitted patch, 89: 2867960-89.patch, failed testing. View results

jofitz’s picture

Status: Needs work » Needs review
FileSize
6.99 KB

Whoops, the patch in #89 was against 8.5.x. This is against 8.4.x.

Eric_A’s picture

Component: base system » composer
Status: Needs review » Needs work
Issue tags: +Needs reroll
Related issues: +#2913459: drupal/core-class-finder missing in ComposerIntegrationTest, +#2913460: drupal/core-class-finder missing from replace section
jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
6.26 KB

Patch in #91 no longer applies. Re-rolled.

Mile23’s picture

Almost RTBC except it needs an 8.5.x patch so we can do both at the same time. The only difference is the lock file content hash, which you can make like this:

$ git apply git apply --rej 2867960-93.patch
$ rm composer.lock.rej
$ composer update --lock

I was able to perform composer update and composer update --prefer-lowest and then run all the unit tests, for both 8.4.x and 8.5.x.

Mile23’s picture

Status: Needs review » Needs work
mpdonadio’s picture

The 84x patch is just the one from #93renamed for clarity.

Ran ComposerIntegrationTest locally and both passed.

mpdonadio’s picture

Status: Needs work » Needs review
Mile23’s picture

Status: Needs review » Reviewed & tested by the community

Same deal as #94: I was able to perform composer update and composer update --prefer-lowest and then run all the unit tests, for both 8.4.x and 8.5.x.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 96: 2867960-96-85x.patch, failed testing. View results

Mile23’s picture

Status: Needs work » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 96: 2867960-96-85x.patch, failed testing. View results

andypost’s picture

alexpott’s picture

Do we need a change record because people are managing their own root composer.json files? I.e. are people going to have to change the recurse value in their own root composer.json files? I also wonder what happens with composer drupal installer? Or do we just not care because the core is coming anyway and this buys us testing on DrupalCI but makes no difference for anyone else atm?

alexpott’s picture

Well there is a CR https://www.drupal.org/node/2875519 - but it is not telling a site what are the actual impacts of the change for them and what if anything they need to do.

alexpott’s picture

Also the CR talks about things that haven't happened yet - ie. moving components to vendor which is odd because it means that people reading it are getting information that is not helping them deal with the actual change.

Mile23’s picture

Or do we just not care because the core is coming anyway and this buys us testing on DrupalCI but makes no difference for anyone else atm?

That's pretty much it. Drupal core doesn't even officially support having a different composer.json file. However, other projects could do the same trick for their testing.

The only concern is that if you required, say, drupal/address into drupal/drupal in the past, and maybe drupal/address' requirements are in conflict with a component or two. How do you find out? You have to merge the components. But if you don't add the merge to your stale composer.json file then you never find out. We'd expect this to be as much a problem as it is right now (not a huge one).

However... If you follow the update.txt instructions you'll do the right thing in that case and type composer require drupal/address into the new drupal/drupal. Then your stale composer.json file won't be stale any more, and you'll find out that there's a conflict (if there is).

Hmm... Looking for that issue about updating UPDATE.TXT to make this clearer, and can't find it.

Updated CR to point out that you can make this change in your bespoke composer.json file if you want, with instructions.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 96: 2867960-96-85x.patch, failed testing. View results

jofitz’s picture

Restarting tests.

jofitz’s picture

Status: Needs work » Reviewed & tested by the community

Tests passed so setting back to RTBC, assuming testbot failure.

larowlan’s picture

Status: Reviewed & tested by the community » Postponed
Related issues: +#2874909: Update Symfony components to 3.3.*

@xjm and I discussed this and decided to postpone it on #2874909: Update Symfony components to 3.3.* as that is Critical.

If the two won't collide, please advise.

Mile23’s picture

The changes to the component composer.json files have a very wide allowance for symfony versions, safe to say >=2.8 <4.0. That should include 3.3.

Part of the point of merging the dependencies here is that we can then test which constraints are right or wrong and generally make them more maintainable.

We should probably concern ourselves with the 3.3 upgrade first, but as part of that we might end up changing the components and forgetting to change their constraints to ^3.3. Which we wouldn't do if we fixed this issue first.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

Status: Postponed » Needs work
jofitz’s picture

Status: Needs work » Needs review
FileSize
6.31 KB

The patches from #96 no longer apply so I rerolled.

Mile23’s picture

This will probably need another re-roll after #2940367: Update Symfony components to 3.4.4 (or vice-versa).

It'd be great to get this in 8.5.x so we can start testing the component constraints before the 8.6.0 release. It's only disruptive to our test results if we're doing the wrong thing, which is what we want.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

We already have a follow-up #2876669: Fix dependency version requirement declarations in components ready to finetune version requirements so setting it to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c70c4f4 and pushed to 8.5.x. Thanks!
Committed 65b232a and pushed to 8.6.x. Thanks!

Whilst 8.5.x and 8.6.x are relatively aligned I think we should do this. It helps keeps our component composer.json a bit more honest.

  • alexpott committed 65b232a on 8.6.x
    Issue #2867960 by Eric_A, Mile23, Jo Fitzgerald, mpdonadio: Merge...

  • alexpott committed c70c4f4 on 8.5.x
    Issue #2867960 by Eric_A, Mile23, Jo Fitzgerald, mpdonadio: Merge...

Status: Fixed » Closed (fixed)

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