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

Add support for traits - #23

Merged
dantleech merged 6 commits into
phpactor:masterfrom
dshoreman:trait-fix
Feb 3, 2019
Merged

dantleech merged 6 commits into
phpactor:masterfrom
dshoreman:trait-fix

Conversation

@dshoreman

Copy link
Copy Markdown
Contributor

Fixes phpactor/phpactor#726, but relies on phpactor/code-builder#9 to
get the underlying trait() method added with all its supporting code.

Fixes phpactor/phpactor#726, but relies on phpactor/code-builder#9 to
get the underlying trait() method added with all its supporting code.
@dshoreman dshoreman mentioned this pull request Feb 3, 2019
8 tasks done
@dantleech

dantleech commented Feb 3, 2019 •

Copy link
Copy Markdown
Contributor

Build is failing due to coding standards, you need to run:

  • ./vendor/bin/php-cs-fixer fix to fix the CS.
  • ./vendor/bin/phpstan analyse lib --level=6 to check the code
  • ./vendor/bin/phpunit to run the tests

(when in doubt cat .travis.yml)

@dshoreman

dshoreman commented Feb 3, 2019 •

Copy link
Copy Markdown
Contributor Author

Thanks for the hint. Running composer install now to get the dependencies (did that for code-builder but totally forgot transform!) then I'll see what CS fixer picks up :)

@dantleech

Copy link
Copy Markdown
Contributor

btw would also be good to add a regression test for this, should be enough just to add a single test case in tests/Adapter/WorseReflection/Transformer/AddMissingPropertiesTest.php

@dshoreman

Copy link
Copy Markdown
Contributor Author

Good news is the code styling bug was a simple blank line. Nice easy fix so I'll sort that when I add the resolveClassBuilder() method.

Going to take a quick break to prepare dinner, but should hopefully have this ready fairly soon. Thanks for being so quick with the replies! Makes a massive difference ;)

Also fixes blank line introduced a couple commits back to please Travis.
Considered adding an abstract method to ClassLikeBuilder in
phpactor/code-builder, but this would break InterfaceBuilder and doesn't
seem to make any difference to the outcome of phpstan's checks.
@dshoreman

Copy link
Copy Markdown
Contributor Author

Test and resolver added, all green and Stan's happy too. Now to travis for the final verdict!

@dantleech
dantleech merged commit c75b56e into phpactor:master Feb 3, 2019
@dantleech

Copy link
Copy Markdown
Contributor

Great, thanks!

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.

2 participants