Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial PHP 8 Support #67

Merged
merged 38 commits into from
Oct 5, 2020
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
251fce0
Support PHP 8
deleugpn Jul 11, 2020
b890211
Only run Reflection Closure 6 on PHP 8
deleugpn Jul 11, 2020
a1312e9
Revert phpunit version change
deleugpn Jul 11, 2020
a95a6a8
Attempt to expect exception for both new and old phpunit version
deleugpn Jul 11, 2020
fd66ae0
Support PHP 5.4
deleugpn Jul 11, 2020
1864f84
Use setExpectException instead of docblock
deleugpn Jul 11, 2020
710bbfb
Rename variable
deleugpn Jul 11, 2020
878c73a
Test against nightly
deleugpn Jul 11, 2020
920c191
Update tests.yml
GrahamCampbell Jul 11, 2020
7f26f1d
Update tests.yml
GrahamCampbell Jul 11, 2020
24e80e7
Update phpunit.xml
GrahamCampbell Jul 11, 2020
13590e2
Update composer.json
GrahamCampbell Jul 11, 2020
c484451
Update composer.json
GrahamCampbell Jul 11, 2020
6047099
Tweaks to allow the code to be updated easily if PHP 8.1 makes more c…
GrahamCampbell Jul 11, 2020
36f3d22
Added in array, callable, iterable
GrahamCampbell Jul 11, 2020
0f69f14
Added additional PHP8 pesudo-types
GrahamCampbell Jul 18, 2020
f453f32
Add more cases to assertion
deleugpn Jul 20, 2020
378c39e
Add more union type assertions
deleugpn Aug 12, 2020
c9eac8a
8.0.0-dev is not greater than 8.0.0
deleugpn Aug 12, 2020
47ad58b
GitHub Actions debug
deleugpn Aug 12, 2020
5f856e1
Namespace fix
deleugpn Aug 14, 2020
b116437
Fix qualified and unqualified namespace
deleugpn Aug 15, 2020
aba532d
Fix partially qualified namespace
deleugpn Aug 15, 2020
7a0d6ee
Instantiation with Partially Qualified Namespace
deleugpn Aug 15, 2020
f9e510d
Handle Different Cases of T_NAME_QUALIFIED
deleugpn Aug 23, 2020
baa435f
Short Closure only works on PHP 7.4
deleugpn Aug 23, 2020
3a8eb4a
Move constant definition to the start of the file
deleugpn Sep 2, 2020
a0676d9
Declaration inside namespace
deleugpn Sep 2, 2020
bb133ae
Add tests for Trailing Comma, Named Parameter & Nullsafe operator
deleugpn Sep 2, 2020
94745f7
Fix Named Parameter test
deleugpn Sep 2, 2020
7a7ff99
Don't need dev stability anymore
GrahamCampbell Sep 6, 2020
2274a2c
Code style
GrahamCampbell Sep 6, 2020
522c9b6
Code style
GrahamCampbell Sep 6, 2020
ed079ca
Code style
GrahamCampbell Sep 6, 2020
3b0ebd7
Code style
GrahamCampbell Sep 6, 2020
f61aa2a
Code style
GrahamCampbell Sep 6, 2020
ab833c4
Code style
GrahamCampbell Sep 6, 2020
caaf68c
Fixed typo
GrahamCampbell Sep 7, 2020
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
Instantiation with Partially Qualified Namespace
  • Loading branch information
deleugpn committed Aug 15, 2020
commit 7a0d6eecb6cf7d93be7118d818b2648ba09133cb
8 changes: 7 additions & 1 deletion src/ReflectionClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ public function getCode()
$code .= $token[1];
break;
case T_NS_SEPARATOR:
case T_NAME_QUALIFIED:
case T_NAME_FULLY_QUALIFIED:
case T_STRING:
case T_STATIC:
Expand All @@ -473,6 +472,13 @@ public function getCode()
$id_name = '';
$state = 'id_name';
break 2;
case T_NAME_QUALIFIED:
$id_start_ci_length = strpos($token[1], '\\');
$id_start = substr($token[1], 0, $id_start_ci_length);
$id_start_ci = strtolower($id_start);
$id_name = substr($token[1], $id_start_ci_length);
$state = 'id_name';
break 2;
case T_VARIABLE:
$code .= $token[1];
$state = $lastState;
Expand Down