# mage-os/mageos-common-async-events

> Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

`composer require mage-os/mageos-common-async-events`

Canonical URL: https://packagento.com/mage-os/mageos-common-async-events

## At a glance

- **Vendor**: mage-os (https://packagento.com/mage-os.md)
- **Latest version**: 0.6.1 — released 2026-03-04
- **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/mage-os/mageos-common-async-events 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 mage-os/mageos-common-async-events:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

## README

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

This module uses the [Mage-OS Asynchronous Events](https://github.com/mage-os/mageos-async-events/) module as a basis.

### Installation

```
composer require mage-os/mageos-common-async-events
```

If you run into an error like "Could not find a version of package mage-os/mageos-common-async-events matching your minimum-stability (stable).", run this command instead:
```
composer require mage-os/mageos-common-async-events @dev
```

Enable and install the module:
```
bin/magento setup:upgrade
```

### Usage

You can now use the following events without having to implement them yourself.

| Event identifier         | Description                                           | Remarks |
|--------------------------|-------------------------------------------------------|---------|
| customer.created         | Whenever a customer is created                        |         |
| customer.updated         | Whenever a customer is saved, except it's new         |         |
| customer.login           | Whenever a customer logs in successfully              |         |
| customer.address.created | Whenever a customer address is created                |         |
| customer.address.updated | Whenever a customer address is saved, except it's new |         |
| sales.order.created      | When a new order is created                           |         |
| sales.order.updated      | When the state of an existing order is changed        |         |
| sales.order.paid         | When an order is fully paid                           |         |
| sales.order.shipped      | When an order is fully shipped                        |         |
| sales.order.holded       | When an order is set "on hold"                        |         |
| sales.order.unholded     | When an order is released from "on hold"              |         |
| sales.order.cancelled    | When an order is cancelled                            |         |
| sales.shipment.created   | When a new shipment is created                        |         |
| sales.invoice.created    | When a new invoice is created                         |         |
| sales.invoice.paid       | When an invoice is paid                               |         |
| sales.creditmemo.created | When a new creditmemo is created                      |         |
| catalog.product.created  | When a new product is created                         |         |
| catalog.product.updated  | When a product is updated                             |         |
| cms.page.created         | When a CMS page has been created                      |         |
| cms.page.updated         | When a CMS page is updated                            |         |
| cms.block.created        | When a CMS block has been created                     |         |
| cms.block.updated        | When a CMS block is updated                           |         |

You can use these events by

* [creating a new subscription via Mage-OS REST API](https://github.com/mage-os/mageos-async-events/#create-subscription)
* [creating a new subscription with the Mage-OS Async Events Admin UI module](https://github.com/mage-os/mageos-async-events-admin-ui)


### 3rd Party Events

| Event identifier       | Description                                         | Module                                                                                                                           |
|------------------------|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| customer.login_failed  | Whenever a customer fails to log in                 | [`zero1/async-event-customer-login-failed`](https://github.com/zero1limited/magento2-module-async-event-customer-login-failed)   |
| customer.create_failed | Whenever a customer fails to sign up for an account | [`zero1/async-event-customer-create-failed`](https://github.com/zero1limited/magento2-module-async-event-customer-create-failed) |

## Recent Versions

| Version | Released |
|---|---|
| 0.6.1 | 2026-03-04 |
| 0.6.0 | 2026-02-25 |
| 0.5.2 | 2025-12-23 |
| 0.5.1 | 2025-04-12 |
| 0.5.0 | 2025-02-06 |
| 0.4.3 | 2024-12-09 |
| 0.4.2 | 2024-12-09 |
| 0.4.1 | 2024-11-29 |
| 0.4.0 | 2024-11-21 |
| 0.3.2 | 2024-09-18 |

Showing 10 of 15 versions. Full release history on https://packagento.com/mage-os/mageos-common-async-events.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| mage-os/mageos-async-events | * |
| magento/framework | * |
| php | >=8.1 |

### Require (dev)

| Package | Constraint |
|---|---|
| magento/magento-coding-standard | * |
| squizlabs/php_codesniffer | ~3.5 |

## Quality

Latest release (0.6.1) 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 | Warning | 8 | 8 warnings (ruleset: Magento2), 3 auto-fixable with phpcbf |
| PHPMD | Pass | 0 |  |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 2 | valid; 2 advisory notes (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 | 17 | 17 | – | – |
| 2.4.8 | – | 17 | 17 | – |
| 2.4.9 | – | – | 17 | 17 |


### 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=["mage-os/mageos-common-async-events"],
  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

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

