New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autoloading with PHPUnit 6 #4262

Merged
merged 1 commit into from May 26, 2017

Conversation

Projects
None yet
3 participants
@enumag
Member

enumag commented May 26, 2017

My builds on Travis are failing because composer autoloading doesn't work correctly for PHPUnit 6.

PHP Fatal error:  Interface 'PHPUnit_Framework_Test' not found in ...\vendor\codeception\codeception\src\Codeception\TestInterface.php on line 7

So far the only fix I found was to add "files": ["vendor/codeception/codeception/shim.php"] to my autoload-dev in composer.json. This commit should fix the issue.

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda May 26, 2017

Member

How do you run your tests?

Member

Naktibalda commented May 26, 2017

How do you run your tests?

@enumag

This comment has been minimized.

Show comment
Hide comment
@enumag

enumag May 26, 2017

Member

I checked my builds again. Tests are actually passing. This error happens when analyzing the code using phpstan.

Member

enumag commented May 26, 2017

I checked my builds again. Tests are actually passing. This error happens when analyzing the code using phpstan.

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda May 26, 2017

Member

shim.php is included by autoload.php.

Member

Naktibalda commented May 26, 2017

shim.php is included by autoload.php.

@enumag

This comment has been minimized.

Show comment
Hide comment
@enumag

enumag May 26, 2017

Member

Which is not autoloaded either.

Member

enumag commented May 26, 2017

Which is not autoloaded either.

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda May 26, 2017

Member

That's correct, it is included by codecept file.

Member

Naktibalda commented May 26, 2017

That's correct, it is included by codecept file.

@enumag

This comment has been minimized.

Show comment
Hide comment
@enumag

enumag May 26, 2017

Member

I know. PHPStan doesn't use that obviously which is why it is failing.

Member

enumag commented May 26, 2017

I know. PHPStan doesn't use that obviously which is why it is failing.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 26, 2017

Member

Anyway, for such cases or for case when a custom runner is implemented, this patch makes sense

Member

DavertMik commented May 26, 2017

Anyway, for such cases or for case when a custom runner is implemented, this patch makes sense

@DavertMik DavertMik merged commit c93669e into Codeception:2.3 May 26, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Jun 1, 2017

Member

@enumag sorry, this patch caused a deeper problem. Now, shim is loaded everywhere, even outside the Codeception. So it may affect the execution of other applications not related to Codeception.
I need to revert this PR

Member

DavertMik commented Jun 1, 2017

@enumag sorry, this patch caused a deeper problem. Now, shim is loaded everywhere, even outside the Codeception. So it may affect the execution of other applications not related to Codeception.
I need to revert this PR

DavertMik added a commit that referenced this pull request Jun 1, 2017

DavertMik added a commit that referenced this pull request Jun 1, 2017

@enumag

This comment has been minimized.

Show comment
Hide comment
@enumag

enumag Jun 2, 2017

Member

Understood. I'll just add it to my autoload-dev then. Thanks.

Member

enumag commented Jun 2, 2017

Understood. I'll just add it to my autoload-dev then. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment