Skip to content

Conversation

@TomasVotruba
Copy link
Contributor

@TomasVotruba TomasVotruba commented Sep 8, 2020

This is not a normal deprecation, but rather a replacement 1:1 with better tool.

PHP_CodeSniffer is great for handling spaces and char positions. Yet these rules are about code architecture and structure. In 2020, there is tool that suits this perfectly - PHPStan.

Saying that, object calisthenics were implemented as PHPStan rules in a symplify/coding-standard package. It should be used instead.




cc @guilhermeblanco Hi Guilherme, I know you're not active much here, but still I think you should know. Let me know if this move is ok for you.
Not much really changes, rules just work much better now as PHPStan doesn't deal with spacing bugs.

@TomasVotruba TomasVotruba changed the title [README] Add deprecatoin notice and PHPStan rule set link [README] Add deprecation notice and link to PHPStan rule set Sep 8, 2020
@guilhermeblanco
Copy link
Contributor

@TomasVotruba I agree with the statement. PHPStan is simple to adopt and better suited for these type of checks.
I just have mixed feelings on switching organizations instead of opening a new repository in this one. However, since you've been the main contributor of this repository for a while, I trust your judgement.

Please let me know if there's anything I can do to assist you in this change.

@TomasVotruba
Copy link
Contributor Author

Thanks for reaching out so quickly!

I just have mixed feelings on switching organizations instead of opening a new repository in this one.

I'll try to explain why I belieive this is the best.

1. One Location

I mentioned there are few many new repositories with PHPStan rules. Actually, there are so many of them, that it's very hard to "Google" them on Github. Each person has his or her small set of PHPStan rules, but they can't be found. I saw some rule in June, but I can't find it now, so I have to reimplement it.

2. Maintenance

While it's quite easy and optimistic to maintain a repositories for 1st or 2nd year of existance, later it becomes obsolete. The more split the packages and maintainer attention is, the faster it rottens. Saying that, I've chosen the main&only monorepo I maintain - https://github.com/symplify/symplify

I know that even if I don't have time for any other projets and repositories, this I'll mostly likely maintain the longest.

I was thinking about making symplify/object-calisthenics-phpstan-rules, but it would only cause both mentioned troubles. From what I can observe for last 7 years in open-source maintenance world, this should make this package the most health and stability.


Please let me know if there's anything I can do to assist you in this change.

I think I have all the access I need - on packagist I marked the redirect:
https://packagist.org/packages/object-calisthenics/phpcs-calisthenics-rules

There is a little post about this change: https://tomasvotruba.com/blog/2020/09/07/introducing-object-calisthenics-rules-for-phpstan/
It would help if you could share it, to make the change more official.


Thank you 👍

@TomasVotruba TomasVotruba merged commit 53c73ef into master Sep 8, 2020
@TomasVotruba TomasVotruba deleted the prefer-phpstan branch September 8, 2020 14:17
hussainweb added a commit to hussainweb/drupalqa that referenced this pull request Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants