-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error executing phpunit. #3909
Comments
@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 If you want more extensive information, I suggest you have a read through the open PR which updates the |
@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:
1. 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
<#3803>.
2. 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
<#3909 (comment)>,
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 |
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
<#3909 (comment)>,
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
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
bin/phpcs
My environment details
Please confirm:
The text was updated successfully, but these errors were encountered: