Skip to content

Merge release 3.7.1 into 3.8.x#55

Merged
Ocramius merged 34 commits into3.8.xfrom
3.7.x-merge-up-into-3.8.x_cIiblTNN
Jan 21, 2022
Merged

Merge release 3.7.1 into 3.8.x#55
Ocramius merged 34 commits into3.8.xfrom
3.7.x-merge-up-into-3.8.x_cIiblTNN

Conversation

@github-actions
Copy link
Copy Markdown

Release Notes for 3.7.1

3.7.x bugfix release (patch)

3.7.1

  • Total issues resolved: 1
  • Total pull requests resolved: 2
  • Total contributors: 3

Bug

weierophinney and others added 30 commits February 16, 2016 12:13
Allow travis to build against the 2.7 branch.
Overrides the zend-hydrator plugins to use the extensions provided in
this repository. This preserves the original typehints, allowing
developers to gradually migrate by replacing zend-stdlib typehints with
zend-hydrator typehints.
As noted in zendframework/zendframework#7672, on updating to:

- zend-stdlib >= 2.7.0
- zend-mvc >= 2.6.0

backwards compatibility is broken with regards to typehints against hydrators.
The reason is two-fold:

- The `HydratorPluginManager` is simply an extension of the one provided in
  zend-hydrator, meaning that all plugins returned are under the `Zend\Hydrator`
  namespace, not the `Zend\Stdlib\Hydrator` namespace.
- zend-mvc altered the `HydratorPluginManager` mapping to use the instance from
  zend-hydrator instead of zend-stdlib.

This patch addresses the first point of each. It does the following:

- Updates the DelegatingHydratorFactory to return a zend-stdlib instance.
- Updates the HydratorPluginManager to override the defaults from zend-hydrator,
  and have them return zend-stdlib extensions.
- Adds a test suite for HydratorPluginManager to verify backwards compatibility.

A related commit against the zend-mvc 2.6 series will occur shortly, having it
use the zend-stdlib HydratorPluginManager.
- Added `COMPOSER_ROOT_VERSION` directive to composer install, to ensure we
  don't get a circular dependency issue.
- PHP 7 MUST pass!
Per #55 (and originally reported as zendframework/zend-hydrator#19),
this patch does the following:

- Adds tests against the hydrate and extract methods to ensure that the
  event triggered is the zend-stdlib variant (as well as kept the tests
  for the zend-hydrator variants).
- Updated test expectations to check for `triggerEvent()` (and not
  `trigger()`), as the 1.1 version of zend-hydrator is now
  forwards-compatible with zend-eventmanager v3. This also required
  raising the minimum version of zend-hydrator to 1.1 so that tests do
  not need to be varied.
- Fixes the test assumptions in `testAdd()`, as attachment of the
  aggregate listener now calls the `attach()` method of the listener
  class, changing how the mock EM instance is called.
When updating zend-hydrator to 1.1, we discovered some testing issues
with the underlying functionality; additionally, due to the fact that
the `createService()` method of the factory delegates to the
`__invoke()` method, and the typehints are different (former uses
ServiceLocatorInterface, while latter uses ContainerInterface), and the
fact that the DelegatingHydrator constructor now accepts a
ContainerInterface (vs ServiceLocatorInterface), prophecy had to be used
to allow composing multiple interfaces in the mock object.
This commit refers to the issue #58 and fixes an exception that was arising up on
systems based on MUSL (and probably other UNIX based rather than GNU Linux)

```
  [Exception]
  Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /magento/vendor/zendframework/zend-stdlib/src/Glob.php on line 64
```
This patch allows the 2.7 series to work without errors on PHP 7.3. and 7.4.
To make this possible, it makes the following changes:

- Drops support for PHP versions prior to 5.6; we cannot test against those at this time.
- Adds the Laminas CI and automatic-releases workflows to the 2.7.x branch, to allow testing and releasing on that branch.
  - It removes the existing Travis-CI configuration at the same time.
- Updates the PHPUnit version so we can test against 5.6 and the entire 7.x series.
- Removes the CHANGELOG file; changelogs will be kept in milestone descriptions, and propagated to tag and release notes.
- Updates `ArrayObject::count()` to test if the internal storage is countable before it attempts to return its count; if not, it returns 1.
- Updates `Parameters::toString()` to have it call `http_build_query()` on the return value of `toArray()` instead of on `$this`.
- Updates unit tests to extend the namespaced variant of `PHPUnit\Framework\TestCase` instead of the pseudo-namespaced version.
- Updates unit tests to use `createMock()` or `getMockBuilder(...)->getMock()` instead of `getMock()`.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
- Bumps laminas-eventmanager to 2.6.1 to pickup the `triggerEvent()` method.
- Bumps laminas-servicemanager to 2.7.5/3.0.3 to pickup container-interop compatability.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
To pick up `is_countable()`.

Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
fix: fix unit tests by bumping minimum supported dependency versions
Signed-off-by: Anton Smirnov <sandfox@sandfox.me>
Signed-off-by: Anton Smirnov <sandfox@sandfox.me>
Signed-off-by: Anton Smirnov <sandfox@sandfox.me>
Signed-off-by: Anton Smirnov <sandfox@sandfox.me>
Fixes crash in `StringUtils::registerWrapper()`
…omposer/composer:2.2.3` (re-generated, no dependency changes)
…ArrayAccess` caused by asymmetric property/getter access
…()`, to comply with PHP 8.1 requirements

Also marked any future detected deprecations as failures
…erator-php-8.1-deprecation

Fix for #50 - added `ReturnTypeWillChange` to `ArrayStack#getIterator()`, to comply with PHP 8.1 requirements
@Ocramius Ocramius added this to the 3.8.0 milestone Jan 21, 2022
@Ocramius Ocramius self-assigned this Jan 21, 2022
@Ocramius Ocramius added the Bug Something isn't working label Jan 21, 2022
@Ocramius Ocramius merged commit 52ea08e into 3.8.x Jan 21, 2022
@Ocramius Ocramius deleted the 3.7.x-merge-up-into-3.8.x_cIiblTNN branch January 21, 2022 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants