Skip to content

Add gitignore to Symfony admin scaffold - #2999

Open
ousamabenyounes wants to merge 1 commit into
api-platform:mainfrom
ousamabenyounes:fix-admin-gitignore-2998
Open

Add gitignore to Symfony admin scaffold#2999
ousamabenyounes wants to merge 1 commit into
api-platform:mainfrom
ousamabenyounes:fix-admin-gitignore-2998

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #2998
License MIT
Doc PR n/a

Summary

This adds a .gitignore template to the standalone Symfony React-admin scaffold so generated admin/node_modules/, admin/dist/, and local env overrides are not accidentally committed.

Test verification (RED → GREEN)

RED, before the fix, after adding the regression test:

...FF...                                                            8 / 8 (100%)

1) ApiPlatform\Installer\Tests\Scaffold\SymfonyAdminScaffoldTest::testAdminTemplatesAreShippedWithTheInstaller
Failed asserting that file "/app/templates/admin-gitignore" exists.

2) ApiPlatform\Installer\Tests\Scaffold\SymfonyAdminScaffoldTest::testAdminScaffoldCopiesGitignoreTemplate
Failed asserting that null is identical to '.gitignore'.

FAILURES!
Tests: 8, Assertions: 24, Failures: 2.

GREEN, with the fix:

...............................................................  63 / 109 ( 57%)
..............................................                  109 / 109 (100%)

OK (109 tests, 220 assertions)

Fix-reverted regression check:

....F...                                                            8 / 8 (100%)

ApiPlatform\Installer\Tests\Scaffold\SymfonyAdminScaffoldTest::testAdminScaffoldCopiesGitignoreTemplate
Failed asserting that null is identical to '.gitignore'.

FAILURES!
Tests: 8, Assertions: 24, Failures: 1.

Static analysis:

php vendor/bin/phpstan analyse
[OK] No errors

All commands were run inside an ephemeral Docker container with docker run --rm -u "$(id -u):$(id -g)" -v "$PWD":/app -w /app composer:2 ....

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.

1 participant