-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
For avoid the BC Break I suggest one of this:
I think the option 3 it's better. Just maintain a copy of that hydrator on this repo. |
@Maks3w Option 3 would be simplest; the problem is that you wouldn't be able to assert that it's an instance of the original class from |
Is it important to assert both Hydrators are the same? |
@Maks3w for typehints, yes. |
Test coverage changes are to be expected with code removal. Honestly, looking at the report, it looks like it's a bunch of small coverage changes that, per file, are less than 1%, but which aggregate. I'm not concerned about it; tests are still passing. |
Since v2.2 of phpunit coverage So because the project now has less "relevant lines" now each line has more weight in the global percent and uncovered lines got more relevance. |
@weierophinney I reviewed the PR and it looks good to me. |
- Updated interfaces, abstract classes, and concrete classes to extend zend-hydrator counterparts. - Where required, also implemented local hydrator interfaces to allow extensions to comply. - Most test modifications were around updating exception expectations to look for the zend-hydrator equivalents.
- Each also indicates the class from zendframework/zend-hydrator to use.
2e79060
to
802072d
Compare
This was needed to ensure that objects typehinting on `Zend\Stdlib\Extractor\ExtractionInterface` specifically would continue to work with objects implementing HydratorInterface. (Discovered in testing Apigility; this one change makes Apigility work correctly.)
- In case any code is type-hinting on `HydrationInterface` from zend-stdlib, this ensures objects fulfilling `HydratorInterface` will fulfill those as well.
I've tested Apigility against the current stable develop branch. 7752b57 fixes the only issue I encountered, which is that zf-hal was doing some type-hinting against At this point, the only thing that will require a change are any objects implementing |
Now presents notes on how to update code to work with the removal of the Hydrator classes.
I've updated the changelog to detail any necessary changes users may need. If using |
Before this patch, if a typehint was on `Zend\Stdlib\Hydrator\HydratorInterface`, and the hydrator extend the `AbstractHydrator`, then the type check would fail, as it was not implementing the interface.
In IRC, @mwillbanks noted an issue in zend-db's I've now updated |
- to ensure LSP
- to ensure LSP
To satisfy the LSP, I've updated all concrete classes to not only extend the relevant zend-hydrator counterparts, but to also implement the relevant local interfaces. This should obviate any issues with substitution in other classes. One note at this time: users adopting zend-hydrator and implementing those interfaces will be in a strange situation where that code will not work on code targeting the stdlib interfaces. I'll note that in the release notes. |
As a follow-up, I'll be updating the following repositories, using the following checklist, in the coming days to ensure they will work going forward, and use the zend-hydrator component for new minor versions:
Checklist:
|
Per zendframework#20, this removes the hydrator functionality from zend-stdlib.
Per zendframework#20, this removes the hydrator functionality from zend-stdlib.
As zend-hydrator has now been created, we can deprecate the various Hydrator classes.
The following is a checklist for what needs to happen:
zendframework/zend-hydrator
zend-hydrator
equivalents. In some cases, this may require either decoration (some classes are marked final) or changes tozend-hydrator
to accommodate extension.@deprecated
; we may also want to raise anE_USER_DEPRECATED
error to flag to users they will need to update.zend-hydrator
instances, not thezend-stdlib
equivalents.Once complete, we will also need to update
zend-mvc
to start usingzend-hydrator
for the hydrator plugin manager integration.