Skip to content

Commit

Permalink
Update to PHP7.3+ and PHPStan 1.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 1, 2021
1 parent d1813f7 commit 3cf06ca
Show file tree
Hide file tree
Showing 162 changed files with 1,529 additions and 881 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,30 @@ on:
branches:
- 'master'
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
testsuite:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
php-version: [ '7.2', '7.4', '8.0' ]
php-version: [ '7.3', '7.4' '8.1' ]
db-type: [ sqlite, mysql, pgsql, agnostic ]
symfony-version: [ '3-min', '3-max', '4-min', '4-max', '5-min', '5-max' ]
exclude:
- php-version: '8.0'
symfony-version: '4-min'
steps:
- name: Install PostgreSQL latest
if: matrix.db-type == 'pgsql' && matrix.php-version != '7.2'
if: matrix.db-type == 'pgsql' && matrix.php-version != '7.3'
uses: CasperWA/postgresql-action@v1.2
with:
postgresql db: 'propel-tests'
postgresql user: 'postgres'
postgresql password: 'postgres'

- name: Install PostgreSQL min
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.2'
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.3'
uses: CasperWA/postgresql-action@v1.2
with:
postgresql version: 9
Expand All @@ -39,11 +37,11 @@ jobs:
postgresql password: 'postgres'

- name: Install MariaDb latest
if: matrix.db-type == 'mysql' && matrix.php-version != '7.2'
if: matrix.db-type == 'mysql' && matrix.php-version != '7.3'
uses: getong/mariadb-action@v1.1

- name: Install MariaDb min
if: matrix.db-type == 'mysql' && matrix.php-version == '7.2'
if: matrix.db-type == 'mysql' && matrix.php-version == '7.3'
uses: getong/mariadb-action@v1.1
with:
mariadb version: '10.2'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Propel2 is an open-source Object-Relational Mapping (ORM) for PHP.
[![Github actions Status](https://github.com/propelorm/Propel2/workflows/CI/badge.svg?branch=master)](https://github.com/propelorm/Propel2/actions?query=workflow%3ACI+branch%3Amaster)
[![codecov](https://codecov.io/gh/propelorm/Propel2/branch/master/graph/badge.svg?token=L1thFB9nOG)](https://codecov.io/gh/propelorm/Propel2)
[![Code Climate](https://codeclimate.com/github/propelorm/Propel2/badges/gpa.svg)](https://codeclimate.com/github/propelorm/Propel2)
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg)](https://php.net/)
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg)](https://php.net/)
[![License](https://poser.pugx.org/propel/propel/license.svg)](https://packagist.org/packages/propel/propel)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/propelorm/Propel)

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.2",
"php": ">=7.3",
"symfony/yaml": "^3.4.0||^4.0.0||^5.0.0",
"symfony/config": "^3.4.0||^4.0.0||^5.0.0",
"symfony/console": "^3.4.0||^4.0.0||^5.0.0",
Expand All @@ -31,9 +31,9 @@
"ext-pdo": "*",
"ext-json": "*",
"monolog/monolog": "^1.3",
"phpstan/phpstan": "^0.12.97",
"phpunit/phpunit": "^8.0.0||^9.0.0",
"spryker/code-sniffer": "^0.15.6",
"phpstan/phpstan": "^1.0.0",
"phpunit/phpunit": "^9.5.0",
"spryker/code-sniffer": "^0.17.2",
"psalm/phar": "4.9.3",
"mikey179/vfsstream": "^1.6"
},
Expand All @@ -49,8 +49,8 @@
"bin/propel"
],
"scripts": {
"cs-check": "phpcs -p -s --standard=config/phpcs.xml src/",
"cs-fix": "phpcbf -p --standard=config/phpcs.xml src/",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"stan": "vendor/bin/phpstan analyze",
"stan-baseline": "vendor/bin/phpstan analyze --generate-baseline",
"psalm": "vendor/bin/psalm.phar --show-info=false",
Expand Down
15 changes: 8 additions & 7 deletions config/phpcs.xml → phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@
Extends Spryker+Slevomatik Coding Standard.
</description>

<rule ref="vendor/spryker/code-sniffer/Spryker/ruleset.xml"/>
<config name="installed_paths" value="../../spryker/code-sniffer"/>

<arg value="nps"/>

<file>src/</file>

<exclude-pattern>*/templates/*</exclude-pattern>

<!-- exclude until PHP8 -->
<rule ref="Spryker.PHP.DisallowFunctions">
<severity>0</severity>
</rule>
<rule ref="Spryker"/>

<!-- exclude for now -->
<rule ref="Spryker.ControlStructures.NoInlineAssignment">
<severity>0</severity>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison">
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition.AssignmentInCondition">
<severity>0</severity>
</rule>
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison">
<severity>0</severity>
</rule>
<rule ref="Generic.PHP.NoSilencedErrors">
Expand Down
Loading

0 comments on commit 3cf06ca

Please sign in to comment.