-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
added the new Composer exclude-from-classmap option #16397
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
Conversation
fabpot
commented
Oct 30, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
Thank you @annesosensio. |
…esosensio) This PR was merged into the 2.3 branch. Discussion ---------- added the new Composer exclude-from-classmap option | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 65bef75 added the new Composer exclude-from-classmap option
I think this will have similar problems as the removal of Tests folder via gitattributes as in #5674. When using an optimized autoloader Test classes will not be found anymore. So IMO using gitattributes is the better approach as this will actually also make the package considerably smaller. And developers still have a choice with --prefer-dist vs --prefer-source. |
"psr-0": { "Symfony\\Component\\Form\\": "" } | ||
"psr-0": { "Symfony\\Component\\Form\\": "" }, | ||
"exclude-from-classmap": [ | ||
"/Tests/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is also a Test
folder in the form component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This folder, just like the Test/ folder in the FrameworkBundle, provides test helpers to use in your own unit/functional tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Test
be included in autoload-dev
only? As you said there are only meant to be used for tests, so you don't need them in production mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autoload-dev
only affects the root project. So this would only work when you are running tests for Symfony itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for your explanation @wouterj
These changes have been forgotten for new 2.8 components: #16655 |
…s (Tobion) This PR was merged into the 2.8 branch. Discussion ---------- add composer exclude-from-classmap for new 2.8 components | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a #16397 for new components in 2.8 that was missing Commits ------- 2edebbf add composer exclude-from-classmap for new 2.8 components
This PR was merged into the 3.1-dev branch. Discussion ---------- Add exclude-from-classmap for autoloading Same as symfony/symfony#16397 Commits ------- 3077d33 Add exclude-from-classmap for autoloading