Skip to content

Force adding vendor/ to bypass global .gitignore #1073

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
Feb 16, 2022

Conversation

bocharsky-bw
Copy link
Contributor

If users excluded vendor/ dir in their global .gitignore - it will cause problems with tests, something like this:

4) Symfony\Bundle\MakerBundle\Tests\Maker\MakeResetPasswordTest::testExecute with data set "it_generates_with_custom_user" (Symfony\Bundle\MakerBundle\Test\MakerTestDetails Object (...))
Exception: Error running command: "php dep_runner.php". Output: "
Warning: require(/Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/vendor/autoload.php): failed to open stream: No such file or directory in /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php on line 3

Call Stack:
    0.0001     403280   1. {main}() /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php:0


Fatal error: require(): Failed opening required '/Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/vendor/autoload.php' (include_path='.:/usr/local/Cellar/php@7.4/7.4.27/share/php@7.4/pear') in /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php on line 3

Call Stack:
    0.0001     403280   1. {main}() /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php:0

". Error: "PHP Warning:  require(/Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/vendor/autoload.php): failed to open stream: No such file or directory in /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php on line 3
PHP Stack trace:
PHP   1. {main}() /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php:0
PHP Fatal error:  require(): Failed opening required '/Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/vendor/autoload.php' (include_path='.:/usr/local/Cellar/php@7.4/7.4.27/share/php@7.4/pear') in /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php on line 3
PHP Stack trace:
PHP   1. {main}() /Users/victor/www/symfony/maker-bundle/tests/tmp/cache/maker_app_e9d3bad0858931812130f4a985c93519_current/dep_runner.php:0
"

/Users/victor/www/symfony/maker-bundle/src/Test/MakerTestProcess.php:51
/Users/victor/www/symfony/maker-bundle/src/Test/MakerTestEnvironment.php:412
/Users/victor/www/symfony/maker-bundle/src/Test/MakerTestEnvironment.php:152
/Users/victor/www/symfony/maker-bundle/src/Test/MakerTestCase.php:58
/Users/victor/www/symfony/maker-bundle/src/Test/MakerTestCase.php:33

Force adding vendor/ will help to overcome this problem

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

This is harmless and if it helps someone, then that's great. Let's do it!

@weaverryan weaverryan merged commit c1a739e into symfony:main Feb 16, 2022
@bocharsky-bw bocharsky-bw deleted the force-vendor-dir branch February 16, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants