Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/compat_tests.yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:

- run: vendor/bin/phpunit tests/PHPStan

- run: vendor/bin/phpunit tests/PHPStan --config phpunit_custom_bootstrap.xml

- run: vendor/bin/phpunit tests/Rector

- run: vendor/bin/phpunit
14 changes: 14 additions & 0 deletions phpunit_custom_bootstrap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="tests/PHPStan/CustomPHPStanRule/autoload/bootstrap.php"
>
<testsuites>
<testsuite name="Project Tests">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>
4 changes: 4 additions & 0 deletions tests/PHPStan/CustomPHPStanRule/autoload/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

include __DIR__ . '/../../../../vendor/rector/rector/preload.php';
include __DIR__ . '/../../../../vendor/autoload.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This structure should never be used manually. Rector autoload should not be exposed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just the way I can imagine it reproduced, but actual applications may use include over include_once for autoload somewhere that it automatically make preload.php included more than once. Some magic framework things

Loading