Skip to content

Commit

Permalink
Merge pull request #248 from MarcinOrlowski/dev
Browse files Browse the repository at this point in the history
Release 11.0.0
  • Loading branch information
MarcinOrlowski committed May 6, 2024
2 parents 5a1ca08 + 3b312ef commit 9b6d00a
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
fail-fast: false
matrix:
# quotes are needed it is treated as a number and zero at decimal part is gone at runtime
laravel: ["9.x"]
php: ["8.0", "8.1"]
laravel: ["11.x"]
php: ["8.2"]

runs-on: ubuntu-latest

steps:
- name: "Checkout repository..."
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/marketplace/actions/composer-php-actions
- name: "Installing dependencies..."
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ jobs:
# do not stop the workflow if single run failed
fail-fast: false
matrix:
# quotes are needed it is treated as a number and zero at decimal part is gone at runtime
laravel: ["9.x"]
php: ["8.0", "8.1"]
# quotes are needed it is treated as a number and zero at decimal part is gone
# at runtime i.e. 8.10 -> 8.1, while "8.10" => "8.10".
laravel: ["11.0"]
php: ["8.2"]

runs-on: ubuntu-latest

steps:
- name: "Checkout repository..."
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/marketplace/actions/composer-php-actions
- name: "Installing dependencies..."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# https://github.com/marketplace/actions/my-markdown-linter
- name: "Running markdown linter..."
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ jobs:
# do not stop the workflow if single run failed
fail-fast: false
matrix:
# quotes are needed it is treated as a number and zero at decimal part is gone at runtime
laravel: ["10.x"]
php: ["8.1"]
# quotes are needed it is treated as a number and zero at decimal part is gone
# at runtime i.e. 8.10 -> 8.1, while "8.10" => "8.10".
laravel: ["11.0"]
php: ["8.2"]

runs-on: ubuntu-latest

steps:
- name: "Checkout repository..."
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/marketplace/actions/composer-php-actions
- name: "Installing dependencies..."
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ jobs:
# do not stop the workflow if single run failed
fail-fast: false
matrix:
# quotes are needed it is treated as a number and zero at decimal part is gone at runtime
laravel: ["10.x"]
php: ["8.1"]
# quotes are needed it is treated as a number and zero at decimal part is gone
# at runtime i.e. 8.10 -> 8.1, while "8.10" => "8.10".
laravel: ["11.0"]
php: ["8.2"]

runs-on: ubuntu-latest

steps:
- name: "Checkout repository..."
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/marketplace/actions/composer-php-actions
- name: "Installing dependencies..."
Expand All @@ -44,12 +45,9 @@ jobs:
php_version: "${{ matrix.php }}"
dev: yes

# https://github.com/marketplace/actions/phpunit-php-actions
- name: "Running PHPUnit..."
uses: php-actions/phpunit@v3
with:
bootstrap: "vendor/autoload.php"
configuration: "tests/phpunit.xml"
# version: "10.0.89"
# memory_limit: "16M"
php_version: "${{ matrix.php }}"
shell: bash
run: |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
/usr/local/bin/composer install --no-interaction
/usr/local/bin/composer test
33 changes: 22 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "marcin-orlowski/laravel-api-response-builder",
"description": "Helps building nice, normalized and easy to consume Laravel REST API.",
"homepage": "https://github.com/MarcinOrlowski/laravel-api-response-builder",
"version": "10.0.0",
"version": "11.0.0",
"keywords": [
"laravel",
"laravel10",
Expand All @@ -13,7 +13,8 @@
"helper",
"php",
"php8",
"php81",
"php82",
"php83",
"mobile",
"android",
"ios"
Expand Down Expand Up @@ -44,19 +45,29 @@
}
},
"require": {
"php": "^8.1|^8.2",
"laravel/framework": "^10.0"
"php": "^8.2|^8.3",
"laravel/framework": "^11.0"
},
"require-dev": {
"marcin-orlowski/phpunit-extra-asserts": "^5.1.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0.0",
"phpunit/php-code-coverage": "^10.0",
"nunomaduro/larastan": "^2.0",
"marcin-orlowski/php-lockpick": "^1.0"
"orchestra/testbench": "^9.0",
"phpunit/phpunit": "^11.0",
"phpunit/php-code-coverage": "^11.0",
"larastan/larastan": "^2.0",
"marcin-orlowski/lockpick": "^1.0"
},
"scripts": {
"test": "vendor/bin/phpunit -c tests/phpunit.xml",
"mdlint": "markdownlint --config .markdownlint.yaml --ignore vendor **/*.md .github/**/*.md docs README.md"
"test": [
"Composer\\Config::disableProcessTimeout",
"vendor/bin/phpunit -c tests/phpunit.xml"
],
"lint": [
"Composer\\Config::disableProcessTimeout",
"vendor/bin/phpstan analyse --no-progress --no-interaction -c phpstan.neon"
],
"mdlint": [
"Composer\\Config::disableProcessTimeout",
"markdownlint --config .markdownlint.yaml --ignore vendor **/*.md .github/**/*.md docs README.md"
]
}
}
4 changes: 4 additions & 0 deletions docs/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ should be able to easily backport future new features to older versions rather e

## CHANGE LOG ##

* dev
* Added support for Laravel v11.
* Corrected documentation (thanks to Ehsan Soleimanian)

* v10.0.0 (2023-02-20)
* **BACKWARD INCOMPATIBLE CHANGES** ([more info](compatibility.md)).
* Added support for Laravel v10.
Expand Down
2 changes: 1 addition & 1 deletion docs/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use MarcinOrlowski\ResponseBuilder\ExceptionHandlerHelper;
public function register()
{
$this->renderable(function (Throwable $ex, $request) {
return ExceptionHandlerHelper::handle($ex, $request);
return ExceptionHandlerHelper::render($request ,$ex );
});
}
```
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
##################################################################################

includes:
- vendor/nunomaduro/larastan/extension.neon
- vendor/larastan/larastan/extension.neon
parameters:
checkGenericClassInNonGenericObjectType: false
level: max
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/Models/TestModelJsonSerializable.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __construct(protected mixed $val) {}

public function getVal(): string
{
/** @phpstan-ignore-next-line */
return $this->val;
}

Expand Down

0 comments on commit 9b6d00a

Please sign in to comment.