# inpvlsa/magento-clockwork

> Development tool for Magento 2 with timeline, database queries, cache, templates, and more. Built on Clockwork.

`composer require inpvlsa/magento-clockwork`

Canonical URL: https://packagento.com/inpvlsa/magento-clockwork

## At a glance

- **Vendor**: inpvlsa (https://packagento.com/inpvlsa.md)
- **Latest version**: 1.1.3 — released 2025-06-11
- **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/inpvlsa/magento-clockwork 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 inpvlsa/magento-clockwork:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Development tool for Magento 2 with timeline, database queries, cache, templates, and more. Built on Clockwork.

## README

[![PHP 7.4+](https://img.shields.io/badge/PHP-7.4%2B-blue.svg)](#)
[![Magento 2.4.3+](https://img.shields.io/badge/Magento-2.4.3%2B-orange.svg)](#)
[![License MIT](https://img.shields.io/badge/License-MIT-green.svg)](#)
![Packagist Version](https://img.shields.io/packagist/v/inpvlsa/magento-clockwork)
![Packagist Downloads](https://img.shields.io/packagist/dt/inpvlsa/magento-clockwork)

A powerful development tool that brings advanced debugging and profiling capabilities to Magento 2.

Track timeline events, database queries, cache operations, template rendering, and more - all through an intuitive interface built on [⚙️ Clockwork](https://github.com/itsgoingd/clockwork).

### 🚀 Key Features

- **Comprehensive Timeline**: View and filter all page events by type or text
- **Interactive Toolbar**: Quick access to debugging tools
- **Detailed Profiling**: Track a wide range of timeline events:
  - Routing processes
  - Layout rendering
  - Event dispatching
  - Observer execution
  - Collection loading
- **Database Monitoring**
  - SQL query inspection with syntax highlighting
  - Sort, search, and analyze database operations
- **Template Insights**: Track template rendering performance
- **Cache Inspection**: Monitor cache operations with identifiers, data, tags, and TTL
- **Request Analysis**: Examine Magento-specific and HTTP request data
- **Search Integration**: Track all OpenSearch/ElasticSearch queries and responses
- **AJAX Support**: Monitor all HTTP requests in the frontend area

### 📋 Requirements

- **PHP 7.4+**
- **Magento 2 (Community Edition)**

> - Tested on versions:
>    - 2.4.3 (PHP 7.4, with 3rd party extensions)
>    - 2.4.6 (PHP 8.1, Hyva, 3rd party extensions)
>    - 2.4.7 (PHP 8.3, clean installation)

> Note: Minimum tested Magento version is 2.4.3. Enterprise Edition compatibility not yet verified.

### 📦 Installation

```bash
## Recommended for development environments only
composer require inpvlsa/magento-clockwork --dev

## For dev/stage environments (see Authentication section)
composer require inpvlsa/magento-clockwork
```

> You are free now to install it to non-local instances (with no `--dev`), check the [Authentication](#-authentication) section. But I strongly recommend not adding packages to production environments and use `--dev` flag.

### ⚙️ Configuration

Enable the module and turn on Clockwork writing mode:

```bash
php bin/magento module:enable Inpvlsa_Clockwork
php bin/magento config:set dev/clockwork/enabled 1
```

#### Storage options

By default, data is stored in files. You can change the storage method:

- Via admin panel: Stores → Advanced → Developer → Clockwork
- Or using CLI:

```bash
php bin/magento config:set dev/clockwork/data_storage file|redis 
```

> ### Redis Configuration Note
> - Pre-set configuration of Redis storage requires Magento session storage to be configured for Redis
>   - The module retrieves Redis connection data from Magento deployment config if not a "custom" redis credential is set in module configuration tab
> - Check logs after switching to Redis - errors will cause fallback to file storage

For detailed Redis configuration, see <ins>[Redis Documentation](_doc/Redis.md)</ins>.

### 🔐 Authentication

Authentication is automatically configured for local development environments.

If you can't access the /clockwork URL, add your IP to the maintenance mode whitelist.

For detailed authentication options, see <ins>[Authentication Documentation](_doc/Authentication.md)</ins>.

### 🧩 Usage

1. Navigate to `/clockwork` from your Magento root URL
2. Explore timeline events grouped by type
3. Use text filters to search specific information
4. Utilize the button on the right of the search input for additional sorting options
5. Explore logs, database queries, cache operations, collections tab, enjoy!

### 📸 Feature Showcase

![Web1](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Web.png?raw=true)
![Web2](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Web2.png?raw=true)
![Collection](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Collection.png?raw=true)
![Db](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Db.png?raw=true)
![Cache](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Cache.png?raw=true)
![Events](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Events.png?raw=true)
![Request](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/Request.png?raw=true)
![OpenSearch](https://github.com/INPVLSA/magento-clockwork/blob/assets/repo_asset/OpenSearch.png?raw=true)

## Recent Versions

| Version | Released |
|---|---|
| 1.1.3 | 2025-06-11 |
| 1.1.2 | 2025-04-30 |
| 1.1.1 | 2025-03-28 |
| 1.1.0 | 2025-03-27 |
| 1.0.3 | 2025-03-25 |
| 1.0.2 | 2025-03-24 |
| 1.0.1 | 2025-03-23 |
| 1.0.0 | 2025-03-23 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| itsgoingd/clockwork | ^5.3 |
| magento/framework | ^101.0.0 \|\| ^102.0.0 \|\| ^103.0.0 |
| php | ^7.4\|\|^8.1\|\|^8.2\|\|^8.3\|\|^8.4 |

## Quality

Latest release (1.1.3) 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 | 78 | 2 errors, 76 warnings (ruleset: Magento2) — 6 auto-fixable with phpcbf |
| PHPMD | Warning | 13 | 13 rule violations (UnusedFormalParameter:12, EmptyCatchBlock:1) |
| Cpd | Pass | 0 |  |
| 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 | 6 | 6 | – | – |
| 2.4.8 | – | 6 | 6 | – |
| 2.4.9 | – | – | 6 | 6 |


### 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=["inpvlsa/magento-clockwork"],
  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

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

