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
Livewire Strict

Livewire Strict Laravel Package

wire-elements/livewire-strict

Add strict mode to your Livewire components. Livewire Strict throws exceptions when the frontend tries to update undefined or protected properties, catching typos and unauthorized updates early instead of failing silently. A lightweight safety net for more predictable, secure Livewire apps.

View on GitHub
Deep Wiki
Context7

Livewire Strict helps to enforce security measures and prevents you from leaving sensitive public properties unprotected.

Frequently asked questions about Livewire Strict
What is wire-elements/livewire-strict and what problem does it solve?
Livewire Strict is a developer-experience guardrail for Livewire components that enforces strict typing on public component properties. It throws exceptions when the frontend tries to update undefined or protected properties, so typos and unauthorized updates fail loudly instead of silently. It is positioned as a lightweight safety net for more predictable and secure Livewire apps.
How do I install wire-elements/livewire-strict in a Laravel app?
Install it with Composer as a dev dependency using composer require --dev wire-elements/livewire-strict, then publish its configuration. After publishing, run your test suite to see which existing components violate strict mode. The integration is straightforward; the real effort is remediating legacy untyped properties.
Does livewire-strict support Livewire v3 and v4?
Version 2.0.2 is a compatibility fix via PR #5 that asserts support for both Livewire v3 and v4. Because dual support is newly claimed in a patch release, treat Livewire v4 coverage as something to smoke test rather than assume. Pin ^2.0.2 rather than ^2.0.1 to get the widened support.
Should livewire-strict be a dev dependency or a production dependency?
It should be installed as a dev/test dependency with require-dev. Architecturally it is a service provider plus config that hooks the Livewire component lifecycle, and it should not carry production traffic or own business logic. Keep it as a CI and local guardrail rather than a runtime production concern.
What happens if I enable strict mode on existing Livewire components with untyped properties?
A mature app with untyped legacy properties will likely see a burst of failures on first enablement. That is a remediation cost, not an integration cost: the package is turning previously silent type looseness into hard failures. Plan to baseline the violations before making the check blocking.
How do I configure livewire-strict to warn instead of throwing exceptions?
After publishing the package config, it can either warn or throw depending on configuration. Use the non-blocking warning mode first to enumerate violations without halting renders or CI. Once the violation count is stable and triaged, switch to throwing as a blocking gate.
Can I use livewire-strict in CI or my Laravel test suite?
Yes. The recommended workflow is to install it as require-dev, publish config, and run your suite to enumerate failures. That makes it useful as an advisory CI signal first and a blocking CI gate later. Decide explicitly whether strict mode is a blocking gate or advisory warning, because that changes your remediation plan.
Does livewire-strict check method signatures and computed properties too?
The package's positioning focuses on strict typing for public component properties and frontend-to-component property updates. Whether it also governs method signatures and computed properties is flagged as an open scope question in the assessment. Verify coverage against the README and package source before assuming it protects your entire component surface.
How can I adopt livewire-strict gradually without breaking my app?
Adopt it in a non-blocking mode first, capture the violation set as a baseline, then ratchet up strictness. The recommended sequence is install as require-dev, publish config, run the suite to enumerate failures, and triage into fix now, temporary allowlist, or out of scope. Only after the violation count is stable should the gate become blocking.
What alternatives exist to livewire-strict, and is it actively maintained?
There is no direct like-for-like alternative named in the assessment; the closest baseline is Livewire's native behavior, which can fail silently on typos and unauthorized updates. The package is a single-maintainer wire-elements dev tool, which is tolerable for a dev-only guardrail but worth tracking. Pin ^2.0.2 and monitor releases, especially around Livewire v4 coverage.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo