Skip to content

Commit 323d261

Browse files
committed
Update dependencies, adopt flexible versioning policy, include composer.lock
WE2-879 Signed-off-by: Mart Somermaa <[email protected]>
1 parent f5d08bf commit 323d261

File tree

5 files changed

+2296
-8
lines changed

5 files changed

+2296
-8
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
vendor
2-
composer.lock
2+
.vscode
33
.DS_Store
44
.phpunit.result.cache
5+
.phpunit.cache
56
web-eid-authtoken-validation-php.log
67
build
7-
phpunit.xml
8+
phpunit.xml
9+
*.swp

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,28 @@ composer dump-autoload
378378

379379
Please note, that there are no certificate files included in this example. You can find certificates from [here](https://www.skidsolutions.eu/en/repository/certs)
380380

381+
382+
# Dependency versioning policy
383+
384+
Starting from version 1.2.0 we adopt a flexible versioning policy for
385+
`phpseclib` and `guzzlehttp`, and specify the dependency version as `x.y.*`.
386+
This approach allows our library integrators to quickly incorporate security
387+
patches and minor updates from dependencies.
388+
389+
## Why we include `composer.lock`
390+
391+
While it is common practice for applications to include a `composer.lock` file
392+
to lock down the specific versions of dependencies used, this is less common
393+
for libraries. However, we have chosen to include `composer.lock` in our
394+
repository to clearly indicate the exact versions of dependencies we have
395+
tested against.
396+
397+
Although our library is designed to work with any minor version of dependencies
398+
within the specified range, the `composer.lock` file ensures that integrators
399+
are aware of the specific version we consider stable and secure. The provided
400+
`composer.lock` is intended to be used as a reference, not as a strict
401+
requirement.
402+
381403
# Code formatting
382404

383405
We are using `Prettier` for code formatting. To install Prettier, use following command:

composer.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
}
1111
],
1212
"require-dev": {
13-
"phpunit/phpunit": "^11.0.4"
14-
},
13+
"phpunit/phpunit": "^11.0.4"
14+
},
1515
"autoload": {
1616
"psr-4": {
1717
"web_eid\\web_eid_authtoken_validation_php\\": ["src"]
@@ -33,12 +33,16 @@
3333
],
3434
"require": {
3535
"phpseclib/phpseclib": "3.0.*",
36-
"guzzlehttp/psr7": "2.6.2",
37-
"web-eid/ocsp-php": "dev-main",
36+
"guzzlehttp/psr7": "2.6.*",
37+
"web-eid/ocsp-php": "1.1.1",
3838
"psr/log": "^3.0"
3939
},
4040
"scripts": {
4141
"fix-php": ["prettier src/**/* --write", "prettier examples/src/* --write"],
42-
"test": "phpunit --no-coverage"
42+
"test": "phpunit --no-coverage --display-warnings",
43+
"test-coverage": [
44+
"@putenv XDEBUG_MODE=coverage",
45+
"phpunit --coverage-html coverage"
46+
]
4347
}
4448
}

0 commit comments

Comments
 (0)