# magewirephp/magewire

> A framework that makes building reactive and dynamic interfaces simple in Magento 2

`composer require magewirephp/magewire`

Canonical URL: https://packagento.com/magewirephp/magewire

## At a glance

- **Vendor**: magewirephp (https://packagento.com/magewirephp.md)
- **Latest version**: 3.2.0 — released 2026-06-14
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/magewirephp/magewire and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require magewirephp/magewire:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

A framework that makes building reactive and dynamic interfaces simple in Magento 2

## README

> Looking for v1? See the [1.x branch](https://github.com/magewirephp/magewire/tree/1.x).

[![Latest Stable Version](http://poser.pugx.org/magewirephp/magewire/v)](https://packagist.org/packages/magewirephp/magewire)
[![Total Downloads](http://poser.pugx.org/magewirephp/magewire/downloads)](https://packagist.org/packages/magewirephp/magewire)
[![License](http://poser.pugx.org/magewirephp/magewire/license)](https://packagist.org/packages/magewirephp/magewire)
[![Mago](https://github.com/magewirephp/magewire/actions/workflows/mago.yml/badge.svg?branch=main)](https://github.com/magewirephp/magewire/actions/workflows/mago.yml)

MagewirePHP brings the power of reactive, server-driven UI development to Magento 2—without writing JavaScript.
Inspired by Laravel Livewire, MagewirePHP lets you build dynamic, interactive frontend components using only PHP,
fully integrated with Magento’s architecture.

Whether you're creating real-time search, dynamic product forms, or interactive checkout steps, MagewirePHP enables a clean,
component-based approach that stays true to Magento’s conventions while simplifying complex frontend behavior.

- ✅ Write less JavaScript
- ✅ Maintain component logic in PHP
- ✅ Ideal for dynamic UIs like filters, modals, and configurators

MagewirePHP helps you deliver modern UX experiences in Magento—faster, cleaner, and with less frontend overhead.

- [Website](https://magewirephp.nl)
- [Documentation](https://docs.magewirephp.nl)
- [Discord](https://discord.gg/ZXcckNgMgm)
- [Admin Compatibility](https://github.com/magewirephp/magewire-admin)
- [Hyvä Theme Compatibility](https://github.com/magewirephp/magewire-hyva-theme)
- [Hyvä Checkout Compatibility](https://github.com/magewirephp/magewire-hyva-checkout)

### Sponsors

|   |   |   |
|---|---|---|
|<a align="center" href="https://hyva.io/" title="Hyvä" target="_blank"><img width="64" alt="Hyvä" src="https://github.com/user-attachments/assets/4b22d11f-9afd-4604-8ed2-8cccceb13542"/></a>|<a align="center" href="https://vendic.nl/" title="Vendic" target="_blank"><img width="64" alt="Vendic" src="https://user-images.githubusercontent.com/5383956/228823594-d3344d87-dadc-4c36-a212-89cba8c7340b.jpg"/></a>|<a align="center" href="https://www.zero1.co.uk/" title="ZERO-1" target="_blank"><img width="64" alt="ZERO-1" src="https://github.com/user-attachments/assets/df1e0e2b-96e9-49e2-a6f4-1ee0aafaf0cc"/></a>|

Click [here](https://github.com/sponsors/wpoortman) to start sponsoring.

### Upgrading from 1.x
See [UPGRADING.md](UPGRADING.md) for migration notes — dependency changes, the `#[HandleBackwardsCompatibility]` opt-in, and `wire:model` semantics.

### Contributing
Thank you for considering contributing to Magewire! Please read the [contribution guide](CONTRIBUTING.md) to know how to behave, install and use Magewire for contributors.

### Code of Conduct
In order to ensure that the Magewire is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/magewirephp/magewire/blob/main/CODE_OF_CONDUCT.md).

### Security Vulnerabilities
**Please do not report security issues publicly.** Email `magewirephp@wpoortman.nl` with a private report — see [SECURITY.md](SECURITY.md) for the full policy. All vulnerabilities will be promptly addressed and [responsibly disclosed](https://en.wikipedia.org/wiki/Responsible_disclosure).

### License
Copyright © [Willem Poortman](https://github.com/wpoortman)

Magewire is open-sourced software licensed under the [MIT license](LICENSE.md).

> It's important to emphasize that this package is completely independent of any business entities. There is absolutely
> no involvement or interference from other companies expressing their preferences. This package is created by the
> community, for the community, ensuring its integrity and unbiased nature.

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### [3.2.0](https://github.com/magewirephp/magewire/compare/3.1.0...3.2.0) (2026-06-14)


#### Features

* Magewire compiler resource path from generated to var ([812f6ae](https://github.com/magewirephp/magewire/commit/812f6ae6ee1d7628b546a17f5aa197b5d4fdce18))
* Rate limiting dev-mode disabled ([502706a](https://github.com/magewirephp/magewire/commit/502706afe932781640e4cc4a1c9d3761c8ff07f8))
* Removed all theme compatibility modules from this package ([118d518](https://github.com/magewirephp/magewire/commit/118d518342f26463ed374ad9160a7ce56e26cbb7))


#### Bug Fixes

* Correct v1 emit() param spreading and implement empty emit methods ([0eadd6c](https://github.com/magewirephp/magewire/commit/0eadd6c98e81b7e6ce8c558a05096a855caeb4ce))
* Correct v1 emit() param spreading and implement empty emit methods (2/2) ([10c00fc](https://github.com/magewirephp/magewire/commit/10c00fc5bf576b1850f625142de535781c237e06))


#### Miscellaneous Chores

* Added updating argument swapping for backwards compatible components ([2377627](https://github.com/magewirephp/magewire/commit/23776279a09be38f14b111394a32f7eced063ff4))
* Rate limiting system config improvements ([0f52472](https://github.com/magewirephp/magewire/commit/0f524725be7f8f1274ee3bf33d33ec90ee553f3b))
* Upgrade docs URL to docs.magewirephp.nl ([#234](https://github.com/magewirephp/magewire/issues/234)) ([9bf650b](https://github.com/magewirephp/magewire/commit/9bf650b29bfb6023277db1db86e7c96755ee8777))

### [3.1.0](https://github.com/magewirephp/magewire/compare/3.0.0...v3.1.0) (2026-06-02)


#### Features

* Blade-like echo compilers ([364f5d2](https://github.com/magewirephp/magewire/commit/364f5d28bfefefcd12366ed17991d04652b9442a))
* Compiled views resource path including area and theme ([5d322d7](https://github.com/magewirephp/magewire/commit/5d322d73a9a6076592d8aea30a54695ef5223a1c))


#### Bug Fixes

* complies check continues, even if resolver was already found ([069be4f](https://github.com/magewirephp/magewire/commit/069be4fd89e1e9711ddbbdf20a3a519fab99a311))
* HTML fragment attribute render restored ([81c8e9d](https://github.com/magewirephp/magewire/commit/81c8e9dd7d8c0f86f31043e6b262c4896c343141))


#### Miscellaneous Chores

_(Changelog truncated for .md surface. Full history on https://packagento.com/magewirephp/magewire.)_

## Recent Versions

| Version | Released |
|---|---|
| 3.2.0 | 2026-06-14 |
| 3.1.0 | 2026-06-02 |
| 3.0.0 | 2026-04-25 |
| 1.13.3 | 2026-01-09 |
| 1.13.2 | 2025-11-10 |
| 3.0.0-beta.1 | 2025-09-08 |
| 1.13.1 | 2025-05-16 |
| 1.13.0 | 2025-04-30 |
| 1.12.1 | 2025-02-21 |
| 1.12.0 | 2025-02-20 |

Showing 10 of 53 versions. Full release history on https://packagento.com/magewirephp/magewire.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| illuminate/support | ^10.48 |
| magento/framework | * |
| magewirephp/validation | ^1.0 |
| php | >=8.2 |

### Require (dev)

| Package | Constraint |
|---|---|
| captainhook/captainhook | ^5.25 |
| captainhook/hook-installer | ^1.0 |
| magewirephp/portman | ^0.5.10 |
| ramsey/conventional-commits | ^1.6 |

## Quality

Latest release (3.2.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 2586 | 41 errors, 2545 warnings (ruleset: Magento2) — 759 auto-fixable with phpcbf |
| PHPMD | Warning | 14 | 14 rule violations (UnusedFormalParameter:7, UndefinedVariable:4, TooManyPublicMethods:2, EmptyCatchBlock:1) |
| Cpd | Warning | 54 | 54 duplicated chunks spanning 4051 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1339 | 1339 | – | – |
| 2.4.8 | – | 1339 | 1340 | – |
| 2.4.9 | – | – | 1340 | 1340 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["magewirephp/magewire"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

magewirephp is a Magento 2 vendor on Packagento. See https://packagento.com/magewirephp.md for their full catalogue.

