Skip to content

Conversation

@FeBe95
Copy link
Contributor

@FeBe95 FeBe95 commented Jul 23, 2025

We copied the config to our own /config directory and PHPStan reported the following error:

 ------ ----------------------------------------------------- 
  Line   laravel-logger.php                                   
 ------ ----------------------------------------------------- 
  30     Expression on left side of ?? is not nullable.       
         🪪 nullCoalesce.expr                                 
 ------ ----------------------------------------------------- 

This happens because the (string) cast has a higher operator precedence than the ?? null coalescing operator.

I changed the code to use the built-in fallback of the env() function instead.

@jeremykenedy jeremykenedy merged commit 962c909 into jeremykenedy:master Sep 18, 2025
2 of 3 checks passed
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.

2 participants