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: [ '8.3', '8.4' ]
php-versions: [ '8.3', '8.4', '8.5' ]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: SonarQube

on:
push:
Expand Down Expand Up @@ -41,6 +41,6 @@ jobs:
run: make php/tests # To generate the coverage report

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6.0.0
uses: SonarSource/sonarqube-scan-action@v7
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
->setRules(
[
'@PER-CS3x0' => true,
]
],
)

//~ Format
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
```

## [7.1.0] - 2026-01-05
[7.1.0]: https://github.com/eureka-framework/component-orm/compare/7.0.0...7.1.0
### Added
- PHP 8.5 support
### Changed
- Fix phpstan error
- PHP code style fixes
- Update CI
- Update Makefile

## [7.0.0] - 2025-08-25
[7.0.0]: https://github.com/eureka-framework/component-orm/compare/6.1.0...7.0.0
### Added
Expand Down
40 changes: 24 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
.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_VERSION_MIN := 8.3
PHP_VERSION_MAX := 8.4

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
endef

#~ Composer dependency
validate:
$(call header,Composer Validation)
@composer validate
@${COMPOSER_BIN} validate

install:
$(call header,Composer Install)
@composer install
@${COMPOSER_BIN} install

update:
$(call header,Composer Update)
@composer update
@composer bump --dev-only
@${COMPOSER_BIN} update
@${COMPOSER_BIN} bump --dev-only

composer.lock: install

#~ Vendor binaries dependencies
vendor/bin/php-cs-fixer:
vendor/bin/phpstan:
vendor/bin/phpunit:
vendor/bin/php-cs-fixer: composer.lock
vendor/bin/phpstan: composer.lock
vendor/bin/phpunit: composer.lock

#~ Report directories dependencies
build/reports/phpunit:
Expand All @@ -42,24 +42,26 @@ php/deps: composer.json

php/check: vendor/bin/php-cs-fixer
$(call header,Checking Code Style)
@./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)
@./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 ${PHP_VERSION_MIN} 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 ${PHP_VERSION_MAX} 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
$(call header,Running Static Analyze - Pretty tty format)
@XDEBUG_MODE=off ./vendor/bin/phpstan analyse --error-format=table

php/clean-tests:
$(call header,Clean previous generated classes from tests)

php/tests: vendor/bin/phpunit build/reports/phpunit #ci
$(call header,Running Unit Tests)
@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
Expand All @@ -78,4 +80,10 @@ clean:
$(call header,Cleaning previous build) #manual
@if [ "$(shell ls -A ./build)" ]; then rm -rf ./build/*; fi; echo " done"

ci: clean validate install php/deps php/check php/tests php/integration php/min-compatibility php/max-compatibility php/analyze
clean-tests:
$(call header,Cleaning generated classes from tests) #manual
@if [ "$(shell ls -A ./tests/unit/Generated/Entity)" ]; then rm -rf ./tests/unit/Generated/Entity; fi; echo " . Removing entities: done"
@if [ "$(shell ls -A ./tests/unit/Generated/Infrastructure)" ]; then rm -rf ./tests/unit/Generated/Infrastructure; fi; echo " . Removing infrastructure: done"
@if [ "$(shell ls -A ./tests/unit/Generated/Repository)" ]; then rm -rf ./tests/unit/Generated/Repository; fi; echo " . Removing repositories: done"

ci: clean clean-tests validate install php/deps php/check php/tests php/integration php/min-compatibility php/max-compatibility php/analyze
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# component-orm

[![Current version](https://img.shields.io/packagist/v/eureka/component-orm.svg?logo=composer)](https://packagist.org/packages/eureka/component-orm)
[![Supported PHP version](https://img.shields.io/static/v1?logo=php&label=PHP&message=8.3%20-%208.4&color=777bb4)](https://packagist.org/packages/eureka/component-orm)
[![Supported PHP version](https://img.shields.io/static/v1?logo=php&label=PHP&message=>%3D8.3&color=777bb4)](https://packagist.org/packages/eureka/component-orm)
![CI](https://github.com/eureka-framework/component-orm/workflows/CI/badge.svg)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=eureka-framework_component-orm&metric=alert_status)](https://sonarcloud.io/dashboard?id=eureka-framework_component-orm)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=eureka-framework_component-orm&metric=coverage)](https://sonarcloud.io/dashboard?id=eureka-framework_component-orm)
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
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@
},

"require": {
"php": "8.3.*||8.4.*",
"php": ">=8.3",
"ext-pdo": "*",

"eureka/component-database": "^3.4",
"eureka/component-database": "^4.0",
"eureka/component-validation": "^6.0",
"eureka/component-console": "^6.3",
"eureka/component-console": "^7.0",

"psr/cache": "^1.0||^2.0||^3.0"
},

"require-dev": {
"friendsofphp/php-cs-fixer": "^3.89.2",
"phpstan/phpstan": "^2.1.31",
"phpstan/phpstan-phpunit": "^2.0.7",
"friendsofphp/php-cs-fixer": "^3.92.4",
"phpstan/phpstan": "^2.1.33",
"phpstan/phpstan-phpunit": "^2.0.11",
"phpstan/phpstan-strict-rules": "^2.0.7",
"phpunit/phpcov": "^11.0.2",
"phpunit/phpunit": "^12.4.2",
"symfony/cache": "^7.3.6",
"shipmonk/composer-dependency-analyser": "^1.8.3"
"phpunit/phpcov": "^11.0.3",
"phpunit/phpunit": "^12.5.4",
"symfony/cache": "^7.4.3",
"shipmonk/composer-dependency-analyser": "^1.8.4"
}
}