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

Add an env var to disable the deprecation message #9

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

Pierstoval
Copy link
Owner

@Pierstoval Pierstoval commented Apr 10, 2024

Fixes #8

@Pierstoval
Copy link
Owner Author

Friendly ping @tacman: by adding this env var to your global PHPUnit config, or your .env.test file, you can remove the messages!

@Pierstoval Pierstoval force-pushed the deprecation-message branch from 8351abb to 392ba8e Compare April 10, 2024 12:34
@Pierstoval Pierstoval merged commit 2e7e27d into main Apr 10, 2024
22 checks passed
@Pierstoval Pierstoval deleted the deprecation-message branch April 10, 2024 12:41
@tacman
Copy link

tacman commented Nov 22, 2024

Can you provide an example? This didn't work:

    <php>
        <ini name="display_errors" value="1" />
        <ini name="error_reporting" value="-1" />
        <env name="SMOKE_TESTING_ROUTES_METHODS" value="false" />
        <server name="APP_ENV" value="test" force="true" />
        <server name="SHELL_VERBOSITY" value="-1" />
        <server name="SYMFONY_PHPUNIT_REMOVE" value="" />
        <server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
    </php>

@Pierstoval
Copy link
Owner Author

Pierstoval commented Dec 30, 2024

@tacman I've just published v1.1.0 with a small refactoring of the variable.

Could you update your project and test it?
Theoretically, just <server name="SMOKE_TESTING_ROUTES_METHODS" value="off" /> should do the trick (I tested it on a big project of mine and it worked, but I'm curious about yours 👍)

(sorry for the long delay, I had tons of things preventing me from focusing properly)

@tacman
Copy link

tacman commented Dec 30, 2024

Yep, works great!

I am still getting this deprecation, though:

2x: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated
2x in AllRoutesTest::testRoutesDoNotReturnInternalError from App\Tests

@Pierstoval
Copy link
Owner Author

The package isn't using parse_str() anywhere, this must come from your code calling this function with null as argument instead of a string

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

Successfully merging this pull request may close these issues.

Document how to silence deprecation messages
2 participants