Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merging develop to master in preparation for 3.0.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Dec 10, 2018
2 parents 15979c1 + b3cc525 commit baa10aa
Show file tree
Hide file tree
Showing 179 changed files with 7,934 additions and 4,118 deletions.
37 changes: 9 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,40 @@ env:

matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 7
env:
- DEPS=latest
- php: 7.1
- php: 7.2
env:
- DEPS=lowest
- php: 7.1
- php: 7.2
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
- STATIC_ANALYSIS=true
- php: 7.2
env:
- DEPS=latest
- php: 7.2
- php: 7.3
env:
- DEPS=lowest
- php: 7.2
- php: 7.3
env:
- DEPS=locked
- php: 7.2
- php: 7.3
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- travis_retry composer install $COMPOSER_ARGS
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120 && composer show

script:
- if [[ $STATIC_ANALYSIS == 'true' ]]; then composer analyse ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

Expand Down
121 changes: 121 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,127 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 3.0.0 - 2018-12-10

### Added

- [#87](https://github.com/zendframework/zend-hydrator/pull/87) adds `Zend\Hydrator\HydratorPluginManagerInterface` to allow
type-hinting on plugin manager implementations. The interface simply extends
the [PSR-11 ContainerInterface](https://www.php-fig.org/psr/psr-11/).

- [#87](https://github.com/zendframework/zend-hydrator/pull/87) adds `Zend\Hydrator\StandaloneHydratorPluginManager` as an implementation
of each of `Psr\Container\ContainerInterface` and `Zend\Hydrator\HydratorPluginManagerInterface`,
along with a factory for creating it, `Zend\Hydrator\StandaloneHydratorPluginManagerFactory`.
It can act as a replacement for `Zend\Hydrator\HydratorPluginManager`, but
only supports the shipped hydrator implementations. See the [plugin manager documentation](https://docs.zendframework.com/zend-hydrator/v3/plugin-managers/)
for more details on usage.

- [#79](https://github.com/zendframework/zend-hydrator/pull/79) adds a third, optional parameter to the `DateTimeFormatterStrategy` constructor.
The parameter is a boolean, and, when enabled, a string that can be parsed by
the `DateTime` constructor will still result in a `DateTime` instance during
hydration, even if the string does not follow the provided date-time format.

- [#14](https://github.com/zendframework/zend-hydrator/pull/14) adds the following `final` classes:
- `\Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy\UnderscoreToCamelCaseFilter`
- `\Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy\CamelCaseToUnderscoreFilter`

### Changed

- [#89](https://github.com/zendframework/zend-hydrator/pull/89) renames the various hydrators to use the "Hydrator" suffix:
- `ArraySerializable` becomes `ArraySerializableHydrator`
- `ClassMethods` becomes `ClassMethodsHydrator`
- `ObjectProperty` becomes `ObjectPropertyHydrator`
- `Reflection` becomes `ReflectionHydrator`
In each case, the original class was re-added to the repository as a
deprecated extension of the new class, to be removed in version 4.0.0.

Aliases resolving the original class name to the new class were also added to
the `HydratorPluginManager` to ensure you can still obtain instances.

- [#87](https://github.com/zendframework/zend-hydrator/pull/87) modifies `Zend\Hydrator\ConfigProvider` to add a factory entry for
`Zend\Hydrator\StandaloneHydratorPluginManager`.

- [#87](https://github.com/zendframework/zend-hydrator/pull/87) modifies `Zend\Hydrator\ConfigProvider` to change the target of the
`HydratorManager` alias based on the presence of the zend-servicemanager
package; if the package is not available, the target points to
`Zend\Hydrator\StandaloneHydratorPluginManager` instead of
`Zend\Hydrator\HydratorPluginManager`.

- [#83](https://github.com/zendframework/zend-hydrator/pull/83) renames `Zend\Hydrator\FilterEnabledInterface` to `Zend\Hydrator\Filter\FilterEnabledInterface` (new namespace).

- [#83](https://github.com/zendframework/zend-hydrator/pull/83) renames `Zend\Hydrator\NamingStrategyEnabledInterface` to `Zend\Hydrator\NamingStrategy\NamingStrategyEnabledInterface` (new namespace).

- [#83](https://github.com/zendframework/zend-hydrator/pull/83) renames `Zend\Hydrator\StrategyEnabledInterface` to `Zend\Hydrator\Strategy\StrategyEnabledInterface` (new namespace).

- [#82](https://github.com/zendframework/zend-hydrator/pull/82) and [#85](https://github.com/zendframework/zend-hydrator/pull/85) change `Zend\Hydrator\NamingStrategy\MapNamingStrategy`
in the following ways:
- The class is now marked `final`.
- The constructor is marked private. You can no longer instantiate it directly.
- The class offers three new named constructors; one of these MUST be used to
create an instance, as the constructor is now final:
- `MapNamingStrategy::createFromExtractionMap(array $extractionMap) : MapNamingStrategy`
will use the provided extraction map for extraction operations, and flip it
for hydration operations.
- `MapNamingStrategy::createFromHydrationMap(array $hydrationMap) : MapNamingStrategy`
will use the provided hydration map for hydration operations, and flip it
for extraction operations.
- `MapNamingStrategy::createFromAssymetricMap(array $extractionMap, array $hydrationMap) : MapNamingStrategy`
will use the appropriate map based on the requested operation.

- [#80](https://github.com/zendframework/zend-hydrator/pull/80) bumps the minimum supported PHP version to 7.2.

- [#80](https://github.com/zendframework/zend-hydrator/pull/80) bumps the minimum supported zend-eventmanager version to 3.2.1. zend-eventmanager
is only required if you are using the `AggregateHydrator`.

- [#80](https://github.com/zendframework/zend-hydrator/pull/80) bumps the minimum supported zend-serializer version to 2.9.0. zend-serializer is
only required if you are using the `SerializableStrategy`.

- [#80](https://github.com/zendframework/zend-hydrator/pull/80) bumps the minimum supported zend-servicemanager version to 3.3.2.
zend-servicemanager is only required if you are using the
`HydratorPluginManager` or `DelegatingHydrator`. This change means that
some service names supported by zend-servicemanager v2 will no longer work.
When in doubt, use the fully qualified class name, or the class name minus the
namespace, with correct casing.

- [#80](https://github.com/zendframework/zend-hydrator/pull/80) adds scalar typehints both to parameters and return values, and object
typehints to parameters, wherever possible. For consumers, this should pose no
discernable change. **For those implementing interfaces or extending classes
from this package, updates will be necessary to ensure your code will run.**
[See the migration guide for details](https://docs.zendframework.com/zend-hydrator/v3/migration/).

- [#14](https://github.com/zendframework/zend-hydrator/pull/14) replaces usage of zend-filter with the hardcoded filters referenced in
the above section.

- [#14](https://github.com/zendframework/zend-hydrator/pull/14) made the following visibility changes to `\Zend\Hydrator\NamingStrategy\UnderscoreNamingStrategy`:
- static property `$underscoreToStudlyCaseFilter` was renamed to `$underscoreToCamelCaseFilter` and marked `private`
- static property `$camelCaseToUnderscoreFilter` was marked `private`
- method `getCamelCaseToUnderscoreFilter` was marked `private`
- method `getUnderscoreToStudlyCaseFilter` was renamed to `getUnderscoreToCamelCaseFilter` and marked `private`

### Deprecated

- [#89](https://github.com/zendframework/zend-hydrator/pull/89) and
[#93](https://github.com/zendframework/zend-hydrator/pull/93) deprecate the
following classes, which will be removed in 4.0.0:
- `Zend\Hydrator\ArraySerializable` (becomes `ArraySerializableHydrator`)
- `Zend\Hydrator\ClassMethods` (becomes `ClassMethodsHydrator`)
- `Zend\Hydrator\ObjectProperty` (becomes `ObjectPropertyHydrator`)
- `Zend\Hydrator\Reflection` (becomes `ReflectionHydrator`)

### Removed

- [#83](https://github.com/zendframework/zend-hydrator/pull/83) removes the constructor in `Zend\Hydrator\AbstractHydrator`. All
initialization is now either performed via property definitions or lazy-loading.

- [#82](https://github.com/zendframework/zend-hydrator/pull/82) removes `Zend\Hydrator\NamingStrategy\ArrayMapNamingStrategy`. The functionality
it provided has been merged into `Zend\Hydrator\NamingStrategy\MapNamingStrategy`;
use `MapNamingStrategy::createFromExtractionMap()` to create an instance that
has the same functionality as `ArrayMapNamingStrategy` previously provided.

### Fixed

- Nothing.

## 2.4.1 - 2018-11-19

### Added
Expand Down
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
"forum": "https://discourse.zendframework.com/c/questions/components"
},
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-stdlib": "^3.0"
"php": "^7.2",
"zendframework/zend-stdlib": "^3.2.1"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
"phpspec/prophecy": "^1.7.5",
"phpstan/phpstan": "^0.10.5",
"phpunit/phpunit": "^7.5",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
"zendframework/zend-filter": "^2.6",
"zendframework/zend-inputfilter": "^2.6",
"zendframework/zend-serializer": "^2.6.1",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
"zendframework/zend-eventmanager": "^3.2.1",
"zendframework/zend-modulemanager": "^2.8",
"zendframework/zend-serializer": "^2.9",
"zendframework/zend-servicemanager": "^3.3.2"
},
"suggest": {
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage",
"zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage",
"zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage"
"zendframework/zend-eventmanager": "^3.2, to support aggregate hydrator usage",
"zendframework/zend-serializer": "^2.9, to use the SerializableStrategy",
"zendframework/zend-servicemanager": "^3.3, to support hydrator plugin manager usage"
},
"autoload": {
"psr-4": {
Expand All @@ -49,17 +49,17 @@
},
"extra": {
"branch-alias": {
"dev-release-1.0": "1.0.x-dev",
"dev-release-1.1": "1.1.x-dev",
"dev-master": "2.4.x-dev",
"dev-develop": "3.0.x-dev"
"dev-release-2.4": "2.4.x-dev",
"dev-master": "3.0.x-dev",
"dev-develop": "3.1.x-dev"
},
"zf": {
"component": "Zend\\Hydrator",
"config-provider": "Zend\\Hydrator\\ConfigProvider"
}
},
"scripts": {
"analyse": "phpstan analyse --no-progress",
"check": [
"@cs-check",
"@test"
Expand Down
Loading

0 comments on commit baa10aa

Please sign in to comment.