8000 PHP 7.1 support by Ocramius · Pull Request #87 · zendframework/zend-code · GitHub
[go: up one dir, main page]

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

PHP 7.1 support #87

Merged
merged 60 commits into from
Oct 24, 2016
Merged
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 Aug 19, 2016
6f1c169
Test asset: class with default-null nullable method parameters
Ocramius Aug 19, 2016
f02e6e2
Test asset: class with nullable method parameters
Ocramius Aug 19, 2016
c6fd91c
Test asset: class with nullable return types
Ocramius Aug 19, 2016
63bbba6
Test case: method generation must work also with nullable return types
Ocramius Aug 19, 2016
d488f5d
Corrected test asset: using same class to distinguish usage of `self`…
Ocramius Aug 19, 2016
131ef0f
Supporting nullable type hints in the `TypeGenerator`
Ocramius Aug 19, 2016
b9ff80d
Making tests pass on 7.1: `self` hint to be properly recognized
Ocramius Aug 19, 2016
e89c054
Re-enabling nullable string type (now not crashing anymore)
Ocramius Aug 19, 2016
9198522
Adding `void` to the possible return type hints in the test assets
Ocramius Aug 19, 2016
427ca19
Testing for `void` as return type
Ocramius Aug 19, 2016
907b358
Void cannot be namespaced
Ocramius Aug 19, 2016
cac6dc2
`void` should just work
Ocramius Aug 19, 2016
c4781a2
`void` cannot be nullable
Ocramius Aug 19, 2016
6ac9d28
Better keys for errors in test case failures
Ocramius Aug 19, 2016
f68ee52
Better keys for errors in test case failures (for valid strings)
Ocramius Aug 19, 2016
820b0cf
Checking nullability of types
Ocramius Aug 19, 2016
e6df60f
Simplistic support of the `void` type
Ocramius Aug 19, 2016
6f8cf39
Correcting test expectation: nullability to be removed from expected …
Ocramius Aug 19, 2016
4ff2b36
Removed useless nullability matcher
Ocramius Aug 19, 2016
beabbe4
Corrected return type in docblock
Ocramius Aug 19, 2016
3f00d69
Removed ignored coverage rule
Ocramius Aug 19, 2016
dcf9934
`void` is not allowed to be nullable (`?` prefix rejected)
Ocramius Aug 19, 2016
eb3362e
Corrected parameter type to match same class
Ocramius Aug 19, 2016
5c5fbe7
Testing nullable parameter definitions
Ocramius Aug 19, 2016
9409b61
`ReflectionType#getName()` to be used instead of `__toString()`
Ocramius Aug 19, 2016
62a6303
Parameter generator test adjustments: must now assert the correct typ…
Ocramius Aug 19, 2016
d2ea9aa
Expecting generated code signature to match parameter types (with nul…
Ocramius Aug 19, 2016
480600b
Correcting method names to reflect correct class parameter name
Ocramius Aug 19, 2016
bd3da75
Correcting parameter type to use same class as defined one, testing n…
Ocramius Aug 19, 2016
94b518e
Reverting test expecations around `getType` calls, maintaining BC the…
Ocramius Aug 19, 2016
6e0df02
Implementing changes to make parameter reflection also expose nullabl…
Ocramius Aug 19, 2016
79a3cd9
expand `self` to class name
Sep 13, 2016
da9a02f
Re-enabling string hints on tests (now passing, as per PHP 7.1.0-RC1)
Ocramius Sep 13, 2016
f0e8621
Nullable return type parameters are not supported in PHP 7.0
Ocramius Sep 13, 2016
9b03825
Skipping `void` and nullable parameters from the `MethodGeneratorTest…
Ocramius Sep 13, 2016
07509d7
Adding empty class test asset
Ocramius Sep 13, 2016
e1b991b
Adding `parent` hint to `ReturnTypeHintedClass`
Ocramius Sep 13, 2016
6f2a368
Adding `parent` to the possible return types to be expanded to the ac…
Ocramius Sep 13, 2016
80efdfc
Adding `parent` nullable return type hint
Ocramius Sep 13, 2016
bba27ef
Expecting `parent` nullable return hint to be expanded to the actual …
Ocramius Sep 13, 2016
6bb8fcd
Expanding also `parent` type when looking at method return types
Ocramius Sep 13, 2016
9e90219
Nullable `parent` hint test asset
Ocramius Sep 13, 2016
23eb0f5
Testing against the `parentParameter` nullable hint
Ocramius Sep 13, 2016
69892eb
Testing against the `parentParameter` nullable hint on the parent par…
Ocramius Sep 13, 2016
1baa95f
Nullable defaulted `parent` parameter should be expaneded to the pare…
Ocramius Sep 13, 2016
8b339a2
Adding simple `parent` hint expansion scenarios
Ocramius Sep 13, 2016
cf1f743
Expanding `parent` parameter hint to the FQCN of the parent class
Ocramius Sep 13, 2016
b12085a
Minor CS fix - excessive spacing
Ocramius Sep 13, 2016
1d518df
Minor CS fix - excessive line length
Ocramius Sep 13, 2016
264bea4
Removing class docblock (not needed in this test asset, and genuinely…
Ocramius Sep 16, 2016
8495179
Test asset with the `iterable` hints (7.1 feature)
Ocramius Sep 16, 2016
5a5a441
The `iterable` PHP 7.1 built-in union-type should not be namespaced
Ocramius Sep 16, 2016
7f5c35a
Expectations around how the `iterable` PHP 7.1 built-in union type sh…
Ocramius Sep 16, 2016
b40bbd1
Adding `iterable` to the internal types recognized by `TypeGenerator`
Ocramius Sep 16, 2016
657e57a
`iterable` (PHP 7.1 internal union type) should be recognized as "spe…
Ocramius Sep 16, 2016
aa8e947
`iterable` (PHP 7.1 internal union type) should be recognized as "spe…
Ocramius Sep 16, 2016
bda0512
Tests around `iterable` to be skipped pre-PHP-7.1
Ocramius Sep 16, 2016
db63773
Adding PHP 7.1 to the build matrix
Ocramius Sep 20, 2016
c682384
`xdebug.ini` may not exist in all matrix entries
Ocramius Sep 20, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Nullable defaulted parent parameter should be expaneded to the pare…
…nt class FQCN
  • Loading branch information
Ocramius committed Oct 24, 2016
commit 1baa95f525d5e2d74be09299c3bccdb68e1aea4c
1 change: 1 addition & 0 deletions test/Generator/ParameterGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ public function reflectionHintsProvider()
[NullNullableDefaultHintsClass::class, 'stringParameter', 'foo', '?string'],
[NullNullableDefaultHintsClass::class, 'boolParameter', 'foo', '?bool'],
[NullNullableDefaultHintsClass::class, 'selfParameter', 'foo', '?\\' . NullNullableDefaultHintsClass::class],
[NullNullableDefaultHintsClass::class, 'parentParameter', 'foo', '?\\' . EmptyClass::class],
[NullNullableDefaultHintsClass::class, 'nullableDefaultHintsClassParameter', 'foo', '?\\' . NullNullableDefaultHintsClass::class],
[ClassTypeHintedClass::class, 'selfParameter', 'foo', '\\' . ClassTypeHintedClass::class],
[ClassTypeHintedClass::class, 'classParameter', 'foo', '\\' . ClassTypeHintedClass::class],
Expand Down
0