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
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP Action
uses: shivammathur/setup-php@2.26.0
with:
php-version: 8.3
php-version: 8.4
extensions: dom
coverage: xdebug

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
coverage
vendor
.scannerwork
.phpunit.result.cache
.phpunit.result.cache
.phpunit.cache
var/*
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PHP library to create a response json pattern to API's

### Installation

[Release 8.0.0](https://github.com/not-empty/response-json-php-lib/releases/tag/8.0.0) Requires [PHP](https://php.net) 8.4

[Release 7.0.0](https://github.com/not-empty/response-json-php-lib/releases/tag/7.0.0) Requires [PHP](https://php.net) 8.3

[Release 6.0.0](https://github.com/not-empty/response-json-php-lib/releases/tag/6.0.0) Requires [PHP](https://php.net) 8.2
Expand Down Expand Up @@ -63,12 +65,12 @@ var_dump($response);
if you want an environment to run or test it, you can build and install dependences like this

```sh
docker build --build-arg PHP_VERSION=8.3-rc-cli -t not-empty/response-json-php-lib:php83 -f contrib/Dockerfile .
docker build --build-arg PHP_VERSION=8.4-cli -t not-empty/response-json-php-lib:php84 -f contrib/Dockerfile .
```

Access the container
```sh
docker run -v ${PWD}/:/var/www/html -it not-empty/response-json-php-lib:php83 bash
docker run --name response-json-php-lib -v ${PWD}/:/var/www/html -it not-empty/response-json-php-lib:php84 bash
```

Verify if all dependencies is installed
Expand All @@ -94,12 +96,12 @@ To ensure that the entire project is fine:
First you need to building a correct environment to install all dependences

```sh
docker build --build-arg PHP_VERSION=8.3-rc-cli -t not-empty/response-json-php-lib:php83 -f contrib/Dockerfile .
docker build --build-arg PHP_VERSION=8.4-cli -t not-empty/response-json-php-lib:php84 -f contrib/Dockerfile .
```

Access the container
```sh
docker run -v ${PWD}/:/var/www/html -it not-empty/response-json-php-lib:php83 bash
docker run --name response-json-php-lib -v ${PWD}/:/var/www/html -it not-empty/response-json-php-lib:php84 bash
```

Install all dependences
Expand Down
19 changes: 8 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "not-empty/response-json-php-lib",
"description": "PHP library to create a response json pattern to API's",
"version": "7.0.0",
"version": "8.0.0",
"type": "library",
"license": "GPL-3.0-only",
"require": {
"php": "^8.3"
"php": "^8.4"
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^12.5",
"mockery/mockery": "^1.6",
"squizlabs/php_codesniffer": "^3.7",
"phpmd/phpmd": "^2.14"
"squizlabs/php_codesniffer": "^4.0",
"phpstan/phpstan": "^2.1"
},
"authors": [
{
Expand All @@ -31,21 +31,18 @@
"check": [
"@lint",
"@cs",
"@mess",
"@static",
"@test",
"@ccu"
],
"mess" : [
"vendor/bin/phpmd ./src text phpmd.xml",
"vendor/bin/phpmd ./sample text phpmd.xml"
],
"static": "vendor/bin/phpstan analyse",
"lint": [
"find ./src -name '*.php' -print0 | xargs -0 -n1 -P8 php -l -d display_errors=0",
"find ./tests -name '*.php' -print0 | xargs -0 -n1 -P8 php -l -d display_errors=0",
"find ./sample -name '*.php' -print0 | xargs -0 -n1 -P8 php -l -d display_errors=0"
],
"cs": "vendor/bin/phpcs",
"test": "phpdbg -qrr vendor/bin/phpunit --configuration phpunit.xml -d memory_limit=1024M",
"test": "php -d xdebug.mode=coverage vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage/coverage.xml -d memory_limit=1024M",
"ccu" : "php contrib/coverage-checker.php coverage/coverage.xml 100"
}
}
Loading