PHPackages                             kfriars/connection-shim - 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. [Database &amp; ORM](/categories/database)
4. /
5. kfriars/connection-shim

ActiveLibrary[Database &amp; ORM](/categories/database)

kfriars/connection-shim
=======================

A Laravel Connection implementation that allows you to persist the Schema Builder instance.

v11.0.0(1y ago)043[4 PRs](https://github.com/kfriars/connection-shim/pulls)MITPHPPHP ^8.2CI passing

Since Feb 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/kfriars/connection-shim)[ Packagist](https://packagist.org/packages/kfriars/connection-shim)[ Docs](https://github.com/kfriars/connection-shim)[ GitHub Sponsors]()[ RSS](/packages/kfriars-connection-shim/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (7)Versions (13)Used By (0)

Laravel Connection Shim
=======================

[](#laravel-connection-shim)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0a1d81b4182effe547949cb5dfd0e07831d8939348bb503f283d36541362bdb4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6672696172732f636f6e6e656374696f6e2d7368696d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kfriars/connection-shim)[![GitHub Tests Action Status](https://camo.githubusercontent.com/828c9f7bcaeb3afc9b96bf8aa5d26e983a82e77bb2c22586585459b7b1941b14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6672696172732f636f6e6e656374696f6e2d7368696d2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kfriars/connection-shim/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/1def845d838e0fae9e2f9af1cf964b2ba05c180b66fe4bdb9a7326593100dda1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6672696172732f636f6e6e656374696f6e2d7368696d2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/kfriars/connection-shim/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f5e706c323ad780530ee910266157d2ddc3f9917110e6d93bc5e8bebb17edec6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6672696172732f636f6e6e656374696f6e2d7368696d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kfriars/connection-shim)

This package is a set of Laravel Connection implementations that allow you to persist the Schema Builder on the Connection instance.

The Laravel Framework has hard-coded the schema builder into the connections, so if you want to customize the schema builder you would need to override the connection classes.

I have started a [discussion](https://github.com/laravel/framework/discussions/54551) on the `laravel/framework` repository, to see if this behavior can be changed.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/a60227a98b70e5dddbc3df28cd0f0c374f6990ce55d24b568671ad52cf09d23d/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f636f6e6e656374696f6e2d7368696d2e6a70673f743d31)](https://spatie.be/github-ad-click/connection-shim)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kfriars/connection-shim
```

Usage
-----

[](#usage)

After installing the package, you will not need to do anything else. All first-party database drivers will allow you to call the `setSchemaBuilder` method on them. This ensures the connection will be using a consistent schema throughout execution.

Credits
-------

[](#credits)

- [Kurt Friars](https://github.com/kfriars)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance66

Regular maintenance activity

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~0 days

Total

6

Last Release

505d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3378675?v=4)[Kurt](/maintainers/kfriars)[@kfriars](https://github.com/kfriars)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![kfriars](https://avatars.githubusercontent.com/u/3378675?v=4)](https://github.com/kfriars "kfriars (2 commits)")

---

Tags

laravelKurt Friarsconnection-shim

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kfriars-connection-shim/health.svg)

```
[![Health](https://phpackages.com/badges/kfriars-connection-shim/health.svg)](https://phpackages.com/packages/kfriars-connection-shim)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.3M19](/packages/bavix-laravel-wallet)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[watson/validating

Eloquent model validating trait.

9803.5M54](/packages/watson-validating)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

213420.9k2](/packages/wnx-laravel-backup-restore)[spatie/laravel-model-flags

Add flags to Eloquent models

4571.2M5](/packages/spatie-laravel-model-flags)

PHPackages © 2026

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