From 594865a7f0a70d21198b33c9f19842fb3aedd548 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 08:55:20 +0200 Subject: [PATCH 01/33] Update deps --- composer.json | 7 +- composer.lock | 287 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 279 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 972234a..a9b82ad 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,17 @@ "docs": "https://formcontrols.com/docs" }, "require-dev": { - "wp-coding-standards/wpcs": "^2.0" + "wp-coding-standards/wpcs": "^3.1" }, "scripts": { "lint": [ "phpcs", "composer validate" ] + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/composer.lock b/composer.lock index fccc20c..5ec4eb7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,253 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c098d42d10ebf7b4d294400bbc8187ff", + "content-hash": "dee2d278e65acd5ff7f1b54c977cbfb4", "packages": [], "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" + }, + "time": "2023-01-05T11:28:13+00:00" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" + } + ], + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2023-12-08T16:49:07+00:00" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.0.12", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c", + "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPCSUtils/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" + } + ], + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", + "keywords": [ + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "standards", + "static analysis", + "tokens", + "utility" + ], + "support": { + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-05-20T13:34:27+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.10.1", @@ -89,30 +333,38 @@ }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9333efcbff231f10dfd9c56bb7b65818b4733ca7", + "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.2.1", + "phpcsstandards/phpcsutils": "^1.0.10", + "squizlabs/php_codesniffer": "^3.9.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -129,6 +381,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -136,15 +389,21 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2020-05-13T23:57:56+00:00" + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2024-03-25T16:39:00+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], + "platform": {}, + "platform-dev": {}, "plugin-api-version": "2.6.0" } From f84d2930444072b1b380e92d3ae52e38aad194cf Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:04:22 +0200 Subject: [PATCH 02/33] Bump the tested --- readme.txt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt.md b/readme.txt.md index 150b649..e5f2c36 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -3,7 +3,7 @@ Contributors: kasparsd, buzztone Tags: Contact Form 7, cf7, forms, form, admin, backend, redirect, tracking, analytics, google analytics, facebook pixel, ga, simple, interface, dashboard, recaptcha Requires at least: 4.6 -Tested up to: 6.5 +Tested up to: 6.7 Stable tag: STABLETAG Simple controls, analytics, tracking and redirects for Contact Form 7. From 38d11347a0056b69c69bba32930e5831b40fad43 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:04:34 +0200 Subject: [PATCH 03/33] =?UTF-8?q?We=E2=80=99re=20PHP=205.6=20and=20can=20d?= =?UTF-8?q?o=20this=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.php b/plugin.php index 3327f0e..c04ea97 100644 --- a/plugin.php +++ b/plugin.php @@ -5,13 +5,13 @@ * Plugin URI: https://formcontrols.com * Author: Kaspars Dambis * Author URI: https://formcontrols.com - * Version: 0.8.1 + * Version: 0.8.2 * License: GPL2 * Text Domain: contact-form-7-extras */ -include_once dirname( __FILE__ ) . '/src/class-cf7-extras.php'; +include_once __DIR__ . '/src/class-cf7-extras.php'; $plugin = Cf7_Extras::instance(); -$plugin->set_plugin_dir( dirname( __FILE__ ) ); +$plugin->set_plugin_dir( __DIR__ ); $plugin->init(); From 104dd0eafcf63db01045de8b1b2fab08defa8117 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:28:31 +0200 Subject: [PATCH 04/33] Add deps locally for editor autocomplete --- composer.json | 25 +- composer.lock | 350 +++++++++++++++++- tools/local/.gitignore | 1 + .../wp-content/plugins/contact-form-7-extras | 1 + 4 files changed, 374 insertions(+), 3 deletions(-) create mode 100644 tools/local/.gitignore create mode 120000 tools/local/wp-content/plugins/contact-form-7-extras diff --git a/composer.json b/composer.json index a9b82ad..5c28a4c 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,21 @@ "source": "https://github.com/kasparsd/contact-form-7-extras", "docs": "https://formcontrols.com/docs" }, + "repositories": [ + { + "type": "composer", + "url": "https://wpackagist.org", + "only": [ + "wpackagist-plugin/*", + "wpackagist-theme/*" + ] + } + ], "require-dev": { - "wp-coding-standards/wpcs": "^3.1" + "wp-coding-standards/wpcs": "^3.1", + "roots/wordpress": "^6.7", + "wpackagist-plugin/contact-form-7": "^6.0", + "roots/wordpress-core-installer": "^1.100" }, "scripts": { "lint": [ @@ -26,7 +39,15 @@ }, "config": { "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true + "dealerdirect/phpcodesniffer-composer-installer": true, + "roots/wordpress-core-installer": true, + "composer/installers": true + } + }, + "extra": { + "wordpress-install-dir": "tools/local/wordpress", + "installer-paths": { + "tools/local/wp-content/plugins/{$name}/": [ "type:wordpress-plugin" ] } } } diff --git a/composer.lock b/composer.lock index 5ec4eb7..f47111e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,155 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dee2d278e65acd5ff7f1b54c977cbfb4", + "content-hash": "afc98916b558f524dc4e334d9f339309", "packages": [], "packages-dev": [ + { + "name": "composer/installers", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e", + "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "composer/composer": "^1.10.27 || ^2.7", + "composer/semver": "^1.7.2 || ^3.4.0", + "phpstan/phpstan": "^1.11", + "phpstan/phpstan-phpunit": "^1", + "symfony/phpunit-bridge": "^7.1.1", + "symfony/process": "^5 || ^6 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "2.x-dev" + }, + "plugin-modifies-install-path": true + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "concreteCMS", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "matomo", + "mediawiki", + "miaoxing", + "modulework", + "modx", + "moodle", + "osclass", + "pantheon", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "tastyigniter", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-06-24T20:46:46+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v1.0.0", @@ -251,6 +397,190 @@ ], "time": "2024-05-20T13:34:27+00:00" }, + { + "name": "roots/wordpress", + "version": "6.7.1", + "source": { + "type": "git", + "url": "https://github.com/roots/wordpress.git", + "reference": "9451af491af7124c12186398c56ab87a6e145123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roots/wordpress/zipball/9451af491af7124c12186398c56ab87a6e145123", + "reference": "9451af491af7124c12186398c56ab87a6e145123", + "shasum": "" + }, + "require": { + "roots/wordpress-core-installer": "^1.0.0", + "roots/wordpress-no-content": "self.version" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-2.0-or-later" + ], + "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", + "homepage": "https://wordpress.org/", + "keywords": [ + "blog", + "cms", + "wordpress" + ], + "support": { + "issues": "https://github.com/roots/wordpress/issues", + "source": "https://github.com/roots/wordpress/tree/6.7.1" + }, + "funding": [ + { + "url": "https://github.com/roots", + "type": "github" + } + ], + "time": "2024-11-13T09:56:09+00:00" + }, + { + "name": "roots/wordpress-core-installer", + "version": "1.100.0", + "source": { + "type": "git", + "url": "https://github.com/roots/wordpress-core-installer.git", + "reference": "73f8488e5178c5d54234b919f823a9095e2b1847" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roots/wordpress-core-installer/zipball/73f8488e5178c5d54234b919f823a9095e2b1847", + "reference": "73f8488e5178c5d54234b919f823a9095e2b1847", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.6.0" + }, + "conflict": { + "composer/installers": "<1.0.6" + }, + "replace": { + "johnpbloch/wordpress-core-installer": "*" + }, + "require-dev": { + "composer/composer": "^1.0 || ^2.0", + "phpunit/phpunit": ">=5.7.27" + }, + "type": "composer-plugin", + "extra": { + "class": "Roots\\Composer\\WordPressCorePlugin" + }, + "autoload": { + "psr-4": { + "Roots\\Composer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "John P. Bloch", + "email": "me@johnpbloch.com" + }, + { + "name": "Roots", + "email": "team@roots.io" + } + ], + "description": "A custom installer to handle deploying WordPress with composer", + "keywords": [ + "wordpress" + ], + "support": { + "issues": "https://github.com/roots/wordpress-core-installer/issues", + "source": "https://github.com/roots/wordpress-core-installer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/roots", + "type": "github" + }, + { + "url": "https://www.patreon.com/rootsdev", + "type": "patreon" + } + ], + "time": "2020-08-20T00:27:30+00:00" + }, + { + "name": "roots/wordpress-no-content", + "version": "6.7.1", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress.git", + "reference": "6.7.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/release/wordpress-6.7.1-no-content.zip", + "shasum": "321a5b819369e772ce606fbc12b1e264fb73da5b" + }, + "require": { + "php": ">= 7.2.24" + }, + "provide": { + "wordpress/core-implementation": "6.7.1" + }, + "suggest": { + "ext-curl": "Performs remote request operations.", + "ext-dom": "Used to validate Text Widget content and to automatically configuring IIS7+.", + "ext-exif": "Works with metadata stored in images.", + "ext-fileinfo": "Used to detect mimetype of file uploads.", + "ext-hash": "Used for hashing, including passwords and update packages.", + "ext-imagick": "Provides better image quality for media uploads.", + "ext-json": "Used for communications with other servers.", + "ext-libsodium": "Validates Signatures and provides securely random bytes.", + "ext-mbstring": "Used to properly handle UTF8 text.", + "ext-mysqli": "Connects to MySQL for database interactions.", + "ext-openssl": "Permits SSL-based connections to other hosts.", + "ext-pcre": "Increases performance of pattern matching in code searches.", + "ext-xml": "Used for XML parsing, such as from a third-party site.", + "ext-zip": "Used for decompressing Plugins, Themes, and WordPress update packages." + }, + "type": "wordpress-core", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "WordPress Community", + "homepage": "https://wordpress.org/about/" + } + ], + "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", + "homepage": "https://wordpress.org/", + "keywords": [ + "blog", + "cms", + "wordpress" + ], + "support": { + "docs": "https://developer.wordpress.org/", + "forum": "https://wordpress.org/support/", + "irc": "irc://irc.freenode.net/wordpress", + "issues": "https://core.trac.wordpress.org/", + "rss": "https://wordpress.org/news/feed/", + "source": "https://core.trac.wordpress.org/browser", + "wiki": "https://codex.wordpress.org/" + }, + "funding": [ + { + "url": "https://wordpressfoundation.org/donate/", + "type": "other" + } + ], + "time": "2024-11-21T14:15:19+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.10.1", @@ -396,6 +726,24 @@ } ], "time": "2024-03-25T16:39:00+00:00" + }, + { + "name": "wpackagist-plugin/contact-form-7", + "version": "6.0.1", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/contact-form-7/", + "reference": "tags/6.0.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/contact-form-7.6.0.1.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/contact-form-7/" } ], "aliases": [], diff --git a/tools/local/.gitignore b/tools/local/.gitignore new file mode 100644 index 0000000..73782ac --- /dev/null +++ b/tools/local/.gitignore @@ -0,0 +1 @@ +/wordpress/ diff --git a/tools/local/wp-content/plugins/contact-form-7-extras b/tools/local/wp-content/plugins/contact-form-7-extras new file mode 120000 index 0000000..c866b86 --- /dev/null +++ b/tools/local/wp-content/plugins/contact-form-7-extras @@ -0,0 +1 @@ +../../../.. \ No newline at end of file From 8318909e15255fe58c8d790880dfe806aade53f9 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:28:53 +0200 Subject: [PATCH 05/33] Ignore everything by default --- tools/local/wp-content/plugins/.gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tools/local/wp-content/plugins/.gitignore diff --git a/tools/local/wp-content/plugins/.gitignore b/tools/local/wp-content/plugins/.gitignore new file mode 100644 index 0000000..76d4447 --- /dev/null +++ b/tools/local/wp-content/plugins/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!/contact-form-7-extras From 4c0b089892921f8c32317852a5fc5a5d81de7ae3 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:29:03 +0200 Subject: [PATCH 06/33] Be specific about what we track --- readme.txt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt.md b/readme.txt.md index e5f2c36..1aeeef9 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -15,7 +15,7 @@ Simple controls, analytics, tracking and redirects for Contact Form 7. This is an addon for the [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) plugin with the following features: -- [Track form submissions, errors and completions](https://formcontrols.com/docs) with Google Analytics, Global Site Tag (gtag.js), Matomo (formerly Piwik) and Facebook Pixel. +- [Track form submissions, errors and completions](https://formcontrols.com/docs) with Google Analytics (GA4), Google Tag (gtag.js), Google Tag Manager (GTM), Matomo (formerly Piwik) and Facebook Pixel. - Redirect to URL on form submission - Disable AJAX form submissions - Disable default form CSS From 73536046888180ece93918e5314dae2fbafc610e Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:31:53 +0200 Subject: [PATCH 07/33] Add license --- readme.txt.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt.md b/readme.txt.md index 1aeeef9..f176e91 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -5,6 +5,7 @@ Tags: Contact Form 7, cf7, forms, form, admin, backend, redirect, tracking, anal Requires at least: 4.6 Tested up to: 6.7 Stable tag: STABLETAG +License: GPLv2 or later Simple controls, analytics, tracking and redirects for Contact Form 7. From 18a12d4bea10d0ef2a7407f3aec90ec36274722e Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:32:08 +0200 Subject: [PATCH 08/33] Reduce tag count to 5 to include the most important stuff --- readme.txt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt.md b/readme.txt.md index f176e91..df92628 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -1,7 +1,7 @@ # Controls for Contact Form 7 (Redirects, Analytics & Tracking) Contributors: kasparsd, buzztone -Tags: Contact Form 7, cf7, forms, form, admin, backend, redirect, tracking, analytics, google analytics, facebook pixel, ga, simple, interface, dashboard, recaptcha +Tags: Contact Form 7, gtm, matomo, google analytics, facebook pixel Requires at least: 4.6 Tested up to: 6.7 Stable tag: STABLETAG From dcb6b8659fd3f3e557ef6a487043077e43bae4d0 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:34:01 +0200 Subject: [PATCH 09/33] Link our own stuff --- .wp-env.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.wp-env.json b/.wp-env.json index 0873105..7758729 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,5 +1,6 @@ { - "plugins": [ - "." - ] + "core": "./tools/local/wordpress", + "mappings": { + "wp-content": "./tools/local/wp-content" + } } From b3ad1f0bd52f8bcc2f270f6b7f06d2c94ae9c232 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:36:54 +0200 Subject: [PATCH 10/33] Ignore things --- composer.json | 6 ++++-- composer.lock | 20 +++++++++++++++++++- tools/local/wp-content/.gitignore | 4 ++++ tools/local/wp-content/plugins/.gitignore | 3 --- 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 tools/local/wp-content/.gitignore delete mode 100644 tools/local/wp-content/plugins/.gitignore diff --git a/composer.json b/composer.json index 5c28a4c..0601d9b 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "wp-coding-standards/wpcs": "^3.1", "roots/wordpress": "^6.7", "wpackagist-plugin/contact-form-7": "^6.0", - "roots/wordpress-core-installer": "^1.100" + "roots/wordpress-core-installer": "^1.100", + "wpackagist-theme/twentytwentyfive": "^1.0" }, "scripts": { "lint": [ @@ -47,7 +48,8 @@ "extra": { "wordpress-install-dir": "tools/local/wordpress", "installer-paths": { - "tools/local/wp-content/plugins/{$name}/": [ "type:wordpress-plugin" ] + "tools/local/wp-content/plugins/{$name}/": [ "type:wordpress-plugin" ], + "tools/local/wp-content/themes/{$name}/": [ "type:wordpress-theme" ] } } } diff --git a/composer.lock b/composer.lock index f47111e..b845a35 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "afc98916b558f524dc4e334d9f339309", + "content-hash": "cb1300bb14b074c8967deaea38ad6a1e", "packages": [], "packages-dev": [ { @@ -744,6 +744,24 @@ }, "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/contact-form-7/" + }, + { + "name": "wpackagist-theme/twentytwentyfive", + "version": "1.0", + "source": { + "type": "svn", + "url": "https://themes.svn.wordpress.org/twentytwentyfive/", + "reference": "1.0" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/theme/twentytwentyfive.1.0.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-theme", + "homepage": "https://wordpress.org/themes/twentytwentyfive/" } ], "aliases": [], diff --git a/tools/local/wp-content/.gitignore b/tools/local/wp-content/.gitignore new file mode 100644 index 0000000..623a42b --- /dev/null +++ b/tools/local/wp-content/.gitignore @@ -0,0 +1,4 @@ +/uploads/ +/themes/ +/plugins/ +!/plugins/contact-form-7-extras diff --git a/tools/local/wp-content/plugins/.gitignore b/tools/local/wp-content/plugins/.gitignore deleted file mode 100644 index 76d4447..0000000 --- a/tools/local/wp-content/plugins/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!/contact-form-7-extras From 49a644e30b4a60396ce916855a1ac047d5ff082d Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:55:42 +0200 Subject: [PATCH 11/33] Let wp-env map it instead --- tools/local/wp-content/plugins/contact-form-7-extras | 1 - 1 file changed, 1 deletion(-) delete mode 120000 tools/local/wp-content/plugins/contact-form-7-extras diff --git a/tools/local/wp-content/plugins/contact-form-7-extras b/tools/local/wp-content/plugins/contact-form-7-extras deleted file mode 120000 index c866b86..0000000 --- a/tools/local/wp-content/plugins/contact-form-7-extras +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file From 11bd900a7fa78d2b4418a66cf0fb8f48e95fca21 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 09:58:49 +0200 Subject: [PATCH 12/33] Use an https example --- src/class-cf7-extras.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 1523e52..57eefa5 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -246,7 +246,7 @@ public function wpcf7_metabox( $cf7 ) {

