Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Implement PSR-17 #326

Merged

Conversation

weierophinney
Copy link
Member

This patch implements the PSR-17 interfaces, and tests them against the http-interop/http-factory-tests integration test suite.

As part of the change, we are also able to remove the additional integration test dependency when testing against the PSR-7 integration tests. Those tests rely on PSR-17 factories, which we now provide, and map within the phpunit.xml.dist file. As such, both PSR-7 and PSR-17 integration tests will run for every build target.

All PSR-17 implementations are alongside the PSR-7 classes they create.

Also adds php nightly build to matrix, to ensure we are prepared for PHP 7.3.

@weierophinney weierophinney added this to the 2.0.0 milestone Sep 5, 2018
weierophinney added a commit to weierophinney/zend-diactoros that referenced this pull request Sep 5, 2018
@@ -0,0 +1,45 @@
<?php
/**
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
Copy link

Choose a reason for hiding this comment

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

Shouldn't this be zend-diactoros instead of zend-expressive?

Copy link
Member Author

Choose a reason for hiding this comment

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

Arrgggghhh! Yes. I'll fix that momentarily.

/**
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
* @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
* @license https://github.com/zendframework/zend-expressive/blob/master/LICENSE.md New BSD License
Copy link

Choose a reason for hiding this comment

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

zend-diactoros instead of zend-expressive

@@ -0,0 +1,31 @@
<?php
/**
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
Copy link

Choose a reason for hiding this comment

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

zend-diactoros instead of zend-expressive

/**
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
* @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com)
* @license https://github.com/zendframework/zend-expressive/blob/master/LICENSE.md New BSD License
Copy link

Choose a reason for hiding this comment

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

zend-diactoros instead of zend-expressive


class RequestFactory implements RequestFactoryInterface
{
public function createRequest(string $method, $uri) : RequestInterface
Copy link
Member

Choose a reason for hiding this comment

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

Does this work without @inheritdoc? Also for the exceptions?

Copy link
Member

Choose a reason for hiding this comment

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

@xtreamwayz
Can you answer this question?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add the @inheritDoc annotations.

Copy link
Member

@geerteltink geerteltink left a comment

Choose a reason for hiding this comment

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

LGTM except the url's used in the top docblocks

This patch implements the PSR-17 interfaces, and tests them against the
http-interop/http-factory-tests integration test suite.

As part of the change, we are also able to remove the additional
integration test dependency when testing against the PSR-7 integration
tests. Those tests rely on PSR-17 factories, which we now provide, and
map within the `phpunit.xml.dist` file. As such, both PSR-7 and PSR-17
integration tests will run for every build target.

All PSR-17 implementations are alongside the PSR-7 classes they create.

Also adds php nightly build to matrix, to ensure we are prepared for PHP
7.3.
@weierophinney
Copy link
Member Author

URLs fixed, and {@inheritDoc} docblocks have been added.

@weierophinney weierophinney merged commit 190349f into zendframework:release-2.0 Sep 6, 2018
weierophinney added a commit that referenced this pull request Sep 6, 2018
@weierophinney weierophinney deleted the feature/psr-17 branch September 6, 2018 13:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants