Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Contextify

Laravel Contextify Laravel Package

faustoff/laravel-contextify

Laravel Contextify is a lightweight package for managing application context in Laravel. Define and share contextual data across requests, services, jobs, and views through a simple, fluent API with Laravel-friendly helpers and minimal setup. It keeps context explicit and testable without overcompli...

View on GitHub
Deep Wiki
Context7

Contextual logging with inline notifications for Laravel.

Frequently asked questions about Laravel Contextify
What is Laravel Contextify and what problem does it solve?
Laravel Contextify is a lightweight Composer package (faustoff/laravel-contextify) for managing application context in Laravel. It lets you define and share contextual data across requests, services, queued jobs, and views through a simple fluent API and Laravel-friendly helpers. The goal is to keep context explicit and testable without pulling in a heavy framework or overcomplicating your code.
How do I install faustoff/laravel-contextify in a Laravel application?
Install it with Composer using composer require faustoff/laravel-contextify, then confirm the service provider is registered per the package documentation. Publish or merge the package config file if you intend to customize behavior, including the disable option added in 4.4.0. Setup is intentionally minimal, so most applications only need the Composer install plus a config publish step.
Which Laravel and PHP versions does Laravel Contextify support?
The package is built for standard Laravel applications, but you should check the composer.json constraints in the repository for the exact PHP and Laravel version matrix. Version constraints can change between minor releases, so verify them before upgrading rather than assuming your current Laravel version is covered. If you maintain multiple Laravel versions across projects, test the upgrade on each target version separately.
How do I share context data across requests, jobs, services, and views?
Contextify exposes a fluent API with Laravel-style helpers for setting and retrieving context values. You define context once, then read it from services, jobs, or Blade views without threading parameters through every method call. Because the context is explicit rather than magic, it stays testable and easy to reason about in your application code.
How do I fully disable Laravel Contextify in production?
Version 4.4.0 adds a configuration option that allows Contextify to be fully disabled, which works as a production kill switch for an optional dependency. Set the option in the package config file and confirm the exact key name and default value in the package documentation before relying on it. After changing it, run php artisan config:clear or rebuild the config cache so the new value actually takes effect.
Does the disable switch really stop all Contextify behavior?
That depends on whether the disabled mode prevents service-provider registration, middleware, listeners, and container bindings, or only turns runtime behavior into a no-op. The important thing to verify in your own application is that no listeners, middleware, or scheduled work still fire while the package reports itself as disabled. Test the disabled mode in staging before assuming it is a complete kill switch.
Does Laravel Contextify work with php artisan config:cache?
Config-driven Laravel packages normally work fine under config caching, but a stale cache is the most common reason a newly toggled option appears to have no effect. After changing the Contextify config, clear and rebuild the cache with php artisan config:clear and php artisan config:cache. Verify the disabled behavior in an environment where config caching is enabled, since that matches production.
Is Laravel Contextify safe to use in queued jobs and long-running processes?
Contextify is designed to share context across jobs as well as requests and views, so it is intended for that use case. In long-running workers, be deliberate about resetting or scoping context between jobs so values do not leak from one job to the next. If you disable the package, check whether any jobs or downstream consumers silently lose expected context data.
How do I test code that depends on Laravel Contextify?
Because Contextify uses an explicit fluent API rather than hidden global state, you can set context directly in your test setup and assert on what your services or views read back. Cover both the enabled and disabled modes if the 4.4.0 configuration switch is part of your deployment strategy. Also test with config caching enabled, since cached configuration is a common source of surprises.
Is upgrading from 4.3.0 to 4.4.0 a breaking change?
The 4.4.0 release appears to be a minor, backward-compatible update that adds a configuration option rather than changing existing APIs. Updating the Composer constraint and refreshing composer.lock should preserve current behavior as long as you keep the new option at its default. Upgrade on a non-production branch, confirm enabled behavior matches 4.3.0, and test the disabled path separately.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource