Skip to content

$_ENV['CI'] not nullable since v2.1.9 #12776

@mvorisek

Description

@mvorisek

Bug report

repro: https://github.com/atk4/ui/blob/235416b31066827226e462f1916d9fc99c0d14b4/demos/init-db.php#L556

 ------ --------------------------------------------------------------------- 
  Line   demos/init-db.php                                                    
 ------ --------------------------------------------------------------------- 
  556    Offset 'CI' on non-empty-array on left side of ?? always exists and  
         is not nullable.                                                     
         🪪  nullCoalesce.offset                                              
 ------ --------------------------------------------------------------------- 

Looking into the release notes - maybe caused by phpstan/phpstan-src@d4d7e11, not sure. Environment variables passed into PHPStan must however not be assumed on runtime.

Code snippet that reproduces the problem

n/a

Expected output

no PHPStan error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions