PHPackages                             flashtag/subsplit-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flashtag/subsplit-service

ActiveProject[Utility &amp; Helpers](/categories/utility)

flashtag/subsplit-service
=========================

Flashtag services...

v0.3.1(10y ago)3925MITPHPPHP &gt;=5.5.9

Since Nov 6Pushed 9y ago4 watchersCompare

[ Source](https://github.com/ryanwinchester/subsplit-service)[ Packagist](https://packagist.org/packages/flashtag/subsplit-service)[ RSS](/packages/flashtag-subsplit-service/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (6)Used By (0)

Flashtag Subsplit Service
=========================

[](#flashtag-subsplit-service)

[![version](https://camo.githubusercontent.com/ad419ae1d819931b8afade874d5c5732bc0892fa2d3375be3d4926f804e44220/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c6173687461672f73756273706c69742d736572766963652e737667)](https://packagist.org/packages/flashtag/subsplit-service)[![license](https://camo.githubusercontent.com/875b50aa6e047afed105f513f32cb7847593fbca5f2a699f3c91f0eeaf71fadd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666c6173687461672f73756273706c69742d736572766963652e737667)](https://packagist.org/packages/flashtag/subsplit-service)

### Webhook and Scheduler

[](#webhook-and-scheduler)

Have you ever wanted to split some of your code from your project into components... maybe read-only github repositories like [Symfony](https://github.com/symfony) and [Laravel](https://github.com/laravel)?

Well, I certainly did. It took me a while to find a good way to do it and now I'm going to help you do the same. This subsplit project will help you to automate the process with webhooks and/or scheduled commands.

##### Webhooks

[](#webhooks)

**git push** webhook that runs the subtree split command from a github, bitbucket, or gitlab webhook

##### Scheduled commands

[](#scheduled-commands)

A `flashtag:subsplit` command will run the subtree split command and publish to the subtree repositories.

### Install

[](#install)

Install with [composer](https://getcomposer.org/):

```
composer create-project flashtag/subsplit-service --prefer-dist
```

From the project directory:

```
cd .git-subsplit; ./install.sh
```

### Setup

[](#setup)

Edit the [build/flashtag-subsplit.sh](https://github.com/flashtag/services/blob/master/build/flashtag-subsplit.sh) file to match your repo, and this package should actually just work almost out-of-the-box for your own repos as well.

```
git subsplit init git@github.com:flashtag/flashtag.git
git subsplit publish --heads="master" app/Admin:git@github.com:flashtag/admin.git
git subsplit publish --heads="master" app/Api:git@github.com:flashtag/api.git
git subsplit publish --heads="master" app/Client:git@github.com:flashtag/client.git
git subsplit publish --heads="master" app/Cms:git@github.com:flashtag/cms.git
git subsplit publish --heads="master" app/Data:git@github.com:flashtag/data.git
rm -rf .subsplit/
```

Would change to look like:

```
git subsplit init git@github.com:Foobar/Parent.git
git subsplit publish --heads="master" src/One:git@github.com:Foobar/one.git
git subsplit publish --heads="master" src/Two:git@github.com:Foobar/two.git
git subsplit publish --heads="master" src/Three:git@github.com:Foobar/three.git
# . . .
# etc.
# . . .
rm -rf .subsplit/
```

#### For webhooks:

[](#for-webhooks)

Copy the example environment file `cp .env.example .env` and change the appropriate properties.

**Uncomment** the line corresponding to the service you are using to send the webhook in [`app/Http/routes/php`](https://github.com/ryanwinchester/subsplit-service/blob/master/app/Http/routes.php)and comment out any you aren't using.

Currently, the gitlab route is commented out by default because I don't know of any way to validate the request.

```
// Github
$app->post('github', [
    'middleware' => 'github',
    'uses' => 'App\Http\Controllers\WebhooksController@push',
]);

// Bitbucket
$app->post('bitbucket', [
    'middleware' => 'bitbucket',
    'uses' => 'App\Http\Controllers\WebhooksController@push',
]);

// // Gitlab
// $app->post('gitlab', [
//     'middleware' => 'gitlab',
//     'uses' => 'App\Http\Controllers\WebhooksController@push',
// ]);
```

##### GITHUB

[](#github)

The `WEBHOOK_SECRET` is what you will also set the `secret` property to in the github webhook setup:

[![Github add webhook](https://camo.githubusercontent.com/2e1592394b69b2a6f109a46540dd069e1e1abfa223f5e980881cd043777a6443/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f7279616e77696e636865737465722f73637265656e73686f74732f6769746875622d776562686f6f6b2d6164642e706e67)](https://camo.githubusercontent.com/2e1592394b69b2a6f109a46540dd069e1e1abfa223f5e980881cd043777a6443/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f7279616e77696e636865737465722f73637265656e73686f74732f6769746875622d776562686f6f6b2d6164642e706e67)

Your github push webhook payload url path is `/webhooks/github` so an example webhook url would look something like `https://subsplit.whateveryourdomain.com/webhooks/github`

##### BITBUCKET

[](#bitbucket)

Your bitbucket push webhook url path is `/webhooks/bitbucket` so an example webhook url would look something like `https://subsplit.whateveryourdomain.com/webhooks/bitbucket`

##### GITLAB

[](#gitlab)

Your gitlab push webhook url path is `/webhooks/gitlab` so an example webhook url would look something like `https://subsplit.whateveryourdomain.com/webhooks/gitlab`

#### For the scheduled command:

[](#for-the-scheduled-command)

You can either use the scheduler as lumen intended in the [`app/Console/Kernel`](https://github.com/flashtag/subsplit-service/blob/master/app/Console/Kernel.php), by setting up this cron job:

```
* * * * * php /path/to/project/artisan schedule:run

```

or schedule the command yourself. For my own project, I've set up this cron job to just execute this every night:

```
0 0 * * * php /path/to/project/artisan flashtag:subsplit

```

### Powered by

[](#powered-by)

Sometimes re-inventing the wheel is a good idea and sometimes you have great packages like:

- [Lumen PHP Framework](https://github.com/laravel/lumen)
- [Git Subsplit](https://github.com/dflydev/git-subsplit)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Total

5

Last Release

3786d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f839bc1a48d9699534fdfd618ad477afe371e9ce70c76885a5cb851895ab7289?d=identicon)[ryanwinchester](/maintainers/ryanwinchester)

---

Top Contributors

[![ryanwinchester](https://avatars.githubusercontent.com/u/2897340?v=4)](https://github.com/ryanwinchester "ryanwinchester (48 commits)")

---

Tags

schedulewebhookscommands

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flashtag-subsplit-service/health.svg)

```
[![Health](https://phpackages.com/badges/flashtag-subsplit-service/health.svg)](https://phpackages.com/packages/flashtag-subsplit-service)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)[vinkla/wordplate

The WordPlate boilerplate

2.2k5.3k](/packages/vinkla-wordplate)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

43785.5k4](/packages/lullabot-drainpipe)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
