PHPackages                             firevel/firestore-session-driver - 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. firevel/firestore-session-driver

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

firevel/firestore-session-driver
================================

Firestore session driver for Laravel app running inside Google App Engine.

1.0.3(8mo ago)520.9k↓50%1MITPHP

Since May 8Pushed 8mo agoCompare

[ Source](https://github.com/firevel/firestore-session-driver)[ Packagist](https://packagist.org/packages/firevel/firestore-session-driver)[ RSS](/packages/firevel-firestore-session-driver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (1)

Laravel – Firestore Session Driver
==================================

[](#laravel--firestore-session-driver)

A Firestore-backed session driver for [Laravel](https://www.laravel.com), designed to run smoothly on **Google App Engine (Standard environment)**.

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

[](#installation)

```
composer require firevel/firestore-session-driver
```

Configuration
-------------

[](#configuration)

### 1) Set the session driver

[](#1-set-the-session-driver)

**App Engine (app.yaml):**

```
env_variables:
  SESSION_DRIVER: firestore
  # Optional: tune GC batch size (see "Garbage collection & scale")
  # SESSION_GC_BATCH_SIZE: 500
```

**Local development (.env):**

```
SESSION_DRIVER=firestore
# SESSION_GC_BATCH_SIZE=500
```

> Firestore credentials on App Engine Standard are picked up via Application Default Credentials. For local development, set `GOOGLE_APPLICATION_CREDENTIALS` if needed.

### 2) (Optional) Session lifetime

[](#2-optional-session-lifetime)

Configure the session lifetime as usual in `config/session.php` or via `.env`:

```
SESSION_LIFETIME=120
```

Garbage collection &amp; scale
------------------------------

[](#garbage-collection--scale)

Firestore session cleanup happens via Laravel’s session **lottery**. On very high-traffic apps this can be a bottleneck. You can tune or offload it:

- **Adjust the lottery** in `config/session.php` (note the correct path/key): ```
    'lottery' => [2, 100], // e.g., 2% chance per request
    ```
- **Batch size**: control how many expired sessions are removed per GC pass: ```
    SESSION_GC_BATCH_SIZE=500
    ```
- **Heavy load / HA setups**: consider moving GC out of request flow. Run cleanup on a schedule (cron/Scheduler) and set a very low lottery, or temporarily switch to the `cookie` driver if GC becomes a hotspot.

> In extreme cases, run garbage collection from a scheduled job/cron and reduce the in-request lottery to near zero.

Limitations
-----------

[](#limitations)

- Review Firestore’s quotas and limits before deploying high-throughput workloads:

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance59

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

4

Last Release

264d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ef4a79c6f9a9afe04267a19b98fe0a5a45930c92d08fd720b233ab21ae102ca?d=identicon)[sl0wik](/maintainers/sl0wik)

---

Top Contributors

[![sl0wik](https://avatars.githubusercontent.com/u/2696038?v=4)](https://github.com/sl0wik "sl0wik (13 commits)")

---

Tags

laraveldriversessiongoogle cloudfirestoreapp enginefirevel

### Embed Badge

![Health badge](/badges/firevel-firestore-session-driver/health.svg)

```
[![Health](https://phpackages.com/badges/firevel-firestore-session-driver/health.svg)](https://phpackages.com/packages/firevel-firestore-session-driver)
```

###  Alternatives

[firevel/firequent

Limited implementation of Eloquent based on Firestore.

267.1k](/packages/firevel-firequent)[jenssegers/mongodb-session

A MongoDB session driver for Laravel 4, 5, 6, 7 and 8

76308.1k3](/packages/jenssegers-mongodb-session)[ytake/laravel-couchbase

Couchbase providers for Laravel

3051.9k](/packages/ytake-laravel-couchbase)[laravel-freelancer-nl/aranguent

Laravel bridge for the ArangoDB Multi-model database

517.0k](/packages/laravel-freelancer-nl-aranguent)

PHPackages © 2026

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