Skip to content
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

remove composer.lock file #1

Closed
winkbrace opened this issue May 10, 2015 · 8 comments
Closed

remove composer.lock file #1

winkbrace opened this issue May 10, 2015 · 8 comments

Comments

@winkbrace
Copy link

Hi, first of all thanks for creating this helpful boilerplate package! :)

It might be a good idea to remove the composer.lock file from the repo, so that composer install -o will always fetch the latest versions.

@jadjoubran
Copy link
Owner

Thanks!

How can I remove composer.lock without adding it to .gitignore? Because adding it to .gitignore would be problematic for people using this repository

@winkbrace
Copy link
Author

Just remove it and commit :)
It doesn't have to be in this repository. That's all.

@jadjoubran
Copy link
Owner

Okay but then next time I run composer install and commit it will be back no?

@winkbrace
Copy link
Author

Yes, but why would you composer install on this repository? That should only happen on a copy of it, right?

edit: or am I missing something?

@jadjoubran
Copy link
Owner

Yeah here's the thing:
I'm planning on adding other libraries to this starter project. So next time I run composer update the composer.lock file will be generated again and it will be committed.
I also don't want to add it to .gitignore because anyone using this repository needs to have the composer.lock committed.

So I think the only solution would be to have a pre-commit hook that deletes my local composer.lock file.

What do you think?

@winkbrace
Copy link
Author

I see.

I can't think of a better solution than the pre-commit hook. It feels a little ugly though. I guess you have to decide if you think it is worth it.

@jadjoubran
Copy link
Owner

it's definitely worth it!
I'll also update the contributing guide so that other contributors won't cause a regression for this.

jadjoubran pushed a commit that referenced this issue May 10, 2015
@jadjoubran
Copy link
Owner

Now that I think of it, it was fine to keep it because as soon as the end user runs composer update it'll automatically generate the new composer.lock. But I'm gonna keep the fix, that way when they run composer install (as mentioned in the guides), they'll get the newest dependencies.

Open a new issue if you have other suggestions!

And check this related package, I think you'll find it useful
https://github.com/jadjoubran/laravel5-generator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants