Skip to content

Commit e1f9cbc

Browse files
authored
Merge pull request #8 from phalcon/min-php-8.0
Bump min PHP version to 8.1
2 parents 25165d7 + 0fddb5f commit e1f9cbc

29 files changed

Lines changed: 2015 additions & 2308 deletions

.docker/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
FROM php:7.4-cli
1+
FROM php:8.1-cli
22

33
COPY --from=composer /usr/bin/composer /usr/bin/composer
44

55
RUN apt update && apt install -y git unzip
6-
RUN pecl install phalcon mongodb && docker-php-ext-enable phalcon mongodb
6+
RUN CFLAGS="-Wno-incompatible-pointer-types" pecl install phalcon && \
7+
pecl install mongodb && docker-php-ext-enable phalcon mongodb

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
name: "Tests"
1+
name: "CI"
22

3-
on: [push, pull_request]
3+
on: [push]
44

55
jobs:
6-
run-tests:
7-
name: PHP ${{ matrix.php-versions }}
6+
validate-and-test:
7+
name: Static Analysis & Tests with PHP ${{ matrix.php-versions }}
88
runs-on: ubuntu-latest
99
env:
1010
extensions: mbstring, intl, json, phalcon, redis, mongodb, xdebug
11-
key: cache-v0.0.2
11+
key: cache-v0.0.3
1212
services:
1313
mongodb:
14-
image: mongo:3.6
14+
image: mongo:4.0
1515
ports:
1616
- 27017:27017
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
php-versions: ['7.4', '8.0', '8.1', '8.2']
20+
php-versions: ['8.1', '8.2', '8.3', '8.4']
2121
steps:
2222
- uses: actions/checkout@v5
2323

24+
- name: Validate composer.json and composer.lock
25+
run: composer validate
26+
2427
- name: Setup cache environment
2528
id: cache-env
2629
uses: shivammathur/cache-extensions@v1
@@ -44,27 +47,28 @@ jobs:
4447
extensions: ${{ env.extensions }}
4548
tools: pecl
4649

47-
- name: Get Composer Cache Directory
48-
id: composer-cache
49-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
50-
51-
- name: Cache composer dependencies
52-
uses: actions/cache@v3
53-
with:
54-
path: ${{ steps.composer-cache.outputs.dir }}
55-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
56-
restore-keys: ${{ runner.os }}-composer-
57-
5850
- name: Install Composer dependencies
5951
run: composer install --prefer-dist --no-suggest
6052

53+
- name: Validate Code Style
54+
if: always()
55+
run: vendor/bin/phpcs
56+
57+
- name: Run Psalm
58+
if: always()
59+
run: vendor/bin/psalm
60+
61+
- name: Run PHPStan
62+
if: always()
63+
run: vendor/bin/phpstan analyse src
64+
6165
- name: Run test suites
6266
if: success()
63-
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml
67+
run: vendor/bin/phpunit --coverage-clover=coverage-${{ matrix.php-versions }}.xml
6468

6569
- name: Upload coverage to Codecov
6670
if: success()
6771
uses: codecov/codecov-action@v3
6872
with:
6973
token: ${{secrets.CODECOV_TOKEN}}
70-
file: ./tests/_output/coverage-*.xml
74+
file: ./coverage-*.xml

.github/workflows/validations.yml

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

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
composer.phar
22
/vendor/
3-
4-
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock
3+
.idea/
4+
.vscode/
5+
.DS_Store

composer.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@
2626
"forum": "https://forum.phalcon.io"
2727
},
2828
"require": {
29-
"php": ">=7.4",
29+
"php": ">=8.1",
3030
"ext-phalcon": "^5.0"
3131
},
3232
"require-dev": {
3333
"ext-mongodb": "*",
3434
"phalcon/ide-stubs": "^5.0",
35-
"vimeo/psalm": "^5.15",
36-
"squizlabs/php_codesniffer": "^3.7",
37-
"codeception/codeception": "^4.1",
38-
"codeception/module-asserts": "^2.0",
39-
"mongodb/mongodb": "^1.16",
35+
"vimeo/psalm": "^6.13",
36+
"squizlabs/php_codesniffer": "^4.0",
37+
"phpunit/phpunit": "^10.0",
38+
"mongodb/mongodb": "^2.1",
4039
"phpstan/phpstan": "^1.10"
4140
},
4241
"autoload": {
@@ -46,7 +45,7 @@
4645
},
4746
"autoload-dev": {
4847
"psr-4": {
49-
"Phalcon\\Incubator\\Session\\Tests\\Unit\\": "tests/unit/"
48+
"Tests\\": "tests/"
5049
}
5150
},
5251
"minimum-stability": "dev",
@@ -57,10 +56,9 @@
5756
"/.github",
5857
"/tests",
5958
".codecov.yml",
60-
"codeception.yml",
6159
"docker-compose.yml",
6260
"phpcs.xml.dist",
63-
"psalm.xml.dist"
61+
"psalm.xml"
6462
]
6563
}
6664
}

0 commit comments

Comments
 (0)