From ef9bff1c8ed6b5a54d563f52aeab73f23bf5350d Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Wed, 22 Oct 2025 16:34:44 +0100 Subject: [PATCH 1/9] New: copy config from plugin template --- .editorconfig | 6 +- .eslintignore | 3 + .eslintrc.json | 3 + .gitattributes | 27 + .gitignore | 56 +- .nvmrc | 1 + .prettierignore | 3 + .prettierrc | 1 + .stylelintignore | 3 + .stylelintrc.json | 3 + composer.json | 5 +- composer.lock | 2034 +++++++++++++++++++++++++++++++++++ lefthook.yml | 42 + package.json | 33 + phpcs.xml => phpcs.xml.dist | 8 +- postcss.config.js | 5 + 16 files changed, 2218 insertions(+), 15 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 .gitattributes create mode 100644 .nvmrc create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .stylelintignore create mode 100644 .stylelintrc.json create mode 100644 composer.lock create mode 100644 lefthook.yml create mode 100644 package.json rename phpcs.xml => phpcs.xml.dist (73%) create mode 100644 postcss.config.js diff --git a/.editorconfig b/.editorconfig index 79207a4..b5df0fc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,11 +12,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab -indent_size = 4 -[{.jshintrc,*.json,*.yml}] +[*.{yml,yaml}] indent_style = space indent_size = 2 - -[{*.txt,wp-config-sample.php}] -end_of_line = crlf diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..51d107a --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +build +vendor +node_modules diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..02fb747 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["@eighteen73/eslint-config-wordpress"] +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d3fd5c2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,27 @@ +# Directories +/.git export-ignore +/.github export-ignore +/.husky export-ignore +/.vscode export-ignore +/node_modules export-ignore +/src export-ignore +/tests export-ignore + +# Files +/.* export-ignore +/CHANGELOG.md export-ignore +/CODE_OF_CONDUCT.md export-ignore +/composer.json export-ignore +/composer.lock export-ignore +/CONTRIBUTING.md export-ignore +/CREDITS.md export-ignore +/DEVELOPERS.md export-ignore +/lefthook.yml export-ignore +/LICENSE.md export-ignore +/package-lock.json export-ignore +/package.json export-ignore +/phpcs.xml.dist export-ignore +/postcss.config.js export-ignore +/README.md export-ignore +/tsconfig.json export-ignore +/webpack.config.js export-ignore diff --git a/.gitignore b/.gitignore index 09bb803..f3919bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,53 @@ -# Composer -vendor/ -# Lock files -composer.lock +# Operating System files +.DS_Store +Thumbs.db -# Local files +# IDE files .idea -.DS_Store +.vscode/* + +# Sass +.sass-cache/ + +# Logs +logs/ + +# Environment files +wp-cli.local.yml +yarn-error.log +npm-debug.log +.pnpm-debug.log + +# Build files +*.sql +*.swp +*.zip + +# Built packages +build/ +build-module/ +build-style/ +build-types/ +dist/ + +# Project files +node_modules/ +vendor/ + +# TypeScript files +tsconfig.tsbuildinfo + +# Node Package Dependencies +package-lock.json + +# wp-env config +.wp-env.override.json + +# Unit tests +tmp/ + +# Composer +vendor/ +bin/composer/**/vendor/ +lib/vendor/ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..51d107a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +build +vendor +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2353765 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +"@wordpress/prettier-config" diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 0000000..51d107a --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,3 @@ +build +vendor +node_modules diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..a9573ad --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "@eighteen73/stylelint-config-wordpress" +} diff --git a/composer.json b/composer.json index 638b1b4..f4e33b1 100644 --- a/composer.json +++ b/composer.json @@ -34,9 +34,8 @@ } }, "scripts": { - "test": [ - "phpcs" - ], + "lint": "./vendor/bin/phpcs", + "format": "./vendor/bin/phpcbf", "post-install-cmd": [ "\"vendor/bin/mozart\" compose", "composer dump-autoload" diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..11af9b6 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2034 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "90df7d8ce1d1a015ce236bcebe9e4049", + "packages": [ + { + "name": "pelago/emogrifier", + "version": "v8.0.0", + "source": { + "type": "git", + "url": "https://github.com/MyIntervals/emogrifier.git", + "reference": "7fdf4ee46fe57bd017b92640bca1ec42d124440a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/7fdf4ee46fe57bd017b92640bca1ec42d124440a", + "reference": "7fdf4ee46fe57bd017b92640bca1ec42d124440a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "sabberworm/php-css-parser": "^9.0.0", + "symfony/css-selector": "^5.4.35 || ~6.3.12 || ^6.4.3 || ^7.0.3" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "1.4.0", + "phpmd/phpmd": "2.15.0", + "phpstan/extension-installer": "1.4.3", + "phpstan/phpstan": "1.12.28 || 2.1.20", + "phpstan/phpstan-phpunit": "1.4.2 || 2.0.7", + "phpstan/phpstan-strict-rules": "1.6.2 || 2.0.6", + "phpunit/phpunit": "9.6.23", + "rawr/phpunit-data-provider": "3.3.1", + "rector/rector": "1.2.10 || 2.1.2", + "rector/type-perfect": "1.0.0 || 2.1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "8.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Pelago\\Emogrifier\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Zoli Szabó", + "email": "zoli.szabo+github@gmail.com" + }, + { + "name": "John Reeve", + "email": "jreeve@pelagodesign.com" + }, + { + "name": "Jake Hotson", + "email": "jake.github@qzdesign.co.uk" + }, + { + "name": "Cameron Brooks" + }, + { + "name": "Jaime Prado" + } + ], + "description": "Converts CSS styles into inline style attributes in your HTML code", + "homepage": "https://www.myintervals.com/emogrifier.php", + "keywords": [ + "css", + "email", + "pre-processing" + ], + "support": { + "issues": "https://github.com/MyIntervals/emogrifier/issues", + "source": "https://github.com/MyIntervals/emogrifier" + }, + "time": "2025-07-27T17:45:42+00:00" + }, + { + "name": "sabberworm/php-css-parser", + "version": "v9.0.0", + "source": { + "type": "git", + "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git", + "reference": "54574e3de2f8cdc91175ffd2337e5c6804a7d729" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/54574e3de2f8cdc91175ffd2337e5c6804a7d729", + "reference": "54574e3de2f8cdc91175ffd2337e5c6804a7d729", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": "^7.2.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "1.4.0", + "phpstan/extension-installer": "1.4.3", + "phpstan/phpstan": "1.12.28 || 2.1.19", + "phpstan/phpstan-phpunit": "1.4.2 || 2.0.7", + "phpstan/phpstan-strict-rules": "1.6.2 || 2.0.6", + "phpunit/phpunit": "8.5.42", + "rawr/phpunit-data-provider": "3.3.1", + "rector/rector": "1.2.10 || 2.1.2", + "rector/type-perfect": "1.0.0 || 2.1.0" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + }, + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Jake Hotson", + "email": "jake.github@qzdesign.co.uk" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues", + "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v9.0.0" + }, + "time": "2025-07-27T07:24:01+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + } + ], + "packages-dev": [ + { + "name": "coenjacobs/mozart", + "version": "0.7.1", + "source": { + "type": "git", + "url": "https://github.com/coenjacobs/mozart.git", + "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/coenjacobs/mozart/zipball/dbcdeb992d20d9c8914eef090f9a0d684bb1102c", + "reference": "dbcdeb992d20d9c8914eef090f9a0d684bb1102c", + "shasum": "" + }, + "require": { + "league/flysystem": "^1.0", + "php": "^7.3|^8.0", + "symfony/console": "^4|^5", + "symfony/finder": "^4|^5" + }, + "require-dev": { + "mheap/phpunit-github-actions-printer": "^1.4", + "phpunit/phpunit": "^8.5", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.4" + }, + "bin": [ + "bin/mozart" + ], + "type": "library", + "autoload": { + "psr-4": { + "CoenJacobs\\Mozart\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Coen Jacobs", + "email": "coenjacobs@gmail.com" + } + ], + "description": "Composes all dependencies as a package inside a WordPress plugin", + "support": { + "issues": "https://github.com/coenjacobs/mozart/issues", + "source": "https://github.com/coenjacobs/mozart/tree/0.7.1" + }, + "funding": [ + { + "url": "https://github.com/coenjacobs", + "type": "github" + } + ], + "time": "2021-02-02T21:37:03+00:00" + }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\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/Dealerdirect/phpcodesniffer-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/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" + }, + { + "name": "eighteen73/wordpress-coding-standards", + "version": "V2.0.1", + "source": { + "type": "git", + "url": "https://github.com/eighteen73/wordpress-coding-standards.git", + "reference": "988265b4e038321cffd547b655862ff8c3443ca1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/eighteen73/wordpress-coding-standards/zipball/988265b4e038321cffd547b655862ff8c3443ca1", + "reference": "988265b4e038321cffd547b655862ff8c3443ca1", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "phpcompatibility/phpcompatibility-wp": "^2.1", + "squizlabs/php_codesniffer": "^3.6", + "wp-coding-standards/wpcs": "^3.0" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ed Jeavons", + "email": "ed@orphans.co.uk" + }, + { + "name": "Brett Mason", + "email": "brett@orphans.co.uk" + } + ], + "description": "Modestly opinionated PHPCS configuration for WordPress.", + "support": { + "issues": "https://github.com/eighteen73/wordpress-coding-standards/issues", + "source": "https://github.com/eighteen73/wordpress-coding-standards/tree/V2.0.1" + }, + "time": "2023-09-19T07:48:57+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.10", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", + "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2022-10-04T09:16:37+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-09-21T08:32:55+00:00" + }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "phpcompatibility/phpcompatibility-paragonie", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "paragonie/random_compat": "dev-master", + "paragonie/sodium_compat": "dev-master" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "paragonie", + "phpcs", + "polyfill", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + }, + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-04-24T21:30:46+00:00" + }, + { + "name": "phpcompatibility/phpcompatibility-wp", + "version": "2.1.7", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", + "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/5bfbbfbabb3df2b9a83e601de9153e4a7111962c", + "reference": "5bfbbfbabb3df2b9a83e601de9153e4a7111962c", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/phpcompatibility-paragonie": "^1.0", + "squizlabs/php_codesniffer": "^3.3" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + }, + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcompatibility", + "type": "thanks_dev" + } + ], + "time": "2025-05-12T16:38:37+00:00" + }, + { + "name": "phpcsstandards/phpcsextra", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/fa4b8d051e278072928e32d817456a7fdb57b6ca", + "reference": "fa4b8d051e278072928e32d817456a7fdb57b6ca", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0 || ^4.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "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" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-06-14T07:40:39+00:00" + }, + { + "name": "phpcsstandards/phpcsutils", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "f7eb16f2fa4237d5db9e8fed8050239bee17a9bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/f7eb16f2fa4237d5db9e8fed8050239bee17a9bd", + "reference": "f7eb16f2fa4237d5db9e8fed8050239bee17a9bd", + "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.13.0 || ^4.0" + }, + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.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", + "phpcs4", + "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" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-08-10T01:04:45+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.13.2", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5b5e3821314f947dd040c70f7992a64eac89025c", + "reference": "5b5e3821314f947dd040c70f7992a64eac89025c", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-06-17T22:17:01+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-11-06T11:30:55+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.45", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "63741784cd7b9967975eec610b256eed3ede022b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/63741784cd7b9967975eec610b256eed3ede022b", + "reference": "63741784cd7b9967975eec610b256eed3ede022b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.4.45" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-28T13:32:08+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.32.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-02T08:10:11+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-25T09:37:31+00:00" + }, + { + "name": "symfony/string", + "version": "v6.4.24", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f0ce0bd36a3accb4a225435be077b4b4875587f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f0ce0bd36a3accb4a225435be077b4b4875587f4", + "reference": "f0ce0bd36a3accb4a225435be077b4b4875587f4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.4.24" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-10T08:14:14+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/d2421de7cec3274ae622c22c744de9a62c7925af", + "reference": "d2421de7cec3274ae622c22c744de9a62c7925af", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", + "php": ">=5.4", + "phpcsstandards/phpcsextra": "^1.4.0", + "phpcsstandards/phpcsutils": "^1.1.0", + "squizlabs/php_codesniffer": "^3.13.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.4.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "suggest": { + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "funding": [ + { + "url": "https://opencollective.com/php_codesniffer", + "type": "custom" + } + ], + "time": "2025-07-24T20:08:31+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=8.0" + }, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..3ac5730 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,42 @@ +# EXAMPLE USAGE: +# +# Refer for explanation to following link: +# https://lefthook.dev/configuration/ +# +# pre-push: +# jobs: +# - name: packages audit +# tags: +# - frontend +# - security +# run: yarn audit +# +# - name: gems audit +# tags: +# - backend +# - security +# run: bundle audit +# +# pre-commit: +# parallel: true +# jobs: +# - run: yarn eslint {staged_files} +# glob: "*.{js,ts,jsx,tsx}" +# +# - name: rubocop +# glob: "*.rb" +# exclude: +# - config/application.rb +# - config/routes.rb +# run: bundle exec rubocop --force-exclusion {all_files} +# +# - name: govet +# files: git ls-files -m +# glob: "*.go" +# run: go vet {files} +# +# - script: "hello.js" +# runner: node +# +# - script: "hello.go" +# runner: go run diff --git a/package.json b/package.json new file mode 100644 index 0000000..f2be683 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "orbit", + "version": "2.3.0", + "description": "Opinionated WordPress behaviour overrides", + "author": "eighteen73", + "license": "MIT License", + "homepage": "https://github.com/eighteen73/orbit", + "scripts": { + "postinstall": "composer install -o", + "format": "npm run format:css && npm run format:js && format:php", + "format:css": "stylelint --fix \"./css/*.css\"", + "format:js": "eslint --fix \"./js/*.js\"", + "format:php": "composer run format", + "lint": "npm run lint:css && npm run lint:js && npm run lint:php", + "lint:css": "wp-scripts lint-style", + "lint:js": "wp-scripts lint-js", + "lint:php": "composer run lint", + "lint:md:docs": "wp-scripts lint-md-docs", + "lint:pkg-json": "wp-scripts lint-pkg-json", + "packages-update": "wp-scripts packages-update", + "plugin-zip": "wp-scripts plugin-zip", + "pot": "wp i18n make-pot . languages/example-block.pot --domain=example-block --exclude=node_modules,vendor,.git" + }, + "devDependencies": { + "@eighteen73/eslint-config-wordpress": "latest", + "@eighteen73/stylelint-config-wordpress": "latest", + "@wordpress/browserslist-config": "latest", + "@wordpress/prettier-config": "latest", + "@wordpress/scripts": "latest", + "lefthook": "latest", + "postcss-preset-env": "latest" + } +} diff --git a/phpcs.xml b/phpcs.xml.dist similarity index 73% rename from phpcs.xml rename to phpcs.xml.dist index b48c21f..d5a98a5 100644 --- a/phpcs.xml +++ b/phpcs.xml.dist @@ -3,7 +3,12 @@ Eighteen73 Orbit - . + ./ + + + node_modules/ + vendor/ + build/ lib/packages/* includes/lib/* @@ -21,4 +26,5 @@ + diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..f36eb39 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: { + 'postcss-preset-env': {}, + }, +}; From a2ac4ff79d33b1dd4f6a8c2045465d2d680baa77 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Wed, 22 Oct 2025 16:35:29 +0100 Subject: [PATCH 2/9] New: lefthook config --- lefthook.yml | 62 +++++++++++++++++----------------------------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 3ac5730..ddd53bc 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,42 +1,20 @@ -# EXAMPLE USAGE: -# -# Refer for explanation to following link: -# https://lefthook.dev/configuration/ -# -# pre-push: -# jobs: -# - name: packages audit -# tags: -# - frontend -# - security -# run: yarn audit -# -# - name: gems audit -# tags: -# - backend -# - security -# run: bundle audit -# -# pre-commit: -# parallel: true -# jobs: -# - run: yarn eslint {staged_files} -# glob: "*.{js,ts,jsx,tsx}" -# -# - name: rubocop -# glob: "*.rb" -# exclude: -# - config/application.rb -# - config/routes.rb -# run: bundle exec rubocop --force-exclusion {all_files} -# -# - name: govet -# files: git ls-files -m -# glob: "*.go" -# run: go vet {files} -# -# - script: "hello.js" -# runner: node -# -# - script: "hello.go" -# runner: go run +pre-commit: + parallel: true + jobs: + - run: npm run lint:css + glob: + - "*.scss" + - "*.css" + stage_fixed: true + + - run: npm run lint:js + glob: + - "*.js" + - "*.jsx" + - "*.ts" + - "*.tsx" + stage_fixed: true + + - run: npm run lint:php + glob: "*.php" + stage_fixed: true From 6483b37f0ceac6ea56f3abe7038b0198ad33c1cf Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Wed, 22 Oct 2025 16:47:41 +0100 Subject: [PATCH 3/9] Tidy: remove settings.js --- js/settings.js | 75 -------------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 js/settings.js diff --git a/js/settings.js b/js/settings.js deleted file mode 100644 index a05713d..0000000 --- a/js/settings.js +++ /dev/null @@ -1,75 +0,0 @@ -(function ($) { - $(document).ready(function () { - const wpOpenGallery = function (o, callback) { - const options = typeof o === 'object' ? o : {}; - - // Predefined settings - const defaultOptions = { - title: 'Select Media', - fileType: 'image', - multiple: false, - currentValue: '', - }; - - const opt = { ...defaultOptions, ...options }; - - let image_frame; - - if (image_frame) { - image_frame.open(); - } - - // Define image_frame as wp.media object - image_frame = wp.media({ - title: opt.title, - multiple: opt.multiple, - library: { - type: opt.fileType, - }, - }); - - image_frame.on('open', function () { - // On open, get the id from the hidden input - // and select the appropiate images in the media manager - const selection = image_frame.state().get('selection'); - const ids = opt.currentValue.split(','); - - ids.forEach(function (id) { - const attachment = wp.media.attachment(id); - attachment.fetch(); - selection.add(attachment ? [attachment] : []); - }); - }); - - image_frame.on('close', function () { - // On close, get selections and save to the hidden input - // plus other AJAX stuff to refresh the image preview - const selection = image_frame.state().get('selection'); - const files = []; - - selection.each(function (attachment) { - files.push({ - id: attachment.attributes.id, - filename: attachment.attributes.filename, - url: attachment.attributes.url, - type: attachment.attributes.type, - subtype: attachment.attributes.subtype, - sizes: attachment.attributes.sizes, - }); - }); - - callback(files); - }); - - image_frame.open(); - }; - - // Set the logo attachment ID and preview on click. - $('#orbit_ui_login_logo_button').click(function(event) { - wpOpenGallery(null, function(data) { - $('#orbit_ui_login_logo').val(data[0].id); - $('#login-logo-preview').attr('src', data[0].url); - }); - }); - }); -})(jQuery); From 1e66e0d4727d2379e1924b10bdf555fbfe873751 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Wed, 22 Oct 2025 16:58:49 +0100 Subject: [PATCH 4/9] New: move initialisation into Plugin class --- includes/classes/Plugin.php | 65 +++++++++++++++++++++++++++++++++++++ orbit.php | 34 ++++--------------- 2 files changed, 71 insertions(+), 28 deletions(-) create mode 100644 includes/classes/Plugin.php diff --git a/includes/classes/Plugin.php b/includes/classes/Plugin.php new file mode 100644 index 0000000..9c00a45 --- /dev/null +++ b/includes/classes/Plugin.php @@ -0,0 +1,65 @@ +setup(); + Performance\Fast404::instance()->setup(); + ThirdParty\WooCommerce::instance()->setup(); + ThirdParty\Altcha::instance()->setup(); + + add_action( + 'init', + function () { + Admin\CleanUI::instance()->setup(); + Admin\HideUpdates::instance()->setup(); + Admin\EnvironmentIcon::instance()->setup(); + Capabilities\GravityForms::instance()->setup(); + Capabilities\Users::instance()->setup(); + Capabilities\Editor::instance()->setup(); + Security\DisableAPI::instance()->setup(); + Security\DisableXMLRPC::instance()->setup(); + Security\HideAuthor::instance()->setup(); + Security\HideVersion::instance()->setup(); + Security\RemoveHeadLinks::instance()->setup(); + Branding\BrandedEmails::instance()->setup(); + Monitoring\HealthCheck::instance()->setup(); + Media\RemoteFiles::instance()->setup(); + BlockEditor\Patterns::instance()->setup(); + } + ); + } + + /** + * Plugin activation. + * + * @return void + */ + public static function activation(): void {} + + /** + * Plugin deactivation. + * + * @return void + */ + public static function deactivation(): void {} +} diff --git a/orbit.php b/orbit.php index 5860f42..175dc6b 100644 --- a/orbit.php +++ b/orbit.php @@ -15,10 +15,7 @@ namespace Eighteen73\Orbit; -// Exit if accessed directly -if ( ! defined( 'ABSPATH' ) ) { - exit; -} +defined( 'ABSPATH' ) || exit; // Useful global constants. define( 'ORBIT_URL', plugin_dir_url( __FILE__ ) ); @@ -27,28 +24,9 @@ require_once 'autoload.php'; -DisallowIndexing\DisallowIndexing::instance()->setup(); -Performance\Fast404::instance()->setup(); -ThirdParty\WooCommerce::instance()->setup(); -ThirdParty\Altcha::instance()->setup(); +// Initialise the plugin. +Plugin::instance()->setup(); -add_action( - 'init', - function () { - Admin\CleanUI::instance()->setup(); - Admin\HideUpdates::instance()->setup(); - Admin\EnvironmentIcon::instance()->setup(); - Capabilities\GravityForms::instance()->setup(); - Capabilities\Users::instance()->setup(); - Capabilities\Editor::instance()->setup(); - Security\DisableAPI::instance()->setup(); - Security\DisableXMLRPC::instance()->setup(); - Security\HideAuthor::instance()->setup(); - Security\HideVersion::instance()->setup(); - Security\RemoveHeadLinks::instance()->setup(); - Branding\BrandedEmails::instance()->setup(); - Monitoring\HealthCheck::instance()->setup(); - Media\RemoteFiles::instance()->setup(); - BlockEditor\Patterns::instance()->setup(); - } -); +// Register activation and deactivation hooks. +register_activation_hook( __FILE__, [ Plugin::class, 'activation' ] ); +register_deactivation_hook( __FILE__, [ Plugin::class, 'deactivation' ] ); From f51136ad2959b244c1fbfb92e1ddcad3af2ad583 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Wed, 22 Oct 2025 16:59:46 +0100 Subject: [PATCH 5/9] Tidy: package formatting --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f2be683..0a52d85 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "eighteen73", "license": "MIT License", "homepage": "https://github.com/eighteen73/orbit", - "scripts": { + "scripts": { "postinstall": "composer install -o", "format": "npm run format:css && npm run format:js && format:php", "format:css": "stylelint --fix \"./css/*.css\"", @@ -21,7 +21,7 @@ "plugin-zip": "wp-scripts plugin-zip", "pot": "wp i18n make-pot . languages/example-block.pot --domain=example-block --exclude=node_modules,vendor,.git" }, - "devDependencies": { + "devDependencies": { "@eighteen73/eslint-config-wordpress": "latest", "@eighteen73/stylelint-config-wordpress": "latest", "@wordpress/browserslist-config": "latest", From 4ffcbdeb5d42eabd78d4cfe3494784c57f9a6502 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Thu, 23 Oct 2025 11:20:38 +0100 Subject: [PATCH 6/9] New: initialise classes on init within themselves --- includes/classes/Admin/CleanUI.php | 13 ++++++- includes/classes/Admin/EnvironmentIcon.php | 13 ++++++- includes/classes/Admin/HideUpdates.php | 13 ++++++- includes/classes/Branding/BrandedEmails.php | 13 +++++-- includes/classes/Media/RemoteFiles.php | 13 +++++-- includes/classes/Monitoring/HealthCheck.php | 14 ++++++-- includes/classes/Plugin.php | 36 ++++++++----------- includes/classes/Security/DisableAPI.php | 14 ++++++-- includes/classes/Security/DisableXMLRPC.php | 14 ++++++-- includes/classes/Security/HideAuthor.php | 13 +++++-- includes/classes/Security/HideVersion.php | 14 ++++++-- includes/classes/Security/RemoveHeadLinks.php | 13 +++++-- 12 files changed, 143 insertions(+), 40 deletions(-) diff --git a/includes/classes/Admin/CleanUI.php b/includes/classes/Admin/CleanUI.php index 7095b4f..ce6ed9b 100644 --- a/includes/classes/Admin/CleanUI.php +++ b/includes/classes/Admin/CleanUI.php @@ -19,8 +19,19 @@ class CleanUI { /** * Setup module + * + * @return void + */ + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void */ - public function setup() { + public function init(): void { add_action( 'admin_menu', [ $this, 'clean_ui_menu_items' ] ); add_action( 'admin_bar_menu', [ $this, 'clean_ui_toolbar_items' ], 999 ); add_action( 'wp_dashboard_setup', [ $this, 'clean_ui_dashboard_widgets' ] ); diff --git a/includes/classes/Admin/EnvironmentIcon.php b/includes/classes/Admin/EnvironmentIcon.php index b0639d4..f9ffe69 100644 --- a/includes/classes/Admin/EnvironmentIcon.php +++ b/includes/classes/Admin/EnvironmentIcon.php @@ -20,8 +20,19 @@ class EnvironmentIcon { /** * Setup module + * + * @return void + */ + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void */ - public function setup() { + public function init(): void { if ( ! $this->is_allowed() ) { return; } diff --git a/includes/classes/Admin/HideUpdates.php b/includes/classes/Admin/HideUpdates.php index cdfbec7..7fe4989 100644 --- a/includes/classes/Admin/HideUpdates.php +++ b/includes/classes/Admin/HideUpdates.php @@ -19,8 +19,19 @@ class HideUpdates { /** * Setup module + * + * @return void + */ + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void */ - public function setup() { + public function init(): void { if ( $this->is_allowed() ) { return; } diff --git a/includes/classes/Branding/BrandedEmails.php b/includes/classes/Branding/BrandedEmails.php index 48025f0..c7e2589 100644 --- a/includes/classes/Branding/BrandedEmails.php +++ b/includes/classes/Branding/BrandedEmails.php @@ -22,11 +22,20 @@ class BrandedEmails { use Singleton; /** - * Primary constructor + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { if ( ! apply_filters( 'orbit_enable_branded_emails', true ) ) { return; } diff --git a/includes/classes/Media/RemoteFiles.php b/includes/classes/Media/RemoteFiles.php index 93e32ff..1e6662a 100644 --- a/includes/classes/Media/RemoteFiles.php +++ b/includes/classes/Media/RemoteFiles.php @@ -37,11 +37,20 @@ class RemoteFiles { public array $directories = []; /** - * Primary constructor + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { if ( ! $this->is_safe_environment() ) { return; } diff --git a/includes/classes/Monitoring/HealthCheck.php b/includes/classes/Monitoring/HealthCheck.php index ddb16ca..0715c75 100644 --- a/includes/classes/Monitoring/HealthCheck.php +++ b/includes/classes/Monitoring/HealthCheck.php @@ -17,14 +17,24 @@ class HealthCheck { use Singleton; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { add_action( 'rest_api_init', [ $this, 'add_endpoint' ] ); } + /** * Add the API endpoint * diff --git a/includes/classes/Plugin.php b/includes/classes/Plugin.php index 9c00a45..e5b37a5 100644 --- a/includes/classes/Plugin.php +++ b/includes/classes/Plugin.php @@ -22,31 +22,25 @@ class Plugin { * @return void */ public function setup(): void { + Admin\CleanUI::instance()->setup(); + Admin\HideUpdates::instance()->setup(); + Admin\EnvironmentIcon::instance()->setup(); + BlockEditor\Patterns::instance()->setup(); + Branding\BrandedEmails::instance()->setup(); + Capabilities\GravityForms::instance()->setup(); + Capabilities\Users::instance()->setup(); + Capabilities\Editor::instance()->setup(); DisallowIndexing\DisallowIndexing::instance()->setup(); + Media\RemoteFiles::instance()->setup(); + Monitoring\HealthCheck::instance()->setup(); Performance\Fast404::instance()->setup(); + Security\DisableAPI::instance()->setup(); + Security\DisableXMLRPC::instance()->setup(); + Security\HideAuthor::instance()->setup(); + Security\HideVersion::instance()->setup(); + Security\RemoveHeadLinks::instance()->setup(); ThirdParty\WooCommerce::instance()->setup(); ThirdParty\Altcha::instance()->setup(); - - add_action( - 'init', - function () { - Admin\CleanUI::instance()->setup(); - Admin\HideUpdates::instance()->setup(); - Admin\EnvironmentIcon::instance()->setup(); - Capabilities\GravityForms::instance()->setup(); - Capabilities\Users::instance()->setup(); - Capabilities\Editor::instance()->setup(); - Security\DisableAPI::instance()->setup(); - Security\DisableXMLRPC::instance()->setup(); - Security\HideAuthor::instance()->setup(); - Security\HideVersion::instance()->setup(); - Security\RemoveHeadLinks::instance()->setup(); - Branding\BrandedEmails::instance()->setup(); - Monitoring\HealthCheck::instance()->setup(); - Media\RemoteFiles::instance()->setup(); - BlockEditor\Patterns::instance()->setup(); - } - ); } /** diff --git a/includes/classes/Security/DisableAPI.php b/includes/classes/Security/DisableAPI.php index 4051b11..7243c72 100644 --- a/includes/classes/Security/DisableAPI.php +++ b/includes/classes/Security/DisableAPI.php @@ -16,14 +16,24 @@ class DisableAPI { use Singleton; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { if ( apply_filters( 'orbit_enable_rest_api_user_endpoints', false ) ) { return; } + add_filter( 'rest_endpoints', [ $this, 'disable_users' ] ); } diff --git a/includes/classes/Security/DisableXMLRPC.php b/includes/classes/Security/DisableXMLRPC.php index f54b703..45e4651 100644 --- a/includes/classes/Security/DisableXMLRPC.php +++ b/includes/classes/Security/DisableXMLRPC.php @@ -16,14 +16,24 @@ class DisableXMLRPC { use Singleton; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { if ( apply_filters( 'orbit_enable_xmlrpc', false ) ) { return; } + add_filter( 'xmlrpc_enabled', '__return_false' ); remove_action( 'wp_head', 'rsd_link' ); } diff --git a/includes/classes/Security/HideAuthor.php b/includes/classes/Security/HideAuthor.php index 71728c3..5848a07 100644 --- a/includes/classes/Security/HideAuthor.php +++ b/includes/classes/Security/HideAuthor.php @@ -16,11 +16,20 @@ class HideAuthor { use Singleton; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { add_action( 'template_redirect', [ $this, 'author_page_404' ] ); } diff --git a/includes/classes/Security/HideVersion.php b/includes/classes/Security/HideVersion.php index acb7abd..588014c 100644 --- a/includes/classes/Security/HideVersion.php +++ b/includes/classes/Security/HideVersion.php @@ -18,14 +18,24 @@ class HideVersion { const VERSIONED_URL_REGEX = '/(.+\?(?:ver|version)=)([^&]+)(.*)/'; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { if ( apply_filters( 'orbit_enable_expose_wordpress_version', false ) ) { return; } + remove_action( 'wp_head', 'wp_generator' ); add_filter( 'the_generator', '__return_empty_string' ); add_filter( 'style_loader_src', [ $this, 'obfuscate_script_or_style_version' ], 20000 ); diff --git a/includes/classes/Security/RemoveHeadLinks.php b/includes/classes/Security/RemoveHeadLinks.php index f606171..6455401 100644 --- a/includes/classes/Security/RemoveHeadLinks.php +++ b/includes/classes/Security/RemoveHeadLinks.php @@ -18,11 +18,20 @@ class RemoveHeadLinks { use Singleton; /** - * Run on init + * Setup module * * @return void */ - public function setup() { + public function setup(): void { + add_action( 'init', [ $this, 'init' ] ); + } + + /** + * Initialize module + * + * @return void + */ + public function init(): void { remove_action( 'wp_head', 'wlwmanifest_link' ); remove_action( 'wp_head', 'wp_shortlink_wp_head' ); From 8314cdbdd80e099239ed3393f7bfece165a13fac Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Thu, 23 Oct 2025 12:01:05 +0100 Subject: [PATCH 7/9] New: documenting returns --- includes/classes/Admin/CleanUI.php | 14 ++++++++++---- includes/classes/Admin/EnvironmentIcon.php | 4 +++- includes/classes/BlockEditor/Patterns.php | 4 ++-- includes/classes/Branding/BrandedEmails.php | 12 ++++++------ includes/classes/Capabilities/Editor.php | 6 +++++- includes/classes/Capabilities/GravityForms.php | 6 +++++- includes/classes/Capabilities/Users.php | 6 +++++- includes/classes/Media/RemoteFiles.php | 2 +- includes/classes/Monitoring/HealthCheck.php | 2 +- includes/classes/Security/HideAuthor.php | 2 +- includes/classes/ThirdParty/Altcha.php | 2 +- includes/classes/ThirdParty/WooCommerce.php | 2 +- includes/classes/Utilities/Templates.php | 4 ++-- 13 files changed, 43 insertions(+), 23 deletions(-) diff --git a/includes/classes/Admin/CleanUI.php b/includes/classes/Admin/CleanUI.php index ce6ed9b..5b15901 100644 --- a/includes/classes/Admin/CleanUI.php +++ b/includes/classes/Admin/CleanUI.php @@ -41,8 +41,10 @@ public function init(): void { /** * Remove menu items + * + * @return void */ - public function clean_ui_menu_items() { + public function clean_ui_menu_items(): void { if ( ! apply_filters( 'orbit_enable_menu_item_dashboard', true ) ) { remove_menu_page( 'index.php' ); } @@ -61,7 +63,7 @@ public function clean_ui_menu_items() { * * @return void */ - public function clean_ui_toolbar_items( $menu ) { + public function clean_ui_toolbar_items( $menu ): void { $menu->remove_node( 'comments' ); $menu->remove_node( 'customize' ); $menu->remove_node( 'dashboard' ); @@ -81,8 +83,10 @@ public function clean_ui_toolbar_items( $menu ) { /** * Remove dahboard widgets + * + * @return void */ - public function clean_ui_dashboard_widgets() { + public function clean_ui_dashboard_widgets(): void { global $wp_meta_boxes; unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health'] ); @@ -101,8 +105,10 @@ public function remove_cms_footer_text(): string { /** * Nice logo for the login page + * + * @return void */ - public function clean_ui_logo() { + public function clean_ui_logo(): void { if ( ! apply_filters( 'orbit_enable_login_logo', true ) ) { return; } diff --git a/includes/classes/Admin/EnvironmentIcon.php b/includes/classes/Admin/EnvironmentIcon.php index f9ffe69..cea0a8b 100644 --- a/includes/classes/Admin/EnvironmentIcon.php +++ b/includes/classes/Admin/EnvironmentIcon.php @@ -66,8 +66,10 @@ public function is_allowed(): bool { * Add the environment name to the admin toolbar * * @param \WP_Admin_Bar $wp_admin_bar WordPress Admin Bar instance. + * + * @return void */ - public function add_environment_name_to_toolbar( \WP_Admin_Bar $wp_admin_bar ) { + public function add_environment_name_to_toolbar( \WP_Admin_Bar $wp_admin_bar ): void { $env = wp_get_environment_type(); $wp_admin_bar->add_node( diff --git a/includes/classes/BlockEditor/Patterns.php b/includes/classes/BlockEditor/Patterns.php index 7b2bf76..949ad2c 100644 --- a/includes/classes/BlockEditor/Patterns.php +++ b/includes/classes/BlockEditor/Patterns.php @@ -21,7 +21,7 @@ class Patterns { * * @return void */ - public function setup() { + public function setup(): void { if ( ! apply_filters( 'orbit_enable_disable_external_patterns', true ) ) { return; } @@ -56,7 +56,7 @@ public function remove_woocommerce_patterns(): void { * @param array $handler Route handler used for the request. * @return mixed */ - public function filter_woocommerce_patterns_rest( $dispatch_result, $request, $route, $handler ) { + public function filter_woocommerce_patterns_rest( $dispatch_result, $request, $route, $handler ): mixed { // Check if this is a block patterns request if ( strpos( $route, '/wp/v2/block-patterns/patterns' ) !== 0 ) { return $dispatch_result; diff --git a/includes/classes/Branding/BrandedEmails.php b/includes/classes/Branding/BrandedEmails.php index c7e2589..2163f18 100644 --- a/includes/classes/Branding/BrandedEmails.php +++ b/includes/classes/Branding/BrandedEmails.php @@ -52,7 +52,7 @@ public function init(): void { * @param array $args Array of arguments passed to wp_mail(). * @return array Modified $args array with the email message wrapped in branded HTML. */ - public function apply_branded_email_template( $args ) { + public function apply_branded_email_template( $args ): array { $headers = []; // Convert headers to an array if they aren't already @@ -119,7 +119,7 @@ function ( $header ) { * @param string $template The original email template string (usually empty). * @return string The modified email template with placeholders for message and subject. */ - public function apply_branded_email_template_to_gf_notifications( $template ) { + public function apply_branded_email_template_to_gf_notifications( $template ): string { ob_start(); Templates::include_template( @@ -143,7 +143,7 @@ public function apply_branded_email_template_to_gf_notifications( $template ) { * @param string|null $email_content Content that will receive inline styles. * @return string The email content with inline styles applied. */ - public function style_inline( $email_content ) { + public function style_inline( $email_content ): string { try { $inlined_content = CssInliner::fromHtml( $email_content )->inlineCss()->render(); } catch ( Exception $e ) { @@ -158,7 +158,7 @@ public function style_inline( $email_content ) { * * @return array Array of CSS variables for use in the email template. */ - public static function get_css_variables() { + public static function get_css_variables(): array { return [ 'background_color' => apply_filters( 'orbit_branded_emails_background_color', @@ -292,7 +292,7 @@ public static function orbit_branded_emails_resolve_color( $color_value, $fallba * * @return string The resolved background color after applying the filter. */ - public static function apply_branded_email_colours_to_gf_table_labels( $color, $field, $lead ) { + public static function apply_branded_email_colours_to_gf_table_labels( $color, $field, $lead ): string { $label_background_color = apply_filters( 'orbit_branded_emails_gf_label_bg_color', self::orbit_branded_emails_resolve_color( @@ -314,7 +314,7 @@ public static function apply_branded_email_colours_to_gf_table_labels( $color, $ * @param array $entry The current entry. * @return string The modified color value. */ - public static function apply_branded_email_colours_to_gf_table_data( $color, $field, $entry ) { + public static function apply_branded_email_colours_to_gf_table_data( $color, $field, $entry ): string { $data_background_color = apply_filters( 'orbit_branded_emails_gf_data_bg_color', $color diff --git a/includes/classes/Capabilities/Editor.php b/includes/classes/Capabilities/Editor.php index 045f061..7962a4f 100644 --- a/includes/classes/Capabilities/Editor.php +++ b/includes/classes/Capabilities/Editor.php @@ -17,13 +17,17 @@ class Editor { /** * Setup module + * + * @return void */ - public function setup() { + public function setup(): void { add_action( 'admin_init', [ $this, 'manage_editor_caps' ] ); } /** * Add or remove site editor capabilities based on a filter. + * + * @return void */ public function manage_editor_caps(): void { $disable_user_caps = ! apply_filters( 'orbit_enable_editor_caps_access', true ); diff --git a/includes/classes/Capabilities/GravityForms.php b/includes/classes/Capabilities/GravityForms.php index fb9d8fd..8fb479b 100644 --- a/includes/classes/Capabilities/GravityForms.php +++ b/includes/classes/Capabilities/GravityForms.php @@ -17,13 +17,17 @@ class GravityForms { /** * Setup module + * + * @return void */ - public function setup() { + public function setup(): void { add_action( 'admin_init', [ $this, 'manage_gravity_forms_caps' ] ); } /** * Add or remove Gravity Forms capabilities based on a filter. + * + * @return void */ public function manage_gravity_forms_caps(): void { $disable_gf_access = ! apply_filters( 'orbit_enable_gravity_forms_access', true ); diff --git a/includes/classes/Capabilities/Users.php b/includes/classes/Capabilities/Users.php index a1e99fd..17426f0 100644 --- a/includes/classes/Capabilities/Users.php +++ b/includes/classes/Capabilities/Users.php @@ -17,13 +17,17 @@ class Users { /** * Setup module + * + * @return void */ - public function setup() { + public function setup(): void { add_action( 'admin_init', [ $this, 'manage_user_caps' ] ); } /** * Add or remove user-related capabilities based on a filter. + * + * @return void */ public function manage_user_caps(): void { $disable_user_caps = ! apply_filters( 'orbit_enable_user_caps_access', true ); diff --git a/includes/classes/Media/RemoteFiles.php b/includes/classes/Media/RemoteFiles.php index 1e6662a..5c3face 100644 --- a/includes/classes/Media/RemoteFiles.php +++ b/includes/classes/Media/RemoteFiles.php @@ -86,7 +86,7 @@ private function is_safe_environment(): bool { * * @return mixed */ - public function image_src( $image ) { + public function image_src( $image ): mixed { if ( $image === false || empty( $image ) ) { return $image; } diff --git a/includes/classes/Monitoring/HealthCheck.php b/includes/classes/Monitoring/HealthCheck.php index 0715c75..a338c1c 100644 --- a/includes/classes/Monitoring/HealthCheck.php +++ b/includes/classes/Monitoring/HealthCheck.php @@ -59,7 +59,7 @@ public function add_endpoint(): void { * @param WP_REST_Request $data The request data * @return string */ - public function run_health_check( $data ) { + public function run_health_check( $data ): string { return 'ok'; } } diff --git a/includes/classes/Security/HideAuthor.php b/includes/classes/Security/HideAuthor.php index 5848a07..646280a 100644 --- a/includes/classes/Security/HideAuthor.php +++ b/includes/classes/Security/HideAuthor.php @@ -38,7 +38,7 @@ public function init(): void { * * @return void */ - public function author_page_404() { + public function author_page_404(): void { global $wp_query; if ( is_author() ) { diff --git a/includes/classes/ThirdParty/Altcha.php b/includes/classes/ThirdParty/Altcha.php index dc4653e..113034c 100644 --- a/includes/classes/ThirdParty/Altcha.php +++ b/includes/classes/ThirdParty/Altcha.php @@ -20,7 +20,7 @@ class Altcha { * * @return void */ - public function setup() { + public function setup(): void { add_filter( 'altcha_challenge_url', [ $this, 'altcha_challenge_url' ] ); } diff --git a/includes/classes/ThirdParty/WooCommerce.php b/includes/classes/ThirdParty/WooCommerce.php index aa416fd..987d898 100644 --- a/includes/classes/ThirdParty/WooCommerce.php +++ b/includes/classes/ThirdParty/WooCommerce.php @@ -20,7 +20,7 @@ class WooCommerce { * * @return void */ - public function setup() { + public function setup(): void { // Force WooCommerce tracking to always be disabled. // This setting loads additional patterns from PTK. diff --git a/includes/classes/Utilities/Templates.php b/includes/classes/Utilities/Templates.php index 4545512..c9053f1 100644 --- a/includes/classes/Utilities/Templates.php +++ b/includes/classes/Utilities/Templates.php @@ -25,7 +25,7 @@ class Templates { * @param string $template_name The name of the template file. * @return string The path to the template file. */ - private static function get_template( $template_name ) { + private static function get_template( $template_name ): string { $theme_template = get_theme_file_path( '//orbit//' . $template_name ); if ( file_exists( $theme_template ) ) : @@ -41,7 +41,7 @@ private static function get_template( $template_name ) { * @param string $template_name The name of the template file. * @param array $args Optional. Associative array of variables to make available in the template. */ - public static function include_template( string $template_name, array $args = [] ) { + public static function include_template( string $template_name, array $args = [] ): array { $template_path = self::get_template( $template_name ); if ( file_exists( $template_path ) ) { From dd31f81e6ad2362c88daa92ff0931130710f40c4 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Thu, 23 Oct 2025 12:17:13 +0100 Subject: [PATCH 8/9] New: removed activation and deactivation hooks --- includes/classes/Plugin.php | 14 -------------- orbit.php | 4 ---- 2 files changed, 18 deletions(-) diff --git a/includes/classes/Plugin.php b/includes/classes/Plugin.php index e5b37a5..026df83 100644 --- a/includes/classes/Plugin.php +++ b/includes/classes/Plugin.php @@ -42,18 +42,4 @@ public function setup(): void { ThirdParty\WooCommerce::instance()->setup(); ThirdParty\Altcha::instance()->setup(); } - - /** - * Plugin activation. - * - * @return void - */ - public static function activation(): void {} - - /** - * Plugin deactivation. - * - * @return void - */ - public static function deactivation(): void {} } diff --git a/orbit.php b/orbit.php index 175dc6b..34517b8 100644 --- a/orbit.php +++ b/orbit.php @@ -26,7 +26,3 @@ // Initialise the plugin. Plugin::instance()->setup(); - -// Register activation and deactivation hooks. -register_activation_hook( __FILE__, [ Plugin::class, 'activation' ] ); -register_deactivation_hook( __FILE__, [ Plugin::class, 'deactivation' ] ); From e6293f6a685b325c81578b757722843048686b57 Mon Sep 17 00:00:00 2001 From: Dan Hudson Date: Fri, 24 Oct 2025 09:27:29 +0100 Subject: [PATCH 9/9] New: remove css and js building + node --- lefthook.yml | 16 +--------------- package.json | 33 --------------------------------- postcss.config.js | 5 ----- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 package.json delete mode 100644 postcss.config.js diff --git a/lefthook.yml b/lefthook.yml index ddd53bc..4bf89b2 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,20 +1,6 @@ pre-commit: parallel: true jobs: - - run: npm run lint:css - glob: - - "*.scss" - - "*.css" - stage_fixed: true - - - run: npm run lint:js - glob: - - "*.js" - - "*.jsx" - - "*.ts" - - "*.tsx" - stage_fixed: true - - - run: npm run lint:php + - run: composer run lint glob: "*.php" stage_fixed: true diff --git a/package.json b/package.json deleted file mode 100644 index 0a52d85..0000000 --- a/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "orbit", - "version": "2.3.0", - "description": "Opinionated WordPress behaviour overrides", - "author": "eighteen73", - "license": "MIT License", - "homepage": "https://github.com/eighteen73/orbit", - "scripts": { - "postinstall": "composer install -o", - "format": "npm run format:css && npm run format:js && format:php", - "format:css": "stylelint --fix \"./css/*.css\"", - "format:js": "eslint --fix \"./js/*.js\"", - "format:php": "composer run format", - "lint": "npm run lint:css && npm run lint:js && npm run lint:php", - "lint:css": "wp-scripts lint-style", - "lint:js": "wp-scripts lint-js", - "lint:php": "composer run lint", - "lint:md:docs": "wp-scripts lint-md-docs", - "lint:pkg-json": "wp-scripts lint-pkg-json", - "packages-update": "wp-scripts packages-update", - "plugin-zip": "wp-scripts plugin-zip", - "pot": "wp i18n make-pot . languages/example-block.pot --domain=example-block --exclude=node_modules,vendor,.git" - }, - "devDependencies": { - "@eighteen73/eslint-config-wordpress": "latest", - "@eighteen73/stylelint-config-wordpress": "latest", - "@wordpress/browserslist-config": "latest", - "@wordpress/prettier-config": "latest", - "@wordpress/scripts": "latest", - "lefthook": "latest", - "postcss-preset-env": "latest" - } -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index f36eb39..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: { - 'postcss-preset-env': {}, - }, -};