Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
109 changes: 88 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,100 @@ jobs:
strategy:
fail-fast: false
matrix:
php:
- '8.1'
- '8.2'
coverage: ['none']
symfony-versions:
- '4.4.*'
- '5.4.*'
- '6.0.*'
- '6.1.*'
- '6.2.*'
include:
- php: '7.4'
symfony-versions: '^4.4'
# --- Symfony 6.4 LTS ---
- php: '8.1'
symfony-versions: '^6.4'
doctrine-orm-versions: '^2.0'
doctrine-mongodb-odm-bundle-versions: '^4.4'
mongodb-extension-version: '1.21.0'
coverage: 'none'
- php: '7.4'
symfony-versions: '^5.4'
- php: '8.2'
symfony-versions: '^6.4'
doctrine-orm-versions: '^3.0'
doctrine-mongodb-odm-bundle-versions: '^5.0'
mongodb-extension-version: ''
coverage: 'none'
- php: '8.0'
symfony-versions: '^5.4'
- php: '8.3'
symfony-versions: '^6.4'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''
coverage: 'none'
- php: '8.0'
symfony-versions: '^6.0'
- php: '8.4'
symfony-versions: '^6.4'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''
coverage: 'none'
- php: '8.5'
symfony-versions: '^6.4'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''
coverage: 'none'

# --- Symfony 7.4 LTS ---
- php: '8.2'
symfony-versions: '^7.4'
doctrine-orm-versions: '^2.0'
doctrine-mongodb-odm-bundle-versions: '^5.0'
mongodb-extension-version: '1.21.0'
coverage: 'none'
- php: '8.3'
symfony-versions: '^7.4'
doctrine-orm-versions: '^3.0'
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: '2.0.0'
coverage: 'none'
- php: '8.4'
symfony-versions: '^7.4'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''
coverage: 'none'
- description: 'Log Code Coverage'
php: '8.2'
php: '8.5'
coverage: 'xdebug'
symfony-versions: '^7.0'
symfony-versions: '^7.4'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''

# --- Symfony 8.0 ---
- php: '8.4'
symfony-versions: '^8.0'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: ''
mongodb-extension-version: ''
coverage: 'none'
- php: '8.5'
symfony-versions: '^8.0'
doctrine-orm-versions: ''
doctrine-mongodb-odm-bundle-versions: '^5.0'
mongodb-extension-version: ''
coverage: 'none'

