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

Only parse APP_URL for default stateful domains when it's set #279

Merged
merged 1 commit into from
May 19, 2021

Commits on May 19, 2021

  1. Ignore APP_URL when it's not set

    If APP_URL is missing then null is passed to parse_url(), which breaks
    on PHP 8.1 even when you're only running composer install. On PHP <==8
    it wouldn't error, but you'd have an empty entry in sanctum.stateful.
    
    Setting SANCTUM_STATEFUL_DOMAINS in the project's .env isn't enough
    because the default config is still merged in the service provider as
    long as config isn't cached (which it won't be during composer install).
    
    ---
    
    Also removes APP_URL from phpunit.xml, setting in the test that needs it
    instead. By using getEnvironmentSetUp instead of @environment-setup, we
    don't need putenv everywhere and it more closely matches other tests.
    dshoreman committed May 19, 2021
    Configuration menu
    Copy the full SHA
    6382928 View commit details
    Browse the repository at this point in the history