Extract reusable testing package #7694
erickskrauch
started this conversation in
RFC
Replies: 1 comment 5 replies
-
Hi @erickskrauch! Interesting idea, however it needs to be decided by @keradus. From my perspective I understand the need, but I don't know if a dedicated package for that is a good path. For example, PHPStan provides a testing contract in its main src repo. Since it's in For me such an approach is much better as you can use the same contract for the main tool and you don't need to update the Composer package and develop the testing API somewhere else. What do you think? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I'm the developer of the custom rules for PHP-CS-Fixer. I want to maintain the high quality of those rules, so I write tests and run them the same way it is done in the main PHP-CS-Fixer repository. To do so I had to empirically figure out what dependencies are relatable to testing and which are not. I also had to request the PHP-CS-Fixer source code and enable autoloading for their
tests
directory. Take a look at the diff.It took a while, but the deed was done and the tests started working.
I daresay there aren't many developers like me who will follow the same path. Besides, having gone down this path once, there is no guarantee that the PHP-CS-Fixer codebase won't change after a while and I won't have to search again for what dependencies are needed to make the tests work.
That's why I suggest to introduce a separate
php-cs-fixer/testing-tools
package, where all the support classes for testing fixers are placed (e.g.AbstractFixerTestCase
and all related to it).I'd be happy to help with shaping this package and then implementing it into the PHP-CS-Fixer codebase.
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions