Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

Allow nullable return types - #11

Merged
dantleech merged 4 commits into
phpactor:masterfrom
einenlum:feature/allow-nullable-return-types
Apr 27, 2019
Merged

dantleech merged 4 commits into
phpactor:masterfrom
einenlum:feature/allow-nullable-return-types

Conversation

@einenlum

Copy link
Copy Markdown
Contributor

Hi Dan :).

Here is my proposition of a first step to fix phpactor/phpactor#753

Comment thread lib/Domain/Builder/MethodBuilder.php Resolved
Comment thread lib/Domain/Prototype/Type.php Resolved
Comment thread lib/Domain/Prototype/Type.php Resolved
@dantleech

Copy link
Copy Markdown
Contributor

Build is failing on PHP 7.1:

PHP Fatal error:  Access level to Phpactor\CodeBuilder\Domain\Prototype\Type::__construct() must be public (as in class Phpactor\CodeBuilder\Domain\Prototype\Prototype) in /home/travis/build/phpactor/code-builder/lib/Domain/Prototype/Type.php on line 73

@einenlum

Copy link
Copy Markdown
Contributor Author

Indeed, did not realize it was extending a class with a public construct…

@dantleech
dantleech merged commit e19701e into phpactor:master Apr 27, 2019
@dantleech

dantleech commented Apr 27, 2019 •

Copy link
Copy Markdown
Contributor

Awesome, thanks for this :)

I guess the next step is to enable support in WorseReflection for example here: https://github.com/phpactor/worse-reflection/blob/master/lib/Bridge/TolerantParser/Reflection/ReflectionMethod.php#L124

Then perhaps to integrate those changes in the WorseReflectionBuilderFactory in this package if required

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.

phpactor does not understand nullable return typehints

2 participants