This repository was archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
PHP 7.1 support #87
Merged
Ocramius
merged 60 commits into
zendframework:develop
from
Ocramius:feature/php-7-1-support
Oct 24, 2016
Merged
PHP 7.1 support #87
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
ed00915
Test asset: class with default-null return parameter
Ocramius 6f1c169
Test asset: class with default-null nullable method parameters
Ocramius f02e6e2
Test asset: class with nullable method parameters
Ocramius c6fd91c
Test asset: class with nullable return types
Ocramius 63bbba6
Test case: method generation must work also with nullable return types
Ocramius d488f5d
Corrected test asset: using same class to distinguish usage of `self`…
Ocramius 131ef0f
Supporting nullable type hints in the `TypeGenerator`
Ocramius b9ff80d
Making tests pass on 7.1: `self` hint to be properly recognized
Ocramius e89c054
Re-enabling nullable string type (now not crashing anymore)
Ocramius 9198522
Adding `void` to the possible return type hints in the test assets
Ocramius 427ca19
Testing for `void` as return type
Ocramius 907b358
Void cannot be namespaced
Ocramius cac6dc2
`void` should just work
Ocramius c4781a2
`void` cannot be nullable
Ocramius 6ac9d28
Better keys for errors in test case failures
Ocramius f68ee52
Better keys for errors in test case failures (for valid strings)
Ocramius 820b0cf
Checking nullability of types
Ocramius e6df60f
Simplistic support of the `void` type
Ocramius 6f8cf39
Correcting test expectation: nullability to be removed from expected …
Ocramius 4ff2b36
Removed useless nullability matcher
Ocramius beabbe4
Corrected return type in docblock
Ocramius 3f00d69
Removed ignored coverage rule
Ocramius dcf9934
8000
`void` is not allowed to be nullable (`?` prefix rejected)
Ocramius eb3362e
Corrected parameter type to match same class
Ocramius 5c5fbe7
Testing nullable parameter definitions
Ocramius 9409b61
`ReflectionType#getName()` to be used instead of `__toString()`
Ocramius 62a6303
Parameter generator test adjustments: must now assert the correct typ…
Ocramius d2ea9aa
Expecting generated code signature to match parameter types (with nul…
Ocramius 480600b
Correcting method names to reflect correct class parameter name
Ocramius bd3da75
Correcting parameter type to use same class as defined one, testing n…
Ocramius 94b518e
Reverting test expecations around `getType` calls, maintaining BC the…
Ocramius 6e0df02
Implementing changes to make parameter reflection also expose nullabl…
Ocramius 79a3cd9
expand `self` to class name
da9a02f
Re-enabling string hints on tests (now passing, as per PHP 7.1.0-RC1)
Ocramius f0e8621
Nullable return type parameters are not supported in PHP 7.0
Ocramius 9b03825
Skipping `void` and nullable parameters from the `MethodGeneratorTest…
Ocramius 07509d7
Adding empty class test asset
Ocramius e1b991b
Adding `parent` hint to `ReturnTypeHintedClass`
Ocramius 6f2a368
Adding `parent` to the possible return types to be expanded to the ac…
Ocramius 80efdfc
Adding `parent` nullable return type hint
Ocramius bba27ef
Expecting `parent` nullable return hint to be expanded to the actual …
Ocramius 6bb8fcd
Expanding also `parent` type when looking at method return types
Ocramius 9e90219
Nullable `parent` hint test asset
Ocramius 23eb0f5
Testing against the `parentParameter` nullable hint
Ocramius 69892eb
Testing against the `parentParameter` nullable hint on the parent par…
Ocramius 1baa95f
Nullable defaulted `parent` parameter should be expaneded to the pare…
Ocramius 8b339a2
Adding simple `parent` hint expansion scenarios
Ocramius cf1f743
Expanding `parent` parameter hint to the FQCN of the parent class
Ocramius b12085a
Minor CS fix - excessive spacing
Ocramius 1d518df
Minor CS fix - excessive line length
Ocramius 264bea4
Removing class docblock (not needed in this test asset, and genuinely…
Ocramius 8495179
Test asset with the `iterable` hints (7.1 feature)
Ocramius 5a5a441
The `iterable` PHP 7.1 built-in union-type should not be namespaced
Ocramius 7f5c35a
Expectations around how the `iterable` PHP 7.1 built-in union type sh…
Ocramius b40bbd1
Adding `iterable` to the internal types recognized by `TypeGenerator`
Ocramius 657e57a
`iterable` (PHP 7.1 internal union type) should be recognized as "spe…
Ocramius aa8e947
`iterable` (PHP 7.1 internal union type) should be recognized as "spe…
Ocramius bda0512
Tests around `iterable` to be skipped pre-PHP-7.1
Ocramius db63773
Adding PHP 7.1 to the build matrix
Ocramius c682384
`xdebug.ini` may not exist in all matrix entries
Ocramius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Expanding also
parent
type when looking at method return types
- Loading branch information
commit 6bb8fcdf6d480ca23a2413a145d223c184fb706a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I reading this correctly in that it pulls the type from reflecting the docblock in this case? If so, should it also consider
static
and$this
? (If it's strictly from declared return type, ignore.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static
is not a valid type hint (for good reasons).static
is used when resolving methods to call inside an instance, but it is not possible to use it as a hint due to its natural non-LSP-compliance.$this
is not a typeIn general, reflecting from docblocks is now a deprecated feature (there are explicit tests that verify that docblocks aren't used for reflecting anymore)