Skip to content

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

Merged
merged 1 commit into from
Oct 30, 2015

Conversation

fabpot
Copy link
Member

@fabpot 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

@fabpot
Copy link
Member Author

fabpot commented Oct 30, 2015

Thank you @annesosensio.

@fabpot fabpot merged commit 65bef75 into symfony:2.3 Oct 30, 2015
fabpot added a commit that referenced this pull request Oct 30, 2015
…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
@Tobion
Copy link
Contributor

Tobion commented Oct 31, 2015

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/"
Copy link
Contributor

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

Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't Testbe 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.

Copy link
Member

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.

Copy link
Contributor

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

@Tobion
Copy link
Contributor

Tobion commented Nov 24, 2015

These changes have been forgotten for new 2.8 components: #16655

fabpot added a commit that referenced this pull request Nov 25, 2015
…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
fabpot added a commit to symfony/swiftmailer-bundle that referenced this pull request Oct 6, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants