Introduce JsonSerializable polyfill and support in Zend\Json\Encoder #4534

Merged
merged 2 commits into from May 23, 2013

Projects

None yet

2 participants

@gws
Contributor
gws commented May 23, 2013

This is an alternative to #4507

It introduces a polyfill into Zend\Stdlib which can be used by legacy PHP implementations. Zend\Json\Encoder then tests for the PHP built-in interface which will work even on PHP implementations where \JsonSerializable doesn't exist.

@gws
Contributor
gws commented May 23, 2013

ZF2 convention is to use the Interface suffix for interfaces, which I did not do in the Zend\Stdlib polyfill because of the naming of the native class, but I could see arguments for both sides.

@weierophinney weierophinney added a commit that referenced this pull request May 23, 2013
@weierophinney weierophinney Merge branch 'feature/4534' into develop
Close #4534
Resolves #4507
1446551
@weierophinney weierophinney merged commit ff34a09 into zendframework:develop May 23, 2013
@weierophinney
Member

@gwis we did not follow the "Interface" suffix in other polyfills, either. :)

Merged to develop for release in 2.3.0. Thanks!

@gws gws deleted the unknown repository branch May 23, 2013
@weierophinney weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#4534 from gwis/feature…
…/jsonserializable-polyfill

Introduce JsonSerializable polyfill and support in Zend\Json\Encoder
cb2f233
@weierophinney weierophinney added a commit to zendframework/zend-stdlib that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge branch 'feature/4534' into develop bdbff54
@weierophinney weierophinney added a commit to zendframework/zend-json that referenced this pull request May 15, 2015
@weierophinney weierophinney Merge pull request zendframework/zendframework#4534 from gwis/feature…
…/jsonserializable-polyfill

Introduce JsonSerializable polyfill and support in Zend\Json\Encoder
8b56746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment