Skip to content

Conversation

@thewilkybarkid
Copy link
Contributor

(Very-much WIP!)

Starting to try and implement #251 and (BC) support for generics-style collections.

TypeHintDeclarationSniffTest::testNoErrors and TypeHintDeclarationSniffTest::testErrors (not yet added news cases) are green, other tests not yet fixed. The code changes are the result of hacking until it works(ish), so definitely a lot of tidying up to do as well. Opening this PR early just to get it visible.

Will probably result in a new-sniff to allow/force this syntax, but need to get it working properly first.

},
"require": {
"php": "^7.1",
"phpstan/phpdoc-parser": "^0.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use ^0.3 until #534 is complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't checked what changed... hopefully isn't much...

@kukulich
Copy link
Contributor

@thewilkybarkid Thank you for yourt effort but I think the implementation of the parser should be done by me because I need to figure out how to use it in all sniffs.

@thewilkybarkid
Copy link
Contributor Author

@kukulich Do you know when you would get around to it? This is looking like it could be done in a BC way; I'm happy to commit time over the next week to try and finish it (and there could be a major release after to tidy it up), but won't if you wouldn't merge it.

@kukulich
Copy link
Contributor

I want to fix currently known bugs, make a bugfix release a then work on this. I don't have any timeline because I don't have any time currently.

This PR will not be merged because I want the support in all sniffs at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants