-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow usage with v2 or v3 ZF components #38
Allow usage with v2 or v3 ZF components #38
Conversation
- Removed root package `Module.php` file; it's essentially unnecessary, and folks can add autoloading to their application manually if not using Composer. - Use short array notation, and split multiple entries over multiple lines in the test bootstrap. - Added phpcs configuration, and bumped minimum required version to 2.6.2 - Set up composer scripts for QA tools. - Set up a modern test matrix for Travis CI. - lowest/locked/latest testing strategy, to pick up when a change may not be backwards and/or forwards compatible - use docker builds - cache dependencies between builds - reference composer scripts, so that the build configuration may not necessarily need to change if QA tools change - Bump dependencies to versions known to be stable and forwards compatible with v3 releases.
- For forwards compatibility with PHPUnit 5.
- Adds `Zend\Router` as a module to the test configuration - Calls `disableOriginalConstructor()` on select mock instances where needed
- only if it exists
and we have green! Pinging @bakura10 ! |
"zendframework/zend-view": "^2.8.1", | ||
"zendframework/zend-serializer": "^2.8", | ||
"zendframework/zend-log": "^2.9.1", | ||
"zendframework/zend-i18n": "^2.7.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some cleanup should be done here. I remember that I've added all of this crap in the past due to all those dependencies being needed, but they are actually not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I was able to remove all but the QA tools and the module manager dep from the dev rules.
Looks good :p. @danizord just in case ! |
), | ||
); | ||
], | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some array()
in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because they're in comments. I can fix if you'd like.
On Aug 16, 2016 5:01 PM, "Daniel Gimenes" notifications@github.com wrote:
In config/zfr_cors.global.php.dist
#38 (comment):@@ -43,5 +43,5 @@ return array(
* the proper response header.
*/
// 'allowed_credentials' => false,
- ),
-);- ],
+];There are still some array() in this file
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zf-fr/zfr-cors/pull/38/files/a9bbdf9c81cfe3c14553208bb60d4558683168fa#r75029118,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABlVypBqBBLqregns4F7bGyomA2gXeDks5qgjMtgaJpZM4JloTx
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please, then I'll be able to merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Looks good for me 👍 |
- Removed arguments that were unused - ensures the signature will work with either zend-servicemanager version - More defensive about configuration - check that the service exists before pulling it - check that the key exists before pulling it
- Removed all dependencies that were not required by the package, and verified that tests continue to run.
Tests not passing :D. |
@bakura10 Yep - it's because those dependencies, or at least some of them, are needed by v2 components. I'm looking into finding out which. |
Good luck, I’ve tried in the past, never managed to remove those dependencies ;). |
- zend-i18n, zend-log, zend-serializer, and zend-view are needed when testing against v2 releases.
Got rid of zend-config from there, at least. Rest were needed for testing against v2. I think if you weren't using the module manager in the test bootstrap, we could likely reduce the deps more, but I think that might take some significant re-architecture. |
Okay, I think I'm done now, @bakura10 ! |
@bakura10 Ping me when the release is tagged, and I'll announce via the zfdevteam and Apigility twitter accounts. |
Tagged as 1.3.0 :). Thanks! |
This patch modernizes the module to allow it to work with either v2 or v3 components. The changes include:
Module.php
file. If folks are not using Composer for their autoloading, they should; if they cannot, they can setup autoloading manually.Locally, everything passes just fine against both v2 and v3 components, but we'll see what Travis says.