%s

', esc_url( $settings['redirect-success'] ), - esc_attr( 'http://example.com' ), + esc_attr( 'https://example.com/thank-you' ), esc_html__( 'Enter the URL where users should be redirected after successful form submissions.', 'contact-form-7-extras' ) ), ), From ca4cdd3a4479bedebf5cadf5bd6bd6abaf26e4d4 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:07:16 +0200 Subject: [PATCH 13/33] Controls for consistency --- plugin.php | 2 +- readme.txt.md | 2 +- src/class-cf7-extras.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.php b/plugin.php index c04ea97..797e050 100644 --- a/plugin.php +++ b/plugin.php @@ -1,7 +1,7 @@ 🚀 PRO version for advanced analytics and tracking features. + * Description: Use the "Controls" tab of each form settings for advanced controls. Subscribe to the 🚀 PRO version for advanced analytics and tracking features. * Plugin URI: https://formcontrols.com * Author: Kaspars Dambis * Author URI: https://formcontrols.com diff --git a/readme.txt.md b/readme.txt.md index df92628..463103b 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -32,7 +32,7 @@ Please note that some settings work on the per-page level and will apply to all ### Usage -The plugin adds a new "Customize" tab for each Contact Form 7 form in the WordPress administration area. +The plugin adds a new "Controls" tab for each Contact Form 7 form in the WordPress administration area. ### Analytics Tracking diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 57eefa5..549420e 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -436,7 +436,7 @@ public function register_wpcf7_panel( $panels ) { } $panels['cf7-extras'] = array( - 'title' => __( 'Customize', 'contact-form-7-extras' ), + 'title' => __( 'Controls', 'contact-form-7-extras' ), 'callback' => array( $this, 'wpcf7_metabox' ), ); From f4bd1d8246245a8cb4bea54bd0815887e6a8c411 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:07:23 +0200 Subject: [PATCH 14/33] Link the plugin --- .wp-env.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.wp-env.json b/.wp-env.json index 7758729..b922e25 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -2,5 +2,8 @@ "core": "./tools/local/wordpress", "mappings": { "wp-content": "./tools/local/wp-content" - } + }, + "plugins": [ + "." + ] } From 494912e873bb7605f3ed18608efa466f19be3b2e Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:07:35 +0200 Subject: [PATCH 15/33] Be specific about the supported implementations --- readme.txt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt.md b/readme.txt.md index 463103b..33d7ed6 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -38,7 +38,7 @@ The plugin adds a new "Controls" tab for each Contact Form 7 form in the WordPre The plugin _automatically_ triggers analytics events for the following services: -- [Google Analytics](https://analytics.google.com/analytics/web/) and [Global Site Tag (gtag.js)](https://developers.google.com/gtagjs) with `ga()`, `_gaq.push()` and `dataLayer.push()` implementations, +- [Google Analytics (GA4)](https://support.google.com/analytics/topic/14088998) using [Google Tag Manager](https://support.google.com/tagmanager/answer/9442095) and [Global Tag (gtag.js)](https://developers.google.com/tag-platform/gtagjs) with `ga()`, `_gaq.push()` and `dataLayer.push()` implementations, - [Matomo](https://matomo.org/) (formerly Piwik), - [Facebook Pixel Conversion Tracking](https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking). From 871f42ec36e915b8f5c5da74e9f0cb843c241771 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:19:56 +0200 Subject: [PATCH 16/33] Better instructions --- readme.txt.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.txt.md b/readme.txt.md index 33d7ed6..b1cafe1 100644 --- a/readme.txt.md +++ b/readme.txt.md @@ -65,9 +65,13 @@ See the [release notes](https://github.com/kasparsd/contact-form-7-extras/releas ## Installation +### From your WordPress dashboard + Search for "Controls for Contact Form 7" under "Plugins" → "Add New" in your WordPress administration panel. -Alternatively, add it as [a Composer dependency](https://packagist.org/packages/kasparsd/contact-form-7-extras): +### Using Composer + +Add it as [a Composer dependency](https://packagist.org/packages/kasparsd/contact-form-7-extras): composer require kasparsd/contact-form-7-extras From 091747671a4d0ade0c05878cc37422bc9111b952 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:24:06 +0200 Subject: [PATCH 17/33] Use path mapping to ensure predictable directory name --- .wp-env.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.wp-env.json b/.wp-env.json index b922e25..cc432cc 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,9 +1,7 @@ { "core": "./tools/local/wordpress", "mappings": { - "wp-content": "./tools/local/wp-content" - }, - "plugins": [ - "." - ] + "wp-content": "./tools/local/wp-content", + "wp-content/plugins/contact-form-7-extras": "." + } } From e8b7b67f109c49197d43e4ddb520a69aab514f51 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:25:57 +0200 Subject: [PATCH 18/33] Fix #45 --- src/class-cf7-extras.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 549420e..a2b1f06 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -682,10 +682,15 @@ function maybe_reset_autop( $form ) { $disable_autop = $this->get_form_settings( $form_instance, 'disable-autop' ); if ( $disable_autop ) { - $manager = WPCF7_ShortcodeManager::get_instance(); - $form_meta = get_post_meta( $form_instance->id(), '_form', true ); - $form = $manager->do_shortcode( $form_meta ); + + if ( class_exists( 'WPCF7_FormTagsManager' ) ) { + $manager = WPCF7_FormTagsManager::get_instance(); + $form = $manager->replace_all( $form_meta ); + } else { + $manager = WPCF7_ShortcodeManager::get_instance(); + $form = $manager->do_shortcode( $form_meta ); + } $form_instance->set_properties( array( From 047174b41ca7ccb58e6aabaf255c65060da0a8e5 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:30:38 +0200 Subject: [PATCH 19/33] Per linter --- plugin.php | 2 +- src/class-cf7-extras.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.php b/plugin.php index 797e050..52f7a75 100644 --- a/plugin.php +++ b/plugin.php @@ -10,7 +10,7 @@ * Text Domain: contact-form-7-extras */ -include_once __DIR__ . '/src/class-cf7-extras.php'; +require_once __DIR__ . '/src/class-cf7-extras.php'; $plugin = Cf7_Extras::instance(); $plugin->set_plugin_dir( __DIR__ ); diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index a2b1f06..63ffc49 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -738,5 +738,4 @@ public function render_admin_errors() { Date: Mon, 16 Dec 2024 10:31:04 +0200 Subject: [PATCH 20/33] Support for linting --- composer.json | 6 +++++- composer.lock | 2 +- package.json | 3 +++ phpcs.xml | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0601d9b..8cbfeed 100644 --- a/composer.json +++ b/composer.json @@ -30,12 +30,16 @@ "roots/wordpress": "^6.7", "wpackagist-plugin/contact-form-7": "^6.0", "roots/wordpress-core-installer": "^1.100", - "wpackagist-theme/twentytwentyfive": "^1.0" + "wpackagist-theme/twentytwentyfive": "^1.0", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0" }, "scripts": { "lint": [ "phpcs", "composer validate" + ], + "format": [ + "phpcbf" ] }, "config": { diff --git a/composer.lock b/composer.lock index b845a35..10cb7ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cb1300bb14b074c8967deaea38ad6a1e", + "content-hash": "094c3fe0f521e25320bad6bb334aa609", "packages": [], "packages-dev": [ { diff --git a/package.json b/package.json index 6cb1290..b35aa39 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "lint": "npm-run-all lint:*", "lint:js": "eslint *.js assets", "lint:php": "composer lint", + "format": "npm-run-all format:*", + "format:js": "eslint --fix *.js assets", + "format:php": "composer format", "build": "grunt build", "deploy": "grunt deploy", "deploy-trunk": "grunt deploy:trunk", diff --git a/phpcs.xml b/phpcs.xml index 5c16011..8c5adc5 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,5 @@ - . @@ -16,5 +15,6 @@ /node_modules /vendor - /dist + /dist/ + /tools/ From e9d8e3d1d057cade6b2d073fab94de57be7af306 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:31:10 +0200 Subject: [PATCH 21/33] Ignore more for release --- .distignore | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.distignore b/.distignore index 0390226..45f5591 100644 --- a/.distignore +++ b/.distignore @@ -1,7 +1,9 @@ -/tests -/vendor -/node_modules -/assets/dotorg +/tests/ +/vendor/ +/node_modules/ +/tools/ +/tests/ +/assets/dotorg/ Gruntfile.js composer.json composer.lock From d4e9dce0b861377d52c82d9a33f3bc1e673c9331 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:33:30 +0200 Subject: [PATCH 22/33] Visibility per linter --- src/class-cf7-extras.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 63ffc49..e6b644c 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -144,7 +144,7 @@ public function asset_url( $asset_path_relative ) { * * @return void */ - function wpcf7_add_meta_boxes( $post_id ) { + public function wpcf7_add_meta_boxes( $post_id ) { add_meta_box( 'cf7s-subject', __( 'Extra Settings', 'contact-form-7-extras' ), @@ -373,7 +373,7 @@ public function wpcf7_metabox( $cf7 ) { * * @return void */ - function wpcf7_save_contact_form( $cf7 ) { + public function wpcf7_save_contact_form( $cf7 ) { if ( ! isset( $_POST ) || empty( $_POST ) || ! isset( $_POST['extra'] ) || ! is_array( $_POST['extra'] ) ) { return; } @@ -398,7 +398,7 @@ function wpcf7_save_contact_form( $cf7 ) { * * @return void */ - function admin_enqueue_scripts( $hook ) { + public function admin_enqueue_scripts( $hook ) { if ( false === strpos( $hook, 'wpcf7' ) ) { return; } @@ -535,7 +535,7 @@ public function get_form_settings( $form, $field = null, $fresh = false ) { * * @return void */ - function maybe_alter_scripts() { + public function maybe_alter_scripts() { // @todo use wp_scripts() in future global $wp_scripts; @@ -592,7 +592,7 @@ public function dequeue_styles() { * * @return void */ - function track_form_events() { + public function track_form_events() { if ( empty( $this->rendered ) ) { return; } @@ -651,7 +651,7 @@ function track_form_events() { * * @return void */ - function wpcf7_submit( $form, $result ) { + public function wpcf7_submit( $form, $result ) { // JS is already doing the redirect. if ( isset( $_POST['_wpcf7_is_ajax_call'] ) || ! isset( $result['status'] ) ) { return; @@ -677,7 +677,7 @@ function wpcf7_submit( $form, $result ) { * * @return WPCF7_ContactForm */ - function maybe_reset_autop( $form ) { + public function maybe_reset_autop( $form ) { $form_instance = WPCF7_ContactForm::get_current(); $disable_autop = $this->get_form_settings( $form_instance, 'disable-autop' ); From 05ceb27daf09015c9f1e2b51d410039528a6f60c Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 10:45:03 +0200 Subject: [PATCH 23/33] Allow local overrides --- .gitignore | 4 ++++ phpcs.xml => phpcs.xml.dist | 0 2 files changed, 4 insertions(+) rename phpcs.xml => phpcs.xml.dist (100%) diff --git a/.gitignore b/.gitignore index 663888c..5532a55 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ /node_modules /vendor .DS_Store + +# Local overrides. +/phpcs.xml +/phpunit.xml diff --git a/phpcs.xml b/phpcs.xml.dist similarity index 100% rename from phpcs.xml rename to phpcs.xml.dist From 5c68ebaaaec878be46aa75d9b12be8d9e43e610d Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 11:23:06 +0200 Subject: [PATCH 24/33] Add phpunit support --- .gitignore | 1 + composer.json | 7 +- composer.lock | 2094 +++++++++++++++++++++++++-- package.json | 2 + phpunit.xml.dist | 14 + tests/bootstrap-phpunit.php | 28 + tests/phpunit/class-plugin-test.php | 7 + 7 files changed, 2031 insertions(+), 122 deletions(-) create mode 100644 phpunit.xml.dist create mode 100644 tests/bootstrap-phpunit.php create mode 100644 tests/phpunit/class-plugin-test.php diff --git a/.gitignore b/.gitignore index 5532a55..9e05934 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /node_modules /vendor .DS_Store +.phpunit.result.cache # Local overrides. /phpcs.xml diff --git a/composer.json b/composer.json index 8cbfeed..3440721 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,9 @@ "wpackagist-plugin/contact-form-7": "^6.0", "roots/wordpress-core-installer": "^1.100", "wpackagist-theme/twentytwentyfive": "^1.0", - "dealerdirect/phpcodesniffer-composer-installer": "^1.0" + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "wp-phpunit/wp-phpunit": "^6.7", + "yoast/phpunit-polyfills": "^3.0" }, "scripts": { "lint": [ @@ -40,6 +42,9 @@ ], "format": [ "phpcbf" + ], + "test": [ + "phpunit" ] }, "config": { diff --git a/composer.lock b/composer.lock index 10cb7ea..29930c0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "094c3fe0f521e25320bad6bb334aa609", + "content-hash": "a43eeea0f49e41673266a2567494cb23", "packages": [], "packages-dev": [ { @@ -231,6 +231,312 @@ }, "time": "2023-01-05T11:28:13+00:00" }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-11-08T17:47:46+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.3.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1" + }, + "time": "2024-10-08T18:51:32+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, { "name": "phpcsstandards/phpcsextra", "version": "1.2.1", @@ -376,210 +682,1595 @@ "utility" ], "support": { - "docs": "https://phpcsutils.com/", - "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", - "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", - "source": "https://github.com/PHPCSStandards/PHPCSUtils" + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-05-20T13:34:27+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.22", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.5.0 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.12.1", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.32", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.4", + "phpunit/php-timer": "^5.0.3", + "sebastian/cli-parser": "^1.0.2", + "sebastian/code-unit": "^1.0.8", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.6", + "sebastian/environment": "^5.1.5", + "sebastian/exporter": "^4.0.6", + "sebastian/global-state": "^5.0.7", + "sebastian/object-enumerator": "^4.0.4", + "sebastian/resource-operations": "^3.0.4", + "sebastian/type": "^3.2.1", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-12-05T13:48:26+00:00" + }, + { + "name": "roots/wordpress", + "version": "6.7.1", + "source": { + "type": "git", + "url": "https://github.com/roots/wordpress.git", + "reference": "9451af491af7124c12186398c56ab87a6e145123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roots/wordpress/zipball/9451af491af7124c12186398c56ab87a6e145123", + "reference": "9451af491af7124c12186398c56ab87a6e145123", + "shasum": "" + }, + "require": { + "roots/wordpress-core-installer": "^1.0.0", + "roots/wordpress-no-content": "self.version" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-2.0-or-later" + ], + "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", + "homepage": "https://wordpress.org/", + "keywords": [ + "blog", + "cms", + "wordpress" + ], + "support": { + "issues": "https://github.com/roots/wordpress/issues", + "source": "https://github.com/roots/wordpress/tree/6.7.1" + }, + "funding": [ + { + "url": "https://github.com/roots", + "type": "github" + } + ], + "time": "2024-11-13T09:56:09+00:00" + }, + { + "name": "roots/wordpress-core-installer", + "version": "1.100.0", + "source": { + "type": "git", + "url": "https://github.com/roots/wordpress-core-installer.git", + "reference": "73f8488e5178c5d54234b919f823a9095e2b1847" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roots/wordpress-core-installer/zipball/73f8488e5178c5d54234b919f823a9095e2b1847", + "reference": "73f8488e5178c5d54234b919f823a9095e2b1847", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.6.0" + }, + "conflict": { + "composer/installers": "<1.0.6" + }, + "replace": { + "johnpbloch/wordpress-core-installer": "*" + }, + "require-dev": { + "composer/composer": "^1.0 || ^2.0", + "phpunit/phpunit": ">=5.7.27" + }, + "type": "composer-plugin", + "extra": { + "class": "Roots\\Composer\\WordPressCorePlugin" + }, + "autoload": { + "psr-4": { + "Roots\\Composer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "John P. Bloch", + "email": "me@johnpbloch.com" + }, + { + "name": "Roots", + "email": "team@roots.io" + } + ], + "description": "A custom installer to handle deploying WordPress with composer", + "keywords": [ + "wordpress" + ], + "support": { + "issues": "https://github.com/roots/wordpress-core-installer/issues", + "source": "https://github.com/roots/wordpress-core-installer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/roots", + "type": "github" + }, + { + "url": "https://www.patreon.com/rootsdev", + "type": "patreon" + } + ], + "time": "2020-08-20T00:27:30+00:00" + }, + { + "name": "roots/wordpress-no-content", + "version": "6.7.1", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress.git", + "reference": "6.7.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/release/wordpress-6.7.1-no-content.zip", + "shasum": "321a5b819369e772ce606fbc12b1e264fb73da5b" + }, + "require": { + "php": ">= 7.2.24" + }, + "provide": { + "wordpress/core-implementation": "6.7.1" + }, + "suggest": { + "ext-curl": "Performs remote request operations.", + "ext-dom": "Used to validate Text Widget content and to automatically configuring IIS7+.", + "ext-exif": "Works with metadata stored in images.", + "ext-fileinfo": "Used to detect mimetype of file uploads.", + "ext-hash": "Used for hashing, including passwords and update packages.", + "ext-imagick": "Provides better image quality for media uploads.", + "ext-json": "Used for communications with other servers.", + "ext-libsodium": "Validates Signatures and provides securely random bytes.", + "ext-mbstring": "Used to properly handle UTF8 text.", + "ext-mysqli": "Connects to MySQL for database interactions.", + "ext-openssl": "Permits SSL-based connections to other hosts.", + "ext-pcre": "Increases performance of pattern matching in code searches.", + "ext-xml": "Used for XML parsing, such as from a third-party site.", + "ext-zip": "Used for decompressing Plugins, Themes, and WordPress update packages." + }, + "type": "wordpress-core", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "WordPress Community", + "homepage": "https://wordpress.org/about/" + } + ], + "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", + "homepage": "https://wordpress.org/", + "keywords": [ + "blog", + "cms", + "wordpress" + ], + "support": { + "docs": "https://developer.wordpress.org/", + "forum": "https://wordpress.org/support/", + "irc": "irc://irc.freenode.net/wordpress", + "issues": "https://core.trac.wordpress.org/", + "rss": "https://wordpress.org/news/feed/", + "source": "https://core.trac.wordpress.org/browser", + "wiki": "https://codex.wordpress.org/" + }, + "funding": [ + { + "url": "https://wordpressfoundation.org/donate/", + "type": "other" + } + ], + "time": "2024-11-21T14:15:19+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:27:43+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:19:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:33:00+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:35:11+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-22T06:20:34+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { - "url": "https://github.com/PHPCSStandards", - "type": "github" - }, - { - "url": "https://github.com/jrfnl", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://opencollective.com/php_codesniffer", - "type": "open_collective" } ], - "time": "2024-05-20T13:34:27+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { - "name": "roots/wordpress", - "version": "6.7.1", + "name": "sebastian/resource-operations", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/roots/wordpress.git", - "reference": "9451af491af7124c12186398c56ab87a6e145123" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/wordpress/zipball/9451af491af7124c12186398c56ab87a6e145123", - "reference": "9451af491af7124c12186398c56ab87a6e145123", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "roots/wordpress-core-installer": "^1.0.0", - "roots/wordpress-no-content": "self.version" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] }, - "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT", - "GPL-2.0-or-later" + "BSD-3-Clause" ], - "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", - "homepage": "https://wordpress.org/", - "keywords": [ - "blog", - "cms", - "wordpress" + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/roots/wordpress/issues", - "source": "https://github.com/roots/wordpress/tree/6.7.1" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { - "url": "https://github.com/roots", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2024-11-13T09:56:09+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "roots/wordpress-core-installer", - "version": "1.100.0", + "name": "sebastian/type", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/roots/wordpress-core-installer.git", - "reference": "73f8488e5178c5d54234b919f823a9095e2b1847" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/wordpress-core-installer/zipball/73f8488e5178c5d54234b919f823a9095e2b1847", - "reference": "73f8488e5178c5d54234b919f823a9095e2b1847", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.6.0" - }, - "conflict": { - "composer/installers": "<1.0.6" - }, - "replace": { - "johnpbloch/wordpress-core-installer": "*" + "php": ">=7.3" }, "require-dev": { - "composer/composer": "^1.0 || ^2.0", - "phpunit/phpunit": ">=5.7.27" + "phpunit/phpunit": "^9.5" }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "Roots\\Composer\\WordPressCorePlugin" + "branch-alias": { + "dev-master": "3.2-dev" + } }, "autoload": { - "psr-4": { - "Roots\\Composer\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0-or-later" + "BSD-3-Clause" ], "authors": [ { - "name": "John P. Bloch", - "email": "me@johnpbloch.com" - }, - { - "name": "Roots", - "email": "team@roots.io" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A custom installer to handle deploying WordPress with composer", - "keywords": [ - "wordpress" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/roots/wordpress-core-installer/issues", - "source": "https://github.com/roots/wordpress-core-installer/tree/master" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { - "url": "https://github.com/roots", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://www.patreon.com/rootsdev", - "type": "patreon" } ], - "time": "2020-08-20T00:27:30+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { - "name": "roots/wordpress-no-content", - "version": "6.7.1", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/WordPress/WordPress.git", - "reference": "6.7.1" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://downloads.wordpress.org/release/wordpress-6.7.1-no-content.zip", - "shasum": "321a5b819369e772ce606fbc12b1e264fb73da5b" + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" }, "require": { - "php": ">= 7.2.24" + "php": ">=7.3" }, - "provide": { - "wordpress/core-implementation": "6.7.1" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } }, - "suggest": { - "ext-curl": "Performs remote request operations.", - "ext-dom": "Used to validate Text Widget content and to automatically configuring IIS7+.", - "ext-exif": "Works with metadata stored in images.", - "ext-fileinfo": "Used to detect mimetype of file uploads.", - "ext-hash": "Used for hashing, including passwords and update packages.", - "ext-imagick": "Provides better image quality for media uploads.", - "ext-json": "Used for communications with other servers.", - "ext-libsodium": "Validates Signatures and provides securely random bytes.", - "ext-mbstring": "Used to properly handle UTF8 text.", - "ext-mysqli": "Connects to MySQL for database interactions.", - "ext-openssl": "Permits SSL-based connections to other hosts.", - "ext-pcre": "Increases performance of pattern matching in code searches.", - "ext-xml": "Used for XML parsing, such as from a third-party site.", - "ext-zip": "Used for decompressing Plugins, Themes, and WordPress update packages." + "autoload": { + "classmap": [ + "src/" + ] }, - "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0-or-later" + "BSD-3-Clause" ], "authors": [ { - "name": "WordPress Community", - "homepage": "https://wordpress.org/about/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "WordPress is open source software you can use to create a beautiful website, blog, or app.", - "homepage": "https://wordpress.org/", - "keywords": [ - "blog", - "cms", - "wordpress" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "docs": "https://developer.wordpress.org/", - "forum": "https://wordpress.org/support/", - "irc": "irc://irc.freenode.net/wordpress", - "issues": "https://core.trac.wordpress.org/", - "rss": "https://wordpress.org/news/feed/", - "source": "https://core.trac.wordpress.org/browser", - "wiki": "https://codex.wordpress.org/" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { - "url": "https://wordpressfoundation.org/donate/", - "type": "other" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "time": "2024-11-21T14:15:19+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -661,6 +2352,56 @@ ], "time": "2024-05-22T21:24:41+00:00" }, + { + "name": "theseer/tokenizer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:36:25+00:00" + }, { "name": "wp-coding-standards/wpcs", "version": "3.1.0", @@ -727,6 +2468,54 @@ ], "time": "2024-03-25T16:39:00+00:00" }, + { + "name": "wp-phpunit/wp-phpunit", + "version": "6.7.1", + "source": { + "type": "git", + "url": "https://github.com/wp-phpunit/wp-phpunit.git", + "reference": "e63eb1c0980839853c569d3f04ff70263b7795e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/e63eb1c0980839853c569d3f04ff70263b7795e3", + "reference": "e63eb1c0980839853c569d3f04ff70263b7795e3", + "shasum": "" + }, + "type": "library", + "autoload": { + "files": [ + "__loaded.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Evan Mattson", + "email": "me@aaemnnost.tv" + }, + { + "name": "WordPress Community", + "homepage": "https://wordpress.org/about/" + } + ], + "description": "WordPress core PHPUnit library", + "homepage": "https://github.com/wp-phpunit", + "keywords": [ + "phpunit", + "test", + "wordpress" + ], + "support": { + "docs": "https://github.com/wp-phpunit/docs", + "issues": "https://github.com/wp-phpunit/issues", + "source": "https://github.com/wp-phpunit/wp-phpunit" + }, + "time": "2024-11-22T01:27:46+00:00" + }, { "name": "wpackagist-plugin/contact-form-7", "version": "6.0.1", @@ -762,6 +2551,69 @@ }, "type": "wordpress-theme", "homepage": "https://wordpress.org/themes/twentytwentyfive/" + }, + { + "name": "yoast/phpunit-polyfills", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", + "reference": "19e6d5fb8aad31f731f774f9646a10c64a8843d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/19e6d5fb8aad31f731f774f9646a10c64a8843d2", + "reference": "19e6d5fb8aad31f731f774f9646a10c64a8843d2", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "phpunit/phpunit": "^6.4.4 || ^7.0 || ^8.0 || ^9.0 || ^11.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "yoast/yoastcs": "^3.1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "files": [ + "phpunitpolyfills-autoload.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Team Yoast", + "email": "support@yoast.com", + "homepage": "https://yoast.com" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Yoast/PHPUnit-Polyfills/graphs/contributors" + } + ], + "description": "Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests", + "homepage": "https://github.com/Yoast/PHPUnit-Polyfills", + "keywords": [ + "phpunit", + "polyfill", + "testing" + ], + "support": { + "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues", + "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy", + "source": "https://github.com/Yoast/PHPUnit-Polyfills" + }, + "time": "2024-09-07T00:24:25+00:00" } ], "aliases": [], diff --git a/package.json b/package.json index b35aa39..3ed9c9f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "format": "npm-run-all format:*", "format:js": "eslint --fix *.js assets", "format:php": "composer format", + "test": "npm-run-all test:*", + "test:php": "wp-env run tests-cli --env-cwd=wp-content/plugins/contact-form-7-extras composer test", "build": "grunt build", "deploy": "grunt deploy", "deploy-trunk": "grunt deploy:trunk", diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..2db95a1 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,14 @@ + + + + ./tests/phpunit + + + diff --git a/tests/bootstrap-phpunit.php b/tests/bootstrap-phpunit.php new file mode 100644 index 0000000..a3057ac --- /dev/null +++ b/tests/bootstrap-phpunit.php @@ -0,0 +1,28 @@ +assertTrue( class_exists( 'Cf7_Extras' ) ); + } +} From 90f6c2a550957a23911fca715967750747bc193e Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 11:23:13 +0200 Subject: [PATCH 25/33] Enable xdebug --- .vscode/launch.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..bcdf7f8 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "XDebug", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/var/www/html/wp-content/plugins/contact-form-7-extras": "${workspaceFolder}", + "/var/www/html/wp-content": "${workspaceFolder}/tools/local/wp-content", + "/var/www/html": "${workspaceFolder}/tools/local/wordpress" + } + } + ] +} From 5387bc9afd0f3bbfcaccb95ac8afab05531327b0 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 11:27:05 +0200 Subject: [PATCH 26/33] Activate the plugins --- tests/bootstrap-phpunit.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bootstrap-phpunit.php b/tests/bootstrap-phpunit.php index a3057ac..523f230 100644 --- a/tests/bootstrap-phpunit.php +++ b/tests/bootstrap-phpunit.php @@ -21,6 +21,15 @@ putenv( sprintf( 'WP_PHPUNIT__TESTS_CONFIG=%s/wp-tests-config.php', $wp_env_tests_dir ) ); } +global $wp_tests_options; // WP testing library uses this to define option values. + +$wp_tests_options = [ + 'active_plugins' => [ + 'contact-form-7-extras/plugin.php', + 'contact-form-7/wp-contact-form-7.php', + ], +]; + // Include all helper functions. require_once $wp_tests_dir . '/includes/functions.php'; From 42a9429ac04fb481f3310190ac7998a34409c62a Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 11:28:50 +0200 Subject: [PATCH 27/33] Describe the test --- tests/phpunit/class-plugin-test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/class-plugin-test.php b/tests/phpunit/class-plugin-test.php index cb615e7..2dc65fb 100644 --- a/tests/phpunit/class-plugin-test.php +++ b/tests/phpunit/class-plugin-test.php @@ -1,7 +1,7 @@ assertTrue( class_exists( 'Cf7_Extras' ) ); + public function test_plugin_active() { + $this->assertTrue( class_exists( 'Cf7_Extras' ), 'Plugin is active' ); } } From 6992835f54934af344a96ee115d8725e042d4de1 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:15:55 +0200 Subject: [PATCH 28/33] Match the name --- src/class-cf7-extras.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index e6b644c..040a941 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -67,7 +67,7 @@ public function init() { if ( empty( $this->plugin_dir ) ) { $this->set_error( - __( 'Failed to load the Contact Form 7 Controls plugin because the plugin directory was not set.', 'contact-form-7-extras' ) + __( 'Failed to load the Controls for Contact Form 7 plugin because the plugin directory was not set.', 'contact-form-7-extras' ) ); return false; From 2a1098503d5892e43ec93cc7f49501e18c5b5029 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:23:30 +0200 Subject: [PATCH 29/33] Describe how we work --- src/class-cf7-extras.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 040a941..9e6ec75 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -671,7 +671,8 @@ public function wpcf7_submit( $form, $result ) { } /** - * Maybe disable WP core autop() on form email contents. + * Maybe disable WP core autop() on form email contents + * by re-parsing the form content without the autop. * * @param WPCF7_ContactForm $form Current CF7 form. * From 699e8145919923f45a5731090ff43e18d18d52aa Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:24:04 +0200 Subject: [PATCH 30/33] Describe what exactly --- src/class-cf7-extras.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-cf7-extras.php b/src/class-cf7-extras.php index 9e6ec75..7324bdc 100644 --- a/src/class-cf7-extras.php +++ b/src/class-cf7-extras.php @@ -205,7 +205,7 @@ public function wpcf7_metabox( $cf7 ) {

