From 4ef9bdf2e7838e933e49fefb21f0b0a84ba06f83 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 15:42:20 +0100 Subject: [PATCH 01/11] (feat): update extended-cpts and php-cs-fixer --- composer.json | 4 +- composer.lock | 1554 +++++++++++++++++++++++++++++++------------------ 2 files changed, 1004 insertions(+), 554 deletions(-) diff --git a/composer.json b/composer.json index 9240469..9b71e35 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ "type": "wordpress-plugin", "require": { "php": "^7.4|^8.0", - "johnbillion/extended-cpts": "^4.0", + "johnbillion/extended-cpts": "^5.0", "yahnis-elsts/plugin-update-checker": "^5.0" }, "require-dev": { "10up/wp_mock": "~0.5", - "friendsofphp/php-cs-fixer": "^2.0", + "friendsofphp/php-cs-fixer": "^3.0", "mockery/mockery": "^1.5", "phpunit/phpunit": "~9.0", "szepeviktor/phpstan-wordpress": "^1.1" diff --git a/composer.lock b/composer.lock index cb5f689..c35654f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,56 +4,169 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ff20c75b853648a6f9dc6493461c3bc1", + "content-hash": "deaeeba79657f2b41ad9b88c9b868033", "packages": [ + { + "name": "johnbillion/args", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/johnbillion/args.git", + "reference": "ef670a14ce0b9221cee0a39f076f4810a200d1ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnbillion/args/zipball/ef670a14ce0b9221cee0a39f076f4810a200d1ac", + "reference": "ef670a14ce0b9221cee0a39f076f4810a200d1ac", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "ergebnis/json-printer": "^3.2", + "ergebnis/phpstan-rules": "^1.0", + "humanmade/coding-standards": "^1.1", + "johnbillion/falsey-assertequals-detector": "^3", + "phpdocumentor/reflection": "~4.0 || ~5.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^9.0", + "roots/wordpress-core-installer": "^1.0.0", + "roots/wordpress-full": "~6.5.0" + }, + "type": "library", + "extra": { + "args-shapes": [ + "--function=\"\\get_categories()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/category.php", + "--function=\"\\get_comments()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/comment.php", + "--function=\"\\get_posts()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\get_tags()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/category.php", + "--function=\"\\get_terms()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\get_users()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/user.php", + "--function=\"\\paginate_links()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/general-template.php", + "--function=\"\\register_block_type()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/blocks.php", + "--function=\"\\register_meta()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/meta.php", + "--function=\"\\register_post_meta()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\register_post_status()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\register_post_type()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\register_rest_field()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/rest-api.php", + "--function=\"\\register_taxonomy()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\register_term_meta()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\wp_count_terms()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\wp_die()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/functions.php", + "--function=\"\\wp_dropdown_categories()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/category-template.php", + "--function=\"\\wp_dropdown_languages()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/l10n.php", + "--function=\"\\wp_generate_tag_cloud()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/category-template.php", + "--function=\"\\wp_get_nav_menus()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/nav-menu.php", + "--function=\"\\wp_get_object_terms()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\wp_insert_post()\" --param=postarr --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\wp_insert_term()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\wp_insert_user()\" --param=userdata --file=vendor/wordpress/wordpress/wp-includes/user.php", + "--function=\"\\wp_nav_menu()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/nav-menu-template.php", + "--function=\"\\wp_remote_get()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_remote_head()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_remote_post()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_remote_request()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_safe_remote_get()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_safe_remote_head()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_safe_remote_post()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_safe_remote_request()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/http.php", + "--function=\"\\wp_update_post()\" --param=postarr --file=vendor/wordpress/wordpress/wp-includes/post.php", + "--function=\"\\wp_update_term()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/taxonomy.php", + "--function=\"\\wp_update_user()\" --param=userdata --file=vendor/wordpress/wordpress/wp-includes/user.php", + "--method=\"\\WP_Block_Type::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-block-type.php", + "--method=\"\\WP_Comment_Query::__construct()\" --param=query --file=vendor/wordpress/wordpress/wp-includes/class-wp-comment-query.php", + "--method=\"\\WP_Customize_Control::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-customize-control.php", + "--method=\"\\WP_Customize_Manager::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-customize-manager.php", + "--method=\"\\WP_Customize_Panel::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-customize-panel.php", + "--method=\"\\WP_Customize_Section::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-customize-section.php", + "--method=\"\\WP_Customize_Setting::__construct()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-customize-setting.php", + "--method=\"\\WP_Http::request()\" --param=args --file=vendor/wordpress/wordpress/wp-includes/class-wp-http.php", + "--method=\"\\WP_Query::parse_query()\" --param=query --file=vendor/wordpress/wordpress/wp-includes/class-wp-query.php", + "--method=\"\\WP_Term_Query::__construct()\" --param=query --file=vendor/wordpress/wordpress/wp-includes/class-wp-term-query.php", + "--method=\"\\WP_User_Query::prepare_query()\" --param=query --file=vendor/wordpress/wordpress/wp-includes/class-wp-user-query.php" + ], + "wordpress-install-dir": "vendor/wordpress/wordpress" + }, + "autoload": { + "psr-4": { + "Args\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "John Blackbourn", + "homepage": "https://johnblackbourn.com/" + } + ], + "description": "I don't want to get into an argument about this.", + "support": { + "issues": "https://github.com/johnbillion/args/issues", + "source": "https://github.com/johnbillion/args/tree/1.10.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/johnbillion", + "type": "github" + } + ], + "time": "2024-04-02T21:50:24+00:00" + }, { "name": "johnbillion/extended-cpts", - "version": "4.5.2", + "version": "5.0.11", "source": { "type": "git", "url": "https://github.com/johnbillion/extended-cpts.git", - "reference": "59ce9f4e0422512eec6f698ccba4a6a81b018fdb" + "reference": "57f2e74155a12e7a37d07250e6739dbab5a732b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/johnbillion/extended-cpts/zipball/59ce9f4e0422512eec6f698ccba4a6a81b018fdb", - "reference": "59ce9f4e0422512eec6f698ccba4a6a81b018fdb", + "url": "https://api.github.com/repos/johnbillion/extended-cpts/zipball/57f2e74155a12e7a37d07250e6739dbab5a732b3", + "reference": "57f2e74155a12e7a37d07250e6739dbab5a732b3", "shasum": "" }, "require": { - "php": "^7 | ^8" + "johnbillion/args": "^1.4.1 || ^2.0", + "php": ">= 7.4.0" }, "require-dev": { - "automattic/phpcs-neutron-standard": "1.6.0", + "automattic/phpcs-neutron-standard": "1.7.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "johnbillion/falsey-assertequals-detector": "^2", - "phpcompatibility/phpcompatibility-wp": "^2", - "phpunit/phpunit": "^6", - "roots/wordpress": "^5.7.0", - "vlucas/phpdotenv": "^3", - "wp-cli/db-command": "^2.0", - "wp-coding-standards/wpcs": "2.3.0", - "wp-phpunit/wp-phpunit": "^5.7.0" - }, - "suggest": { - "seravo/wp-custom-bulk-actions": "Custom Bulk Actions", - "wpackagist-plugin/rewrite-testing": "Rewrite Rule Testing" + "johnbillion/falsey-assertequals-detector": "*", + "johnbillion/plugin-infrastructure": "dev-trunk", + "johnbillion/wp-compat": "0.3.1", + "lucatume/wp-browser": "3.2.3", + "phpcompatibility/phpcompatibility-wp": "2.1.5", + "phpstan/phpstan": "1.12.12", + "phpstan/phpstan-phpunit": "1.4.1", + "roots/wordpress-core-installer": "1.100.0", + "roots/wordpress-full": "*", + "szepeviktor/phpstan-wordpress": "1.3.5", + "wp-coding-standards/wpcs": "2.3.0" }, "type": "library", "extra": { - "wordpress-install-dir": "tests/wordpress" + "wordpress-install-dir": "vendor/wordpress/wordpress" }, "autoload": { "files": [ - "extended-cpts.php" + "functions.php" ], "psr-4": { - "ExtCPTs\\Tests\\": "tests/phpunit" + "ExtCPTs\\": "src", + "ExtCPTs\\Tests\\": "tests/integration" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0+" + "GPL-2.0-or-later" ], "authors": [ { @@ -65,15 +178,9 @@ "homepage": "https://github.com/johnbillion/extended-cpts/", "support": { "issues": "https://github.com/johnbillion/extended-cpts/issues", - "source": "https://github.com/johnbillion/extended-cpts/tree/4.5.2" + "source": "https://github.com/johnbillion/extended-cpts/tree/5.0.11" }, - "funding": [ - { - "url": "https://github.com/johnbillion", - "type": "github" - } - ], - "time": "2021-03-21T00:26:19+00:00" + "time": "2024-11-30T23:16:17+00:00" }, { "name": "yahnis-elsts/plugin-update-checker", @@ -221,32 +328,104 @@ }, "time": "2024-12-11T10:19:54+00:00" }, + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -274,7 +453,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -290,7 +469,7 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/semver", @@ -375,27 +554,27 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -419,9 +598,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -437,128 +616,7 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:20:32+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.14.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "253dca476f70808a5aeed3a47cc2cc88c5cab915" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/253dca476f70808a5aeed3a47cc2cc88c5cab915", - "reference": "253dca476f70808a5aeed3a47cc2cc88c5cab915", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "~1.4.10 || ^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.4" - }, - "time": "2024-09-05T10:15:52+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", - "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "1.4.10 || 2.0.3", - "phpstan/phpstan-phpunit": "^1.0 || ^2", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psr/log": "^1 || ^2 || ^3" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.4" - }, - "time": "2024-12-07T21:18:45+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "doctrine/instantiator", @@ -631,34 +689,29 @@ "time": "2022-12-30T00:15:36+00:00" }, { - "name": "doctrine/lexer", - "version": "2.1.1", + "name": "evenement/evenement", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6" + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", - "reference": "861c870e8b75f7c8f69c146c7f89cc1c0f1b49b6", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" + "php": ">=7.0" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^12", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.21" + "phpunit/phpunit": "^9 || ^6" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "Evenement\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -667,127 +720,150 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "8520451a140d3f46ac33042715115e290cf5785f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "Tiny utility to get the number of CPU cores.", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "CPU", + "core" ], "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.1" + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" + "url": "https://github.com/theofidry", + "type": "github" } ], - "time": "2024-02-05T11:35:39+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.3", + "version": "v3.65.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", - "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", "shasum": "" }, "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", + "clue/ndjson-react": "^1.0", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", + "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + "fidry/cpu-core-counter": "^1.2", + "php": "^7.4 || ^8.0", + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + "facile-it/paraunit": "^1.3.1 || ^2.4", + "infection/infection": "^0.29.8", + "justinrainbow/json-schema": "^5.3 || ^6.0", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.12", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", + "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" }, "suggest": { "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + "ext-mbstring": "For handling non-UTF8 characters." }, "bin": [ "php-cs-fixer" ], "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, "autoload": { "psr-4": { "PhpCsFixer\\": "src/" }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" + "exclude-from-classmap": [ + "src/Fixer/Internal/*" ] }, "notification-url": "https://packagist.org/downloads/", @@ -805,9 +881,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" }, "funding": [ { @@ -815,7 +897,7 @@ "type": "github" } ], - "time": "2021-11-15T17:17:55+00:00" + "time": "2024-11-25T00:39:24+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -1188,95 +1270,39 @@ "time": "2022-02-21T01:04:05+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", + "name": "php-stubs/wordpress-stubs", + "version": "v6.7.1", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + "url": "https://github.com/php-stubs/wordpress-stubs.git", + "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/83448e918bf06d1ed3d67ceb6a985fc266a02fd1", + "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1", "shasum": "" }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ^8.0", + "php-stubs/generator": "^0.8.3", + "phpdocumentor/reflection-docblock": "^5.4.1", + "phpstan/phpstan": "^1.11", + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", + "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] + "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": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" - }, - "abandoned": true, - "time": "2020-10-14T08:39:05+00:00" - }, - { - "name": "php-stubs/wordpress-stubs", - "version": "v6.7.1", - "source": { - "type": "git", - "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/83448e918bf06d1ed3d67ceb6a985fc266a02fd1", - "reference": "83448e918bf06d1ed3d67ceb6a985fc266a02fd1", - "shasum": "" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "nikic/php-parser": "^4.13", - "php": "^7.4 || ^8.0", - "php-stubs/generator": "^0.8.3", - "phpdocumentor/reflection-docblock": "^5.4.1", - "phpstan/phpstan": "^1.11", - "phpunit/phpunit": "^9.5", - "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^1.1.1", - "wp-coding-standards/wpcs": "3.1.0 as 2.3.0" - }, - "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" + "MIT" ], "description": "WordPress function and class declaration stubs for static analysis.", "homepage": "https://github.com/php-stubs/wordpress-stubs", @@ -1738,65 +1764,441 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2024-12-05T13:48:26+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "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/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "react/cache", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2022-11-30T15:59:55+00:00" + }, + { + "name": "react/child-process", + "version": "v0.6.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "shasum": "" + }, + "require": { + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/event-loop": "^1.2", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/socket": "^1.8", + "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven library for executing child processes with ReactPHP.", + "keywords": [ + "event-driven", + "process", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/child-process/issues", + "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-09-16T13:41:56+00:00" + }, + { + "name": "react/dns", + "version": "v1.13.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.7 || ^1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3 || ^2", + "react/promise-timer": "^1.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Dns\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Async DNS resolver for ReactPHP", "keywords": [ - "phpunit", - "testing", - "xunit" + "async", + "dns", + "dns-resolver", + "reactphp" ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.13.0" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2024-12-05T13:48:26+00:00" + "time": "2024-06-13T14:18:03+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "react/event-loop", + "version": "v1.5.0", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/reactphp/event-loop.git", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, + "suggest": { + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" + }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1805,42 +2207,71 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for caching libraries", + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ - "cache", - "psr", - "psr-6" + "asynchronous", + "event-loop" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" }, - "time": "2016-08-06T20:24:11+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2023-11-13T13:48:05+00:00" }, { - "name": "psr/container", - "version": "1.1.2", + "name": "react/promise", + "version": "v3.2.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "url": "https://github.com/reactphp/promise.git", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", + "reference": "8a164643313c71354582dc850b42b33fa12a4b63", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=7.1.0" + }, + "require-dev": { + "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "Psr\\Container\\": "src/" + "React\\Promise\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1849,51 +2280,75 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "A lightweight implementation of CommonJS Promises/A for PHP", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "promise", + "promises" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v3.2.0" }, - "time": "2021-11-05T16:50:12+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-05-24T10:39:05+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "react/socket", + "version": "v1.16.0", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/reactphp/socket.git", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", "shasum": "" }, "require": { - "php": ">=7.2.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.13", + "react/event-loop": "^1.2", + "react/promise": "^3.2 || ^2.6 || ^1.2.1", + "react/stream": "^1.4" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/async": "^4.3 || ^3.3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.11" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\EventDispatcher\\": "src/" + "React\\Socket\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1902,48 +2357,73 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Standard interfaces for event handling.", + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", "keywords": [ - "events", - "psr", - "psr-14" + "Connection", + "Socket", + "async", + "reactphp", + "stream" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.16.0" }, - "time": "2019-01-08T18:20:26+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-07-26T10:38:09+00:00" }, { - "name": "psr/log", - "version": "1.1.4", + "name": "react/stream", + "version": "v1.4.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "url": "https://github.com/reactphp/stream.git", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d", + "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d", "shasum": "" }, "require": { - "php": ">=5.3.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } + "require-dev": { + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, + "type": "library", "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "React\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1952,21 +2432,48 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ - "log", - "psr", - "psr-3" + "event-driven", + "io", + "non-blocking", + "pipe", + "reactphp", + "readable", + "stream", + "writable" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.4.0" }, - "time": "2021-05-03T11:20:27+00:00" + "funding": [ + { + "url": "https://opencollective.com/reactphp", + "type": "open_collective" + } + ], + "time": "2024-06-11T12:45:25+00:00" }, { "name": "sebastian/cli-parser", @@ -3779,97 +4286,40 @@ "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - }, - "branch-alias": { - "dev-main": "1.20-dev" - } - }, - "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.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.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": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php72", + "name": "symfony/polyfill-php73", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", - "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { "php": ">=7.2" }, - "type": "metapackage", + "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" @@ -3884,7 +4334,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3893,7 +4343,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -3912,17 +4362,17 @@ "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php73", + "name": "symfony/polyfill-php80", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", - "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { @@ -3940,7 +4390,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Php80\\": "" }, "classmap": [ "Resources/stubs" @@ -3951,6 +4401,10 @@ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -3960,7 +4414,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -3969,7 +4423,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -3988,17 +4442,17 @@ "time": "2024-09-09T11:45:10+00:00" }, { - "name": "symfony/polyfill-php80", + "name": "symfony/polyfill-php81", "version": "v1.31.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { @@ -4016,7 +4470,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" + "Symfony\\Polyfill\\Php81\\": "" }, "classmap": [ "Resources/stubs" @@ -4027,10 +4481,6 @@ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -4040,7 +4490,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -4049,7 +4499,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { From 053fe3ea043339da9cd46e2523c5facbbd302054 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 16:43:14 +0100 Subject: [PATCH 02/11] (fix): extended cpt depency check --- config/core.php | 10 +++++----- src/Base/Foundation/DependencyChecker.php | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/config/core.php b/config/core.php index b8468b8..4c9d985 100644 --- a/config/core.php +++ b/config/core.php @@ -48,11 +48,11 @@ 'version' => '1.6.6', 'file' => 'posts-to-posts/posts-to-posts.php', ], - [ - 'type' => 'class', - 'label' => 'Extended CPT library', - 'name' => 'Extended_CPT' - ], + [ + 'type' => 'function', + 'label' => 'Extended CPT library', + 'name' => 'register_extended_post_type' + ], ] ]; diff --git a/src/Base/Foundation/DependencyChecker.php b/src/Base/Foundation/DependencyChecker.php index 4dccd0e..719c204 100644 --- a/src/Base/Foundation/DependencyChecker.php +++ b/src/Base/Foundation/DependencyChecker.php @@ -54,6 +54,10 @@ public function failed(): bool $this->checkPlugin($dependency); break; + case 'function': + $this->checkFunction($dependency); + + break; } } @@ -139,7 +143,17 @@ private function checkPlugin(array $dependency) } } - /** + /** + * Checks if required function exists. + */ + private function checkFunction(array $dependency): void + { + if (! function_exists($dependency['name'])) { + $this->markFailed($dependency, __('Function does not exist:', 'pdc-base') . ' ' . $dependency['name'] . ''); + } + } + + /** * Checks the installed version of the plugin. */ private function checkVersion(array $dependency): bool From 3ba69cf94b96a633f85a27f3e9ff55541e6d99a9 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 17:33:12 +0100 Subject: [PATCH 03/11] (fix): add meta-box-group as dependency --- config/core.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/core.php b/config/core.php index 4c9d985..8c02ffd 100644 --- a/config/core.php +++ b/config/core.php @@ -41,6 +41,11 @@ 'label' => 'RWMB Metabox', 'version' => '4.14.0', 'file' => 'meta-box/meta-box.php' + ], [ + 'type' => 'plugin', + 'label' => 'RWMB Metabox', + 'version' => '1.4.2', + 'file' => 'meta-box-group/meta-box-group.php' ], [ 'type' => 'plugin', From 18e0b28391874fd9f8bf7bde2538cdb76cd267e7 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 21:04:51 +0100 Subject: [PATCH 04/11] (fix): php-cs-fixer --- .php-cs-fixer.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 0d6513a..46613ad 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -27,7 +27,6 @@ 'align_multiline_comment' => true, 'array_indentation' => true, 'no_superfluous_elseif' => true, - 'single_blank_line_before_namespace' => true, 'blank_line_after_opening_tag' => true, 'no_blank_lines_after_phpdoc' => true, 'phpdoc_separation' => true, @@ -49,5 +48,5 @@ 'keep_multiple_spaces_after_comma' => true, ] ]) - ->setRiskyAllowed(true) + ->setRiskyAllowed(false) ->setFinder($finder); From ac83f0430a1d28e7d3520f8d3325b7585ce7d736 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 21:05:03 +0100 Subject: [PATCH 05/11] (chore): run php-cs-fixer --- config/api.php | 4 +- config/core.php | 10 ++--- config/settings.php | 4 +- config/table_of_contents_metabox.php | 12 ++--- config/taxonomies.php | 2 +- config/theme_tiles_metabox.php | 18 ++++---- src/Base/Admin/AdminServiceProvider.php | 4 +- .../Exceptions/PropertyNotExistsException.php | 1 + src/Base/Foundation/Config.php | 1 + src/Base/Foundation/DependencyChecker.php | 29 ++++++------ src/Base/Foundation/Loader.php | 1 + .../Metabox/Handlers/UPLResourceHandler.php | 2 +- src/Base/Metabox/MetaboxServiceProvider.php | 18 ++++---- src/Base/Models/Item.php | 6 +-- src/Base/Models/PortalLinkGenerator.php | 2 +- .../PostTypes/PdcSubcategoryModel.php | 1 + src/Base/Repositories/AbstractRepository.php | 6 +-- .../RestAPI/Controllers/BaseController.php | 2 +- .../RestAPI/Controllers/ItemController.php | 6 +-- .../Controllers/SubthemaController.php | 18 ++++---- .../RestAPI/Controllers/ThemaController.php | 20 ++++----- .../RestAPI/ItemFields/AppointmentField.php | 1 + src/Base/RestAPI/ItemFields/FAQField.php | 1 + src/Base/RestAPI/ItemFields/LinksField.php | 1 + src/Base/RestAPI/ItemFields/SynonymsField.php | 1 + .../ItemFields/TableOfContentsField.php | 3 +- .../ItemFields/TitleAlternativeField.php | 1 + .../RestAPI/SharedFields/HideFeedbackForm.php | 2 +- src/Base/RestAPI/SharedFields/ItemsField.php | 44 +++++++++---------- src/Base/RestAPI/ThemaFields/ThemaField.php | 1 + src/Base/RestAPI/ThemaFields/TilesField.php | 4 +- src/Base/Settings/SettingsPageOptions.php | 24 +++++----- src/Base/Support/CreatesFields.php | 4 +- src/Base/Support/Traits/AppendToTaxQuery.php | 1 + src/Base/Taxonomy/TaxonomyServiceProvider.php | 1 + src/Base/Template/TemplateServiceProvider.php | 1 + .../UPL/views/generate-upl-error-list.php | 2 +- .../UPL/views/generate-upl-success-list.php | 2 +- .../Base/Foundation/DependencyCheckerTest.php | 2 + .../Metabox/MetaboxServiceProviderTest.php | 2 +- tests/Unit/pluginstub.php | 1 + 41 files changed, 142 insertions(+), 124 deletions(-) diff --git a/config/api.php b/config/api.php index 8f5fb0d..a765de3 100644 --- a/config/api.php +++ b/config/api.php @@ -30,7 +30,7 @@ 'seopress' => OWC\PDC\Base\RestAPI\ItemFields\SeoPress::class, 'yoast' => OWC\PDC\Base\RestAPI\ItemFields\Yoast::class, 'hide_feedback_form' => OWC\PDC\Base\RestAPI\SharedFields\HideFeedbackForm::class, - 'table_of_contents_is_active' => OWC\PDC\Base\RestAPI\ItemFields\TableOfContentsField::class + 'table_of_contents_is_active' => OWC\PDC\Base\RestAPI\ItemFields\TableOfContentsField::class ], ], 'subthema' => [ @@ -60,7 +60,7 @@ 'yoast' => OWC\PDC\Base\RestAPI\ItemFields\Yoast::class, 'date_modified' => OWC\PDC\Base\RestAPI\ItemFields\DateModified::class, 'hide_feedback_form' => OWC\PDC\Base\RestAPI\SharedFields\HideFeedbackForm::class, - 'tiles' => OWC\PDC\Base\RestAPI\ThemaFields\TilesField::class + 'tiles' => OWC\PDC\Base\RestAPI\ThemaFields\TilesField::class ], ], ], diff --git a/config/core.php b/config/core.php index 8c02ffd..d8c557e 100644 --- a/config/core.php +++ b/config/core.php @@ -53,11 +53,11 @@ 'version' => '1.6.6', 'file' => 'posts-to-posts/posts-to-posts.php', ], - [ - 'type' => 'function', - 'label' => 'Extended CPT library', - 'name' => 'register_extended_post_type' - ], + [ + 'type' => 'function', + 'label' => 'Extended CPT library', + 'name' => 'register_extended_post_type' + ], ] ]; diff --git a/config/settings.php b/config/settings.php index 2afc038..de04383 100644 --- a/config/settings.php +++ b/config/settings.php @@ -82,13 +82,13 @@ 'id' => 'setting_pdc_use_feedback_form', 'type' => 'checkbox', ], - 'pdc_use_theme_tiles' => [ + 'pdc_use_theme_tiles' => [ 'name' => __('Theme tiles', 'pdc-base'), 'desc' => __('Enable theme tiles.', 'pdc-base'), 'id' => 'setting_pdc_use_theme_tiles', 'type' => 'checkbox', ], - 'pdc_use_table_of_contents' => [ + 'pdc_use_table_of_contents' => [ 'name' => __('Table of contents', 'pdc-base'), 'desc' => __('Enable use of table of contents.', 'pdc-base'), 'id' => 'setting_pdc_use_table_of_contents', diff --git a/config/table_of_contents_metabox.php b/config/table_of_contents_metabox.php index 5dcb482..40d78c2 100644 --- a/config/table_of_contents_metabox.php +++ b/config/table_of_contents_metabox.php @@ -10,12 +10,12 @@ 'autosave' => true, 'fields' => [ 'table_of_contents' => [ - [ - 'name' => __('Table of contents', 'pdc-base'), - 'desc' => __('Use this option if you want to use a table of contents', 'pdc-base'), - 'id' => 'pdc_use_table_of_contents', - 'type' => 'checkbox', - ] + [ + 'name' => __('Table of contents', 'pdc-base'), + 'desc' => __('Use this option if you want to use a table of contents', 'pdc-base'), + 'id' => 'pdc_use_table_of_contents', + 'type' => 'checkbox', + ] ], ] ] diff --git a/config/taxonomies.php b/config/taxonomies.php index a7ae9b5..3ddca63 100644 --- a/config/taxonomies.php +++ b/config/taxonomies.php @@ -27,7 +27,7 @@ 'back_to_items' => __('← Back to tags', 'pdc-base'), ], 'meta_box' => 'simple', - 'show_in_rest' => true, + 'show_in_rest' => true, ], 'names' => [ 'singular' => __('Audience', 'pdc-base'), diff --git a/config/theme_tiles_metabox.php b/config/theme_tiles_metabox.php index 28fc37b..6658f26 100644 --- a/config/theme_tiles_metabox.php +++ b/config/theme_tiles_metabox.php @@ -11,24 +11,24 @@ 'fields' => [ 'tiles' => [ 'group' => [ - 'id' => 'pdc_tiles_group', - 'type' => 'group', - 'clone' => true, + 'id' => 'pdc_tiles_group', + 'type' => 'group', + 'clone' => true, 'sort_clone' => true, 'add_button' => __('Add new tile', 'pdc-base'), - 'fields' => [ + 'fields' => [ [ - 'id' => 'pdc_tile_title', + 'id' => 'pdc_tile_title', 'name' => __('Title', 'pdc-base'), 'type' => 'text', ], - [ - 'id' => 'pdc_tile_url', + [ + 'id' => 'pdc_tile_url', 'name' => __('URL', 'pdc-base'), 'type' => 'url', ], - [ - 'id' => 'pdc_tile_icon', + [ + 'id' => 'pdc_tile_icon', 'name' => __('Icon', 'pdc-base'), 'type' => 'text', ], diff --git a/src/Base/Admin/AdminServiceProvider.php b/src/Base/Admin/AdminServiceProvider.php index 18a077b..3663d9a 100644 --- a/src/Base/Admin/AdminServiceProvider.php +++ b/src/Base/Admin/AdminServiceProvider.php @@ -2,10 +2,10 @@ namespace OWC\PDC\Base\Admin; -use OWC\PDC\Base\Foundation\ServiceProvider; -use OWC\PDC\Base\Models\Item; use WP_Post; use WP_REST_Response; +use OWC\PDC\Base\Models\Item; +use OWC\PDC\Base\Foundation\ServiceProvider; class AdminServiceProvider extends ServiceProvider { diff --git a/src/Base/Exceptions/PropertyNotExistsException.php b/src/Base/Exceptions/PropertyNotExistsException.php index d434db3..0cf2860 100644 --- a/src/Base/Exceptions/PropertyNotExistsException.php +++ b/src/Base/Exceptions/PropertyNotExistsException.php @@ -1,4 +1,5 @@ checkPlugin($dependency); break; - case 'function': - $this->checkFunction($dependency); + case 'function': + $this->checkFunction($dependency); - break; + break; } } @@ -143,17 +144,17 @@ private function checkPlugin(array $dependency) } } - /** - * Checks if required function exists. - */ - private function checkFunction(array $dependency): void - { - if (! function_exists($dependency['name'])) { - $this->markFailed($dependency, __('Function does not exist:', 'pdc-base') . ' ' . $dependency['name'] . ''); - } - } - - /** + /** + * Checks if required function exists. + */ + private function checkFunction(array $dependency): void + { + if (! function_exists($dependency['name'])) { + $this->markFailed($dependency, __('Function does not exist:', 'pdc-base') . ' ' . $dependency['name'] . ''); + } + } + + /** * Checks the installed version of the plugin. */ private function checkVersion(array $dependency): bool diff --git a/src/Base/Foundation/Loader.php b/src/Base/Foundation/Loader.php index 6248683..235aeb6 100644 --- a/src/Base/Foundation/Loader.php +++ b/src/Base/Foundation/Loader.php @@ -1,4 +1,5 @@ getShowOnMetabox($configMetaboxes); } - if ($this->plugin->settings->useThemeTiles()) { - $configMetaboxes = $this->getTilesMetabox($configMetaboxes); - } + if ($this->plugin->settings->useThemeTiles()) { + $configMetaboxes = $this->getTilesMetabox($configMetaboxes); + } - if ($this->plugin->settings->useTableOfContents()) { - $configMetaboxes = $this->getTableOfContentsMetabox($configMetaboxes); - } + if ($this->plugin->settings->useTableOfContents()) { + $configMetaboxes = $this->getTableOfContentsMetabox($configMetaboxes); + } if ($this->plugin->settings->useFeedbackForm()) { $configMetaboxes = $this->getFeedbackFormMetabox($configMetaboxes); @@ -86,12 +86,12 @@ protected function getShowOnMetabox(array $configMetaboxes): array return array_merge($configMetaboxes, $this->plugin->config->get('show_on_metabox')); } - protected function getTilesMetabox(array $configMetaboxes): array + protected function getTilesMetabox(array $configMetaboxes): array { return array_merge($configMetaboxes, $this->plugin->config->get('theme_tiles_metabox')); } - protected function getTableOfContentsMetabox(array $configMetaboxes): array + protected function getTableOfContentsMetabox(array $configMetaboxes): array { return array_merge($configMetaboxes, $this->plugin->config->get('table_of_contents_metabox')); } diff --git a/src/Base/Models/Item.php b/src/Base/Models/Item.php index 918fd46..f9867a7 100644 --- a/src/Base/Models/Item.php +++ b/src/Base/Models/Item.php @@ -254,14 +254,14 @@ public function getEscapeElement(): bool { $value = $this->getMeta('escape_element_active', '0', true, '_owc_'); - return boolval($value); + return boolval($value); } - public function useTableOfContents(): bool + public function useTableOfContents(): bool { $value = $this->getMeta('pdc_use_table_of_contents', '0', true, '_owc_'); - return boolval($value); + return boolval($value); } /** diff --git a/src/Base/Models/PortalLinkGenerator.php b/src/Base/Models/PortalLinkGenerator.php index d95bad4..04a6828 100644 --- a/src/Base/Models/PortalLinkGenerator.php +++ b/src/Base/Models/PortalLinkGenerator.php @@ -2,8 +2,8 @@ namespace OWC\PDC\Base\Models; -use OWC\PDC\Base\Settings\SettingsPageOptions; use WP_Term; +use OWC\PDC\Base\Settings\SettingsPageOptions; class PortalLinkGenerator { diff --git a/src/Base/PostType/PostTypes/PdcSubcategoryModel.php b/src/Base/PostType/PostTypes/PdcSubcategoryModel.php index 6471850..8edf0c2 100644 --- a/src/Base/PostType/PostTypes/PdcSubcategoryModel.php +++ b/src/Base/PostType/PostTypes/PdcSubcategoryModel.php @@ -1,4 +1,5 @@ filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $items->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $items->filterLanguage((string) $language); + } $data = $items->all(); $query = $items->getQuery(); @@ -59,9 +59,9 @@ public function getSubthema(WP_REST_Request $request) $thema->filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $thema->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $thema->filterLanguage((string) $language); + } $thema = $thema->find($id); @@ -91,9 +91,9 @@ public function getSubthemeBySlug(WP_REST_Request $request) $subtheme->filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $subtheme->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $subtheme->filterLanguage((string) $language); + } $subtheme = $subtheme->findBySlug($slug); diff --git a/src/Base/RestAPI/Controllers/ThemaController.php b/src/Base/RestAPI/Controllers/ThemaController.php index 53a9e8a..ef20ef5 100644 --- a/src/Base/RestAPI/Controllers/ThemaController.php +++ b/src/Base/RestAPI/Controllers/ThemaController.php @@ -36,9 +36,9 @@ public function getThemas(WP_REST_Request $request): array $items->filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $items->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $items->filterLanguage((string) $language); + } $data = $items->all(); $query = $items->getQuery(); @@ -63,11 +63,11 @@ public function getThema(WP_REST_Request $request) $thema->filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $thema->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $thema->filterLanguage((string) $language); + } - $thema = $thema->find($id); + $thema = $thema->find($id); if (! $thema) { return new WP_Error('no_item_found', sprintf('Thema with ID [%d] not found', $id), [ @@ -95,9 +95,9 @@ public function getThemeBySlug(WP_REST_Request $request) $theme->filterSource($request->get_param('source')); } - if ($language = $request->get_param('language')) { - $theme->filterLanguage((string) $language); - } + if ($language = $request->get_param('language')) { + $theme->filterLanguage((string) $language); + } $theme = $theme->findBySlug($slug); diff --git a/src/Base/RestAPI/ItemFields/AppointmentField.php b/src/Base/RestAPI/ItemFields/AppointmentField.php index 36df56e..779f212 100644 --- a/src/Base/RestAPI/ItemFields/AppointmentField.php +++ b/src/Base/RestAPI/ItemFields/AppointmentField.php @@ -1,4 +1,5 @@ -1 - ]; + $query = [ + 'p2p:per_page' => -1 + ]; - $query = array_merge_recursive($query, $this->excludeInactiveItemsQuery()); + $query = array_merge_recursive($query, $this->excludeInactiveItemsQuery()); - if ($this->isPluginPDCInternalProductsActive()) { + if ($this->isPluginPDCInternalProductsActive()) { $query = array_merge_recursive($query, $this->excludeInternalItemsQuery()); } @@ -54,22 +54,22 @@ protected function extraQueryArgs(string $type): array $query = array_merge_recursive($query, $this->filterLanguageQuery($this->language)); } - $query['connected_query'] = [ + $query['connected_query'] = [ 'post_status' => ['publish', 'draft'], ]; return $query; } - public function setLanguage(string $language): self - { - $this->language = $language; + public function setLanguage(string $language): self + { + $this->language = $language; - return $this; - } + return $this; + } - protected function shouldFilterLanguage(): bool - { - return !empty($this->language); - } + protected function shouldFilterLanguage(): bool + { + return ! empty($this->language); + } } diff --git a/src/Base/RestAPI/ThemaFields/ThemaField.php b/src/Base/RestAPI/ThemaFields/ThemaField.php index 1cb5702..419c89a 100644 --- a/src/Base/RestAPI/ThemaFields/ThemaField.php +++ b/src/Base/RestAPI/ThemaFields/ThemaField.php @@ -1,4 +1,5 @@ settings['_owc_setting_pdc_use_theme_tiles'] ?? false; + public function useThemeTiles(): bool + { + $setting = $this->settings['_owc_setting_pdc_use_theme_tiles'] ?? false; - return boolval($setting); - } + return boolval($setting); + } - public function useTableOfContents(): bool - { - $setting = $this->settings['_owc_setting_pdc_use_table_of_contents'] ?? false; + public function useTableOfContents(): bool + { + $setting = $this->settings['_owc_setting_pdc_use_table_of_contents'] ?? false; - return boolval($setting); - } + return boolval($setting); + } /** * URL used for retrieving UPL terms. @@ -157,8 +157,8 @@ public static function make(): self '_owc_setting_pdc_enable_show_on' => 0, '_owc_setting_pdc_use_feedback_form' => 0, '_owc_upl_terms_url' => '', - '_owc_setting_pdc_use_theme_tiles' => 0, - '_owc_setting_pdc_use_table_of_contents' => 0, + '_owc_setting_pdc_use_theme_tiles' => 0, + '_owc_setting_pdc_use_table_of_contents' => 0, ]; return new static(wp_parse_args(get_option('_owc_pdc_base_settings'), $defaultSettings)); diff --git a/src/Base/Support/CreatesFields.php b/src/Base/Support/CreatesFields.php index 6babec1..aa7a25d 100644 --- a/src/Base/Support/CreatesFields.php +++ b/src/Base/Support/CreatesFields.php @@ -3,9 +3,9 @@ namespace OWC\PDC\Base\Support; use Closure; +use WP_Post; use Exception; use OWC\PDC\Base\Foundation\Plugin; -use WP_Post; abstract class CreatesFields { @@ -123,7 +123,7 @@ protected function getHeaders(string $url): array try { $response = get_headers($url, 1, $this->streamContext()); - } catch(Exception $e) { + } catch (Exception $e) { $response = false; } diff --git a/src/Base/Support/Traits/AppendToTaxQuery.php b/src/Base/Support/Traits/AppendToTaxQuery.php index f5e80ce..79f0c30 100644 --- a/src/Base/Support/Traits/AppendToTaxQuery.php +++ b/src/Base/Support/Traits/AppendToTaxQuery.php @@ -1,4 +1,5 @@ ' . $item['title'] . '' . $item['uplName'] . '' . $item['doelgroepen'] . 'Wijzigen'; } - ?> + ?>

diff --git a/src/Base/UPL/views/generate-upl-success-list.php b/src/Base/UPL/views/generate-upl-success-list.php index 8d2df55..f61a4d7 100644 --- a/src/Base/UPL/views/generate-upl-success-list.php +++ b/src/Base/UPL/views/generate-upl-success-list.php @@ -11,7 +11,7 @@ foreach ($correctItems as $item) { echo '' . $item['title'] . '' . $item['uplName'] . 'Bekijken'; } - ?> + ?>

diff --git a/tests/Unit/Base/Foundation/DependencyCheckerTest.php b/tests/Unit/Base/Foundation/DependencyCheckerTest.php index 5a4b538..7a899f4 100644 --- a/tests/Unit/Base/Foundation/DependencyCheckerTest.php +++ b/tests/Unit/Base/Foundation/DependencyCheckerTest.php @@ -50,6 +50,7 @@ public function it_succeeds_when_no_dependencies_are_set() /** * @dataProvider wrongVersions + * * @test */ public function it_fails_when_plugin_is_active_but_versions_mismatch($version) @@ -75,6 +76,7 @@ public function it_fails_when_plugin_is_active_but_versions_mismatch($version) /** * @dataProvider correctVersions + * * @test */ public function it_succeeds_when_plugin_is_active_and_versions_match($version) diff --git a/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php b/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php index 6d7ba7f..8bbb6b7 100644 --- a/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php +++ b/tests/Unit/Base/Metabox/MetaboxServiceProviderTest.php @@ -6,8 +6,8 @@ use OWC\PDC\Base\Config; use OWC\PDC\Base\Foundation\Loader; use OWC\PDC\Base\Foundation\Plugin; -use OWC\PDC\Base\Metabox\Handlers\UPLResourceHandler; use OWC\PDC\Base\Tests\Unit\TestCase; +use OWC\PDC\Base\Metabox\Handlers\UPLResourceHandler; class MetaboxServiceProviderTest extends TestCase { diff --git a/tests/Unit/pluginstub.php b/tests/Unit/pluginstub.php index 4111f30..70e80a1 100644 --- a/tests/Unit/pluginstub.php +++ b/tests/Unit/pluginstub.php @@ -1,4 +1,5 @@ Date: Mon, 16 Dec 2024 21:05:56 +0100 Subject: [PATCH 06/11] (chore): php-cs-fixer risky allowed --- .php-cs-fixer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 46613ad..d2a4d21 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -48,5 +48,5 @@ 'keep_multiple_spaces_after_comma' => true, ] ]) - ->setRiskyAllowed(false) + ->setRiskyAllowed(true) ->setFinder($finder); From d3adafa288dd4cf40330957d935d7e388280bc45 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 16 Dec 2024 21:12:49 +0100 Subject: [PATCH 07/11] (fix): working memory limit for phpstan --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9b71e35..c053ae7 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ }, "scripts": { "format": "./vendor/bin/php-cs-fixer fix", - "phpstan": "./vendor/bin/phpstan analyse --no-progress --memory-limit 500M", + "phpstan": "./vendor/bin/phpstan analyse --no-progress --memory-limit 1G", "test": [ "@unit" ], From 99383524e2d1cd7bbf214caef2512ae47f234c7e Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 19 Dec 2024 17:42:46 +0100 Subject: [PATCH 08/11] (wip): remove posts to posts --- config/core.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/core.php b/config/core.php index d8c557e..40c9213 100644 --- a/config/core.php +++ b/config/core.php @@ -47,12 +47,6 @@ 'version' => '1.4.2', 'file' => 'meta-box-group/meta-box-group.php' ], - [ - 'type' => 'plugin', - 'label' => 'Posts 2 Posts', - 'version' => '1.6.6', - 'file' => 'posts-to-posts/posts-to-posts.php', - ], [ 'type' => 'function', 'label' => 'Extended CPT library', From 452c6f5eac5c81efba2a024bd35326317024ff2b Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 14 Jan 2025 11:18:45 +0100 Subject: [PATCH 09/11] (feat): apply posttype and taxonomy argument filters --- src/Base/PostType/PostTypeServiceProvider.php | 2 ++ src/Base/Taxonomy/TaxonomyServiceProvider.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Base/PostType/PostTypeServiceProvider.php b/src/Base/PostType/PostTypeServiceProvider.php index e923fc0..dd78b4b 100644 --- a/src/Base/PostType/PostTypeServiceProvider.php +++ b/src/Base/PostType/PostTypeServiceProvider.php @@ -43,6 +43,8 @@ public function registerPostTypes() continue; } + $postType = apply_filters('owc/pdc-base/before-register-extended-post-type', $postType, $postTypeName); + register_extended_post_type($postTypeName, $postType['args'], $postType['names']); } } diff --git a/src/Base/Taxonomy/TaxonomyServiceProvider.php b/src/Base/Taxonomy/TaxonomyServiceProvider.php index 5abac5f..9b39b01 100644 --- a/src/Base/Taxonomy/TaxonomyServiceProvider.php +++ b/src/Base/Taxonomy/TaxonomyServiceProvider.php @@ -58,6 +58,8 @@ public function registerTaxonomies() $this->configTaxonomies = $this->filterConfigTaxonomies(); foreach ($this->configTaxonomies as $taxonomyName => $taxonomy) { + $taxonomy = apply_filters('owc/pdc-base/before-register-extended-taxonomy', $taxonomy, $taxonomyName); + // Examples of registering taxonomies: https://github.com/johnbillion/extended-cpts/wiki \register_extended_taxonomy($taxonomyName, $taxonomy['object_types'], $taxonomy['args'], $taxonomy['names']); } From 86c8775077880fc527b829c2a5b7a230cb4b4810 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 27 Jan 2025 15:27:16 +0100 Subject: [PATCH 10/11] (fix): upl admin url --- src/Base/UPL/views/upl-start.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Base/UPL/views/upl-start.php b/src/Base/UPL/views/upl-start.php index 105da0e..31a36c3 100644 --- a/src/Base/UPL/views/upl-start.php +++ b/src/Base/UPL/views/upl-start.php @@ -8,7 +8,7 @@

Navigeer naar

- \ No newline at end of file + From b273a78d44bb049584f7203b6f288719e4672a63 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 27 Jan 2025 15:29:52 +0100 Subject: [PATCH 11/11] (feat): apply upl wp_query args --- src/Base/UPL/UPLServiceProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Base/UPL/UPLServiceProvider.php b/src/Base/UPL/UPLServiceProvider.php index fe370e8..c3c01ec 100644 --- a/src/Base/UPL/UPLServiceProvider.php +++ b/src/Base/UPL/UPLServiceProvider.php @@ -67,6 +67,8 @@ protected function getItems(): array 'post_status' => ['publish', 'draft'] ]; + $args = apply_filters('owc/pdc-base/upl/wp-query-args', $args); + $query = new \WP_Query($args); if (empty($query->posts)) {