From f907f2270c3ea8c67bf170822191680a3facf7da Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Wed, 30 Apr 2025 14:10:39 -0400 Subject: [PATCH 1/8] Generate simple-payments package --- .../packages/simple-payments/.gitattributes | 16 +++++ projects/packages/simple-payments/.gitignore | 2 + .../simple-payments/.phan/baseline.php | 12 ++++ .../packages/simple-payments/.phan/config.php | 13 ++++ .../packages/simple-payments/.phpcs.dir.xml | 24 ++++++++ .../packages/simple-payments/CHANGELOG.md | 7 +++ projects/packages/simple-payments/README.md | 24 ++++++++ .../simple-payments/changelog/.gitkeep | 0 .../simple-payments/changelog/initial-version | 4 ++ .../packages/simple-payments/composer.json | 59 +++++++++++++++++++ .../packages/simple-payments/package.json | 25 ++++++++ .../simple-payments/phpunit.11.xml.dist | 36 +++++++++++ .../simple-payments/phpunit.12.xml.dist | 1 + .../simple-payments/phpunit.8.xml.dist | 1 + .../simple-payments/phpunit.9.xml.dist | 17 ++++++ .../src/class-simple-payments.php | 16 +++++ .../simple-payments/tests/.phpcs.dir.xml | 4 ++ .../simple-payments/tests/php/bootstrap.php | 11 ++++ 18 files changed, 272 insertions(+) create mode 100644 projects/packages/simple-payments/.gitattributes create mode 100644 projects/packages/simple-payments/.gitignore create mode 100644 projects/packages/simple-payments/.phan/baseline.php create mode 100644 projects/packages/simple-payments/.phan/config.php create mode 100644 projects/packages/simple-payments/.phpcs.dir.xml create mode 100644 projects/packages/simple-payments/CHANGELOG.md create mode 100644 projects/packages/simple-payments/README.md create mode 100644 projects/packages/simple-payments/changelog/.gitkeep create mode 100644 projects/packages/simple-payments/changelog/initial-version create mode 100644 projects/packages/simple-payments/composer.json create mode 100644 projects/packages/simple-payments/package.json create mode 100644 projects/packages/simple-payments/phpunit.11.xml.dist create mode 120000 projects/packages/simple-payments/phpunit.12.xml.dist create mode 120000 projects/packages/simple-payments/phpunit.8.xml.dist create mode 100644 projects/packages/simple-payments/phpunit.9.xml.dist create mode 100644 projects/packages/simple-payments/src/class-simple-payments.php create mode 100644 projects/packages/simple-payments/tests/.phpcs.dir.xml create mode 100644 projects/packages/simple-payments/tests/php/bootstrap.php diff --git a/projects/packages/simple-payments/.gitattributes b/projects/packages/simple-payments/.gitattributes new file mode 100644 index 0000000000000..f75eda6c8bc1e --- /dev/null +++ b/projects/packages/simple-payments/.gitattributes @@ -0,0 +1,16 @@ +# Files not needed to be distributed in the package. +.gitattributes export-ignore +.github/ export-ignore +package.json export-ignore + +# Files to include in the mirror repo, but excluded via gitignore +# Remember to end all directories with `/**` to properly tag every file. +# /src/js/example.min.js production-include + +# Files to exclude from the mirror repo, but included in the monorepo. +# Remember to end all directories with `/**` to properly tag every file. +.gitignore production-exclude +changelog/** production-exclude +.phpcs.dir.xml production-exclude +tests/** production-exclude +.phpcsignore production-exclude diff --git a/projects/packages/simple-payments/.gitignore b/projects/packages/simple-payments/.gitignore new file mode 100644 index 0000000000000..140fd587d2d52 --- /dev/null +++ b/projects/packages/simple-payments/.gitignore @@ -0,0 +1,2 @@ +vendor/ +node_modules/ diff --git a/projects/packages/simple-payments/.phan/baseline.php b/projects/packages/simple-payments/.phan/baseline.php new file mode 100644 index 0000000000000..c7aa9a4dd4f30 --- /dev/null +++ b/projects/packages/simple-payments/.phan/baseline.php @@ -0,0 +1,12 @@ + [], + // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. + // (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases) +]; diff --git a/projects/packages/simple-payments/.phan/config.php b/projects/packages/simple-payments/.phan/config.php new file mode 100644 index 0000000000000..b33dda52afe8f --- /dev/null +++ b/projects/packages/simple-payments/.phan/config.php @@ -0,0 +1,13 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/packages/simple-payments/CHANGELOG.md b/projects/packages/simple-payments/CHANGELOG.md new file mode 100644 index 0000000000000..721294abd00ad --- /dev/null +++ b/projects/packages/simple-payments/CHANGELOG.md @@ -0,0 +1,7 @@ +# 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/simple-payments/README.md b/projects/packages/simple-payments/README.md new file mode 100644 index 0000000000000..4ffee3fb6299a --- /dev/null +++ b/projects/packages/simple-payments/README.md @@ -0,0 +1,24 @@ +# simple-payments + +Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services. + +## How to install simple-payments + +### Installation From Git Repo + +## Contribute + +## Get Help + +## Using this package in your WordPress plugin + +If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well. + +## Security + +Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic). + +## License + +simple-payments is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt) + diff --git a/projects/packages/simple-payments/changelog/.gitkeep b/projects/packages/simple-payments/changelog/.gitkeep new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/projects/packages/simple-payments/changelog/initial-version b/projects/packages/simple-payments/changelog/initial-version new file mode 100644 index 0000000000000..fb1837c901e51 --- /dev/null +++ b/projects/packages/simple-payments/changelog/initial-version @@ -0,0 +1,4 @@ +Significance: patch +Type: added + +Initial version. diff --git a/projects/packages/simple-payments/composer.json b/projects/packages/simple-payments/composer.json new file mode 100644 index 0000000000000..8bb4833a2e169 --- /dev/null +++ b/projects/packages/simple-payments/composer.json @@ -0,0 +1,59 @@ +{ + "name": "automattic/jetpack-simple-payments", + "description": "Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.", + "type": "jetpack-library", + "license": "GPL-2.0-or-later", + "require": { + "php": ">=7.2" + }, + "require-dev": { + "yoast/phpunit-polyfills": "^4.0.0", + "automattic/jetpack-changelogger": "@dev" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "build-development": "echo 'Add your build step to composer.json, please!'", + "build-production": "echo 'Add your build step to composer.json, please!'", + "phpunit": [ + "phpunit-select-config phpunit.#.xml.dist --colors=always" + ], + "test-coverage": [ + "php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"" + ], + "test-php": [ + "@composer phpunit" + ] + }, + "repositories": [ + { + "type": "path", + "url": "../../packages/*", + "options": { + "monorepo": true + } + } + ], + "minimum-stability": "dev", + "prefer-stable": true, + "extra": { + "autotagger": true, + "branch-alias": { + "dev-trunk": "0.1.x-dev" + }, + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-simple-payments/compare/v${old}...v${new}" + }, + "mirror-repo": "Automattic/jetpack-simple-payments", + "textdomain": "jetpack-simple-payments", + "version-constants": { + "::PACKAGE_VERSION": "src/class-simple-payments.php" + } + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + } +} diff --git a/projects/packages/simple-payments/package.json b/projects/packages/simple-payments/package.json new file mode 100644 index 0000000000000..0e4d649c2a9b1 --- /dev/null +++ b/projects/packages/simple-payments/package.json @@ -0,0 +1,25 @@ +{ + "private": true, + "name": "@automattic/jetpack-simple-payments", + "version": "0.1.0-alpha", + "description": "Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.", + "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/simple-payments/#readme", + "bugs": { + "url": "https://github.com/Automattic/jetpack/labels/[Package] Simple Payments" + }, + "repository": { + "type": "git", + "url": "https://github.com/Automattic/jetpack.git", + "directory": "projects/packages/simple-payments" + }, + "license": "GPL-2.0-or-later", + "author": "Automattic", + "scripts": { + "build": "echo 'Not implemented.'", + "build-js": "echo 'Not implemented.'", + "build-production": "echo 'Not implemented.'", + "build-production-js": "echo 'Not implemented.'", + "clean": "true" + }, + "devDependencies": {} +} diff --git a/projects/packages/simple-payments/phpunit.11.xml.dist b/projects/packages/simple-payments/phpunit.11.xml.dist new file mode 100644 index 0000000000000..f7418373829bb --- /dev/null +++ b/projects/packages/simple-payments/phpunit.11.xml.dist @@ -0,0 +1,36 @@ + + + + + tests/php + + + + + + + + src + + + + + diff --git a/projects/packages/simple-payments/phpunit.12.xml.dist b/projects/packages/simple-payments/phpunit.12.xml.dist new file mode 120000 index 0000000000000..9fdb7a2c745c9 --- /dev/null +++ b/projects/packages/simple-payments/phpunit.12.xml.dist @@ -0,0 +1 @@ +phpunit.11.xml.dist \ No newline at end of file diff --git a/projects/packages/simple-payments/phpunit.8.xml.dist b/projects/packages/simple-payments/phpunit.8.xml.dist new file mode 120000 index 0000000000000..707bde67863cf --- /dev/null +++ b/projects/packages/simple-payments/phpunit.8.xml.dist @@ -0,0 +1 @@ +phpunit.9.xml.dist \ No newline at end of file diff --git a/projects/packages/simple-payments/phpunit.9.xml.dist b/projects/packages/simple-payments/phpunit.9.xml.dist new file mode 100644 index 0000000000000..3965963c485e7 --- /dev/null +++ b/projects/packages/simple-payments/phpunit.9.xml.dist @@ -0,0 +1,17 @@ + + + + + tests/php + + + diff --git a/projects/packages/simple-payments/src/class-simple-payments.php b/projects/packages/simple-payments/src/class-simple-payments.php new file mode 100644 index 0000000000000..61c26859e4a72 --- /dev/null +++ b/projects/packages/simple-payments/src/class-simple-payments.php @@ -0,0 +1,16 @@ + + + + diff --git a/projects/packages/simple-payments/tests/php/bootstrap.php b/projects/packages/simple-payments/tests/php/bootstrap.php new file mode 100644 index 0000000000000..46763b04a2cdb --- /dev/null +++ b/projects/packages/simple-payments/tests/php/bootstrap.php @@ -0,0 +1,11 @@ + Date: Wed, 30 Apr 2025 14:11:33 -0400 Subject: [PATCH 2/8] Add package to pnpm-lock.yaml --- pnpm-lock.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b0df68229b25e..c3e41fe54210d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3336,6 +3336,8 @@ importers: specifier: 6.0.1 version: 6.0.1(webpack@5.94.0) + projects/packages/simple-payments: {} + projects/packages/stats-admin: {} projects/packages/subscribers-dashboard: From fffcbcf007291113a30c5b68c3b0392cddee45ee Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Fri, 2 May 2025 11:36:46 -0400 Subject: [PATCH 3/8] Rename package to paypal-payments --- .../packages/{simple-payments => paypal-payments}/.gitattributes | 0 projects/packages/{simple-payments => paypal-payments}/.gitignore | 0 .../{simple-payments => paypal-payments}/.phan/baseline.php | 0 .../{simple-payments => paypal-payments}/.phan/config.php | 0 .../packages/{simple-payments => paypal-payments}/.phpcs.dir.xml | 0 .../packages/{simple-payments => paypal-payments}/CHANGELOG.md | 0 projects/packages/{simple-payments => paypal-payments}/README.md | 0 .../{simple-payments => paypal-payments}/changelog/.gitkeep | 0 .../changelog/initial-version | 0 .../packages/{simple-payments => paypal-payments}/composer.json | 0 .../packages/{simple-payments => paypal-payments}/package.json | 0 .../{simple-payments => paypal-payments}/phpunit.11.xml.dist | 0 .../{simple-payments => paypal-payments}/phpunit.12.xml.dist | 0 .../{simple-payments => paypal-payments}/phpunit.8.xml.dist | 0 .../{simple-payments => paypal-payments}/phpunit.9.xml.dist | 0 .../src/class-simple-payments.php | 0 .../{simple-payments => paypal-payments}/tests/.phpcs.dir.xml | 0 .../{simple-payments => paypal-payments}/tests/php/bootstrap.php | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename projects/packages/{simple-payments => paypal-payments}/.gitattributes (100%) rename projects/packages/{simple-payments => paypal-payments}/.gitignore (100%) rename projects/packages/{simple-payments => paypal-payments}/.phan/baseline.php (100%) rename projects/packages/{simple-payments => paypal-payments}/.phan/config.php (100%) rename projects/packages/{simple-payments => paypal-payments}/.phpcs.dir.xml (100%) rename projects/packages/{simple-payments => paypal-payments}/CHANGELOG.md (100%) rename projects/packages/{simple-payments => paypal-payments}/README.md (100%) rename projects/packages/{simple-payments => paypal-payments}/changelog/.gitkeep (100%) rename projects/packages/{simple-payments => paypal-payments}/changelog/initial-version (100%) rename projects/packages/{simple-payments => paypal-payments}/composer.json (100%) rename projects/packages/{simple-payments => paypal-payments}/package.json (100%) rename projects/packages/{simple-payments => paypal-payments}/phpunit.11.xml.dist (100%) rename projects/packages/{simple-payments => paypal-payments}/phpunit.12.xml.dist (100%) rename projects/packages/{simple-payments => paypal-payments}/phpunit.8.xml.dist (100%) rename projects/packages/{simple-payments => paypal-payments}/phpunit.9.xml.dist (100%) rename projects/packages/{simple-payments => paypal-payments}/src/class-simple-payments.php (100%) rename projects/packages/{simple-payments => paypal-payments}/tests/.phpcs.dir.xml (100%) rename projects/packages/{simple-payments => paypal-payments}/tests/php/bootstrap.php (100%) diff --git a/projects/packages/simple-payments/.gitattributes b/projects/packages/paypal-payments/.gitattributes similarity index 100% rename from projects/packages/simple-payments/.gitattributes rename to projects/packages/paypal-payments/.gitattributes diff --git a/projects/packages/simple-payments/.gitignore b/projects/packages/paypal-payments/.gitignore similarity index 100% rename from projects/packages/simple-payments/.gitignore rename to projects/packages/paypal-payments/.gitignore diff --git a/projects/packages/simple-payments/.phan/baseline.php b/projects/packages/paypal-payments/.phan/baseline.php similarity index 100% rename from projects/packages/simple-payments/.phan/baseline.php rename to projects/packages/paypal-payments/.phan/baseline.php diff --git a/projects/packages/simple-payments/.phan/config.php b/projects/packages/paypal-payments/.phan/config.php similarity index 100% rename from projects/packages/simple-payments/.phan/config.php rename to projects/packages/paypal-payments/.phan/config.php diff --git a/projects/packages/simple-payments/.phpcs.dir.xml b/projects/packages/paypal-payments/.phpcs.dir.xml similarity index 100% rename from projects/packages/simple-payments/.phpcs.dir.xml rename to projects/packages/paypal-payments/.phpcs.dir.xml diff --git a/projects/packages/simple-payments/CHANGELOG.md b/projects/packages/paypal-payments/CHANGELOG.md similarity index 100% rename from projects/packages/simple-payments/CHANGELOG.md rename to projects/packages/paypal-payments/CHANGELOG.md diff --git a/projects/packages/simple-payments/README.md b/projects/packages/paypal-payments/README.md similarity index 100% rename from projects/packages/simple-payments/README.md rename to projects/packages/paypal-payments/README.md diff --git a/projects/packages/simple-payments/changelog/.gitkeep b/projects/packages/paypal-payments/changelog/.gitkeep similarity index 100% rename from projects/packages/simple-payments/changelog/.gitkeep rename to projects/packages/paypal-payments/changelog/.gitkeep diff --git a/projects/packages/simple-payments/changelog/initial-version b/projects/packages/paypal-payments/changelog/initial-version similarity index 100% rename from projects/packages/simple-payments/changelog/initial-version rename to projects/packages/paypal-payments/changelog/initial-version diff --git a/projects/packages/simple-payments/composer.json b/projects/packages/paypal-payments/composer.json similarity index 100% rename from projects/packages/simple-payments/composer.json rename to projects/packages/paypal-payments/composer.json diff --git a/projects/packages/simple-payments/package.json b/projects/packages/paypal-payments/package.json similarity index 100% rename from projects/packages/simple-payments/package.json rename to projects/packages/paypal-payments/package.json diff --git a/projects/packages/simple-payments/phpunit.11.xml.dist b/projects/packages/paypal-payments/phpunit.11.xml.dist similarity index 100% rename from projects/packages/simple-payments/phpunit.11.xml.dist rename to projects/packages/paypal-payments/phpunit.11.xml.dist diff --git a/projects/packages/simple-payments/phpunit.12.xml.dist b/projects/packages/paypal-payments/phpunit.12.xml.dist similarity index 100% rename from projects/packages/simple-payments/phpunit.12.xml.dist rename to projects/packages/paypal-payments/phpunit.12.xml.dist diff --git a/projects/packages/simple-payments/phpunit.8.xml.dist b/projects/packages/paypal-payments/phpunit.8.xml.dist similarity index 100% rename from projects/packages/simple-payments/phpunit.8.xml.dist rename to projects/packages/paypal-payments/phpunit.8.xml.dist diff --git a/projects/packages/simple-payments/phpunit.9.xml.dist b/projects/packages/paypal-payments/phpunit.9.xml.dist similarity index 100% rename from projects/packages/simple-payments/phpunit.9.xml.dist rename to projects/packages/paypal-payments/phpunit.9.xml.dist diff --git a/projects/packages/simple-payments/src/class-simple-payments.php b/projects/packages/paypal-payments/src/class-simple-payments.php similarity index 100% rename from projects/packages/simple-payments/src/class-simple-payments.php rename to projects/packages/paypal-payments/src/class-simple-payments.php diff --git a/projects/packages/simple-payments/tests/.phpcs.dir.xml b/projects/packages/paypal-payments/tests/.phpcs.dir.xml similarity index 100% rename from projects/packages/simple-payments/tests/.phpcs.dir.xml rename to projects/packages/paypal-payments/tests/.phpcs.dir.xml diff --git a/projects/packages/simple-payments/tests/php/bootstrap.php b/projects/packages/paypal-payments/tests/php/bootstrap.php similarity index 100% rename from projects/packages/simple-payments/tests/php/bootstrap.php rename to projects/packages/paypal-payments/tests/php/bootstrap.php From e75706811b22bb9cf77ca3e953d7e48373c1790a Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Fri, 2 May 2025 11:39:31 -0400 Subject: [PATCH 4/8] Update package name in pnpm-lock.yaml --- pnpm-lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3e41fe54210d..2926d10058937 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3045,6 +3045,8 @@ importers: specifier: 6.0.1 version: 6.0.1(webpack@5.94.0) + projects/packages/paypal-payments: {} + projects/packages/plans: {} projects/packages/plugin-deactivation: @@ -3336,8 +3338,6 @@ importers: specifier: 6.0.1 version: 6.0.1(webpack@5.94.0) - projects/packages/simple-payments: {} - projects/packages/stats-admin: {} projects/packages/subscribers-dashboard: From 6a9fa8f0e40a93764b8b13dcfd635f9dc065bee4 Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Fri, 2 May 2025 11:42:04 -0400 Subject: [PATCH 5/8] Replace simple-payments with paypal-payments --- projects/packages/paypal-payments/.phan/config.php | 2 +- projects/packages/paypal-payments/.phpcs.dir.xml | 6 +++--- projects/packages/paypal-payments/README.md | 6 +++--- projects/packages/paypal-payments/composer.json | 10 +++++----- projects/packages/paypal-payments/package.json | 6 +++--- .../paypal-payments/src/class-simple-payments.php | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/projects/packages/paypal-payments/.phan/config.php b/projects/packages/paypal-payments/.phan/config.php index b33dda52afe8f..df71dd294f003 100644 --- a/projects/packages/paypal-payments/.phan/config.php +++ b/projects/packages/paypal-payments/.phan/config.php @@ -4,7 +4,7 @@ * default configuration. Command-line arguments will be applied * after this file is read. * - * @package automattic/jetpack-simple-payments + * @package automattic/jetpack-paypal-payments */ // Require base config. diff --git a/projects/packages/paypal-payments/.phpcs.dir.xml b/projects/packages/paypal-payments/.phpcs.dir.xml index adaff1fd1f9b2..5ec8985252d8f 100644 --- a/projects/packages/paypal-payments/.phpcs.dir.xml +++ b/projects/packages/paypal-payments/.phpcs.dir.xml @@ -4,20 +4,20 @@ - + - + - + diff --git a/projects/packages/paypal-payments/README.md b/projects/packages/paypal-payments/README.md index 4ffee3fb6299a..760f8841e4105 100644 --- a/projects/packages/paypal-payments/README.md +++ b/projects/packages/paypal-payments/README.md @@ -1,8 +1,8 @@ -# simple-payments +# paypal-payments Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services. -## How to install simple-payments +## How to install paypal-payments ### Installation From Git Repo @@ -20,5 +20,5 @@ Need to report a security vulnerability? Go to [https://automattic.com/security/ ## License -simple-payments is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt) +paypal-payments is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt) diff --git a/projects/packages/paypal-payments/composer.json b/projects/packages/paypal-payments/composer.json index 8bb4833a2e169..58f52741d8622 100644 --- a/projects/packages/paypal-payments/composer.json +++ b/projects/packages/paypal-payments/composer.json @@ -1,5 +1,5 @@ { - "name": "automattic/jetpack-simple-payments", + "name": "automattic/jetpack-paypal-payments", "description": "Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.", "type": "jetpack-library", "license": "GPL-2.0-or-later", @@ -45,12 +45,12 @@ "dev-trunk": "0.1.x-dev" }, "changelogger": { - "link-template": "https://github.com/Automattic/jetpack-simple-payments/compare/v${old}...v${new}" + "link-template": "https://github.com/Automattic/jetpack-paypal-payments/compare/v${old}...v${new}" }, - "mirror-repo": "Automattic/jetpack-simple-payments", - "textdomain": "jetpack-simple-payments", + "mirror-repo": "Automattic/jetpack-paypal-payments", + "textdomain": "jetpack-paypal-payments", "version-constants": { - "::PACKAGE_VERSION": "src/class-simple-payments.php" + "::PACKAGE_VERSION": "src/class-paypal-payments.php" } }, "suggest": { diff --git a/projects/packages/paypal-payments/package.json b/projects/packages/paypal-payments/package.json index 0e4d649c2a9b1..caf93d447c5ea 100644 --- a/projects/packages/paypal-payments/package.json +++ b/projects/packages/paypal-payments/package.json @@ -1,16 +1,16 @@ { "private": true, - "name": "@automattic/jetpack-simple-payments", + "name": "@automattic/jetpack-paypal-payments", "version": "0.1.0-alpha", "description": "Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.", - "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/simple-payments/#readme", + "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/paypal-payments/#readme", "bugs": { "url": "https://github.com/Automattic/jetpack/labels/[Package] Simple Payments" }, "repository": { "type": "git", "url": "https://github.com/Automattic/jetpack.git", - "directory": "projects/packages/simple-payments" + "directory": "projects/packages/paypal-payments" }, "license": "GPL-2.0-or-later", "author": "Automattic", diff --git a/projects/packages/paypal-payments/src/class-simple-payments.php b/projects/packages/paypal-payments/src/class-simple-payments.php index 61c26859e4a72..7458d0e48c362 100644 --- a/projects/packages/paypal-payments/src/class-simple-payments.php +++ b/projects/packages/paypal-payments/src/class-simple-payments.php @@ -2,7 +2,7 @@ /** * Package description here * - * @package automattic/jetpack-simple-payments + * @package automattic/jetpack-paypal-payments */ namespace Automattic\Jetpack; From 31d8037a259b8e3feeaa2b2000fc29cdc4fc2f3d Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Wed, 7 May 2025 13:29:34 -0400 Subject: [PATCH 6/8] Update last instances of simple payments --- projects/packages/paypal-payments/package.json | 2 +- ...{class-simple-payments.php => class-paypal-payments.php} | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename projects/packages/paypal-payments/src/{class-simple-payments.php => class-paypal-payments.php} (65%) diff --git a/projects/packages/paypal-payments/package.json b/projects/packages/paypal-payments/package.json index caf93d447c5ea..348a6b6eeb36c 100644 --- a/projects/packages/paypal-payments/package.json +++ b/projects/packages/paypal-payments/package.json @@ -5,7 +5,7 @@ "description": "Add PayPal, credit, and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/paypal-payments/#readme", "bugs": { - "url": "https://github.com/Automattic/jetpack/labels/[Package] Simple Payments" + "url": "https://github.com/Automattic/jetpack/labels/[Package] PayPal Payments" }, "repository": { "type": "git", diff --git a/projects/packages/paypal-payments/src/class-simple-payments.php b/projects/packages/paypal-payments/src/class-paypal-payments.php similarity index 65% rename from projects/packages/paypal-payments/src/class-simple-payments.php rename to projects/packages/paypal-payments/src/class-paypal-payments.php index 7458d0e48c362..3e0b7920ddcfc 100644 --- a/projects/packages/paypal-payments/src/class-simple-payments.php +++ b/projects/packages/paypal-payments/src/class-paypal-payments.php @@ -1,6 +1,6 @@ Date: Wed, 7 May 2025 13:33:57 -0400 Subject: [PATCH 7/8] Add PHP unit test --- projects/packages/paypal-payments/composer.json | 4 +++- .../paypal-payments/tests/php/Base_Test.php | 14 ++++++++++++++ .../paypal-payments/tests/php/bootstrap.php | 5 +++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 projects/packages/paypal-payments/tests/php/Base_Test.php diff --git a/projects/packages/paypal-payments/composer.json b/projects/packages/paypal-payments/composer.json index 58f52741d8622..c8aef3926f73a 100644 --- a/projects/packages/paypal-payments/composer.json +++ b/projects/packages/paypal-payments/composer.json @@ -8,7 +8,9 @@ }, "require-dev": { "yoast/phpunit-polyfills": "^4.0.0", - "automattic/jetpack-changelogger": "@dev" + "automattic/jetpack-changelogger": "@dev", + "automattic/jetpack-test-environment": "@dev", + "automattic/phpunit-select-config": "@dev" }, "autoload": { "classmap": [ diff --git a/projects/packages/paypal-payments/tests/php/Base_Test.php b/projects/packages/paypal-payments/tests/php/Base_Test.php new file mode 100644 index 0000000000000..3fe34cd07bd65 --- /dev/null +++ b/projects/packages/paypal-payments/tests/php/Base_Test.php @@ -0,0 +1,14 @@ +assertEquals( PayPal_Payments::PACKAGE_VERSION, '0.1.0-alpha' ); + } +} diff --git a/projects/packages/paypal-payments/tests/php/bootstrap.php b/projects/packages/paypal-payments/tests/php/bootstrap.php index 46763b04a2cdb..35c1fec8299db 100644 --- a/projects/packages/paypal-payments/tests/php/bootstrap.php +++ b/projects/packages/paypal-payments/tests/php/bootstrap.php @@ -9,3 +9,8 @@ * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php'; + +define( 'WP_DEBUG', true ); + +// Initialize WordPress test environment +\Automattic\Jetpack\Test_Environment::init(); From 0bd85a0107fd67f462905abe9567120037239a4c Mon Sep 17 00:00:00 2001 From: Allie Mims Date: Wed, 7 May 2025 14:44:24 -0400 Subject: [PATCH 8/8] Update Phan baseline --- projects/packages/paypal-payments/.phan/baseline.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/packages/paypal-payments/.phan/baseline.php b/projects/packages/paypal-payments/.phan/baseline.php index c7aa9a4dd4f30..3df50068147ad 100644 --- a/projects/packages/paypal-payments/.phan/baseline.php +++ b/projects/packages/paypal-payments/.phan/baseline.php @@ -1,12 +1,17 @@ [], + 'file_suppressions' => [ + ], // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. // (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases) ];