-
Notifications
You must be signed in to change notification settings - Fork 94
Common files dispatcher for Symfony CMF repositories #246
Comments
thanks for looking into this! sounds like a great idea!
we said we focus on the master branches to concentrate our efforts. i think that is good enough. we can still backport stuff manually if really needed, or expand the tool later on.
implementing symfony/console is quite simple and allows things like arguments to help while developping. we could e.g. add a dry-run flag to do everything but not really creates pull requests, or to only update one repository... so i opt to use the symfony console.
lets start with the simplest solution and see how well that works and if we need more. there is one thing that could be tricky: https://github.com/symfony-cmf/routing-bundle/blob/201ca313b599bda335cea350256045da05972412/.travis.yml#L42 - though maybe its good enough to run that in each repo that has phpcr-odm somewhere in the dependencies...
we have a bunch of files that are (hopefully) identical in all repos:
the readme follows a very similar pattern but has a paragraph with the purpose of the bundle. i find that paragraph very useful. while it would be cool to generate the readme consistently, we would need something to keep defining that paragraph. if you get the travis thing running, thats a good start. once the infrastructure is there, we can add static files and maybe think of a solution for the readme. |
The simplest solution might be to use a centralized configuration file (like the dev-kit one). But doing that way will require to modify this file on the dispatcher repository when the dependencies versions are modified in the project repository. |
i love your idea of determining php version and symfony versions (for bundles) based on composer.json. that should hopefully not be all that complicated and would be easier to maintain. and ease of maintenance is the primary goal of dev-kit. we do need a configuration file to at least tell which repos to handle, and probably in the future exclude or override some things for some of the repo files. |
After some experimenting, I made a Development Kit console application with a |
cool! @ElectricMaxxx is looking into the monorepo topic. i guess that would change the needs for file dispatching as all would be in the same repository. wdyt max? |
What about the monorepo ? I usually think it's not a good practice. But I don't know why and I don't have any argument against it. I just see so many projects using multiple repos for their components. The monolithic repo is usually a meta one to allow getting the whole project. |
Is there a way to have a monolithic repository while keeping separate component repositories using Git submodules ? |
For the monorepo: |
the dev-kit works fine now. |
After some refactoring of Travis CI configuration files on some Symfony CMF repositories, I wanted to apply the same improvements to others repositories.
But it appears that there are a lot of differences between them. It is understandable as there isn't any centralized location (or maybe this file in the testing repository, but I'm not sure about it's usage).
@dbu pointed out the sonata-project/dev-kit project to me.
The dev-kit project
After studying the code, I think I can explain its usage.
There is 2 main utilities:
The interesting command is
dispatch
.The dispatch command
This command apply common modifications to the configured repositories (see the projects.yml file) :
The common files dispatching
The
dispatch
process is quite simple:When the dev-kit repository is built on Travis CI, the dispatch command is run.
My proposal
I cannot take the time for implementing all dev-kit features (and I'm not sure about the usefulness of all this features for the maintainers). Even by forking it. Indeed, this project does not seem to have been designed to be shared and easily configurable. Moreover, a lot of things need to be removed to just keep what we need.
I think about implementing a simple dispatch process by using the same algorithm, using those tools:
composer.json
file.Features
Some questions need an answer:
master
is sufficient ?My opinion
1. The branches
I don't know how you manage this project. If you are maintaining the legacy versions, this can be useful. Otherwise, affecting only the master branch can be sufficient.
2. Command line application
A command line application is easy to implement using symfony/console. It will allow adding more tools for maintainers later and build a real development kit if needed.
3. No configuration at all
I think it's possible to generate a Travis configuration file using the Composer configuration:
-bundle
to apply the correct one).The only configuration file will be a list of enabled repositories.
The text was updated successfully, but these errors were encountered: