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

Tests fail because of direct access to $argv #10719

Open
weirdan opened this issue Feb 19, 2024 · 3 comments
Open

Tests fail because of direct access to $argv #10719

weirdan opened this issue Feb 19, 2024 · 3 comments
Labels

Comments

@weirdan
Copy link
Collaborator

weirdan commented Feb 19, 2024

$ vendor/bin/phpunit -d memory_limit=-1 tests/Cache/CacheTest.php
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.

Random Seed:   1708301269

Cannot locate memory_limit=-1

I believe this is caused by one of the changes in #10370

cc: @orklah and @kkmuffme

This comment was marked as off-topic.

@kkmuffme
Copy link
Contributor

Seems to be the same issue as #10418 (and various similar ones)

I guess just adding a || for d like in the PR I created to fix the issue above: https://github.com/vimeo/psalm/pull/10442/files

Could you check if that fixes the issue?

@weirdan
Copy link
Collaborator Author

weirdan commented Feb 19, 2024

It may fix the immediate issue, but it isn't a robust solution. There's a myriad of flags you can pass to PHPUnit / paratest / etc, and whitelisting all of them is a pain in the back, not to mention potential conflicts between Psalm and PHPUnit arguments.

A correct solution would be passing arguments from Cli\Psalm to Config::fromXmlAndPaths() instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants