Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

[RFC] Fix classloading error when using contao/phpstan in contao based projects #6

Merged
merged 1 commit into from Aug 22, 2019
Merged

[RFC] Fix classloading error when using contao/phpstan in contao based projects #6

merged 1 commit into from Aug 22, 2019

Conversation

bytehead
Copy link
Member

@bytehead bytehead commented Aug 9, 2019

This could be a possible fix for contao/contao#627.

@bytehead bytehead changed the title Fix classloading error when using contao/phpstan in contao based projects [RFC] Fix classloading error when using contao/phpstan in contao based projects Aug 9, 2019
@bytehead bytehead marked this pull request as ready for review August 13, 2019 07:33
@@ -40,7 +40,8 @@
},
"autoload": {
"psr-4": {
"Contao\\PhpStan\\": "src/"
"Contao\\PhpStan\\": "src/",
"Contao\\CoreBundle\\Tests\\": "../../contao/core-bundle/tests/"
Copy link
Member

Choose a reason for hiding this comment

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

Do we not have to remove the entry from autoload-dev then?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we need autoload-dev for contao/phpstan itself in test environments.
My added line only will provide autoload information if you use contao/phpstan in your project.
If you remove it, the tests for contao/phpstan will fail with the same error message as in contao/contao#627.

Copy link
Member

Choose a reason for hiding this comment

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

I see. Then I guess the solution is fine. @aschempp WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Will it work with contao/contao and contao/core-bundle installed?

@leofeyer leofeyer modified the milestone: 4.8 Aug 16, 2019
@leofeyer leofeyer merged commit 19fe877 into contao:master Aug 22, 2019
@leofeyer
Copy link
Member

leofeyer commented Aug 22, 2019

Thank you @bytehead.

@bytehead bytehead deleted the fix/classloading-error branch January 19, 2020 13:37
@bytehead bytehead mentioned this pull request Jan 19, 2020
1 task
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants