Skip to content

Commit

Permalink
minor #855 [Composer] Remove composer.lock from .gitignore after crea…
Browse files Browse the repository at this point in the history
…ting the project (artyuum)

This PR was merged into the 1.12 branch.

Discussion
----------

This fixes the issue #665.

Inspired by [sulu/skeleton](https://github.com/sulu/skeleton/blob/9f6f4d5792a737e96e20b5d9cce9523e43e064b7/composer.json#L118).

Can you review this, please? @lchrusciel 

Commits
-------

526d8e5 Add post create project command to remove composer.lock from .gitignore
a4e6505 Prevent blank line after removing composer.lock in .gitignore
  • Loading branch information
jakubtobiasz authored Jan 17, 2023
2 parents 2b85897 + a4e6505 commit f278821
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"@auto-scripts"
],
"post-create-project-cmd": [
"@php -r \"file_put_contents('.gitignore', str_replace('/composer.lock' . PHP_EOL, '', file_get_contents('.gitignore')));\"",
"@php bin/console sylius:inform-about-gus --ansi",
"@php bin/console sylius:show-available-plugins --ansi"
],
Expand Down

0 comments on commit f278821

Please sign in to comment.