Closed justin-lovell closed 2 years ago
Thanks @justin-lovell, I'm not sure though if you can have a composer enabled repo and submodules. @Tarendai removed the submodule in favour of using composer to make it easier to stay up to date with lessphp.
What's your opinion @Tarendai?
I'm assuming that @justin-lovell tested his changes prior to the pull request, did the git-submodules break composer based installation?
Currently composer handles the lessphp dependency in its entirety, completely automatically, with zero maintenance costs, and no supervision, via a widespread and commonplace PHP tool. composer install
or composer update
handles this, and an archive for distribution can be generated via composer archive
. If you have wp-less as a git submodule in another project, you may find it desirable to add composer update
in a git hook e.g. post-update
.
Alternatively, you can remove the need for the git submodule and the parent repository in its entirety by using composer to install WordPress and the entire set of plugins and themes, but I sense that would not be a helpful answer in the short term
I would also note that the pull request removes the vendor folder from the .gitignore, which would lead to a lot of files being pulled in as untracked files on any git activity for a composer user or developer using composer, e.g the composer class autoloader. Regardless of the decision, that change should be undone.
Hi guys,
I tested my changes as far as git sub-modules are concerned. To clarify the purpose of removing the vendor
directory from .gitignore
was solely based for git to track the submodule. However, I did not consider the composer workflow model (since most of the work I do is chained with the git clone --recursive ...
workflow).
With respects to your comments @Tarendai, please give me until Friday to think a little further about what you said. I agree with everything you said, and if I cannot bring anything further to the table, I agree to close this pull request.
Not sure there's a neat way to get the 2 to play nicely. My workflow tends to be based more around submodules than composer. Will have a think but we may have to have and maintain a separate composer branch.
@justin-lovell it's not ideal but we could have a git submodule on a different path and just check for that as well in the file_exists()
checks. Would be happy to have that option.
Instead of giving the users the instructions to also download another git repository, let's include it as a submodule.
This would ensure that everything is now kept up to date -- whenever we hear of updates from lessphp, then we just execute the following commands