Skip to content

Commit

Permalink
Merge pull request #757 from driehle/drop-php80
Browse files Browse the repository at this point in the history
Drop PHP 8.0
  • Loading branch information
driehle authored Dec 30, 2024
2 parents 7284f6b + 74f8d17 commit fa1189d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 61 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/continuous-integration.yml"
- "composer.*"
- "src/**"
- "phpunit.xml.dist"
- "tests/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/continuous-integration.yml"
- "composer.*"
- "src/**"
- "phpunit.xml.dist"
- "tests/**"

jobs:
phpunit:
Expand All @@ -17,7 +29,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
Expand All @@ -30,19 +41,19 @@ jobs:
- true
- false
include:
- php-version: "8.0"
- php-version: "8.1"
dbal-version: "2.13.0"
dependencies: "lowest"
optional-dependencies: false
- php-version: "8.0"
- php-version: "8.1"
dbal-version: "3.3.0"
dependencies: "lowest"
optional-dependencies: false
- php-version: "8.0"
- php-version: "8.1"
dbal-version: "2.13.0"
dependencies: "lowest"
optional-dependencies: true
- php-version: "8.0"
- php-version: "8.1"
dbal-version: "3.3.0"
dependencies: "lowest"
optional-dependencies: true
Expand All @@ -61,26 +72,31 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Install PHP"
- name: "Install PHP with PCOV"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "error_reporting=E_ALL, zend.assertions=1"
ini-values: "zend.assertions=1"
extensions: "pdo_mysql"

- name: "Set COMPOSER_ROOT_VERSION"
run: |
echo "COMPOSER_ROOT_VERSION=${{ inputs.composer-root-version }}" >> $GITHUB_ENV
if: "${{ inputs.composer-root-version }}"

- name: "Require specific DBAL version"
run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-suggest"
composer-options: "${{ inputs.composer-options }}"

- name: "Remove optional dependencies"
if: "! matrix.optional-dependencies"
Expand All @@ -103,29 +119,31 @@ jobs:
run: "./ci/run-cli-migrations.sh"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
uses: "actions/upload-artifact@v4"
with:
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ matrix.dbal-version }}.coverage"
name: "phpunit-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ matrix.optional-dependencies }}-${{ matrix.dbal-version }}.coverage"
path: "coverage.xml"

upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
needs:
- "phpunit"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v4"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v4.1.7"
uses: "actions/download-artifact@v4"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
uses: "codecov/codecov-action@v5"
with:
directory: "reports"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
61 changes: 18 additions & 43 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,17 @@
{
"name": "doctrine/doctrine-orm-module",
"description": "Laminas Module that provides Doctrine ORM functionality",
"type": "library",
"license": "MIT",
"type": "library",
"keywords": [
"doctrine",
"orm",
"module",
"laminas"
],
"homepage": "http://www.doctrine-project.org/",
"authors": [
{
"name": "Kyle Spraggs",
"email": "[email protected]",
"homepage": "http://www.spiffyjr.me/"
},
{
"name": "Marco Pivetta",
"email": "[email protected]",
"homepage": "http://marco-pivetta.com/"
},
{
"name": "Evan Coury",
"email": "[email protected]",
"homepage": "http://blog.evan.pro/"
},
{
"name": "Guilherme Blanco",
"email": "[email protected]"
},
{
"name": "Tom H Anderson",
"email": "[email protected]"
}
],
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"laminas": {
"config-provider": "DoctrineORMModule\\ConfigProvider",
"module": "DoctrineORMModule"
}
},
"homepage": "https://www.doctrine-project.org/",
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-json": "*",
"doctrine/dbal": "^2.13.7 || ^3.3.2",
"doctrine/doctrine-laminas-hydrator": "^3.0.0",
Expand Down Expand Up @@ -88,9 +50,9 @@
"doctrine/migrations": "<3.3"
},
"suggest": {
"laminas/laminas-form": "if you want to use form elements backed by Doctrine",
"doctrine/migrations": "doctrine migrations if you want to keep your schema definitions versioned",
"laminas/laminas-developer-tools": "laminas-developer-tools if you want to profile operations executed by the ORM during development",
"doctrine/migrations": "doctrine migrations if you want to keep your schema definitions versioned"
"laminas/laminas-form": "if you want to use form elements backed by Doctrine"
},
"autoload": {
"psr-4": {
Expand All @@ -102,6 +64,19 @@
"DoctrineORMModuleTest\\": "tests/"
}
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true
},
"extra": {
"laminas": {
"config-provider": "DoctrineORMModule\\ConfigProvider",
"module": "DoctrineORMModule"
}
},
"scripts": {
"check": [
"@cs-check",
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<arg name="cache" value=".phpcs.cache"/>
<arg name="colors"/>

<!-- set minimal required PHP version (8.0) -->
<config name="php_version" value="80000"/>
<!-- set minimal required PHP version (8.1) -->
<config name="php_version" value="80100"/>

<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
Expand Down

0 comments on commit fa1189d

Please sign in to comment.