Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing version 6 and 7 of symfony/yaml #346

Merged
merged 8 commits into from
Mar 12, 2024
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
88 changes: 45 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2']
composer-args: ['', '--prefer-lowest']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, apcu
ini-values: apc.enable_cli=1
coverage: xdebug
- name: Install Dependencies
run: |
composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }}
- name: Static Analysis
run: |
composer phpstan
composer psalm -- --shepherd
- name: Code Style Check
env:
PHP_CS_FIXER_IGNORE_ENV: true
run: composer style-check
- name: Test
run: composer test-with-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
files: ./tests/coverage/clover.xml
verbose: true
build:
name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ["7.4", "8.0", "8.1", "8.2"]
composer-args: ["", "--prefer-lowest"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, apcu
ini-values: apc.enable_cli=1
coverage: xdebug
- name: Install Dependencies
run: |
composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }}
- name: Static Analysis
run: |
composer phpstan
composer psalm -- --shepherd
- name: Code Style Check
env:
PHP_CS_FIXER_IGNORE_ENV: true
run: composer style-check
- name: Test
run: composer test-with-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./tests/coverage/clover.xml
verbose: true
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
"ext-pdo": "*",
"symfony/yaml": "^3.4 || ^4.1 || ^5.0"
"symfony/yaml": "^3.4 || ^4.1 || ^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"phpunit/php-code-coverage": "^9.1.10",
"friendsofphp/php-cs-fixer": "^3.51.0",
"phpstan/phpstan": "1.10.14",
"vimeo/psalm": "5.9.0"
"vimeo/psalm": "5.23.1"
},
"scripts": {
"test": "cd tests && php run.php",
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Cache/Memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
foreach (array_keys($slabs) as $slabId) {
$dump = $this->_memcache->getExtendedStats('cachedump', (int) $slabId);
foreach ($dump as $entries) {
if ($entries) {
if ($entries !== false && !empty($entries)) {

Check warning on line 148 in lib/Doctrine/Cache/Memcache.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/Cache/Memcache.php#L148

Added line #L148 was not covered by tests
$keys = array_merge($keys, array_keys($entries));
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Import/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@

if (count($array) == 0) {
throw new Doctrine_Import_Exception(
sprintf('No ' . $format . ' schema found in ' . implode(', ', $schema))
'No ' . $format . ' schema found in ' . implode(', ', $schema)

Check warning on line 280 in lib/Doctrine/Import/Schema.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/Import/Schema.php#L280

Added line #L280 was not covered by tests
);
}

Expand Down Expand Up @@ -766,7 +766,7 @@
foreach ($element as $key => $value) {
if (! isset($validation[$value])) {
throw new Doctrine_Import_Exception(
sprintf('Invalid schema element named "' . $value . '" at path "' . $path . '"')
'Invalid schema element named "' . $value . '" at path "' . $path . '"'

Check warning on line 769 in lib/Doctrine/Import/Schema.php

View check run for this annotation

Codecov / codecov/patch

lib/Doctrine/Import/Schema.php#L769

Added line #L769 was not covered by tests
);
}
}
Expand Down
Loading