Skip to content

Commit b3a6663

Browse files
author
Greg Bowler
committed
Merge branch 'master' of github.com:PhpGt/DataObject
# Conflicts: # example/01-json-encode.php # example/04-type-safety-arrays.php
2 parents 48089d3 + e2623d6 commit b3a6663

9 files changed

Lines changed: 527 additions & 350 deletions

File tree

.github/workflows/ci.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: [ 8.0, 8.1, 8.2 ]
10+
php: [ 8.1, 8.2, 8.3, 8.4 ]
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Cache Composer dependencies
16-
uses: actions/cache@v3
16+
uses: actions/cache@v4
1717
with:
1818
path: /tmp/composer-cache
19-
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
19+
key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2020

2121
- name: Composer install
2222
uses: php-actions/composer@v6
@@ -27,32 +27,32 @@ jobs:
2727
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
2828

2929
- name: Upload build archive for test runners
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
with:
32-
name: build-artifact
32+
name: build-artifact-${{ matrix.php }}
3333
path: /tmp/github-actions
3434

3535
phpunit:
3636
runs-on: ubuntu-latest
3737
needs: [ composer ]
3838
strategy:
3939
matrix:
40-
php: [ 8.0, 8.1, 8.2 ]
40+
php: [ 8.1, 8.2, 8.3, 8.4 ]
4141

4242
outputs:
4343
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
4444

4545
steps:
46-
- uses: actions/download-artifact@v3
46+
- uses: actions/download-artifact@v4
4747
with:
48-
name: build-artifact
48+
name: build-artifact-${{ matrix.php }}
4949
path: /tmp/github-actions
5050

5151
- name: Extract build archive
5252
run: tar -xvf /tmp/github-actions/build.tar ./
5353

5454
- name: PHP Unit tests
55-
uses: php-actions/phpunit@v3
55+
uses: php-actions/phpunit@v4
5656
env:
5757
XDEBUG_MODE: cover
5858
with:
@@ -62,40 +62,43 @@ jobs:
6262
coverage_clover: _coverage/clover.xml
6363

6464
- name: Store coverage data
65-
uses: actions/upload-artifact@v3
65+
uses: actions/upload-artifact@v4
6666
with:
67-
name: code-coverage
67+
name: code-coverage-${{ matrix.php }}-${{ github.run_number }}
6868
path: _coverage
6969

7070
coverage:
7171
runs-on: ubuntu-latest
7272
needs: [ phpunit ]
73+
strategy:
74+
matrix:
75+
php: [ 8.1, 8.2, 8.3, 8.4 ]
7376

7477
steps:
75-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@v4
7679

77-
- uses: actions/download-artifact@v3
80+
- uses: actions/download-artifact@v4
7881
with:
79-
name: code-coverage
82+
name: code-coverage-${{ matrix.php }}-${{ github.run_number }}
8083
path: _coverage
8184

8285
- name: Output coverage
8386
run: cat "_coverage/coverage.txt"
8487

8588
- name: Upload to Codecov
86-
uses: codecov/codecov-action@v3
89+
uses: codecov/codecov-action@v5
8790

8891
phpstan:
8992
runs-on: ubuntu-latest
9093
needs: [ composer ]
9194
strategy:
9295
matrix:
93-
php: [ 8.0, 8.1, 8.2 ]
96+
php: [ 8.1, 8.2, 8.3, 8.4 ]
9497

9598
steps:
96-
- uses: actions/download-artifact@v3
99+
- uses: actions/download-artifact@v4
97100
with:
98-
name: build-artifact
101+
name: build-artifact-${{ matrix.php }}
99102
path: /tmp/github-actions
100103

101104
- name: Extract build archive
@@ -112,12 +115,12 @@ jobs:
112115
needs: [ composer ]
113116
strategy:
114117
matrix:
115-
php: [ 8.0, 8.1, 8.2 ]
118+
php: [ 8.1, 8.2, 8.3, 8.4 ]
116119

117120
steps:
118-
- uses: actions/download-artifact@v3
121+
- uses: actions/download-artifact@v4
119122
with:
120-
name: build-artifact
123+
name: build-artifact-${{ matrix.php }}
121124
path: /tmp/github-actions
122125

123126
- name: Extract build archive
@@ -136,12 +139,12 @@ jobs:
136139
needs: [ composer ]
137140
strategy:
138141
matrix:
139-
php: [ 8.0, 8.1, 8.2 ]
142+
php: [ 8.1, 8.2, 8.3, 8.4 ]
140143

141144
steps:
142-
- uses: actions/download-artifact@v3
145+
- uses: actions/download-artifact@v4
143146
with:
144-
name: build-artifact
147+
name: build-artifact-${{ matrix.php }}
145148
path: /tmp/github-actions
146149

147150
- name: Extract build archive
@@ -162,7 +165,7 @@ jobs:
162165
env:
163166
GH_TOKEN: ${{ github.token }}
164167
run: |
165-
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt
168+
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
166169
while read id
167170
do
168171
echo -n "Deleting artifact ID $id ... "

SECURITY.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
All MAJOR versions of this package will receive security updates for **two years after the next major version is released**. For example, if version 4.0.0 is released, version 3.x will continue receiving security updates for two years from that date.
6+
7+
Versions outside this window are considered end-of-life and will no longer receive updates, even for critical vulnerabilities.
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security issue, please report it using GitHub's [**"Report a vulnerability"** feature](../../security/advisories/new) under the **Security** tab of this repository.
12+
13+
When reporting, please include the following information to help us investigate quickly and thoroughly:
14+
15+
- A clear description of the vulnerability and what part of the code it affects.
16+
- Steps to reproduce the issue, ideally including:
17+
- The affected version
18+
- A code snippet or minimal test case
19+
- The expected vs. actual behavior
20+
- If applicable, an explanation of potential impact or severity.
21+
- Any suggested mitigations or patches (optional, but appreciated).
22+
23+
Please do not disclose the vulnerability publicly until we've had a chance to investigate and publish a fix.
24+
25+
We appreciate responsible disclosure and are committed to resolving issues promptly.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "library",
55

66
"require": {
7-
"php": ">=8.0",
7+
"php": ">=8.1",
88
"ext-json": "*",
99
"phpgt/typesafegetter": "^1.3"
1010
},

0 commit comments

Comments
 (0)