Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Companion to zenstruck/browser#156
I've been working on making it easier to get started using
zenstruck/browser
andsymfony/panther
together. Basically, adding a way to avoid this "hack".The fix in browser does the following:
SYMFONY_PROJECT_DEFAULT_ROUTE_URL
. This env var is added by the Symfony CLI when a server is running for the current project. For the most part, I think this is the user's dev environment which they don't want to run their tests on.PANTHER_APP_ENV
toAPP_ENV
to ensure the arrange/setup phase of your tests work with the same kernel Panther's webserver does. I know Add PANTHER_APP_ENV in .env.test #643 specifically addedPANTHER_APP_ENV=panther
- a separate env to avoid mocked sessions but... I don't seem to be having this problem - Panther appears to work with mock_file session storage just fine. I've tested session auth and form submits (CSRF). Maybe something has changed sincePANTHER_APP_ENV
was introduced? Let me know if I'm missing something here!To avoid BC breaks,
zenstruck/browser
requires you to opt-in but I think this should be the recipe default.