File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ script:
38
38
- vendor/bin/phpstan analyse --no-progress # Run PHPStan
39
39
- vendor/bin/psalm --show-info=false # run psalm
40
40
- if [ "${DEPENDENCIES}" = "highest" ]; then vendor/bin/phan; fi; # Run phan
41
- - if [ "${TRAVIS_PHP_VERSION}" != "7.3" ]; then php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml; fi; # Generate Code coverage report
41
+ # Generate Code coverage report
42
+ - |
43
+ if [ "${TRAVIS_PHP_VERSION}" == "7.4" ] && [ "${DEPENDENCIES}" = "highest" ]; then
44
+ echo 'xdebug.mode = "coverage"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
45
+ php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-clover=coverage.xml
46
+ fi
42
47
43
48
jobs :
44
49
include :
Original file line number Diff line number Diff line change @@ -37,3 +37,20 @@ static function ($v) use ($myStandardName): bool {
37
37
);
38
38
39
39
putenv ("PHPCS_IGNORE_TESTS= {$ ignoredStandardsStr }" );
40
+
41
+ /*
42
+ * PHPUnit 9.3 is the first version which supports Xdebug 3, but we're using older versions.
43
+ *
44
+ * For now, until a fix is pulled into the whole stack, this will allow older PHPUnit
45
+ * versions to run with Xdebug 3 for code coverage.
46
+ */
47
+
48
+ if ((\extension_loaded ('xdebug ' ) === true ) && (\version_compare ((string ) \phpversion ('xdebug ' ), '3 ' , '>= ' ) === true )) {
49
+ if (defined ('XDEBUG_CC_UNUSED ' ) === false ) {
50
+ define ('XDEBUG_CC_UNUSED ' , null );
51
+ }
52
+
53
+ if (defined ('XDEBUG_CC_DEAD_CODE ' ) === false ) {
54
+ define ('XDEBUG_CC_DEAD_CODE ' , null );
55
+ }
56
+ }
You can’t perform that action at this time.
0 commit comments