-
Notifications
You must be signed in to change notification settings - Fork 83
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
PHP >= 7.1 v4 Candidate #158
Conversation
* Require PHP 7.1 minimum * Upgrade PHPUnit * Remove old versions of PHP from Travis
…tiate from JSON data Create base test case for tests to inherit from so that there's easy access to fixtures
…erit from base TestCase
…ional factory methods
…more appropriate place to encapsulate instantiation. The same with forms. Use static factory method instead of putting all the logic in the Api class
… class * Introduce namespaced exceptions * Add test case for Ref and be a bit stricter about parsing refs in the factory method * Fix doc block for Form constructor and make the constructor private
\Prismic\Api::get() simplified and hoisted up next to the constructor
…cs check, fix and tests
…nd write a test for it
…client and cache instead of the Api. This will allow for easier testing and is the only reason the Api instance is injected in the first place. Extract duplicated code in various Api methods into a private method for preparing query options
…gs make sense and add tests
…doesn't support v7.x
…Cache. Wrap Guzzle client exceptions
…ieval of the api data in a try/catch
…t and retrieve it from the cache whenever it is needed. This removes the need to 'reload' the data after a cache bust. Now that instantiating the api instnce does not trigger an http request, one test was updated in order to trigger a fetch
…est for this method into 2 units
@gsteel what ever happened with this? |
Oh lovely :D feels like this product has been abandoned! |
The product is very much alive and well - I'm still using it all the time. There's just no love for PHPers. I maintain my own fork for my own specific needs - it's quite opinionated but contributions are welcome :) |
Ah sorry, when i said "this product" I meant - this facet of the product, e.g. the PHP SDK. It's a shame as looks great in so many ways until you try and use it with PHP then is less polished as everything else |
FWIW, I'm really happy using the fork. I do my best to follow semver and keep things stable. Kick the tyres or fork away ;) Coverage is pretty good |
Add unit test for expected payload values Add boolean data type to search results fixtures in V1/V2 format
Add Boolean Fragment Type
Update Dependencies, CI and Minimum PHP Version. Update all tests for PHPUnit 9
* Switch to doctrine coding standard and have a good old cleanup. * Add utility class for Json related operations in order to have consistent errors throughout the lib. * Add Language value object * Improve inline docs * CS Fix tests so they're compatible with Doctrine coding standard * Where values are being encoded to Json, use a helper method and throw consistent exceptions * Exclude native property type hint sniff * Test the hydrator constructor validates the map given * Cover new method in SearchFormCollection * Fail tests if apc is not enabled for the cli * Immediately create Form value objects inside ApiData instead of having stdClass objects hanging around and persist the 'key' of the form in the form value object - the key of the form was previously just kept as an array key, but it's an important dependency that should be reliablyknown and available. * Search forms don't need to be countable
* Correctly serialize boolean arguments in predicates * Update changelog
This is a very large PR from a fork I've been maintaining. There would need to be some cleanup, specifically the README and composer stuff. There's not a huge amount of BC breaks compared with v3 and it maintains compat with API v1 AFAICT. It's based on PR #150 and comes with a number of useful features.
Highlights:
There's a bit more info here: https://github.com/netglue/prismic-php-kit/releases/tag/4.0.0
This should fix #157, #152 and #117 also maybe #155