Skip to content

Commit 4f68282

Browse files
committed
Merge branch '5.0' into issue-292
2 parents e770575 + ae621c2 commit 4f68282

File tree

113 files changed

+4060
-1040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+4060
-1040
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text eol=lf
2+
*.png binary
3+
*.jpg binary
4+
*.jpeg binary
5+
*.svg binary
6+
*.md diff=markdown

.github/workflows/codecov.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,10 @@ jobs:
4242
php${{ matrix.php }}-composer-
4343
4444
- name: Install dependencies with composer
45+
env:
46+
COMPOSER_DEV_MODE: 1
4547
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4648

47-
- name: Setup project
48-
run: |
49-
mv config/autoload/local.php.dist config/autoload/local.php
50-
mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5349
- name: Collect code coverage with PHPUnit
5450
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml
5551

.github/workflows/qodana_code_quality.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,36 @@ jobs:
1414
contents: write
1515
pull-requests: write
1616
checks: write
17+
strategy:
18+
matrix:
19+
php-versions: [ '8.2', '8.3' ]
1720
steps:
1821
- uses: actions/checkout@v4
1922
with:
2023
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
2124
fetch-depth: 0 # a full history is required for pull request analysis
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
coverage: pcov
30+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
31+
tools: composer:v2, cs2pr
32+
33+
- name: Determine composer cache directory
34+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
35+
36+
- name: Cache dependencies installed with composer
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.COMPOSER_CACHE_DIR }}
40+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: |
42+
php${{ matrix.php }}-composer-
43+
44+
- name: Install dependencies with composer
45+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
2246
- name: 'Qodana Scan'
23-
uses: JetBrains/qodana-action@v2024.1
47+
uses: JetBrains/qodana-action@v2024.2
2448
env:
2549
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
- push
3+
4+
name: Run PHPStan checks
5+
6+
jobs:
7+
mutation:
8+
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.2"
19+
- "8.3"
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: "${{ matrix.php }}"
29+
coverage: pcov
30+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
31+
tools: composer:v2, cs2pr
32+
33+
- name: Determine composer cache directory
34+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
35+
36+
- name: Cache dependencies installed with composer
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.COMPOSER_CACHE_DIR }}
40+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: |
42+
php${{ matrix.php }}-composer-
43+
44+
- name: Install dependencies with composer
45+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
46+
47+
- name: Run static analysis with PHPStan
48+
run: vendor/bin/phpstan analyse

.laminas-ci/pre-run.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ JOB=$3
22
PHP_VERSION=$4
33
COMMAND=$(echo "${JOB}" | jq -r '.command')
44

5-
echo "Running $COMMAND"
5+
echo "Running pre-run $COMMAND"
66

77
if [[ ${COMMAND} =~ phpunit ]];then
88

99
apt-get install php"${PHP_VERSION}"-sqlite3
1010

1111
cp config/autoload/local.php.dist config/autoload/local.php
12-
cp config/autoload/mail.local.php.dist config/autoload/mail.local.php
1312
cp config/autoload/local.test.php.dist config/autoload/local.test.php
1413

1514
fi

CHANGELOG.md

