yireo / magento2-checkout-agreement-commands

yireo/magento2-checkout-agreement-commands

N/A

magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: Pass Security: Pass OSL-3.0
Viewing version 2.0.0. Latest version is 2.0.1. Switch to latest

Yireo_CheckoutAgreementCommands

Magento version
PHP version
License
Latest Version

This Magento 2 module adds CLI commands to manage checkout agreements

Installation

Install this package via composer:

composer require yireo/magento2-checkout-agreement-commands

Next, enable this module:

bin/magento module:enable Yireo_CheckoutAgreementCommands

Usage

List all agreements:

bin/magento checkout_agreement:list

Create an agreement:

bin/magento checkout_agreement:create --name="Terms" --content="Our terms" --checkbox_text="I agree"

Options of checkout_agreement:create:

  • --is_active: 1 (default) or 0
  • --is_html: 0 (default) or 1. HTML content and checkbox texts are rendered unescaped in the checkout, so only use trusted HTML
  • --mode: 1 (manual, default) or 0 (automatic)
  • --store_id: the store ID, 0 (all store views) by default

Breaking change after 1.0.0: --is_html defaults to 0 (it was 1), the options --is_active, --is_html and --mode require a value of 0 or 1, and agreements are created for all store views (instead of only the default store view).

Current status

Static Tests
Unit Tests
Integration Tests
Playwright
DI Compilation

Changelog

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

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[Unreleased]

[2.0.0] - 25 November 2026

Added

  • Support for PHP 8.5
  • New --store_id option for checkout_agreement:create (default 0, all store views)
  • checkout_agreement:create now prints the ID of the created agreement

Changed

  • BREAKING: checkout_agreement:create now defaults --is_html to 0 instead of 1 and creates agreements for all store views instead of only the default store view
  • checkout_agreement:create validates its input: is_active, is_html and mode must be 0 or 1, name and checkbox_text may be at most 255 characters, and save errors are shown as clean error messages
  • Module name corrected from Yireo_AgreementCommands to Yireo_CheckoutAgreementCommands (run bin/magento setup:upgrade after updating)

Removed

  • Support for PHP 8.1

Fixed

  • Terminal escape sequences and console formatter tags in agreement names could manipulate the checkout_agreement:list output
  • Missing dependencies on Magento_CheckoutAgreements, Magento_Store, symfony/console and ext-pcre

[1.0.0] - 10 November 2025

Fixed

  • Copy generic CI/CD files
  • Add CHANGELOG
  • Adding all files to git via Yireo Command
Versions
Version Stability QA Status Compatibility Released
2.0.1 stable Fail Magento 2.4.7-2.4.9 Details 2026-11-27 18:43:51
2.0.0 stable Fail Magento 2.4.7-2.4.9 Details 2026-11-25 18:47:26
1.0.0 stable Fail Not yet tested Details 2025-11-10 12:50:10

Requires 6

Package Constraint
ext-pcre *
magento/framework ^103.0
magento/module-checkout-agreements ^100.4
magento/module-store ^101.0
php >=8.2 <8.6
symfony/console ^5.0 | ^6.0 | ^7.0

Requires-dev 2

Package Constraint
phpunit/phpunit ^10.5
yireo/magento2-integration-test-helper ~0.0

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
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. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. 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.

Static analysis results
Tool Status Findings Summary
PHPCS Warning 4 4 warnings (ruleset: Magento2), 2 auto-fixable with phpcbf
PHPMD Warning 3 3 rule violations (CyclomaticComplexity:1, NPathComplexity:1, UnusedFormalParameter:1)
Cpd Pass 0
Composer validate Info 1 valid; 1 advisory note (composer validate --strict)

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Error Error
2.4.8 Pass Pass
2.4.9 Pass Pass

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
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

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 1 1
2.4.8 Pass Pass
2.4.9 Pass Pass

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0

More from yireo

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.