Skip to content

Commit 6901871

Browse files
committed
Issue #29: Remove PHP 8.1 and add PHP 8.4 & 8.5 support
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent ddb1f9c commit 6901871

13 files changed

+86
-141
lines changed

.github/workflows/codecov.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
2019
- "8.3"
20+
- "8.4"
21+
- "8.5"
2122

2223
steps:
2324
- name: Checkout
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
tags:
8+
9+
jobs:
10+
ci:
11+
uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x

.github/workflows/cs-tests.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
on:
22
- push
33

4-
name: Run static analysis
4+
name: Run PHPStan checks
55

66
jobs:
77
mutation:
8-
name: PHP ${{ matrix.php }}-${{ matrix.os }}
8+
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}
99

1010
runs-on: ${{ matrix.os }}
1111

@@ -15,33 +15,36 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
2019
- "8.3"
20+
- "8.4"
21+
- "8.5"
2122

2223
steps:
2324
- name: Checkout
24-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2526

2627
- name: Install PHP
2728
uses: shivammathur/setup-php@v2
2829
with:
2930
php-version: "${{ matrix.php }}"
31+
coverage: pcov
32+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
3033
tools: composer:v2, cs2pr
31-
coverage: none
3234

3335
- name: Determine composer cache directory
3436
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
3537

3638
- name: Cache dependencies installed with composer
37-
uses: actions/cache@v3
39+
uses: actions/cache@v4
3840
with:
3941
path: ${{ env.COMPOSER_CACHE_DIR }}
4042
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
4143
restore-keys: |
42-
php${{ matrix.php }}-composer-
44+
php${{ matrix.php }}-composer-
45+
4346
- name: Install dependencies with composer
4447
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4548

46-
- name: Run static analysis
47-
run: vendor/bin/psalm --no-cache --output-format=github --show-info=false --threads=4
49+
- name: Run static analysis with PHPStan
50+
run: vendor/bin/phpstan analyse

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.laminas-ci.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"backwardCompatibilityCheck": true
3+
}

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# dot-form
22

3-
> [!IMPORTANT]
3+
Dotkernel form component extending and customizing [laminas-form](https://github.com/laminas/laminas-form).
4+
45
> dot-form is a wrapper on top of [laminas/laminas-form](https://github.com/laminas/laminas-form)
5-
>
6-
> ![OSS Lifecycle](https://img.shields.io/osslifecycle/laminas/laminas-form)
7-
> ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2Flaminas%2Flaminas-form%2Fproperties%2Fvalues&query=%24%5B%3F(%40.property_name%3D%3D%22maintenance-mode%22)%5D.value&label=Maintenance%20Mode)
86
9-
DotKernel form component extending and customizing [laminas-form](https://github.com/laminas/laminas-form)
7+
## Badges
108

119
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-form)
12-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-form/4.2.3)
10+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-form/4.3.0)
1311

1412
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-form)](https://github.com/dotkernel/dot-form/issues)
1513
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-form)](https://github.com/dotkernel/dot-form/network)
@@ -18,5 +16,4 @@ DotKernel form component extending and customizing [laminas-form](https://github
1816

1917
[![Build Static](https://github.com/dotkernel/dot-form/actions/workflows/static-analysis.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-form/actions/workflows/static-analysis.yml)
2018
[![codecov](https://codecov.io/gh/dotkernel/dot-form/graph/badge.svg?token=0U6DM2J7SG)](https://codecov.io/gh/dotkernel/dot-form)
21-
22-
[![SymfonyInsight](https://insight.symfony.com/projects/370a5200-2e49-47da-9988-8e1de8f49502/big.svg)](https://insight.symfony.com/projects/370a5200-2e49-47da-9988-8e1de8f49502)
19+
[![PHPStan](https://github.com/dotkernel/dot-form/actions/workflows/static-analysis.yml/badge.svg?branch=4.0)](https://github.com/dotkernel/dot-form/actions/workflows/static-analysis.yml)

SECURITY.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported | PHP Version |
6+
|---------|--------------------|----------------------------------------------------------------------------------------------------------|
7+
| 4.x | :white_check_mark: | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-form/4.3.0) |
8+
| <= 3.x | :x: | |
9+
10+
## Reporting Potential Security Issues
11+
12+
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
13+
We will work with you to verify the vulnerability and patch it.
14+
15+
When reporting issues, please provide the following information:
16+
17+
- Component(s) affected
18+
- A description indicating how to reproduce the issue
19+
- A summary of the security vulnerability and impact
20+
21+
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
22+
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.
23+
24+
## Policy
25+
26+
If we verify a reported security vulnerability, our policy is:
27+
28+
- We will patch the current release branch, as well as the immediate prior minor release branch.
29+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.

composer.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dotkernel/dot-form",
33
"type": "library",
4-
"description": "DotKernel form component extending and customizing laminas-form",
4+
"description": "Dotkernel form component extending and customizing laminas-form",
55
"license": "MIT",
66
"homepage": "https://github.com/dotkernel/dot-form",
77
"keywords": [
@@ -13,19 +13,20 @@
1313
],
1414
"authors": [
1515
{
16-
"name": "DotKernel Team",
16+
"name": "Dotkernel Team",
1717
"email": "team@dotkernel.com"
1818
}
1919
],
2020
"require": {
21-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
21+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
2222
"laminas/laminas-servicemanager": "^3.22.1",
2323
"laminas/laminas-form": "^3.17.0"
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "^10.4.2",
27-
"laminas/laminas-coding-standard": "^2.5.0",
28-
"vimeo/psalm": "^5.16.0"
26+
"laminas/laminas-coding-standard": "^3.0.0",
27+
"phpstan/phpstan": "^2.1",
28+
"phpstan/phpstan-phpunit": "^2.0",
29+
"phpunit/phpunit": "^10.4.2"
2930
},
3031
"autoload": {
3132
"psr-4": {
@@ -46,12 +47,12 @@
4647
"scripts": {
4748
"check": [
4849
"@cs-check",
49-
"@test"
50+
"@test",
51+
"@static-analysis"
5052
],
5153
"cs-check": "phpcs",
5254
"cs-fix": "phpcbf",
53-
"test": "phpunit --colors=always",
54-
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
55-
"static-analysis": "psalm --shepherd --stats"
55+
"static-analysis": "phpstan analyse --memory-limit 1G",
56+
"test": "phpunit --colors=always"
5657
}
5758
}

phpstan.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
includes:
2+
- vendor/phpstan/phpstan-phpunit/extension.neon
3+
parameters:
4+
level: 5
5+
paths:
6+
- src
7+
- test
8+
treatPhpDocTypesAsCertain: false
9+
ignoreErrors:
10+
- message: '#Class Dot\\Form\\FormElementManager extends @final class Laminas\\Form\\FormElementManager.#'
11+
path: src/FormElementManager.php

0 commit comments

Comments
 (0)