Lines changed: 184 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,195 @@
1-
## 4.0.0 - 2022-11-03
1+
# Changelog
2+
3+
## 5.3.0 - 2025-01-08
4+
5+
### Changed
6+
7+
* Issue [#352](https://github.com/dotkernel/api/issues/352): Updated PHPStan memory limit by [@bidi47](https://github.com/bidi47) in [#353](https://github.com/dotkernel/api/pull/353)
8+
* Issue [#360](https://github.com/dotkernel/api/issues/360): Restricted `Qodana` to supported PHP versions by [@alexmerlin](https://github.com/alexmerlin) in [#361](https://github.com/dotkernel/api/pull/361)
9+
* Issue [#366](https://github.com/dotkernel/api/issues/366): Updated laminas/laminas-coding-standard to latest version by [@MarioRadu](https://github.com/MarioRadu) in [#367](https://github.com/dotkernel/api/pull/367)
10+
* Issue [#362](https://github.com/dotkernel/api/issues/362): Updated user status, removed isDeleted by [@bidi47](https://github.com/bidi47) in [#359](https://github.com/dotkernel/api/pull/359)
11+
* Issue [#355](https://github.com/dotkernel/api/issues/355): Upgraded to dotkernel/dot-mail 5.0 by [@MarioRadu](https://github.com/MarioRadu) in [#368](https://github.com/dotkernel/api/pull/368)
12+
* Issue [#374](https://github.com/dotkernel/api/issues/374): Updated anonymization by [@bidi47](https://github.com/bidi47) in [#375](https://github.com/dotkernel/api/pull/375)
13+
* Issue [#374](https://github.com/dotkernel/api/issues/372): Ignore development files on production env by [@MarioRadu](https://github.com/MarioRadu) in [#373](https://github.com/dotkernel/api/pull/373)
14+
* Update security.txt file by [@arhimede](https://github.com/arhimede) in [#371](https://github.com/dotkernel/api/pull/371)
15+
16+
### Added
17+
18+
* Issue [#363](https://github.com/dotkernel/api/issues/363): Composer post install script which copies config files by [@MarioRadu](https://github.com/MarioRadu) in [#364](https://github.com/dotkernel/api/pull/364)
19+
20+
### Deprecated
21+
22+
* Nothing
23+
24+
### Removed
25+
26+
* Issue [#354](https://github.com/dotkernel/api/issues/354): Removed laminas/laminas-http dependency by [@MarioRadu](https://github.com/MarioRadu) in [#356](https://github.com/dotkernel/api/pull/356)
27+
* Issue [#362](https://github.com/dotkernel/api/issues/362): Updated user status, removed isDeleted by [@bidi47](https://github.com/bidi47) in [#359](https://github.com/dotkernel/api/pull/359)
28+
* Issue [#369](https://github.com/dotkernel/api/issues/369): Delete `config/autoload/mail.global.php.dist` by [@alexmerlin](https://github.com/alexmerlin) in [#370](https://github.com/dotkernel/api/pull/370)
29+
* Removed composer script `post-create-project-cmd` by [@MarioRadu](https://github.com/MarioRadu) in [#376](https://github.com/dotkernel/api/pull/376)
30+
31+
### Fixed
32+
33+
* Issue [#377](https://github.com/dotkernel/api/issues/377): Fixed `.github/workflows/codecov.yml` by [@alexmerlin](https://github.com/alexmerlin) in [#378](https://github.com/dotkernel/api/pull/378)
34+
35+
## 5.2.0 - 2024-11-19
236

337
### Changed
4-
* Refactored dependencies
5-
* Replaced phinx migrations & seeders with doctrine/migrations and dotkernel/dot-data-fixtures
6-
* Minor bug fixes
38+
39+
* Issue [#347](https://github.com/dotkernel/api/issues/324): Replaced `analyze` with `static-analysis` in `check` command in composer.json by [@MarioRadu](https://github.com/MarioRadu) in [#351](https://github.com/dotkernel/api/pull/351)
40+
* Issue [#347](https://github.com/dotkernel/api/issues/324): Replaced `analyze` with `static-analysis` command in composer.json by [@MarioRadu](https://github.com/MarioRadu) in [#350](https://github.com/dotkernel/api/pull/350)
741

842
### Added
9-
* Psalm implementation
10-
* doctrine/migrations and dotkernel/dot-data-fixtures
11-
* Added functional tests
12-
* Implemented github actions for unit and functional tests
13-
* Implemented github actions for Psalm
14-
* Added PHP 8.2 support
43+
44+
* Issue [#347](https://github.com/dotkernel/api/issues/324): Implemented PHPStan by [@MarioRadu](https://github.com/MarioRadu) in [#349](https://github.com/dotkernel/api/pull/349)
1545

1646
### Deprecated
47+
1748
* Nothing
1849

1950
### Removed
20-
* phinx migrations
21-
* Removed PHP 7.4 support
51+
52+
* Issue [#347](https://github.com/dotkernel/api/issues/347): Removed psalm by [@MarioRadu](https://github.com/MarioRadu) in [#348](https://github.com/dotkernel/api/pull/348)
2253

2354
### Fixed
24-
* Refactored unit tests
55+
56+
* Nothing
57+
58+
## 5.1.1 - 2024-11-14
59+
60+
### Changed
61+
62+
* Issue [#320](https://github.com/dotkernel/api/issues/320): composer.json dependencies cleanup by [@alexmerlin](https://github.com/alexmerlin) in [#346](https://github.com/dotkernel/api/pull/346)
63+
64+
### Added
65+
66+
* Nothing
67+
68+
### Deprecated
69+
70+
* Nothing
71+
72+
### Removed
73+
74+
* Issue [#340](https://github.com/dotkernel/api/issues/340): Removed laminas/laminas-config package by [@MarioRadu](https://github.com/MarioRadu) in [#344](https://github.com/dotkernel/api/pull/344)
75+
76+
### Fixed
77+
78+
* Nothing
79+
80+
## 5.1.0 - 2024-10-31
81+
82+
### Changed
83+
84+
* Nothing
85+
86+
### Added
87+
88+
* Issue [#325](https://github.com/dotkernel/api/issues/325): Implemented enums in database by [@alexmerlin](https://github.com/alexmerlin) in [#339](https://github.com/dotkernel/api/pull/339)
89+
90+
### Deprecated
91+
92+
* Nothing
93+
94+
### Removed
95+
96+
* Nothing
97+
98+
### Fixed
99+
100+
* Nothing
101+
102+
## 5.0.2 - 2024-10-29
103+
104+
### Changed
105+
106+
* Update qodana_code_quality.yml by [@arhimede](https://github.com/arhimede) in [#323](https://github.com/dotkernel/api/pull/323)
107+
108+
### Added
109+
110+
* Added .gitattributes by [@bidi47](https://github.com/bidi47) in [#321](https://github.com/dotkernel/api/pull/321)
111+
* Issue [#331](https://github.com/dotkernel/api/issues/331): Added `symfony/var-dumper` to the dev requirements by [@alexmerlin](https://github.com/alexmerlin) in [#333](https://github.com/dotkernel/api/pull/333)
112+
* Issue [#337](https://github.com/dotkernel/api/issues/337): Implemented handle delegators by [@alexmerlin](https://github.com/alexmerlin) in [#338](https://github.com/dotkernel/api/pull/338)
113+
114+
### Deprecated
115+
116+
* Nothing
117+
118+
### Removed
119+
120+
* Nothing
121+
122+
### Fixed
123+
124+
* Nothing
125+
126+
## 5.0.1 - 2024-09-13
127+
128+
### Changed
129+
130+
* Issue [#311](https://github.com/dotkernel/api/issues/311): Upgraded `dot-errorhandler` to `4.x` by
131+
[@alexmerlin](https://github.com/alexmerlin) in [#312](https://github.com/dotkernel/api/pull/312)
132+
133+
### Added
134+
135+
* Issue [#168](https://github.com/dotkernel/api/issues/168): OpenAPI documentation by
136+
[@alexmerlin](https://github.com/alexmerlin) in [#306](https://github.com/dotkernel/api/pull/306)
137+
* Issue [#309](https://github.com/dotkernel/api/issues/309): psr-container-doctrine 5.2.1 support and refactoring
138+
modules configuration by [@cPintiuta](https://github.com/cPintiuta) in
139+
[#309](https://github.com/dotkernel/api/pull/309)
140+
141+
### Deprecated
142+
143+
* Nothing
144+
145+
### Removed
146+
147+
* Issue [#313](https://github.com/dotkernel/api/issues/313): Remove `config` dependency from handlers. by
148+
[@alexmerlin](https://github.com/alexmerlin) in [#315](https://github.com/dotkernel/api/pull/315)
149+
150+
### Fixed
151+
152+
* Issue [#303](https://github.com/dotkernel/api/issues/303): fix content type, special case for multipart/form-data by
153+
[@cPintiuta](https://github.com/cPintiuta) in [#304](https://github.com/dotkernel/api/pull/304)
154+
155+
## 5.0.0 - 2024-07-01
156+
157+
### Changed
158+
159+
* Refactor: Transfer responsibility from handlers to services. by [@alexmerlin](https://github.com/alexmerlin) in
160+
[#272](https://github.com/dotkernel/api/pull/272)
161+
* Issue [#169](https://github.com/dotkernel/api/issues/169): API deprecation refactoring by
162+
[@MarioRadu](https://github.com/MarioRadu) in [#291](https://github.com/dotkernel/api/pull/291)
163+
* Issue [#264](https://github.com/dotkernel/api/issues/264): Bump for doctrine orm 2 -> 3, dbal 3 -> 4 through roave
164+
psr container by [@cPintiuta](https://github.com/cPintiuta) in [#283](https://github.com/dotkernel/api/pull/283)
165+
* Issue [#266](https://github.com/dotkernel/api/issues/266): Replaced annotation-based dependency injection with
166+
attribute-based dependency injection by [@alexmerlin](https://github.com/alexmerlin) in
167+
[#280](https://github.com/dotkernel/api/pull/280)
168+
* Issue [#295](https://github.com/dotkernel/api/issues/295): ContentNegotiationMiddleware: Make `$config` readonly by
169+
[@alexmerlin](https://github.com/alexmerlin) in [#296](https://github.com/dotkernel/api/pull/296)
170+
* Updated license file by [@arhimede](https://github.com/arhimede) in [#282](https://github.com/dotkernel/api/pull/282)
171+
* Update README.md by [@arhimede](https://github.com/arhimede) in [#290](https://github.com/dotkernel/api/pull/290)
172+
* Update qodana_code_quality.yml by [@arhimede](https://github.com/arhimede) in
173+
[#294](https://github.com/dotkernel/api/pull/294)
174+
175+
### Added
176+
177+
* Issue [#169](https://github.com/dotkernel/api/issues/169): Implemented API evolution pattern by
178+
[@MarioRadu](https://github.com/MarioRadu) in [#285](https://github.com/dotkernel/api/pull/285)
179+
* Added missing factory spec for ErrorReportHandler. local.php.dist: removed an unnecessary use statement by
180+
[@alexmerlin](https://github.com/alexmerlin) in [#284](https://github.com/dotkernel/api/pull/284)
181+
* Added version in home handler by [@arhimede](https://github.com/arhimede) in
182+
[#287](https://github.com/dotkernel/api/pull/287)
183+
184+
### Deprecated
185+
186+
* Nothing
187+
188+
### Removed
189+
190+
* Nothing
191+
192+
### Fixed
193+
194+
* Issue [#277](https://github.com/dotkernel/api/issues/277): Sorted routes by name by
195+
[@alexmerlin](https://github.com/alexmerlin) in [#278](https://github.com/dotkernel/api/pull/278)

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# DotKernel API
22

3-
Based on Enrico Zimuel's [Zend Expressive API - Skeleton example](https://github.com/ezimuel/zend-expressive-api), DotKernel API runs on [Laminas](https://github.com/laminas) and [Mezzio](https://github.com/mezzio) components and implements standards like PSR-3, PSR-4, PSR-7, PSR-11 and PSR-15.
3+
DotKernel API is a PHP skeleton app for building REST APIs using [Laminas](https://github.com/laminas) and [Mezzio](https://github.com/mezzio) components and implements standards like PSR-3, PSR-4, PSR-7, PSR-11 and PSR-15.
4+
5+
Dotkernel API is an alternative for legacy Laminas API Tools (formerly Apigility) applications, and is based on Enrico Zimuel's [Zend Expressive API - Skeleton example](https://github.com/ezimuel/zend-expressive-api).
6+
7+
> Live [demo](https://api.dotkernel.net/).
8+
9+
## Documentation
10+
11+
Documentation is available at: https://docs.dotkernel.org/api-documentation/
12+
13+
## Badges
414

515
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/api)
6-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/5.0.x-dev)
16+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/5.2.0)
717

818
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/api)](https://github.com/dotkernel/api/issues)
919
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/api)](https://github.com/dotkernel/api/network)
@@ -13,8 +23,7 @@ Based on Enrico Zimuel's [Zend Expressive API - Skeleton example](https://github
1323
[![Build Static](https://github.com/dotkernel/api/actions/workflows/continuous-integration.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/api/actions/workflows/continuous-integration.yml)
1424
[![codecov](https://codecov.io/gh/dotkernel/api/graph/badge.svg?token=53FN78G5CK)](https://codecov.io/gh/dotkernel/api)
1525
[![Qodana](https://github.com/dotkernel/api/actions/workflows/qodana_code_quality.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/api/actions/workflows/qodana_code_quality.yml)
16-
17-
[![SymfonyInsight](https://insight.symfony.com/projects/7f9143cc-5e3c-4cfc-992c-377a001fde3e/big.svg)](https://insight.symfony.com/projects/7f9143cc-5e3c-4cfc-992c-377a001fde3e)
26+
[![PHPStan](https://github.com/dotkernel/api/actions/workflows/static-analysis.yml/badge.svg?branch=5.0)](https://github.com/dotkernel/api/actions/workflows/static-analysis.yml)
1827

1928
## Getting Started
2029

0 commit comments

Comments
 (0)