yireo / magento2-checkout-agreement-commands
N/A
Yireo_CheckoutAgreementCommands
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) or0--is_html:0(default) or1. HTML content and checkbox texts are rendered unescaped in the checkout, so only use trusted HTML--mode:1(manual, default) or0(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
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.1] - 27 November 2026
Changed
- The
configure()method of the console commandscheckout_agreement:createandcheckout_agreement:listnow declares avoidreturn type, matching the Symfony Console signature
[2.0.0] - 25 November 2026
Added
- Support for PHP 8.5
- New
--store_idoption forcheckout_agreement:create(default0, all store views) checkout_agreement:createnow prints the ID of the created agreement
Changed
- BREAKING:
checkout_agreement:createnow defaults--is_htmlto0instead of1and creates agreements for all store views instead of only the default store view checkout_agreement:createvalidates its input:is_active,is_htmlandmodemust be 0 or 1,nameandcheckbox_textmay be at most 255 characters, and save errors are shown as clean error messages- Module name corrected from
Yireo_AgreementCommandstoYireo_CheckoutAgreementCommands(runbin/magento setup:upgradeafter updating)
Removed
- Support for PHP 8.1
Fixed
- Terminal escape sequences and console formatter tags in agreement names could manipulate the
checkout_agreement:listoutput - 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
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.
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.
| 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.
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
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.
More from yireo
View vendorReplace bundled third party packages from Magento
N/A
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.