Skip to content

Commit

Permalink
Allowing version 6 and 7 of symfony/yaml (#346)
Browse files Browse the repository at this point in the history
* Allowing version 6 of symfony/yaml

* allowing symfony 7 as well

* another odd psalm error

* psalm upgrade and fixes

* psalm fix

* upgrading codecov github action

* adding codecov token
  • Loading branch information
jaydiablo authored Mar 12, 2024
1 parent 5cbee44 commit f81ec02
Show file tree
Hide file tree
Showing 5 changed files with 538 additions and 205 deletions.
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 @@ protected function _getCacheKeys()
foreach (array_keys($slabs) as $slabId) {
$dump = $this->_memcache->getExtendedStats('cachedump', (int) $slabId);
foreach ($dump as $entries) {
if ($entries) {
if ($entries !== false && !empty($entries)) {
$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 @@ public function importSchema($schema, $format = 'yml', $directory = null, $model

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

Expand Down Expand Up @@ -766,7 +766,7 @@ protected function _validateSchemaElement($name, $element, $path)
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 . '"'
);
}
}
Expand Down
Loading

0 comments on commit f81ec02

Please sign in to comment.