-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make bedrock a meta-package by extracting files into separate package #533
Comments
This is a excellent idea, since now we need to port/reapply any upgrade fixes (i.e in case of vlucas/phpdotenv ^3 -> ^4) that you apply on this repo, due to how |
I've created a composer-plugin that could be used. I'm happy to hand that over ;-) |
I like the idea! I dislike the manual updating of the config folder as well. But sometimes I do define my own constants in the |
I understand the motivation for this suggestion but in my opinion it's incompatible with the nature of the project: a boilerplate for WordPress projects. That's what makes Bedrock great is that it gives you a starting point to work from, but doesn't impose any limitations because there is no upgrade path and there can't really be one for Bedrock itself, because it's not a framework. I'm all in favor of making the default configuration in Bedrock more modular to make things easier to update for projects later on if you want to, but moving it into some official packages which are by definition uneditable is essentially turning Bedrock into a framework rather than a boilerplate. I'm not saying it's a bad idea, just that I don't think that it fits Bedrock as a project. There's nothing stopping you from creating your own Bedrock-based framework/abstraction to make things easier for yourself and your projects though. By all means, do that (and maybe share what you made?) but let's not make Bedrock into a framework just to make things a little easier in one way and less flexible in another 🙂 |
Would be great to find the middle ground here. I too would like to just update dependencies by changing the version in composer.json instead of going over all files and patching them manually. Moving files content to a separate package and just creating files with a simple |
I would be open to creating a new project which worked like this, but I highly doubt we'd change Bedrock itself to this model. It might even be possible to create the meta-package model and then generate the Bedrock boilerplate as it currently is, so we offer both alternatives. I'll leave this issue open but it's not something we''re going to actively work on. We'd be happy to help out or discuss more if people are interesting in driving this forward. |
Summary
By extracting the content of the
config
as well as theweb
folder into a separate package (i.e.bedrockfiles
) that this package then requires, this package could be used to create a project but the files that currently then need to be added to version control of the newly created project could still then be handled as dependencies.Motivation
Curently after calling
composer create-project roots/bedrock
I will have to add the files within theconfig
-folder as well as the files within theweb
-folder to my version control. But those actually aren't files I need to or should edit. Usually those files are dependencies of my project that I don't want to (and probably shouldn't) edit. Why should I add them to my version-control then? Especially when one of the great advantages of bedrock is, that I don't need to add files to my version control that do not belong there.But when I currently do exactly that (not adding them to VersionControl) I will not be able to retrieve a working installation using
composer install
as those few files are missing.By extracting them to a separate package I would still have them installed on
composer create-project
but I would also get them installed on callingcomposer install
. And a omposer update` would even update the files to the latest version.Additional context
My main idea is to have a fully working WordPress with the least possible number of files. So for me the unique part of any WordPress installation usually is
composer.json
andcomposer.lock
which contains all the plugins and WordPress as dependencies and then there is the theme folder. If the theme is a child theme, the parent theme is also a dependency withincomposer.json
. Additionally there are some files for a docker-setup that usually are project specific (like the database-dump for dev and stage and such things). I'm currently thinking about moving them to a package as well.This allows me to do the following to have a new (development) system up and running within seconds:
OK: Perhaps in between one should copy the
.env.dist
to.env
...The text was updated successfully, but these errors were encountered: