From 830869901de1d11302d9afa7c8239f9838c0e00e Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Oct 2021 16:05:30 -0600 Subject: [PATCH 1/6] Update search plugin name --- .../plugins/search/changelog/try-search-package-creation | 4 ++++ projects/plugins/search/composer.json | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 projects/plugins/search/changelog/try-search-package-creation diff --git a/projects/plugins/search/changelog/try-search-package-creation b/projects/plugins/search/changelog/try-search-package-creation new file mode 100644 index 000000000000..947d9bb6f5df --- /dev/null +++ b/projects/plugins/search/changelog/try-search-package-creation @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Updated name to automattic/jetpack-search-plugin diff --git a/projects/plugins/search/composer.json b/projects/plugins/search/composer.json index 82899b8072fd..cdf7c1d59afe 100644 --- a/projects/plugins/search/composer.json +++ b/projects/plugins/search/composer.json @@ -1,5 +1,5 @@ { - "name": "automattic/jetpack-search", + "name": "automattic/jetpack-search-plugin", "description": "A cloud-powered replacement for WordPress' search.", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", @@ -40,11 +40,11 @@ "minimum-stability": "dev", "prefer-stable": true, "extra": { - "mirror-repo": "Automattic/jetpack-search", + "mirror-repo": "Automattic/jetpack-search-plugin", "release-branch-prefix": "search", "wp-plugin-slug": "jetpack-search", "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-search/compare/v${old}...v${new}" + "link-template": "https://github.com/Automattic/jetpack-search-plugin/compare/v${old}...v${new}" }, "autotagger": true } From 279190b9c6fed9ba5d2fdd2de260414def8da0c9 Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Oct 2021 16:06:54 -0600 Subject: [PATCH 2/6] Create skeleton package for search --- projects/packages/search/.gitattributes | 9 ++++ projects/packages/search/.gitignore | 1 + projects/packages/search/CHANGELOG.md | 6 +++ projects/packages/search/changelog/.gitkeep | 0 .../changelog/try-search-package-creation | 4 ++ projects/packages/search/composer.json | 51 +++++++++++++++++++ projects/packages/search/phpunit.xml.dist | 16 ++++++ projects/packages/search/src/.gitkeep | 0 8 files changed, 87 insertions(+) create mode 100644 projects/packages/search/.gitattributes create mode 100644 projects/packages/search/.gitignore create mode 100644 projects/packages/search/CHANGELOG.md create mode 100644 projects/packages/search/changelog/.gitkeep create mode 100644 projects/packages/search/changelog/try-search-package-creation create mode 100644 projects/packages/search/composer.json create mode 100644 projects/packages/search/phpunit.xml.dist create mode 100644 projects/packages/search/src/.gitkeep diff --git a/projects/packages/search/.gitattributes b/projects/packages/search/.gitattributes new file mode 100644 index 000000000000..44b456cb4a39 --- /dev/null +++ b/projects/packages/search/.gitattributes @@ -0,0 +1,9 @@ +# Files not needed to be distributed. +.gitattributes export-ignore +.github/ export-ignore +.gitignore export-ignore +phpunit.xml.dist export-ignore +tests/ export-ignore + +# Files not needed in the production build. +/changelog/** production-exclude diff --git a/projects/packages/search/.gitignore b/projects/packages/search/.gitignore new file mode 100644 index 000000000000..554806723c0e --- /dev/null +++ b/projects/packages/search/.gitignore @@ -0,0 +1 @@ +wordpress diff --git a/projects/packages/search/CHANGELOG.md b/projects/packages/search/CHANGELOG.md new file mode 100644 index 000000000000..03a962f457f6 --- /dev/null +++ b/projects/packages/search/CHANGELOG.md @@ -0,0 +1,6 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/projects/packages/search/changelog/.gitkeep b/projects/packages/search/changelog/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/projects/packages/search/changelog/try-search-package-creation b/projects/packages/search/changelog/try-search-package-creation new file mode 100644 index 000000000000..9597e7aaa383 --- /dev/null +++ b/projects/packages/search/changelog/try-search-package-creation @@ -0,0 +1,4 @@ +Significance: major +Type: added + +Add a new Search package with Helper and Options classes. diff --git a/projects/packages/search/composer.json b/projects/packages/search/composer.json new file mode 100644 index 000000000000..889d38e13f67 --- /dev/null +++ b/projects/packages/search/composer.json @@ -0,0 +1,51 @@ +{ + "name": "automattic/jetpack-search", + "description": "Tools to assist with enabling cloud search for Jetpack sites.", + "type": "library", + "license": "GPL-2.0-or-later", + "require": {}, + "require-dev": { + "automattic/jetpack-changelogger": "^2.0", + "yoast/phpunit-polyfills": "1.0.1" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "phpunit": [ + "./vendor/phpunit/phpunit/phpunit --colors=always" + ], + "test-coverage": [ + "@composer install", + "phpdbg -d memory_limit=2048M -d max_execution_time=900 -qrr ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\"" + ], + "test-php": [ + "@composer install", + "@composer phpunit" + ], + "post-update-cmd": "php -r \"copy('vendor/automattic/wordbless/src/dbless-wpdb.php', 'wordpress/wp-content/db.php');\"" + }, + "repositories": [ + { + "type": "path", + "url": "../*", + "options": { + "monorepo": true + } + } + ], + "minimum-stability": "dev", + "prefer-stable": true, + "extra": { + "autotagger": true, + "mirror-repo": "Automattic/jetpack-search", + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-search/compare/v${old}...v${new}" + }, + "branch-alias": { + "dev-master": "0.1.x-dev" + } + } +} diff --git a/projects/packages/search/phpunit.xml.dist b/projects/packages/search/phpunit.xml.dist new file mode 100644 index 000000000000..47e186dc3d76 --- /dev/null +++ b/projects/packages/search/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + tests/php + + + + + . + + tests + vendor + + + + diff --git a/projects/packages/search/src/.gitkeep b/projects/packages/search/src/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 From 24585951d4a3e74bf4d69fb2b3e6be439e8b7340 Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Oct 2021 16:07:06 -0600 Subject: [PATCH 3/6] Update renovate config --- .github/renovate.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/renovate.json b/.github/renovate.json index db0f39c8bdfe..906382d43ccf 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -47,6 +47,7 @@ "automattic/jetpack-post-list", "automattic/jetpack-redirect", "automattic/jetpack-roles", + "automattic/jetpack-search", "automattic/jetpack-status", "automattic/jetpack-sync", "automattic/jetpack-terms-of-service", From 39033dd26c1784661eb045ef980e9024fbd382d3 Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Oct 2021 16:15:00 -0600 Subject: [PATCH 4/6] Fix dependencies --- projects/packages/search/composer.json | 2 +- projects/plugins/search/composer.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/packages/search/composer.json b/projects/packages/search/composer.json index 889d38e13f67..9b96f1fc5bb4 100644 --- a/projects/packages/search/composer.json +++ b/projects/packages/search/composer.json @@ -5,7 +5,7 @@ "license": "GPL-2.0-or-later", "require": {}, "require-dev": { - "automattic/jetpack-changelogger": "^2.0", + "automattic/jetpack-changelogger": "^3.0", "yoast/phpunit-polyfills": "1.0.1" }, "autoload": { diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index 7d5c96c82f10..862f10e32cec 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/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": "5c99151ced99a4c58cec23d01b79dfe8", + "content-hash": "6c9179d94960bf5722d23df95ad69848", "packages": [], "packages-dev": [ { @@ -3137,5 +3137,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } From e14faae60aa2b0b50d0245be0133f8fc8aace22b Mon Sep 17 00:00:00 2001 From: Jason Moon Date: Thu, 21 Oct 2021 16:19:28 -0600 Subject: [PATCH 5/6] Add test bootstrap --- projects/packages/search/tests/php/bootstrap.php | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/packages/search/tests/php/bootstrap.php diff --git a/projects/packages/search/tests/php/bootstrap.php b/projects/packages/search/tests/php/bootstrap.php new file mode 100644 index 000000000000..f0a3c7997661 --- /dev/null +++ b/projects/packages/search/tests/php/bootstrap.php @@ -0,0 +1,11 @@ + Date: Thu, 21 Oct 2021 16:24:53 -0600 Subject: [PATCH 6/6] Update dependencies --- projects/plugins/search/composer.lock | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index 862f10e32cec..b2e5ebaa3692 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -425,16 +425,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -445,7 +445,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -475,9 +476,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1918,6 +1919,7 @@ "type": "github" } ], + "abandoned": true, "time": "2020-09-28T06:45:17+00:00" }, { @@ -3137,5 +3139,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" }