-
Notifications
You must be signed in to change notification settings - Fork 42
Update package to follow organization standards #89
Update package to follow organization standards #89
Conversation
- Use PSR-4 directory structure - Use zend-coding-standard for CS checks - Use phpunit 5/6/7 insted of 4/5 - No custom bootstrap necessary - use namespaced TestCase - migrate `setExpectedException` to `expectException` - migrate `getMock` to `createMock` - use `::class` notation everywhere - Use consistent license docblock everywhere - Adopt lowest/locked/latest test matrix
Splits the README.md file into a number of markdown chapters for mkdocs.
Starting in the 1.5 series, doctrine/migrations allows using a version of ocramius/package-versions that depends on PHP 7.0 and up (usage of return type hints, scalar type hints, and, in even later versions, void return types). This patch installs dependencies using PHP 5.6, to allow testing across all versions.
05db7a8
to
a09ed00
Compare
- Exception types vary between versions of the php ampq library. - A bad conditional in guzzle3 logic may cause problems.
When running under xdebug, exceptions are thrown by the client, which we need to catch in order to retrieve the response.
coveralls installs guzzlehttp/guzzle, which is a version 6 guzzle client, and incompatible with v4/v5... causing tests to error!
d1cc167
to
99ef1d4
Compare
Finally have tests passing. What the matrix highlights is:
|
TODO:
|
Guzzle 3 has been EOL for 5 years. 4 has been EOL for 3 years (though it had a release ~21 months ago). Guzzle 5 is still being maintained, but is considered legacy to the PSR-7-based Guzzle 6. Versions 4 and 5 have the same API for our purposes, so we can support those two reasonably, and add support for version 6 (which, while we had code to allow it, it never was actually tested, and, in fact, did not work without deprecation notices).
7c2efd4
to
2e2843d
Compare
Guzzle 4's `Emitter::once()` method (and potentially others) has a syntax error that is detected in PHP 7.1 and up (an attempt to bind a variable name by the same name as a parameter to the closure). As such, we can no longer support it.
This patch updates the package to follow current ZF standards. Among other things:
setExpectedException
toexpectException
getMock
tocreateMock
::class
notation everywhereAdditionally, it splits the
README.md
file into actual mkdocs documentation.