Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

remove unused use statements #5472

Merged
merged 3 commits into from
Nov 18, 2013
Merged

Conversation

samsonasik
Copy link
Contributor

I just realized that php-cs-fixer support removing unused use statement ^^

using php-cs-fixer
@weierophinney
Copy link
Member

@samsonasik There are test failures in all PHP versions at this point; it looks like the script removed code from the Zend\Code test suite that was necessary.

@samsonasik
Copy link
Contributor Author

@weierophinney fixed ;)

@Maks3w
Copy link
Member

Maks3w commented Nov 14, 2013

@samsonasik Please add the necessary changes to the Travis script for automatize this.

https://github.com/zendframework/zf2/blob/master/bin/check-cs.sh

@samsonasik
Copy link
Contributor Author

@Maks3w done, I have updated bin/check-cs.sh , and I added exclude tests/ZendTest/Code at tests/.php_cs for checking because of some use statements are necessary as @weierophinney said.

@samsonasik
Copy link
Contributor Author

btw, I curious when adding exclude tests/ZendTest/Code at tests/.php_cs is causing ZendTest/Code is not tested anymore for other case ( trailing_space, function_declaration, etc), I will test it to add failure test on it.

@samsonasik
Copy link
Contributor Author

@weierophinney @Maks3w I have tested excluding tests/ZendTest/Code at tests/.php_cs but it cause that folder not tested anymore for other cases ( trailing_spaces, etc). So, I propose to only check --fixers=unused_use only for library folder, how ?

@DASPRiD
Copy link
Member

DASPRiD commented Nov 15, 2013

IDEs also make use of the use statements in doc blocks. Make sure that the removed aliases were not used in these.

@samsonasik
Copy link
Contributor Author

@DASPRiD I already check that, all aliases for unused use is not used at docblock. Let me know if I missed something, thanks.

@Maks3w
Copy link
Member

Maks3w commented Nov 15, 2013

I'll review this manually sortly.

@ghost ghost assigned Maks3w Nov 15, 2013
Maks3w added a commit that referenced this pull request Nov 18, 2013
Maks3w added a commit that referenced this pull request Nov 18, 2013
Maks3w added a commit that referenced this pull request Nov 18, 2013
@Maks3w Maks3w merged commit 2d984f2 into zendframework:master Nov 18, 2013
@samsonasik samsonasik deleted the rem.unused.use branch November 18, 2013 16:11
weierophinney pushed a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney pushed a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-math that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-math that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-math that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-modulemanager that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-text that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-text that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-text that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-inputfilter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-di that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-progressbar that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-progressbar that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-progressbar that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-filter that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-log that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-view that referenced this pull request May 15, 2015
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.

4 participants