Skip to content

Commit 2dcc119

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 64921e6 + eb245a2 commit 2dcc119

21 files changed

+89
-66
lines changed

.github/workflows/tests.yml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,38 @@ jobs:
1010
build:
1111

1212
runs-on: ubuntu-latest
13-
13+
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: ['7.4', '8.0']
18-
laravel: ['^8.0']
17+
php: [7.4, '8.0', 8.1]
18+
laravel: [8, 9]
19+
exclude:
20+
- php: 7.4
21+
laravel: 9
1922

2023
steps:
21-
- name: Checkout Code
22-
uses: actions/checkout@v2
23-
24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@v2
26-
with:
27-
php-version: ${{ matrix.php }}
28-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd
29-
tools: composer:v2
30-
coverage: none
31-
32-
- name: Set Laravel Version
33-
run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n
34-
35-
- name: Install dependencies
36-
uses: nick-invision/retry@v1
37-
with:
38-
timeout_minutes: 5
39-
max_attempts: 5
40-
command: composer install --no-suggest --prefer-dist -n -o
41-
42-
- name: Execute tests
43-
run: vendor/bin/phpunit
24+
- name: Checkout Code
25+
uses: actions/checkout@v2
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
extensions: dom, curl, libxml, mbstring, zip
32+
tools: composer:v2
33+
coverage: none
34+
ini-values: error_reporting=E_ALL
35+
36+
- name: Set Laravel Version
37+
run: composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-update
38+
39+
- name: Install dependencies
40+
uses: nick-invision/retry@v1
41+
with:
42+
timeout_minutes: 5
43+
max_attempts: 5
44+
command: composer update --prefer-dist --no-interaction --no-progress
45+
46+
- name: Execute tests
47+
run: vendor/bin/phpunit

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
All notable changes to this project will be documented in this file. This project adheres to
44
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
55

6+
## [2.0.0] - 2022-02-09
7+
8+
### Added
9+
10+
- Package now supports Laravel 9.
11+
- Package now supports PHP 8.1.
12+
13+
### Changed
14+
15+
- Upgraded the `laravel-json-api/neomerx-json-api` dependency to `5.0`.
16+
- Upgraded the `laravel-json-api/core` dependency to `2.0`.
17+
- Added return types to internal methods to remove deprecation messages in PHP 8.1
18+
619
## [1.1.0] - 2022-01-03
720

821
### Fixed

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
"require": {
2626
"php": "^7.4|^8.0",
2727
"ext-json": "*",
28-
"illuminate/support": "^8.0",
29-
"laravel-json-api/core": "^1.1",
30-
"laravel-json-api/neomerx-json-api": "^4.0.2"
28+
"illuminate/contracts": "^8.0|^9.0",
29+
"illuminate/support": "^8.0|^9.0",
30+
"laravel-json-api/core": "^2.0",
31+
"laravel-json-api/neomerx-json-api": "^5.0"
3132
},
3233
"require-dev": {
33-
"phpunit/phpunit": "^9.5"
34+
"phpunit/phpunit": "^9.5.10"
3435
},
3536
"autoload": {
3637
"psr-4": {
@@ -44,7 +45,7 @@
4445
},
4546
"extra": {
4647
"branch-alias": {
47-
"dev-develop": "1.x-dev"
48+
"dev-develop": "2.x-dev"
4849
},
4950
"laravel": {
5051
"providers": [

phpunit.xml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,27 @@
88
convertErrorsToExceptions="true"
99
convertNoticesToExceptions="true"
1010
convertWarningsToExceptions="true"
11+
convertDeprecationsToExceptions="true"
1112
processIsolation="false"
1213
stopOnError="false"
1314
stopOnFailure="false"
1415
verbose="true"
1516
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
1617
>
17-
<coverage>
18-
<include>
19-
<directory suffix=".php">src/</directory>
20-
</include>
21-
</coverage>
22-
<testsuites>
23-
<testsuite name="Unit">
24-
<directory suffix="Test.php">./tests/Unit/</directory>
25-
</testsuite>
26-
<testsuite name="Integration">
27-
<directory suffix="Test.php">./tests/Integration/</directory>
28-
</testsuite>
29-
</testsuites>
18+
<coverage>
19+
<include>
20+
<directory suffix=".php">src/</directory>
21+
</include>
22+
</coverage>
23+
<testsuites>
24+
<testsuite name="Unit">
25+
<directory suffix="Test.php">./tests/Unit/</directory>
26+
</testsuite>
27+
<testsuite name="Integration">
28+
<directory suffix="Test.php">./tests/Integration/</directory>
29+
</testsuite>
30+
</testsuites>
31+
<php>
32+
<ini name="error_reporting" value="E_ALL"/>
33+
</php>
3034
</phpunit>

src/CompoundDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

src/Document.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -167,7 +167,7 @@ public function toArray()
167167
/**
168168
* @inheritDoc
169169
*/
170-
public function jsonSerialize()
170+
public function jsonSerialize(): array
171171
{
172172
try {
173173
$this->prepareEncoder();

src/Encoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

src/Encoder/Encoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

src/Factory/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
* Copyright 2021 Cloud Creativity Limited
3+
* Copyright 2022 Cloud Creativity Limited
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)