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

Provide PHP 7.2 support for zend-mvc 2.7 series #279

Conversation

weierophinney
Copy link
Member

  • Updates dependencies to versions known to work with 2.7 when possible.
  • Fixes a signature within the PluginManager
  • Fixes a test asset signature
  • Adds 7.1 and 7.2 jobs

@weierophinney weierophinney force-pushed the hotfix/2.7-php-7.2-support branch 3 times, most recently from cb15aa2 to 7800a56 Compare May 2, 2018 22:15
- Updates dependencies to versions known to work with 2.7 when possible.
- Fixes a signature within the PluginManager
- Fixes a test asset signature
- Adds 7.1 and 7.2 jobs
- Drops PHP 5.5 from the matrix

  Most dependencies _require_ 5.6 as a minimum supported version, and thus
  we cannot install dependencies as a result.

  It may still _work_ on 5.5, but if you're on 5.5, you don't care about
  7.2 support.
- Use latest possible version of PHPUnit in the v4 series.
…n detected

`PluginManager` overrides the `get()` method, which has a different
signature in v2 than in v3. Until PHP 7.2, this was not a problem;
however, in 7.2, even optional values must follow the exact same
signature as the parent. As a result, we now need to vary the
implementations.

This patch provides `AbstractPluginManager`, which contains the bulk of the
logic for implementing the `PluginManager`. It then introduces the
following:

- `PluginManagerSM2`, which extends `AbstractPluginManager` and
  implements the zend-servicemanager v2 `get()` signature.
- `PluginManagerSM3`, which extends `AbstractPluginManager` and
  implements the zend-servicemanager v3 `get()` signature.

It removes the `PluginManager` class.

It then adds a file-based autoloader that checks to see if
`Zend\ServiceManager\PluginManagerInterface` exists. If it does, it
aliases `PluginManager` to `PluginManagerSM3`; otherwise, it aliases it
to `PluginManagerSM2`.

Additionally, this patch updates to zend-servicemanager 2.7.10, which
has important fixes to how it handles creation options with
InvokableFactory that are necessary here.
@weierophinney weierophinney force-pushed the hotfix/2.7-php-7.2-support branch from 7800a56 to 43cbba0 Compare May 2, 2018 22:22
@weierophinney weierophinney merged commit 43cbba0 into zendframework:release-2.7 May 2, 2018
weierophinney added a commit that referenced this pull request May 2, 2018
New 2.7.14 release.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant