bugsnag / bugsnag-php

BugSnag error monitoring and crash reporting tool for PHP apps
https://docs.bugsnag.com/platforms/php
MIT License
554 stars 77 forks source link

Allow dynamic PHPStan configuration #638

Closed imjoehaines closed 2 years ago

imjoehaines commented 2 years ago

Goal

This PR makes it possible to dynamically change the PHPStan configuration based on the PHP version. This is required for an upcoming PR that introduces special handling for enums — on PHP 7.1 enums don't exist and so PHPStan doesn't know about the UnitEnum/BackedEnum interfaces

Design

This is the approach used by PHPStan itself for conditionally ignoring errors