name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-versions }} ${{ matrix.description }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Prepare extensions
id: prepare-extensions
run: |
MONGODB_EXT="mongodb"
if [ -n "${{ matrix.mongodb-extension-version }}" ]; then
MONGODB_EXT="mongodb-${{ matrix.mongodb-extension-version }}"
fi
echo "extensions=redis, relay, ${MONGODB_EXT}" >> $GITHUB_OUTPUT

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
extensions: ${{ steps.prepare-extensions.outputs.extensions }}

- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand All @@ -60,6 +116,17 @@ jobs:

composer require --dev symfony/yaml:${{ matrix.symfony-versions }} --no-update --no-scripts
composer require --dev symfony/browser-kit:${{ matrix.symfony-versions }} --no-update --no-scripts
composer require --dev symfony/cache:${{ matrix.symfony-versions }} --no-update --no-scripts

- name: Update Doctrine ORM version
if: matrix.doctrine-orm-versions != ''
run: |
composer require --dev doctrine/orm:${{ matrix.doctrine-orm-versions }} --no-update --no-scripts

- name: Update Doctrine MongoDB ODM Bundle version
if: matrix.doctrine-mongodb-odm-bundle-versions != ''
run: |
composer require --dev doctrine/mongodb-odm-bundle:${{ matrix.doctrine-mongodb-odm-bundle-versions }} --no-update --no-scripts

- name: Install dependencies
run: composer install
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ on:
branches: [ master, develop ]

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
php-cs:
name: PHP CodeSniffer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: redis, relay

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist
Expand All @@ -27,29 +29,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: redis, relay

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

- name: Run script
run: vendor/bin/phpstan analyse
run: vendor/bin/phpstan analyse --memory-limit=1G

composer-validate:
name: Composer validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
extensions: redis, relay

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

- name: Run script
run: composer composer-validate
run: composer validate
69 changes: 0 additions & 69 deletions CHANGELOG.md

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ return [
Create Symfony Health Check Bundle Config:
----------------------------------

> **Note:** XML configuration is no longer supported. Please use YAML or PHP configuration format in your project.

Configurating health check - all available you can see [here](https://github.com/MacPaw/symfony-health-check-bundle/tree/master/src/Check).

```yaml
Expand Down Expand Up @@ -74,7 +76,7 @@ Create Symfony Health Check Bundle Routing Config:

```yaml
health_check:
resource: '@SymfonyHealthCheckBundle/Resources/config/routes.xml'
resource: '@SymfonyHealthCheckBundle/Resources/config/routes.php'
```

Step 3: Configuration
Expand Down
37 changes: 24 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,30 @@
}
],
"require": {
"php": ">=7.4",
"symfony/framework-bundle": "^3.4 || ^4.1.12 || ^5.0 || ^6.0 || ^7.0"
"php": "^8.1",
"symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0"
},
"require-dev": {
"ext-json": "*",
"phpstan/phpstan": "1.11.*",
"squizlabs/php_codesniffer": "3.7.*",
"symfony/phpunit-bridge": "^3.4 || ^4.1.12 || ^5.0 || ^6.0 || ^7.0",
"phpunit/phpunit": "^8.5 || ^9.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0",
"symfony/browser-kit": "^3.4 || ^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/cache": "^3.4 || ^4.4 || ^5.0 || ^6.0 || ^7.0",
"predis/predis": "^2.3"
"ext-redis": "*",
"ext-relay": "*",
"phpstan/phpstan": "^2.1",
"squizlabs/php_codesniffer": "^4.0",
"phpunit/phpunit": "^10.5",
"symfony/yaml": "^6.4 || ^7.4 || ^8.0",
"symfony/browser-kit": "^6.4 || ^7.4 || ^8.0",
"symfony/cache": "^6.4 || ^7.4 || ^8.0",
"predis/predis": "^3.3",
"doctrine/mongodb-odm-bundle": "^4.4 || ^5.0",
"doctrine/orm": "^2.0 || ^3.0"
},
"suggest": {
"symfony/cache": "Required for RedisCheck - provides Redis connection factory",
"ext-redis": "Native PHP Redis extension for RedisCheck (alternative to predis)",
"predis/predis": "Pure PHP Redis client for RedisCheck (alternative to ext-redis)",
"ext-relay": "High-performance Redis extension for RedisCheck (alternative to ext-redis)",
"doctrine/orm": "Required for DoctrineORMCheck - database health monitoring",
"doctrine/mongodb-odm-bundle": "Required for DoctrineODMCheck - MongoDB health monitoring",
"ext-mongodb": "Required for DoctrineODMCheck - MongoDB driver extension"
},
"autoload": {
"psr-4": {
Expand All @@ -64,10 +75,10 @@
"vendor/bin/phpcbf"
],
"phpstan": [
"vendor/bin/phpstan analyse"
"vendor/bin/phpstan analyse --memory-limit=1G"
],
"phpunit": [
"vendor/bin/simple-phpunit"
"vendor/bin/phpunit"
]
}
}
14 changes: 13 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@

<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="eval=>NULL,dd=>NULL,die=>NULL,var_dump=>NULL,dump=>NULL,sizeof=>count,delete=>unset,print=>echo,echo=>NULL,print_r=>NULL,create_function=>NULL"/>
<property name="forbiddenFunctions" type="array">
<element key="create_function" value="NULL"/>
<element key="dd" value="NULL"/>
<element key="delete" value="unset"/>
<element key="die" value="NULL"/>
<element key="dump" value="NULL"/>
<element key="echo" value="NULL"/>
<element key="eval" value="NULL"/>
<element key="print_r" value="NULL"/>
<element key="print" value="echo"/>
<element key="sizeof" value="count"/>
<element key="var_dump" value="NULL"/>
</property>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.neon

This file was deleted.

5 changes: 1 addition & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
includes:
- phpstan-baseline.neon

parameters:
level: 5
level: 9
paths:
- src
Loading