%s

', checked( $settings['disable-autop'], true, false ), - esc_html__( 'Disable automatic paragraph formatting', 'contact-form-7-extras' ), + esc_html__( 'Disable automatic paragraph formatting in form output', 'contact-form-7-extras' ), __( 'Same as define( \'WPCF7_AUTOP\', false );.', 'contact-form-7-extras' ) ), ), From 837472e12f66274368173536f240815b170a20e9 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:27:38 +0200 Subject: [PATCH 31/33] Ignore query monitor db capture --- tools/local/wp-content/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/local/wp-content/.gitignore b/tools/local/wp-content/.gitignore index 623a42b..3fa66c1 100644 --- a/tools/local/wp-content/.gitignore +++ b/tools/local/wp-content/.gitignore @@ -2,3 +2,7 @@ /themes/ /plugins/ !/plugins/contact-form-7-extras + +# Ignore various helpers added by plugins. +/db.php +/object-cache.php From 73f048e99f6d9022fb7e4d318b11878b35eaf22d Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:27:47 +0200 Subject: [PATCH 32/33] Add query monitor and mail capture --- composer.json | 4 +++- composer.lock | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3440721..3d719e9 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,9 @@ "wpackagist-theme/twentytwentyfive": "^1.0", "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "wp-phpunit/wp-phpunit": "^6.7", - "yoast/phpunit-polyfills": "^3.0" + "yoast/phpunit-polyfills": "^3.0", + "wpackagist-plugin/query-monitor": "^3.17", + "wpackagist-plugin/wp-mail-debugger": "^1.1" }, "scripts": { "lint": [ diff --git a/composer.lock b/composer.lock index 29930c0..fe95434 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a43eeea0f49e41673266a2567494cb23", + "content-hash": "678bea4f820866aa14095865fbe38ee2", "packages": [], "packages-dev": [ { @@ -2534,6 +2534,42 @@ "type": "wordpress-plugin", "homepage": "https://wordpress.org/plugins/contact-form-7/" }, + { + "name": "wpackagist-plugin/query-monitor", + "version": "3.17.0", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/query-monitor/", + "reference": "tags/3.17.0" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/query-monitor.3.17.0.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/query-monitor/" + }, + { + "name": "wpackagist-plugin/wp-mail-debugger", + "version": "1.1", + "source": { + "type": "svn", + "url": "https://plugins.svn.wordpress.org/wp-mail-debugger/", + "reference": "tags/1.1" + }, + "dist": { + "type": "zip", + "url": "https://downloads.wordpress.org/plugin/wp-mail-debugger.1.1.zip" + }, + "require": { + "composer/installers": "^1.0 || ^2.0" + }, + "type": "wordpress-plugin", + "homepage": "https://wordpress.org/plugins/wp-mail-debugger/" + }, { "name": "wpackagist-theme/twentytwentyfive", "version": "1.0", From a8fe8fea1b974cbd9c7bee34627664faf85e0cfd Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Mon, 16 Dec 2024 12:35:42 +0200 Subject: [PATCH 33/33] Per linter --- tests/bootstrap-phpunit.php | 8 ++++---- tests/phpunit/class-plugin-test.php | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/bootstrap-phpunit.php b/tests/bootstrap-phpunit.php index 523f230..686b036 100644 --- a/tests/bootstrap-phpunit.php +++ b/tests/bootstrap-phpunit.php @@ -23,12 +23,12 @@ global $wp_tests_options; // WP testing library uses this to define option values. -$wp_tests_options = [ - 'active_plugins' => [ +$wp_tests_options = array( + 'active_plugins' => array( 'contact-form-7-extras/plugin.php', 'contact-form-7/wp-contact-form-7.php', - ], -]; + ), +); // Include all helper functions. require_once $wp_tests_dir . '/includes/functions.php'; diff --git a/tests/phpunit/class-plugin-test.php b/tests/phpunit/class-plugin-test.php index 2dc65fb..121d55c 100644 --- a/tests/phpunit/class-plugin-test.php +++ b/tests/phpunit/class-plugin-test.php @@ -1,7 +1,14 @@ assertTrue( class_exists( 'Cf7_Extras' ), 'Plugin is active' ); } }