diff --git a/.editorconfig b/.editorconfig index 79207a4..2612e4e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,14 +9,15 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true indent_style = tab indent_size = 4 +insert_final_newline = true +tabSize = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false -[{.jshintrc,*.json,*.yml}] +[{*.json,*.yml}] indent_style = space indent_size = 2 - -[{*.txt,wp-config-sample.php}] -end_of_line = crlf diff --git a/.github/workflows/build-test-measure.yml b/.github/workflows/build-test-measure.yml new file mode 100644 index 0000000..cd94352 --- /dev/null +++ b/.github/workflows/build-test-measure.yml @@ -0,0 +1,13 @@ +name: Build, test & measure + +on: + workflow_call: + pull_request: + push: + branches: + ['main'] + +jobs: + call-workflow-build-test-measure: + uses: figuren-theater/code-quality/.github/workflows/build-test-measure.yml@main + secrets: inherit diff --git a/.github/workflows/prerelease-changelog.yml b/.github/workflows/prerelease-changelog.yml new file mode 100644 index 0000000..265e9ab --- /dev/null +++ b/.github/workflows/prerelease-changelog.yml @@ -0,0 +1,12 @@ +name: 'pre-Release Changelog Update' + +on: + workflow_call: + release: + types: [prereleased] + +jobs: + call-workflow-update-changelog: + uses: figuren-theater/.github/.github/workflows/prerelease-changelog-update.yml@main + secrets: inherit + diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..3e5c659 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,19 @@ +name: Draft or update the next release + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + # pull_request event is required only for autolabeler + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + # pull_request_target event is required for autolabeler to support PRs from forks + # pull_request_target: + # types: [opened, reopened, synchronize] + +jobs: + call-workflow-release-drafter: + uses: figuren-theater/.github/.github/workflows/release-drafter.yml@main + secrets: inherit diff --git a/.gitignore b/.gitignore index c465c45..ef0918a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,23 @@ -.DS_Store -phpcs.xml -phpunit.xml -Thumbs.db -wp-cli.local.yml -node_modules/ +/build/ +/node_modules +/vendor *.sql *.tar.gz *.zip +/wiki +.vscode + +# Generated via bin/transform-readme.php +/readme.txt +/.wp-env.override.json + +# misc +.DS_Store +Thumbs.db +# is created during composer install, +# when package is tested +# and not running within ft-platform /vendor/ /wordpress/ /wp-content/ diff --git a/.phpcs.xml b/.phpcs.xml new file mode 100644 index 0000000..416ca6a --- /dev/null +++ b/.phpcs.xml @@ -0,0 +1,23 @@ + + + Coding standards for ft-onboarding + + . + + + + */vendor/* + */wordpress/* + */wp-content/* + + + inc/sites/wp_dropdown_posts/* + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4ff85d3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [Unreleased](https://github.com/figuren-theater/ft-onboarding/compare/1.4.0...HEAD) + + + diff --git a/README.md b/README.md index e37099f..4c2f3b0 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This is the long desc ... * [x] *list closed tracking-issues or `docs` files here* -* [ ] Do you have any [ideas](/issues/new) ? +* [ ] Do you have any [ideas](https://github.com/figuren-theater/ft-onboarding/issues/new) ? ## Background & Motivation @@ -35,20 +35,10 @@ This is the long desc ... ## Install -1. Add this repository to your `composer.json` -```json -"repositories": [ - { - "type": "git", - "url": "https://github.com/figuren-theater/ft-onboarding" - } -] -``` - -2. Install via command line -```sh -composer require figuren-theater/ft-onboarding -``` +1. Install via command line + ```sh + composer require figuren-theater/ft-onboarding + ``` ### Plugins included @@ -77,6 +67,8 @@ Accompaniying the core functionality of the mentioned plugins, theese **best pra ## Built with & uses - [dependabot](/.github/dependabot.yml) + - [code-quality](https://github.com/figuren-theater/code-quality/) + A set of status checks to ensure high and consitent code-quality for the figuren.theater platform. - .... ## Contributing @@ -96,13 +88,13 @@ Don't forget to give the project a star! Thanks again! ## Versioning We use [Semantic Versioning](http://semver.org/) for versioning. For the versions -available, see the [tags on this repository](/tags). +available, see the [tags on this repository](https://github.com/figuren-theater/ft-onboarding/tags). ## Authors - **Carsten Bach** - *Provided idea & code* - [figuren.theater/crew](https://figuren.theater/crew/) -See also the list of [contributors](/contributors) +See also the list of [contributors](https://github.com/figuren-theater/ft-onboarding/contributors) who participated in this project. ## License diff --git a/composer.json b/composer.json index 03e3610..1921dd5 100644 --- a/composer.json +++ b/composer.json @@ -1,92 +1,99 @@ { "name": "figuren-theater/ft-onboarding", "description": "Onboarding of new users, site- and user creation for a WordPress Multisite network like figuren.theater.", - "homepage": "https://websites.fuer.figuren.theater", - "type": "wordpress-muplugin", - "keywords": ["wordpress", "users", "onboarding", "registration"], - "license": "GPL-3.0-or-later", - "authors": [ - { - "name": "figuren.theater", - "email": "info@figuren.theater" - }, - { - "name": "Carsten Bach", - "email": "mail@carsten-bach.de", - "homepage": "https://carsten-bach.de", - "role": "Developer" - } - ], - "support": { - "email": "info@figuren.theater", - "issues": "https://github.com/figuren-theater/ft-onboarding/issues", - "source": "https://github.com/figuren-theater/ft-onboarding" - }, - "autoload": { - "files": [ - "inc/ft-core-block-domaincheck/namespace.php", - "inc/preferred-languages/namespace.php", - "inc/impressum/namespace.php", - "inc/sites/installation.php", - "inc/sites/registration.php", - "inc/sites/namespace.php", - "inc/users/namespace.php", - "inc/wp-approve-user/namespace.php", - "inc/wp-multi-network/namespace.php", - "inc/wp-user-profiles/namespace.php", - "inc/namespace.php" - ], - "classmap": [ - "inc/" - ] + "license": "GPL-3.0-or-later", + "type": "wordpress-muplugin", + "keywords": [ + "wordpress", + "users", + "onboarding", + "registration" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "homepage": "https://websites.fuer.figuren.theater", + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/ft-onboarding/issues", + "source": "https://github.com/figuren-theater/ft-onboarding" + }, + "require": { + "php": ">=7.1", + "figuren-theater/ft-core-block-domaincheck": "0.1.2", + "figuren-theater/ft-options": "*", + "figuren-theater/install.php": "1.1.0", + "stuttter/wp-multi-network": "2.5.2", + "stuttter/wp-user-profiles": "2.6.2", + "wpackagist-plugin/impressum": "2.0.3", + "wpackagist-plugin/preferred-languages": "2.0.1", + "wpackagist-plugin/wp-approve-user": "11" + }, + "require-dev": { + "figuren-theater/code-quality": "^1.1" }, "repositories": [ { - "type": "git", - "url": "https://github.com/figuren-theater/ft-options" - }, - { - "type": "git", - "url": "https://github.com/figuren-theater/ft-core-block-domaincheck" - }, - { - "type": "git", - "url": "https://github.com/figuren-theater/install.php" - }, + "type": "git", + "url": "https://github.com/figuren-theater/ft-core-block-domaincheck" + }, + { + "type": "git", + "url": "https://github.com/figuren-theater/install.php" + }, { "type": "composer", - "url" : "https://wpackagist.org" + "url": "https://wpackagist.org" } ], - "require": { - "php": ">=7.1", - "figuren-theater/ft-options": "*", - "figuren-theater/ft-core-block-domaincheck": "0.1.2", - "figuren-theater/install.php": "1.1.0", - "stuttter/wp-user-profiles": "2.6.2", - "stuttter/wp-multi-network":"2.5.2", - "wpackagist-plugin/impressum":"2.0.3", - "wpackagist-plugin/preferred-languages":"2.0.1", - "wpackagist-plugin/wp-approve-user": "11" + "autoload": { + "classmap": [ + "inc/" + ], + "files": [ + "inc/ft-core-block-domaincheck/namespace.php", + "inc/preferred-languages/namespace.php", + "inc/impressum/namespace.php", + "inc/sites/installation.php", + "inc/sites/registration.php", + "inc/sites/namespace.php", + "inc/users/namespace.php", + "inc/wp-approve-user/namespace.php", + "inc/wp-multi-network/namespace.php", + "inc/wp-user-profiles/namespace.php", + "inc/namespace.php" + ] }, - "extra": { - "altis": { - "install-overrides": [ - "figuren-theater/ft-core-block-domaincheck", - "figuren-theater/install.php", - "stuttter/wp-multi-network", - "stuttter/wp-user-profiles", - "wpackagist-plugin/impressum", - "wpackagist-plugin/preferred-languages", - "wpackagist-plugin/wp-approve-user" - ] - } - }, "config": { "allow-plugins": { "composer/installers": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, "johnpbloch/wordpress-core-installer": true, - "koodimonni/composer-dropin-installer": true + "koodimonni/composer-dropin-installer": true, + "phpstan/extension-installer": true + } + }, + "extra": { + "altis": { + "install-overrides": [ + "figuren-theater/ft-core-block-domaincheck", + "figuren-theater/install.php", + "stuttter/wp-multi-network", + "stuttter/wp-user-profiles", + "wpackagist-plugin/impressum", + "wpackagist-plugin/preferred-languages", + "wpackagist-plugin/wp-approve-user" + ] } } } diff --git a/composer.lock b/composer.lock index 6f902ab..eda89c8 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": "f2e95ddac3c719a7529e7d9bc46337d3", + "content-hash": "95fce607c1c48b73d649b0b53d61ae7b", "packages": [ { "name": "composer/installers", @@ -204,18 +204,24 @@ }, { "name": "figuren-theater/ft-options", - "version": "1.2.3", + "version": "1.2.5", "source": { "type": "git", - "url": "https://github.com/figuren-theater/ft-options", - "reference": "127e6c8bb62cce778ee7468aa548c8326fe9c29a" + "url": "https://github.com/figuren-theater/ft-options.git", + "reference": "19baf021113cdfd91facdd9750820ac22f631330" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/ft-options/zipball/19baf021113cdfd91facdd9750820ac22f631330", + "reference": "19baf021113cdfd91facdd9750820ac22f631330", + "shasum": "" }, "require": { "markjaquith/wp-tlc-transients": "^1.0", "php": ">=7.4" }, "require-dev": { - "figuren-theater/code-quality": "*" + "figuren-theater/code-quality": "^1.1" }, "type": "wordpress-muplugin", "autoload": { @@ -223,6 +229,7 @@ "inc/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-3.0-or-later" ], @@ -241,9 +248,9 @@ "description": "Options management via code for a WordPress multisite like figuren.theater", "homepage": "https://websites.fuer.figuren.theater", "keywords": [ + "Settings", "multisite", "options", - "settings", "wordpress" ], "support": { @@ -251,7 +258,7 @@ "issues": "https://github.com/figuren-theater/ft-options/issues", "source": "https://github.com/figuren-theater/ft-options" }, - "time": "2023-09-11T10:27:33+00:00" + "time": "2024-02-24T14:02:32+00:00" }, { "name": "figuren-theater/install.php", @@ -304,20 +311,20 @@ }, { "name": "johnpbloch/wordpress", - "version": "6.3.2", + "version": "6.4.3", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress.git", - "reference": "95f0b339643817935ac043b98d4aa1e1a0d08049" + "reference": "b20c2071f4cd609953dbd7ffc97e5201094499f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/95f0b339643817935ac043b98d4aa1e1a0d08049", - "reference": "95f0b339643817935ac043b98d4aa1e1a0d08049", + "url": "https://api.github.com/repos/johnpbloch/wordpress/zipball/b20c2071f4cd609953dbd7ffc97e5201094499f0", + "reference": "b20c2071f4cd609953dbd7ffc97e5201094499f0", "shasum": "" }, "require": { - "johnpbloch/wordpress-core": "6.3.2", + "johnpbloch/wordpress-core": "6.4.3", "johnpbloch/wordpress-core-installer": "^1.0 || ^2.0", "php": ">=7.0.0" }, @@ -346,20 +353,20 @@ "issues": "https://core.trac.wordpress.org/", "source": "https://core.trac.wordpress.org/browser" }, - "time": "2023-10-12T19:02:29+00:00" + "time": "2024-01-30T19:31:18+00:00" }, { "name": "johnpbloch/wordpress-core", - "version": "6.3.2", + "version": "6.4.3", "source": { "type": "git", "url": "https://github.com/johnpbloch/wordpress-core.git", - "reference": "0a18695e2ae028ea8485c45053c14525544c1dc7" + "reference": "389a4e72f3e14a995f89fa4bc5a69c7cf75ae2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/0a18695e2ae028ea8485c45053c14525544c1dc7", - "reference": "0a18695e2ae028ea8485c45053c14525544c1dc7", + "url": "https://api.github.com/repos/johnpbloch/wordpress-core/zipball/389a4e72f3e14a995f89fa4bc5a69c7cf75ae2a8", + "reference": "389a4e72f3e14a995f89fa4bc5a69c7cf75ae2a8", "shasum": "" }, "require": { @@ -367,7 +374,7 @@ "php": ">=7.0.0" }, "provide": { - "wordpress/core-implementation": "6.3.2" + "wordpress/core-implementation": "6.4.3" }, "type": "wordpress-core", "notification-url": "https://packagist.org/downloads/", @@ -394,7 +401,7 @@ "source": "https://core.trac.wordpress.org/browser", "wiki": "https://codex.wordpress.org/" }, - "time": "2023-10-12T19:02:24+00:00" + "time": "2024-01-30T19:31:14+00:00" }, { "name": "johnpbloch/wordpress-core-installer", @@ -697,7 +704,1761 @@ "homepage": "https://wordpress.org/plugins/wp-approve-user/" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "automattic/vipwpcs", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/Automattic/VIP-Coding-Standards.git", + "reference": "1b8960ebff9ea3eb482258a906ece4d1ee1e25fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Automattic/VIP-Coding-Standards/zipball/1b8960ebff9ea3eb482258a906ece4d1ee1e25fd", + "reference": "1b8960ebff9ea3eb482258a906ece4d1ee1e25fd", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", + "sirbrillig/phpcs-variable-analysis": "^2.11.17", + "squizlabs/php_codesniffer": "^3.7.2", + "wp-coding-standards/wpcs": "^3.0" + }, + "require-dev": { + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcompatibility/php-compatibility": "^9", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4 || ^5 || ^6 || ^7" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/Automattic/VIP-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions", + "keywords": [ + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/Automattic/VIP-Coding-Standards/issues", + "source": "https://github.com/Automattic/VIP-Coding-Standards", + "wiki": "https://github.com/Automattic/VIP-Coding-Standards/wiki" + }, + "time": "2023-09-05T11:01:05+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": "ergebnis/composer-normalize", + "version": "2.42.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", + "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0.0", + "ergebnis/json": "^1.2.0", + "ergebnis/json-normalizer": "^4.5.0", + "ergebnis/json-printer": "^3.5.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "localheinz/diff": "^1.1.1", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "composer/composer": "^2.6.6", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.2", + "symfony/filesystem": "^5.4.25", + "vimeo/psalm": "^5.20.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + }, + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2024-01-30T11:54:02+00:00" + }, + { + "name": "ergebnis/json", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json.git", + "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json/zipball/a457f25a5ba7ea11fc94f84d53678c5211abfce0", + "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.2", + "vimeo/psalm": "^5.20.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a Json value object for representing a valid JSON string.", + "homepage": "https://github.com/ergebnis/json", + "keywords": [ + "json" + ], + "support": { + "issues": "https://github.com/ergebnis/json/issues", + "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json" + }, + "time": "2024-01-29T15:09:24+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "4.5.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/f0ee9e70739f121b27fac8b743e4a52b23de2152", + "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ergebnis/json-printer": "^3.5.0", + "ergebnis/json-schema-validator": "^4.2.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "composer/semver": "^3.4.0", + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.4", + "vimeo/psalm": "^5.20.0" + }, + "suggest": { + "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "time": "2024-01-30T09:10:15+00:00" + }, + { + "name": "ergebnis/json-pointer", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-pointer.git", + "reference": "b654757d873050622c2166f55ab25d04685261c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/b654757d873050622c2166f55ab25d04685261c5", + "reference": "b654757d873050622c2166f55ab25d04685261c5", + "shasum": "" + }, + "require": { + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.2", + "vimeo/psalm": "^5.20.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Pointer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides an abstraction of a JSON pointer.", + "homepage": "https://github.com/ergebnis/json-pointer", + "keywords": [ + "RFC6901", + "json", + "pointer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-pointer/issues", + "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-pointer" + }, + "time": "2024-01-29T16:37:15+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.5.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/549e16fe6de34b8c3aee7b421be12caa552f3ced", + "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.2", + "vimeo/psalm": "^5.20.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-printer" + }, + "time": "2024-01-29T15:33:37+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "4.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef", + "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.20.0", + "ergebnis/phpunit-slow-test-detector": "^2.9.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.6.16", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.19.2", + "vimeo/psalm": "^5.20.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "time": "2024-01-29T16:50:15+00:00" + }, + { + "name": "figuren-theater/code-quality", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/code-quality.git", + "reference": "c3d56f0e03d78be437079c6893920f03da3bc264" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/code-quality/zipball/c3d56f0e03d78be437079c6893920f03da3bc264", + "reference": "c3d56f0e03d78be437079c6893920f03da3bc264", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "0.7.2", + "ergebnis/composer-normalize": "2.42.0", + "figuren-theater/coding-standards": "*", + "figuren-theater/phpstan": "*", + "phpstan/extension-installer": "1.3.1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "Development tools to measure and test the code quality of figuren.theater, the WordPress Multisite network for puppeteers.", + "homepage": "https://websites.fuer.figuren.theater", + "keywords": [ + ".editorconfig", + "phpcs.xml", + "phpstan.neon", + "wordpress" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/code-quality/issues", + "source": "https://github.com/figuren-theater/code-quality" + }, + "time": "2024-02-15T17:33:00+00:00" + }, + { + "name": "figuren-theater/coding-standards", + "version": "0.4.2", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/coding-standards.git", + "reference": "d2c0ec0e2ba2690099ccfeb8a23bf571dc4599ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/coding-standards/zipball/d2c0ec0e2ba2690099ccfeb8a23bf571dc4599ac", + "reference": "d2c0ec0e2ba2690099ccfeb8a23bf571dc4599ac", + "shasum": "" + }, + "require": { + "automattic/vipwpcs": "^3.0", + "ergebnis/composer-normalize": "^2.31", + "phpcompatibility/phpcompatibility-wp": "*", + "rarst/phpcs-cognitive-complexity": "^0.2.0" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "Coding standards for PHP, JavaScript and CSS within the figuren.theater WordPress Multisite network.", + "homepage": "https://websites.fuer.figuren.theater", + "keywords": [ + "WordPressVIPMinimum", + "coding-standards", + "wordpress", + "wpcs" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/coding-standards/issues", + "source": "https://github.com/figuren-theater/coding-standards" + }, + "time": "2024-02-10T04:32:28+00:00" + }, + { + "name": "figuren-theater/phpstan", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/figuren-theater/phpstan.git", + "reference": "cdab496710bae6416ef3463eb5b879c137130268" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/figuren-theater/phpstan/zipball/cdab496710bae6416ef3463eb5b879c137130268", + "reference": "cdab496710bae6416ef3463eb5b879c137130268", + "shasum": "" + }, + "require": { + "php-stubs/wordpress-globals": "0.2.0", + "szepeviktor/phpstan-wordpress": "1.3.2" + }, + "require-dev": { + "ergebnis/composer-normalize": "2.42.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "figuren.theater", + "email": "info@figuren.theater" + }, + { + "name": "Carsten Bach", + "email": "mail@carsten-bach.de", + "homepage": "https://carsten-bach.de", + "role": "Developer" + } + ], + "description": "org-wide used phpstan.neon file for the WordPress Multisite network for puppeteers figuren.theater", + "homepage": "https://figuren.theater", + "keywords": [ + "PHPStan", + "wordpress" + ], + "support": { + "email": "info@figuren.theater", + "issues": "https://github.com/figuren-theater/phpstan/issues", + "source": "https://github.com/figuren-theater/phpstan" + }, + "time": "2024-02-15T17:24:24+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "v5.2.13", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/v5.2.13" + }, + "time": "2023-09-26T02:20:38+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "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": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, + { + "name": "php-stubs/wordpress-globals", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-globals.git", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-globals/zipball/748a1fb2ae8fda94844bd0545935095dbf404b32", + "reference": "748a1fb2ae8fda94844bd0545935095dbf404b32", + "shasum": "" + }, + "require-dev": { + "php": "~7.1" + }, + "suggest": { + "php-stubs/wordpress-stubs": "Up-to-date WordPress function and class declaration stubs", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Global variables and global constants from WordPress core.", + "homepage": "https://github.com/php-stubs/wordpress-globals", + "keywords": [ + "PHPStan", + "constants", + "globals", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-globals/issues", + "source": "https://github.com/php-stubs/wordpress-globals/tree/master" + }, + "time": "2020-01-13T06:12:59+00:00" + }, + { + "name": "php-stubs/wordpress-stubs", + "version": "v6.4.3", + "source": { + "type": "git", + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "6105bdab2f26c0204fe90ecc53d5684754550e8f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/6105bdab2f26c0204fe90ecc53d5684754550e8f", + "reference": "6105bdab2f26c0204fe90ecc53d5684754550e8f", + "shasum": "" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ~8.0.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^5.3", + "phpstan/phpstan": "^1.10.49", + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.11" + }, + "suggest": { + "paragonie/sodium_compat": "Pure PHP implementation of libsodium", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress function and class declaration stubs for static analysis.", + "homepage": "https://github.com/php-stubs/wordpress-stubs", + "keywords": [ + "PHPStan", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/php-stubs/wordpress-stubs/issues", + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.4.3" + }, + "time": "2024-02-11T18:56:19+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.2", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "paragonie/random_compat": "dev-master", + "paragonie/sodium_compat": "dev-master" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || 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", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + }, + "time": "2022-10-25T01:46:02+00:00" + }, + { + "name": "phpcompatibility/phpcompatibility-wp", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/phpcompatibility-paragonie": "^1.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || 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", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + }, + "time": "2022-10-24T09:00:36+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.9", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "908247bc65010c7b7541a9551e002db12e9dae70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/908247bc65010c7b7541a9551e002db12e9dae70", + "reference": "908247bc65010c7b7541a9551e002db12e9dae70", + "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.8.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": "2023-12-08T14:50:00+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a", + "reference": "f45734bfb9984c6c56c4486b71230355f066a58a", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.3.1" + }, + "time": "2023-05-24T08:59:17+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.59", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "e607609388d3a6d418a50a49f7940e8086798281" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281", + "reference": "e607609388d3a6d418a50a49f7940e8086798281", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2024-02-20T13:59:13+00:00" + }, + { + "name": "rarst/phpcs-cognitive-complexity", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/Rarst/phpcs-cognitive-complexity.git", + "reference": "b903498ba13b12cff037315a3b09ec67714b3a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Rarst/phpcs-cognitive-complexity/zipball/b903498ba13b12cff037315a3b09ec67714b3a1d", + "reference": "b903498ba13b12cff037315a3b09ec67714b3a1d", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "pds/skeleton": "^1.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "Installer plugin for automatic standard registration." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Savchenko", + "homepage": "https://www.Rarst.net/" + } + ], + "description": "Cognitive complexity implementation for PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/Rarst/phpcs-cognitive-complexity/issues", + "source": "https://github.com/Rarst/phpcs-cognitive-complexity" + }, + "time": "2019-12-24T14:23:35+00:00" + }, + { + "name": "sirbrillig/phpcs-variable-analysis", + "version": "v2.11.17", + "source": { + "type": "git", + "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git", + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049", + "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "squizlabs/php_codesniffer": "^3.5.6" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", + "phpcsstandards/phpcsdevcs": "^1.1", + "phpstan/phpstan": "^1.7", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0", + "sirbrillig/phpcs-import-detection": "^1.1", + "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "VariableAnalysis\\": "VariableAnalysis/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Sam Graham", + "email": "php-codesniffer-variableanalysis@illusori.co.uk" + }, + { + "name": "Payton Swick", + "email": "payton@foolord.com" + } + ], + "description": "A PHPCS sniff to detect problems with variables.", + "keywords": [ + "phpcs", + "static analysis" + ], + "support": { + "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues", + "source": "https://github.com/sirbrillig/phpcs-variable-analysis", + "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki" + }, + "time": "2023-08-05T23:46:11+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.9.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "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" + } + ], + "time": "2024-02-16T15:06:51+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.29.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/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.29.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-01-29T20:11:03+00:00" + }, + { + "name": "szepeviktor/phpstan-wordpress", + "version": "v1.3.2", + "source": { + "type": "git", + "url": "https://github.com/szepeviktor/phpstan-wordpress.git", + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/b8516ed6bab7ec50aae981698ce3f67f1be2e45a", + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", + "phpstan/phpstan": "^1.10.30", + "symfony/polyfill-php73": "^1.12.0" + }, + "require-dev": { + "composer/composer": "^2.1.14", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.1", + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^8.0 || ^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" + }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "SzepeViktor\\PHPStan\\WordPress\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "WordPress extensions for PHPStan", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.2" + }, + "time": "2023-10-16T17:23:56+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1", + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", + "php": ">=5.4", + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", + "squizlabs/php_codesniffer": "^3.7.2" + }, + "require-dev": { + "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.2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.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/thewpcc/contribute/wp-php-63406", + "type": "custom" + } + ], + "time": "2023-09-14T07:06:09+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], @@ -707,5 +2468,5 @@ "php": ">=7.1" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/inc/ft-core-block-domaincheck/namespace.php b/inc/ft-core-block-domaincheck/namespace.php index e0f23d6..ecad0b8 100644 --- a/inc/ft-core-block-domaincheck/namespace.php +++ b/inc/ft-core-block-domaincheck/namespace.php @@ -2,22 +2,19 @@ /** * Figuren_Theater Onboarding FT_Core_Block_Domaincheck. * - * @package figuren-theater/onboarding/ft_core_block_domaincheck + * @package figuren-theater/ft-onboarding */ namespace Figuren_Theater\Onboarding\FT_Core_Block_Domaincheck; use FT_VENDOR_DIR; - use Figuren_Theater; -use function Figuren_Theater\get_config; - use function add_action; use function is_network_admin; use function is_user_admin; const BASENAME = 'ft-core-block-domaincheck/ft-core-block-domaincheck.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/figuren-theater/' . BASENAME; +const PLUGINPATH = '/figuren-theater/' . BASENAME; /** * Bootstrap module, when enabled. @@ -29,14 +26,21 @@ function bootstrap() { add_action( 'init', __NAMESPACE__ . '\\load_plugin', 8 ); } -function load_plugin() { +/** + * Conditionally load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin(): void { - if ( is_network_admin() || is_user_admin() ) + if ( is_network_admin() || is_user_admin() ) { return; + } $config = Figuren_Theater\get_config()['modules']['onboarding']; - if ( ! $config['ft-core-block-domaincheck'] ) - return; // early + if ( ! $config['ft-core-block-domaincheck'] ) { + return; + } - require_once PLUGINPATH; + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant } diff --git a/inc/impressum/namespace.php b/inc/impressum/namespace.php index 1f02c59..0f77196 100644 --- a/inc/impressum/namespace.php +++ b/inc/impressum/namespace.php @@ -2,7 +2,7 @@ /** * Figuren_Theater Onboarding Impressum. * - * @package figuren-theater/onboarding/impressum + * @package figuren-theater/ft-onboarding */ namespace Figuren_Theater\Onboarding\Impressum; @@ -17,109 +17,134 @@ use function is_admin; const BASENAME = 'impressum/impressum.php'; -const PLUGINPATH = FT_VENDOR_DIR . '/wpackagist-plugin/' . BASENAME; +const PLUGINPATH = '/wpackagist-plugin/' . BASENAME; const OPTION = 'impressum_imprint_options'; /** * Bootstrap module, when enabled. + * + * @return void */ -function bootstrap() { +function bootstrap(): void { add_action( 'Figuren_Theater\loaded', __NAMESPACE__ . '\\filter_options', 11 ); add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_plugin', 4 ); } +/** + * Load the plugin itself and its modifications. + * + * @return void + */ +function load_plugin(): void { -function load_plugin() { - - require_once PLUGINPATH; + require_once FT_VENDOR_DIR . PLUGINPATH; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant add_filter( 'pre_update_option_' . OPTION, __NAMESPACE__ . '\\pre_update_ft_geo_option_from_imprint', 10, 3 ); - if ( ! is_admin() ) + if ( ! is_admin() ) { return; + } - add_action( 'impressum_country_after_sort', __NAMESPACE__ . '\\impressum_country_after_sort' ); - add_action( 'impressum_legal_entity_after_sort', __NAMESPACE__ . '\\impressum_legal_entity_after_sort' ); + add_filter( 'impressum_country_after_sort', __NAMESPACE__ . '\\impressum_country_after_sort' ); + add_filter( 'impressum_legal_entity_after_sort', __NAMESPACE__ . '\\impressum_legal_entity_after_sort' ); add_action( 'admin_head-settings_page_impressum', __NAMESPACE__ . '\\cleanup_admin_ui' ); } -function filter_options() { +/** + * Handle options + * + * @return void + */ +function filter_options(): void { $_options = [ 'dismissed-impressum_welcome_notice' => true, - // OPTION => [] // DO NOT HANDLE, as it's the user-data + // OPTION => [] // DO NOT HANDLE, as it's the user-data! ]; - // gets added to the 'OptionsCollection' - // from within itself on creation - new Options\Factory( - $_options, - 'Figuren_Theater\Options\Option', - BASENAME, - ); + // Gets added to the 'OptionsCollection' + // from within itself on creation. + new Options\Factory( + $_options, + 'Figuren_Theater\Options\Option', + BASENAME, + ); } -// set Impressum-location, ft_geo-catgeories and WP_LANG -// in one go, by just .... updating an option -// -function pre_update_ft_geo_option_from_imprint( mixed $new_value, mixed $old_value, string $option_name ) : mixed { - - // do nothing, - // if nothing (on the address) has changed - // $new_value['country'] could be unset by Figuren_Theater\Onboarding\Sites\Installation\set_imprint_page() - // so check it - if ( isset($new_value['country']) && - // can be bool, if non existent yet - isset($old_value['country']) && - $old_value['country'] === $new_value['country'] +/** + * Set Impressum-location, ft_geo-catgeories and WP_LANG in one go, by just .... updating an option. + * + * Filters a specific option before its value is (maybe) serialized and updated. + * + * The dynamic portion of the hook name, `$option`, refers to the option name. + * + * @see https://developer.wordpress.org/reference/hooks/pre_update_option_option/ + * + * @param array $new_value The new, unserialized option value. + * @param array $old_value The old option value. + * @param string $option_name Name of the option in the DB. + * + * @return array The new, updated option value ready for being saved to the database. + */ +function pre_update_ft_geo_option_from_imprint( array $new_value, array $old_value, string $option_name ): array { + + // Do nothing, if nothing (on the address) has changed. + // Do check '$new_value['country']', which could be unset by Figuren_Theater\Onboarding\Sites\Installation\set_imprint_page(). + if ( isset( $new_value['country'] ) && + // Can be bool, if non existent yet. + isset( $old_value['country'] ) && + $old_value['country'] === $new_value['country'] && $old_value['address'] === $new_value['address'] - ) + ) { return $new_value; + } - // otherwise - // start the geo-engines :) - $ft_geo_options_bridge = new Geo\ft_geo_options_bridge; - $ft_geo = $ft_geo_options_bridge->update_option_ft_geo( $old_value, $new_value, $option_name ); + // Start the geo-engines :) ! + $ft_geo_options_bridge = new Geo\ft_geo_options_bridge(); + $ft_geo = $ft_geo_options_bridge->update_option_ft_geo( $old_value, $new_value, $option_name ); - // set adress to verified version + // Set adress to verified version. if ( isset( $ft_geo['address'] ) && ! empty( $ft_geo['address'] ) ) { $new_value['address'] = $ft_geo['address']; } else { - // or reset + // Or reset. $new_value['address'] = $old_value['address']; } - // set country to verified version - if ( isset( $ft_geo['geojson']['properties']['address']['country'] )) { - // crazy country codes by 'Impressum' plugin - $_country_helper = [ + // Set country to verified version. + if ( isset( $ft_geo['geojson']['properties']['address']['country'] ) ) { + // Crazy country codes by 'Impressum' plugin. + $_country_helper = [ 'de' => 'deu', 'at' => 'aut', 'ch' => 'che', ]; $new_value['country'] = $_country_helper[ $ft_geo['geojson']['properties']['address']['country_code'] ]; } else { - // or reset + // Or reset. $new_value['country'] = $old_value['country']; } - // go on and save + // Go on and save. return $new_value; - } /** + * Reduce countries to relevant ones. + * * Filter the countries after localized alphabetical sorting. * - * @param array $countries The current countries + * @param array $countries The current countries. + * + * @return array $countries The filtered countries. */ -function impressum_country_after_sort( array $countries ) : array { +function impressum_country_after_sort( array $countries ): array { return [ 'deu' => $countries['deu'], 'aut' => $countries['aut'], @@ -129,11 +154,15 @@ function impressum_country_after_sort( array $countries ) : array { /** + * Reduce legal entities to relevant ones. + * * Filter the legal entities after localized alphabetical sorting. * - * @param array $countries The current countries + * @param array $legal_entities The current legal entities. + * + * @return array The filtered legal entities. */ -function impressum_legal_entity_after_sort( array $legal_entities ) : array { +function impressum_legal_entity_after_sort( array $legal_entities ): array { return [ 'self' => $legal_entities['self'], 'individual' => $legal_entities['individual'], @@ -141,7 +170,12 @@ function impressum_legal_entity_after_sort( array $legal_entities ) : array { } -function cleanup_admin_ui() : void { +/** + * Reduce up-sell bloat & clutter from admin settings-page. + * + * @return void + */ +function cleanup_admin_ui(): void { echo '