Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
php-versions: [ '8.3', '8.4', '8.5' ]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fetch-depth: 0 # To avoid "Shallow clone detected" error in SonarCloud report

#~ PHP Setup
- name: Setup PHP 8.1 # Minimum version
- name: Setup PHP 8.3 # Minimum version
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.3'

#~ Composer Cache
- name: Get Composer Cache Directory
Expand All @@ -41,6 +41,6 @@ jobs:
run: make php/tests # To generate the coverage report

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5.2.0
uses: SonarSource/sonarqube-scan-action@v7
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ composer.lock

#~ Tests
/build/*
.phpunit.result.cache

#~ Misc
.idea
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//~ Rules
->setRules(
[
'@PER-CS2.0' => true,
'@PER-CS3x0' => true,
]
)

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [4.0.0] - 2025-12-24
[4.0.0]: https://github.com/eureka-framework/component-database/compare/3.4.0...4.0.0
### Added
- Add PHP 8.3+ only
### Removed
- Drop PHP 7.4 support
- Drop PHP 8.1 support
- Drop PHP 8.2 support
### Changed
- Use PER Code Style 3.0
- Update CI config


## [3.4.0] - 2025-05-16
[3.4.0]: https://github.com/eureka-framework/component-database/compare/3.3.0...3.4.0
### Changed
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: validate install update php/deps php/check php/fix php/min-compatibility php/max-compatibility php/phpstan php/analyze php/tests php/test php/testdox ci clean

PHP_MIN_VERSION := "8.3"
PHP_MAX_VERSION := "8.5"
COMPOSER_BIN := composer
define header =
@if [ -t 1 ]; then printf "\n\e[37m\e[100m \e[104m $(1) \e[0m\n"; else printf "\n### $(1)\n"; fi
Expand Down Expand Up @@ -40,17 +42,17 @@ php/deps: composer.json

php/check: vendor/bin/php-cs-fixer
$(call header,Checking Code Style)
@PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer check -v --diff
@XDEBUG_MODE=off ./vendor/bin/php-cs-fixer check
php/fix: vendor/bin/php-cs-fixer
$(call header,Fixing Code Style)
@PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix -v
@XDEBUG_MODE=off ./vendor/bin/php-cs-fixer fix -v

php/min-compatibility: vendor/bin/phpstan build/reports/phpstan
$(call header,Checking PHP 7.4 compatibility)
$(call header,Checking PHP ${PHP_MIN_VERSION} compatibility)
@XDEBUG_MODE=off ./vendor/bin/phpstan analyse --configuration=./ci/phpmin-compatibility.neon --error-format=table

php/max-compatibility: vendor/bin/phpstan build/reports/phpstan #ci
$(call header,Checking PHP 8.4 compatibility)
$(call header,Checking PHP ${PHP_MAX_VERSION} compatibility)
@XDEBUG_MODE=off ./vendor/bin/phpstan analyse --configuration=./ci/phpmax-compatibility.neon --error-format=table

php/analyze: vendor/bin/phpstan build/reports/phpstan #manual & ci
Expand All @@ -59,7 +61,7 @@ php/analyze: vendor/bin/phpstan build/reports/phpstan #manual & ci

php/tests: vendor/bin/phpunit build/reports/phpunit #ci
$(call header,Running Unit Tests)
@XDEBUG_MODE=coverage php -dzend_extension=xdebug.so ./vendor/bin/phpunit --testsuite=unit --coverage-clover=./build/reports/phpunit/clover.xml --log-junit=./build/reports/phpunit/unit.xml --coverage-php=./build/reports/phpunit/unit.cov --coverage-html=./build/reports/coverage/ --fail-on-warning
@XDEBUG_MODE=coverage php ./vendor/bin/phpunit --testsuite=unit --coverage-clover=./build/reports/phpunit/clover.xml --log-junit=./build/reports/phpunit/unit.xml --coverage-php=./build/reports/phpunit/unit.cov --coverage-html=./build/reports/coverage/ --fail-on-warning

php/test: php/tests

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# component-database

[![Current version](https://img.shields.io/packagist/v/eureka/component-database.svg?logo=composer)](https://packagist.org/packages/eureka/component-database)
[![Supported PHP version](https://img.shields.io/static/v1?logo=php&label=PHP&message=7.4-8.4&color=777bb4)](https://packagist.org/packages/eureka/component-database)
[![Supported PHP version](https://img.shields.io/static/v1?logo=php&label=PHP&message=>%3D8.3&color=777bb4)](https://packagist.org/packages/eureka/component-database)
![CI](https://github.com/eureka-framework/component-database/workflows/CI/badge.svg)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=eureka-framework_component-database&metric=alert_status)](https://sonarcloud.io/dashboard?id=eureka-framework_component-database)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=eureka-framework_component-database&metric=coverage)](https://sonarcloud.io/dashboard?id=eureka-framework_component-database)
Expand Down
2 changes: 1 addition & 1 deletion ci/phpmax-compatibility.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ includes:
- ./../vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
phpVersion: 80400
phpVersion: 80500
level: 0
paths:
- ./../src
Expand Down
2 changes: 1 addition & 1 deletion ci/phpmin-compatibility.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ includes:
- ./../vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
phpVersion: 70400
phpVersion: 80300
level: 0
paths:
- ./../src
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
},

"require": {
"php": "7.4.*||8.0.*||8.1.*||8.2.*||8.3.*||8.4.*",
"php": ">=8.3",
"ext-pdo": "*"
},

"require-dev": {
"friendsofphp/php-cs-fixer": "^3.75.0",
"phpstan/phpstan": "^2.1.16",
"phpstan/phpstan-phpunit": "^2.0.6",
"phpunit/phpcov": "^8.2.1",
"phpunit/phpunit": "^9.6.23",
"shipmonk/composer-dependency-analyser": "^1.8.3"
"friendsofphp/php-cs-fixer": "^3.92.3",
"phpstan/phpstan": "^2.1.33",
"phpstan/phpstan-phpunit": "^2.0.11",
"phpunit/phpcov": "^11.0.3",
"phpunit/phpunit": "^12.5.4",
"shipmonk/composer-dependency-analyser": "^1.8.4"
}
}
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ includes:
- ./vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
phpVersion: 70400
phpVersion: 80300
level: max
paths:
- ./src
Expand Down
20 changes: 4 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.5/phpunit.xsd"
colors="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
cacheDirectory="build/.phpunit.cache"
>
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>

<testsuites>
<testsuite name="unit">
<directory>./tests/unit</directory>
</testsuite>
</testsuites>

<!--
cacheDirectory="build/.phpunit.cache" #In phpunit 10+
>
<source>
<include>
<directory>./src</directory>
Expand All @@ -33,5 +21,5 @@
<directory>./tests/integration</directory>
</testsuite>
</testsuites>
-->

</phpunit>