Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,14 @@ jobs:
shell: bash
run: composer validate

- name: Composer update
# Install exactly what composer.lock pins. composer update would re-resolve every
# range on each run and pick up any version published since, including a malicious
# one, in a job that holds repository secrets. composer validate above fails the
# job if the lock no longer matches composer.json. The lock is resolved for PHP 8.1
# (config.platform in composer.json), so it installs on every leg of the matrix.
- name: Composer install
shell: bash
run: composer update --prefer-dist --no-interaction
run: composer install --prefer-dist --no-interaction

- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
- name: Composer validate
run: composer validate

- name: Composer update
run: composer update --prefer-dist --no-interaction
# From composer.lock, like build-master.yml: never re-resolve dependencies in the job
# that tags the release.
- name: Composer install
run: composer install --prefer-dist --no-interaction

- name: Run PHPUnit
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.php_cs.cache
phpunit.xml
.phpunit.result.cache
composer.lock
composer.phar
vendor/*
*.iml
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ The exception encapsulates `http_metadata` and `$error_details`, if available.
Once you check out the code from GitHub, the project can be built using composer:

```
composer update
composer install
```

This installs the dependency versions pinned in `composer.lock`, the same ones CI uses. Run `composer update` only when you mean to move those pins, and commit the updated `composer.lock`.

The execution of integration tests require the following environment variables set in your system:

* For default account systems (NAS): `CHECKOUT_DEFAULT_PUBLIC_KEY` & `CHECKOUT_DEFAULT_SECRET_KEY`
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"Checkout\\Tests\\": "test/Checkout/Tests/"
}
},
"config": {
"platform": {
"php": "8.1"
}
},
"scripts": {
"install-hooks": [
"sh ./vendor/smgladkovskiy/phpcs-git-pre-commit/src/setup.sh"
Expand Down
Loading
Loading