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

Ensure invalid extension types result in InvalidExtensionException #13

Merged

Conversation

weierophinney
Copy link
Member

This patch extends on #9, adding tests, and a further check for invalid non-service extension class names.

At this point, an InvalidExtensionException is raised if:

  • a non-string extension name is encountered.
  • the extension resolves to a class instance that does not fulfill ExtensionInterface, whether that instance is pulled from the container or instantiated directly.

hdimo and others added 3 commits January 11, 2017 10:07
Adds a test for the fix originally provided in zendframework#9, and an additional
test for cases where a non-service class name was provided; each should
raise the exception, in order to prevent a `TypeError` (PHP 7) or fatal
error (PHP 5) from occurring instead.

Revised the logic to prevent duplication of the check against
`ExtensionInterface`.
@weierophinney weierophinney added this to the 1.1.1 milestone Jan 11, 2017
@weierophinney weierophinney merged commit 418b12b into zendframework:master Jan 11, 2017
weierophinney added a commit that referenced this pull request Jan 11, 2017
weierophinney added a commit that referenced this pull request Jan 11, 2017
weierophinney added a commit that referenced this pull request Jan 11, 2017
Forward port #13

Conflicts:
	CHANGELOG.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants