Open korostii opened 7 years ago
See also #5262, #4162, Internal ticket MAGETWO-52095
@korostii, thank you for your report. We've created internal ticket(s) MAGETWO-52095 to track progress on the issue.
These do not seem to be an integral part of the application itself, and as such must be separate into a package included inside the "require-dev" section of the composer.
Disagree.
According to my understanding:
dev/
folder must be dissolved as much as possible among modules, not just unit tests deserve to be modular.gitattributes
may be used to get rid of tests in Composer packages but as far as I remember PHPUnit configurations were intentionally adopted to be able to run tests from vendor/
It is commonly expected that "require" section only contains dependencies necessary for production use, and not tests, tools used for development etc.
Such expectation is wrong: https://getcomposer.org/doc/03-cli.md#depends-why- require-dev
section has nothing to do with dev/
folder, only related to packages.
@magento-engcom-team I propose to close this issue as won't fix. Something like https://www.reddit.com/r/PHP/comments/2jzp6k/i_dont_need_your_tests_in_my_production/#bottom-comments may be reported as a low priority improvement but then all testing scenarios needs to be considered - prefer-dist
, prefer-source
- so that it is still possible to test your extension together with all core modules. Unrelated code which allows to run tests from vendor
should be cleaned up.
Personally I do not insist on any particular technical solution to the issue and it's clearly low priority. But there absolutely should be a way to skip tests, travis and other stuff which is not required for running in production, and it should be possibly to do via a simple CLI one-liner.
IMHO even approach similar to http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-sample-data-other.html would be just fine.
Hi @engcom-Bravo. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
[ ] 1. Add/Edit Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 2. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
@engcom-Bravo Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
"Component: "
label(s) to this ticket based on verification result. If uncertain, you may follow the best guessOnce all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
:white_check_mark: Confirmed by @engcom-Bravo
Thank you for verifying the issue. Based on the provided information internal tickets MC-31127
were created
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Hi @korostii. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
[ ] 1. Add/Edit Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 2. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions.
This should still happen one day...
There is a proposal for a fix in https://github.com/magento/magento2/issues/5262 but no idea if this is the best fitted solution:
I think most of these files are getting into place because of the mapping in the
composer.json
file of themagento2-base
module. It would be great if those mappings can get split of into a mapping for development purposes and one for all environments. My suggestion would be to add amap-dev
to theextra
section in the composer.json similar as the normal map section and update the magento-composer-installer project to support this and only install themap-dev
files when you run composer without the--no-dev
flag.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
Is still relevant in my opinion even though it will be considered low priority
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
This is still an issue that requires resolution.
@magento give me 2.4-develop instance
Hi @Manju-crz. Thank you for your request. I'm working on Magento instance for you.
Hi @Manju-crz, here is your Magento Instance: https://38fbdc1296d3cbd2532411bbf0e85736.instances-prod.magento-community.engineering Admin access: https://38fbdc1296d3cbd2532411bbf0e85736.instances-prod.magento-community.engineering/admin_0833 Login: 26c45822 Password: 4cbf9965bfd4
The composer.json file distributed with the application contains separate sections "require" and "require-dev" sections. It is commonly expected that "require" section only contains dependencies necessary for production use, and not tests, tools used for development etc.
Preconditions
Steps to reproduce
Expected result
Actual result
To be precise, it is the magento2-base package maps quite a lot of its files into the dev folder, namely subfolders "dev/tools", "dev/travis" and "dev/tests/". These do not seem to be an integral part of the application itself, and as such must be separate into a package included inside the "require-dev" section of the composer. Accordingly, it would also be nice to see the "dev" folder added into the sample ".gitignore" file distributed with the package available from https://magento.com/tech-resources/download.