Closed nelson1995 closed 8 months ago
@nelson1995 Thank you for your interest in contributing to PHPCS.
This is not a bug, but a question though, so please don't open a bug report for something like this.
Now, as for running the unit tests, there are a couple of issues here:
To get up and running quickly, I'd suggest running composer install
and then using vendor/bin/phpunit
on PHP 7.4.
If you want more extensive information, I suggest you have a read through the open PR which updates the CONTRIBUTING.md
file.
@jrfnl my apologies for the error. Thank you for the feedback. I’m going to resolve it.
Hello Juliette,
A quick question. Why does PHPUnit return an error “class Php_Timer not found” ? I’m running PHPUnit via ./vendor/bin/phpunit with PHP version 7.4 and I checked the installed PHPUnit version has “Php_Timer” class.
Regards, Nelson Katale
On Sat, 28 Oct 2023 at 21:48, Juliette @.***> wrote:
@nelson1995 https://github.com/nelson1995 Thank you for your interest in contributing to PHPCS.
This is not a bug, but a question though, so please don't open a bug report for something like this.
Now, as for running the unit tests, there are a couple of issues here:
- You are trying to run the tests with an incompatible PHPUnit version. The tests are currently only compatible with PHPUnit 4 - 7, not with PHPUnit 9. There is a PR open to change this https://github.com/squizlabs/PHP_CodeSniffer/pull/3803.
- You are trying to run the tests on PHP 8.2. While this is possible with PHPUnit 7, the config file will not parse, so you would need to pass the config via the command line.
To get up and running quickly, I'd suggest running composer install and then using vendor/bin/phpunit on PHP 7.4.
If you want more extensive information, I suggest you have a read through the open PR which updates the CONTRIBUTING.md file https://github.com/squizlabs/PHP_CodeSniffer/pull/3830/files.
— Reply to this email directly, view it on GitHub https://github.com/squizlabs/PHP_CodeSniffer/issues/3909#issuecomment-1783895947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECUIUSO6KP4KH4ZT3ECRBTYBVHPPAVCNFSM6AAAAAA6UIB2CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHA4TKOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>
@nelson1995 I honestly don't know. Try running composer du
to make sure the autoload file is up to date.
I ran the “composer du” command and everything is updated. Unfortunately the error still persists.
On Sat, 11 Nov 2023 at 20:53, Juliette @.***> wrote:
@nelson1995 https://github.com/nelson1995 I honestly don't know. Try running composer du to make sure the autoload file is up to date.
— Reply to this email directly, view it on GitHub https://github.com/squizlabs/PHP_CodeSniffer/issues/3909#issuecomment-1806877623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECUIUT77KADOLOIBMYX4DTYD63RVAVCNFSM6AAAAAA6UIB2CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWHA3TONRSGM . You are receiving this because you were mentioned.Message ID: @.***>
@nelson1995 Well, as I don't see the error, there's not much I can do to help you without you providing more information....
PHP_CodeSniffer Bug
I want to contribute to PHP_Codesniffer and I followed the CONTRIBUTING.md documentation and executed them. After executing![Screenshot from 2023-10-28 20-39-58](https://github.com/squizlabs/PHP_CodeSniffer/assets/17122386/5003ee30-c1f8-4977-a049-03965bcd2f0e)
phpunit
I encountered this error.To reproduce
This is the steps I took to reproduce the behavior:
cd PHP_CodeSniffer
bin/phpcs
phpunit
This was the output after executing script![Screenshot from 2023-10-28 21-22-44](https://github.com/squizlabs/PHP_CodeSniffer/assets/17122386/6a447a64-fc15-4700-a87b-1fc10d3fb0eb)
bin/phpcs
My environment details
Please confirm: