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

Ensure component works against PHP 7.1+ #79

Merged
merged 3 commits into from
Jun 19, 2017

Conversation

weierophinney
Copy link
Member

This patch makes two changes:

  • It updates the declaration of AbstractContainer::offsetGet to return by reference, matching what it inherits from Zend\Stdlib\ArrayObject. This fixes an issue on PHP 7.2 alpha builds, where the difference in signatures creates a fatal error.
  • It updates the SessionConfig tests to skip tests for session.* INI options that are no longer available in PHP 7.1+.
  • It adds PHP 7.1 test targest to Travis.

@weierophinney
Copy link
Member Author

7.1 tests pass, but there are issues with recent zend-servicemanager updates that are causing unrelated failures. I'll try and address those before doing a release; it looks like #78 may address those issues already.

@weierophinney weierophinney added this to the 2.7.4 milestone Jun 19, 2017
`AbstractContainer` inherits from `Zend\Stdlib\ArrayObject`.
`ArrayObject::offsetGet()` is defined such as to _return by reference_;
however, the override in `AbstractContainer` did not. This casuses an
issue in current alpha versions of PHP 7.2, as it is considered an
incompatible signature.

This patch updates the `AbstractContainer::offsetGet()` declaration to
return by reference. All tests related to containers continue to pass.
A number of `session.*` INI options were removed starting in 7.1,
causing tests to fail. This patch updates the test suite to skip
tests for INI options that do not exist when run under 7.1.
@weierophinney
Copy link
Member Author

I'll do a 2.7.4 release with this patch, and then a 2.8.0 with the #78 patches; this will allow more easily back-porting the patch to the 2.4 series to ensure that series works with 7.1.

@weierophinney weierophinney merged commit 3f515bc into zendframework:master Jun 19, 2017
weierophinney added a commit that referenced this pull request Jun 19, 2017
weierophinney added a commit that referenced this pull request Jun 19, 2017
weierophinney added a commit that referenced this pull request Jun 19, 2017
Forward port #79

Conflicts:
	CHANGELOG.md
@Slamdunk
Copy link
Contributor

Tell me if you'd like me to rebase #78 against develop, or you prefer to manually cherrypick it

@weierophinney
Copy link
Member Author

@Slamdunk I can do the rebase, no worries.

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

2 participants