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

PhpdocTypesFixer - support iterable type #2196

Merged
merged 1 commit into from Sep 25, 2016
Merged

PhpdocTypesFixer - support iterable type #2196

merged 1 commit into from Sep 25, 2016

Conversation

GrahamCampbell
Copy link
Contributor

PHP 7.1 will have the iterable type. We should treat it like the other types we normalize.

Refs:

@SpacePossum
Copy link
Contributor

SpacePossum commented Sep 23, 2016

please add missing details here #2090

oops

@keradus
Copy link
Member

keradus commented Sep 23, 2016

isn't it's there? 2nd position of initial comment

@keradus
Copy link
Member

keradus commented Sep 23, 2016

Nice !

Could you please add small integration test for 7.1 (like this: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/1.12/Symfony/CS/Tests/Fixtures/Integration/misc/PHP7.test) ?

I'm not saying to add all 7.1 (which of course would be nice), but at least iterable

@GrahamCampbell
Copy link
Contributor Author

Could you please add small integration test for 7.1

Why PHP 7.1. This phpdoc type can be used on any version, the same way string is used on PHP 5 even though it can't be type hinted until 7.0, and mixed isn't even a real type on any version.

@keradus
Copy link
Member

keradus commented Sep 25, 2016

iterable is not only for typedoc.
add function foo(iterable $bar) {} in integration test like we did for 7.0 syntax changes.

@GrahamCampbell
Copy link
Contributor Author

This fixer change has nothing to do with actual typehints though, so in the interest of keeping this atomic, I shouldn't make an unrelated change.

@keradus
Copy link
Member

keradus commented Sep 25, 2016

then this PR would make false sense of feeling we support the iterable, even if we would support it only in doctype. big -1 for that

keradus added a commit that referenced this pull request Sep 25, 2016
This PR was merged into the 1.12 branch.

Discussion
----------

Add integration test for iterable type

ref #2090, #2196

Commits
-------

8fe403a Add integration test for iterable type
@keradus keradus changed the title Added support for the new iterable type PhpdocTypesFixer - support iterable type Sep 25, 2016
@keradus
Copy link
Member

keradus commented Sep 25, 2016

Thank you @GrahamCampbell.

@keradus keradus merged commit 0d8da6e into PHP-CS-Fixer:1.12 Sep 25, 2016
keradus added a commit that referenced this pull request Sep 25, 2016
This PR was merged into the 1.12 branch.

Discussion
----------

PhpdocTypesFixer - support iterable type

PHP 7.1 will have the `iterable` type. We should treat it like the other types we normalize.

Refs:
* https://wiki.php.net/rfc/iterable
* php/php-src#1941
* https://github.com/php/php-src/blob/php-7.1.0RC2/UPGRADING#L25-L27

Commits
-------

0d8da6e Added support for the new iterable type
@keradus keradus added this to the v1.12.2 milestone Sep 25, 2016
@keradus keradus mentioned this pull request Sep 25, 2016
10 tasks
@SpacePossum
Copy link
Contributor

awesome, thanks @GrahamCampbell !

@GrahamCampbell GrahamCampbell deleted the iterable branch September 25, 2016 18:44
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.

None yet

3 participants