PHPackages                             kaiseki/laravel-helper-mocks - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. kaiseki/laravel-helper-mocks

ActiveLibrary[Testing &amp; Quality](/categories/testing)

kaiseki/laravel-helper-mocks
============================

Mock laravel helper functions

1.0.0(1mo ago)09491MITPHPPHP ^8.2CI passing

Since Jun 1Pushed 3w ago2 watchersCompare

[ Source](https://github.com/kaisekidev/kaiseki-laravel-helper-mocks)[ Packagist](https://packagist.org/packages/kaiseki/laravel-helper-mocks)[ Docs](https://github.com/kaisekidev/kaiseki-laravel-helper-mocks)[ RSS](/packages/kaiseki-laravel-helper-mocks/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (11)Versions (3)Used By (1)

kaiseki/laravel-helper-mocks
============================

[](#kaisekilaravel-helper-mocks)

Mock Laravel helper functions so packages that depend on them can run in non-Laravel projects.

Provides minimal global `app()`, `resolve()` and `config()` functions backed by a PSR-11 container (read from the global `$container`), so code written against Laravel's helpers works without pulling in the Laravel framework.

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

[](#installation)

```
composer require kaiseki/laravel-helper-mocks
```

Requires PHP 8.2 or newer.

Usage
-----

[](#usage)

The helpers resolve services from a PSR-11 container exposed as the global `$container`. Assign it once during bootstrap:

```
use Psr\Container\ContainerInterface;

/** @var ContainerInterface $myContainer */
global $container;
$container = $myContainer;
```

The mocked helpers are then available globally:

```
$container = app();                 // the container itself
$service   = app(MyService::class); // a service resolved from the container
$same      = resolve(MyService::class);
$value     = config('some.config.key');
```

- [`app()`](https://laravel.com/docs/helpers#method-app) — returns the container, or a service from it when given an id; `null` if no PSR container is set.
- [`resolve()`](https://laravel.com/docs/helpers#method-resolve) — alias of `app()`.
- [`config()`](https://laravel.com/docs/helpers#method-config) — reads a key through `kaiseki/config` (`Config::softGet()`), returning `null` when unset.

Each function is declared behind a `function_exists()` guard, so it yields to a real Laravel installation if one is present.

Development
-----------

[](#development)

```
composer install
composer check   # check-deps, cs-check, phpstan
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance94

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

34d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c3a6b11aea9668c9e9ca0c0f8515ef114d344acb552c695d715d35d5b388ea4?d=identicon)[woda](/maintainers/woda)

---

Top Contributors

[![davidmondok](https://avatars.githubusercontent.com/u/3883758?v=4)](https://github.com/davidmondok "davidmondok (7 commits)")[![wolfgangschaefer](https://avatars.githubusercontent.com/u/26325205?v=4)](https://github.com/wolfgangschaefer "wolfgangschaefer (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kaiseki-laravel-helper-mocks/health.svg)

```
[![Health](https://phpackages.com/badges/kaiseki-laravel-helper-mocks/health.svg)](https://phpackages.com/packages/kaiseki-laravel-helper-mocks)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k101.8M2.2k](/packages/behat-behat)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k455.6M9.6k](/packages/symfony-dependency-injection)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)

PHPackages © 2026

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