Skip to content

Conversation

gsteel
Copy link
Contributor

@gsteel gsteel commented Sep 16, 2021

Q A
Bug fix? yes
Related tickets fixes #198
License MIT

What's in this PR?

Since laminas-diactoros 2.7.0 - it appears that Message Factory discovery fails (When the deprecated MessageFactoryDiscovery class is used)

Pretty sure that this is down to the removal of laminas-zendframework-bridge in that release.

To reproduce

composer require php-http/discovery
composer require laminas/laminas-diactoros ^2.7
composer require php-http/message-factory

And then run a php script along the lines of:

<?php
require 'vendor/autoload.php';

use Http\Discovery\MessageFactoryDiscovery;
$factory = MessageFactoryDiscovery::find();

This should yield a DiscoveryFailed exception.

Apologies, but I'm not sure how to go about writing tests for this scenario…

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this fix!

@dbu dbu merged commit d33dfe4 into php-http:master Sep 18, 2021
@dbu
Copy link
Contributor

dbu commented Sep 18, 2021

@gsteel gsteel deleted the diactoros-zend-fix branch September 23, 2021 12:20
gsteel added a commit to netglue/prismic-client that referenced this pull request Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Diactoros Detection Fails after laminas release 2.6

2 participants