Similar to #2442411: Update react/promise to 2.2.0, the introduction of guzzlehttp/psr7 in #2493911: Update guzzle, goutte and mink-goutte-driver to the latest release causes problems if a global install of psr7 exists since the function is included twice. Without this fix, fatal errors will occur when bootstrapping Drupal from another system that has already loaded the psr7 functions.

This needs to wait on https://github.com/guzzle/psr7/issues/27 to tag 1.1.1.
--https://github.com/guzzle/psr7/releases

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug, we want to ship with the latest version of all our dependencies
Issue priority Normal, no bug actually is killing us (but are impacting other projects
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom created an issue. See original summary.

hussainweb’s picture

Title: Update guzzlehttp/psr7 to 1.1.1 » Update guzzlehttp/psr7 to 1.2
Status: Active » Needs review
FileSize
21.41 KB

A new release has been tagged, not 1.1.1 as initially thought, but 1.2.0. It contains the fix we need. Attaching the patch.

hw@d8:/var/www/d8task/core-[git 8.0.x] $ composer update guzzlehttp/psr7
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing guzzlehttp/psr7 (1.1.0)
  - Installing guzzlehttp/psr7 (1.2.0)
    Downloading: 100%

Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
dawehner’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
+++ b/core/vendor/guzzlehttp/psr7/tests/ResponseTest.php
@@ -136,4 +136,11 @@ public function testRemovesPreviouslyAddedHeaderOfDifferentCase()
+    }
+    ¶
 }

LOL

larowlan’s picture

Status: Reviewed & tested by the community » Needs work

Closed #2552281: Update guzzlehttp/psr-7 and guzzlehttp/promises to latest versions in favour of this

Can we also bump guzzlehttp/promises

hussainweb’s picture

Title: Update guzzlehttp/psr7 to 1.2 » Update guzzlehttp/psr7 to 1.2 and guzzlehttp/promises to 1.0.2
Status: Needs work » Needs review
FileSize
28.21 KB

Makes sense.

hw@d8:/var/www/d8task/core-[git 8.0.x] $ composer update guzzlehttp/*
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing guzzlehttp/promises (1.0.1)
  - Installing guzzlehttp/promises (1.0.2)
    Downloading: 100%

  - Removing guzzlehttp/psr7 (1.1.0)
  - Installing guzzlehttp/psr7 (1.2.0)
    Loading from cache

Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
dawehner’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/vendor/guzzlehttp/promises/CHANGELOG.md
@@ -1,5 +1,9 @@
+## 1.0.2 - 2015-05-15
+
+* Conditionally require functions.php.
+

Nice change as well ...

saltednut’s picture

For reference: 1.2.0 of guzzle/psr7 was tagged two days ago https://github.com/guzzle/psr7/releases

saltednut’s picture

Issue summary: View changes
jhedstrom’s picture

Issue summary: View changes
jibran’s picture

Title: Update guzzlehttp/psr7 to 1.2 and guzzlehttp/promises to 1.0.2 » Update guzzlehttp/psr7 to 1.2.0 and guzzlehttp/promises to 1.0.2

Please add @larowlan to commit credit for the patch in the duplicate issue. Thanks.

dawehner’s picture

Note: this patch makes it possible to run behat on Drupal 8 projects

pfrenssen’s picture

Here's the corresponding issue in Behat Drupal Extension: #193: Tests are failing since Drupal 8 updated Guzzle to 5.3.0.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a reroll.

jhedstrom’s picture

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

Rerolled.

hussainweb’s picture

+++ b/core/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2015 Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+

Patch looks same as the previous one except for this part. I assume this is a composer generated file but it didn't generate for me. Which version of composer are you using?

jhedstrom’s picture

A fairly recent version:

Composer version 1.0-dev (9859859f1082d94e546aa75746867df127aa0d9e) 2015-08-17 14:57:00

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Well yeah if they are adding it now ... let's do it.

hussainweb’s picture

Sure, let's do it. I don't think mine was this recent.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed b315b3b on 8.0.x
    Issue #2546272 by hussainweb, jhedstrom, dawehner: Update guzzlehttp/...

Status: Fixed » Closed (fixed)

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