Skip to content
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

Closed
wants to merge 142 commits into from
Closed

Conversation

gsteel
Copy link
Contributor

@gsteel gsteel commented Aug 10, 2018

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:

  • PSR-6/PSR-16 cache
  • Hydrate documents to your own models to easily encapsulate logic
  • Test coverage > 95%
  • Predictable namespaced exceptions throughout

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

* 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
…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
…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
gsteel and others added 8 commits November 16, 2018 11:16
@OwenMelbz
Copy link

@gsteel what ever happened with this?

@gsteel
Copy link
Contributor Author

gsteel commented Mar 19, 2019

This did…

@OwenMelbz
Copy link

Oh lovely :D feels like this product has been abandoned!

@gsteel
Copy link
Contributor Author

gsteel commented Mar 19, 2019

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 :)

@OwenMelbz
Copy link

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

@gsteel
Copy link
Contributor Author

gsteel commented Mar 19, 2019

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

Void and others added 15 commits March 4, 2020 16:47
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
@gsteel gsteel closed this Jun 3, 2020
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.

Prismic::SearchForm url parameters are not correctly separated
3 participants