Skip to content

Commit

Permalink
Merge pull request #235 from XedinUnknown/task/refactor-for-psr-4
Browse files Browse the repository at this point in the history
Refactor for PSR-4
  • Loading branch information
Dinamiko authored Sep 30, 2021
2 parents ac8061a + b0cfb63 commit 40058b4
Show file tree
Hide file tree
Showing 243 changed files with 10,782 additions and 8,254 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v1
php-version: ${{ matrix.php-versions }}
tools: composer:v1

- name: Validate composer.json and composer.lock
run: composer validate
Expand Down
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ You can also use the Docker environment which includes WP, WC and all developmen
0. Install Docker and Docker Compose.
1. `$ cp .env.example .env` and edit the configuration in the `.env` file if needed.
2. `$ yarn run docker:build` (or copy the commands from [package.json](/package.json) if you do not have `yarn`).
3. `$ yarn docker:install`
4. `$ yarn docker:start`
3. `$ yarn run docker:install`
4. `$ yarn run docker:start`
5. Add `127.0.0.1 wc-pp.myhost` to your `hosts` file and open http://wc-pp.myhost (the default value of `WP_DOMAIN` in `.env`).

Tests and code style:
Expand All @@ -44,30 +44,21 @@ After some changes in `.env` (such as PHP, WP versions) you may need to rebuild

See [package.json](/package.json) for other useful commands.

## Preparation for wordpress.org release
## Building a release package

If you want to deploy a new version, you need to do some preparation:
If you want to build a release package
(that can be used for deploying a new version on wordpress.org or manual installation on a WP website via ZIP uploading),
follow these steps:

### Clone

Clone the repository and `cd` into it

### Build

The following command should get you a ZIP file ready to be used on a WordPress site.
1. Clone the repository and `cd` into it.
2. Make sure you have the version in the plugin root file updated.
3. Update the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant.
4. The following command should get you a ZIP file ready to be used on a WordPress site:

```
npm run build
$ yarn run build
```

### Update version

Make sure you have the version in the plugin root file updated.

### Fixate integration date

Fix the PayPal JavaScript SDK integration date by using the current date for the `PAYPAL_INTEGRATION_DATE` constant.

## License

[GPL-2.0 License](LICENSE)
Expand Down
14 changes: 14 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
*** Changelog ***

= 1.6.0 - 2021-09-29 =
* Add - Webhook status. #246 #273
* Add - Show CC gateway in admin payments list. #236
* Add - Add 3d secure contingency settings. #230
* Add - Improve logging. #252 #275
* Add - Do not send payee email. #231
* Add - Allow customers to see and delete their saved payments in My Account. #274
* Fix - PayPal Payments generates multiple orders. #244
* Fix - Saved credit card does not auto fill. #242
* Fix - Incorrect webhooks registration. #254
* Fix - Disable funding credit cards affecting hosted fields, unset for GB. #249
* Fix - REFUND_CAPTURE_CURRENCY_MISMATCH on multicurrency sites. #225
* Fix - Can't checkout to certain countries with optional postcode. #224

= 1.5.1 - 2021-08-19 =
* Fix - Set 3DS contingencies to "SCA_WHEN_REQUIRED". #178
* Fix - Plugin conflict blocking line item details. #221
Expand Down
23 changes: 14 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"description": "PayPal Commerce Platform for WooCommerce",
"license": "GPL-2.0",
"require": {
"php": "^7.1 | ^8.0",
"ext-json": "*",
"dhii/module-interface": "^0.2 || ^0.3",
"psr/container": "1.0.0",
"psr/container": "^1.0",
"container-interop/service-provider": "^0.4.0",
"dhii/containers": "v0.1.0-alpha1",
"dhii/wp-containers": "v0.1.0-alpha1",
"dhii/containers": "^0.1.0-alpha1",
"psr/log": "^1.1",
"ext-json": "*",
"ralouphie/getallheaders": "^3.0"
"ralouphie/getallheaders": "^3.0",
"wikimedia/composer-merge-plugin": "^1.4"
},
"require-dev": {
"woocommerce/woocommerce-sniffs": "^0.1.0",
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
"brain/monkey": "^2.4"
},
"autoload": {
"classmap": [
"modules/",
"src/"
]
"psr-4": {
"WooCommerce\\PayPalCommerce\\": "src"
}
},
"autoload-dev": {
"psr-4": {
Expand All @@ -46,6 +46,11 @@
"type:inpsyde-module"
]
},
"merge-plugin": {
"include": [
"modules/*/composer.json"
]
},
"hooks": {
"pre-commit": [
"vendor/bin/phpcbf"
Expand Down
Loading

0 comments on commit 40058b4

Please sign in to comment.