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

Fixing issues found by PHPStan & Integrating PHPStan #1007

Merged
merged 18 commits into from
Feb 9, 2017

Conversation

ondrejmirtes
Copy link
Contributor

@ondrejmirtes ondrejmirtes commented Jan 4, 2017

I ran PHPStan on your codebase and it found these issues. Feel free to comment on the fixes. I think it'd also to be beneficial to integrate PHPStan into your Travis build so you can prevent these errors in the future.

You can find out more about PHPStan on Medium.com.

@ondrejmirtes
Copy link
Contributor Author

BTW that it found this problem is pretty cool I think :)

@ondrejmirtes
Copy link
Contributor Author

I updated the PR with newest PHPStan version 0.6.

@robmorgan
Copy link
Member

@ondrejmirtes thanks and cool tool. I've read the article, I want to play around with it.

@robmorgan
Copy link
Member

@ondrejmirtes hey mate really cool tool! happy to integrate!

@ondrejmirtes
Copy link
Contributor Author

@robmorgan I'm happy to hear that! :) If you'd need any help integrating PHPStan on some other project, let me know.

@rquadling
Copy link
Collaborator

Would it also be feasible to incorporate php-cs-fixer?

By adding suitable entries in composer.json in the "scripts" section, other devs can easily run the same tools.

For example: my main work has (amongst others) ...

    "run-sa": "vendor/bin/phpstan analyse --ansi --no-progress -c phpstan.neon -l 4 classes controllers lib",
    "run-fixer": "vendor/bin/php-cs-fixer fix",
    "run-tests": "vendor/bin/phpunit --exclude-group requires-db"

So all our devs can easily run composer run-sa without really caring about the rest of the params. And we can call the same command in our pipeline.

@robmorgan robmorgan changed the base branch from 0.6.x-dev to master February 9, 2017 13:10
@robmorgan robmorgan merged commit d575d4c into cakephp:master Feb 9, 2017
@ondrejmirtes ondrejmirtes deleted the phpstan branch February 9, 2017 16:58
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.

3 participants