Skip to content

Commit

Permalink
Merge pull request #1992 from EpsilonTelecommunications/allow_symfony_7
Browse files Browse the repository at this point in the history
allow Symfony v7
  • Loading branch information
PhilinTv committed Mar 23, 2024
2 parents 1ca6543 + 880f994 commit f4889ff
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 23 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ jobs:
matrix:
php-version: [ '7.4', '8.2' ]
db-type: [ sqlite, mysql, pgsql, agnostic ]
symfony-version: [ '4-min', '4-max', '5-min', '5-max', '6-min', '6-max' ]
symfony-version: [ '4-min', '4-max', '5-min', '5-max', '6-min', '6-max', '7-min', '7-max']
exclude:
- symfony-version: '4-min'
php-version: '8.2'
- symfony-version: '6-min'
php-version: '7.4'
- symfony-version: '6-max'
php-version: '7.4'
- symfony-version: '7-min'
php-version: '7.4'
- symfony-version: '7-max'
php-version: '7.4'
env:
DB_NAME: 'propel_tests'
DB_USER: 'propel'
Expand Down Expand Up @@ -125,6 +129,8 @@ jobs:
else
vendor/bin/phpunit -c tests/${{ matrix.db-type }}.phpunit.xml
fi
env:
SYMFONY_VERSION: ${{ matrix.symfony-version }}

- name: Code Coverage Report
if: success() && matrix.php-version == '7.4' && matrix.symfony-version == '5-max'
Expand Down Expand Up @@ -166,6 +172,8 @@ jobs:
run: composer install --prefer-dist --no-interaction

- name: PHPStan
env:
PHPSTAN: 1
run: composer stan

- name: Psalm
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"require": {
"php": ">=7.4",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/yaml": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/config": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/console": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/filesystem": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/finder": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/translation": "^4.4.0 || ^5.0.0 || ^6.0.0",
"symfony/validator": "^4.4.0 || ^5.0.0 || ^6.0.0"
"symfony/yaml": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/config": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/console": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/filesystem": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/finder": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/translation": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
"symfony/validator": "^4.4.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
},
"require-dev": {
"ext-pdo": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/Propel/Generator/Command/MigrationUpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function configure()
*
* @throws \Propel\Runtime\Exception\RuntimeException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$configOptions = [];

Expand Down
5 changes: 0 additions & 5 deletions src/Propel/Runtime/Validator/Constraints/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@

class Date extends SymfonyDateConstraint
{
/**
* @var string
*/
public $message = 'This value is not a valid date.';

/**
* @var string
*/
Expand Down
12 changes: 4 additions & 8 deletions tests/Propel/Tests/Common/Config/Loader/FileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,14 @@ public function testCallResolveParamTwiceReturnsEmpty()

class TestableFileLoader extends BaseFileLoader
{
/**
* @return void
*/
public function load($resource, $type = null)
public function load($resource, $type = null): ?array
{
return null;
}

/**
* @return void
*/
public function supports($resource, $type = null)
public function supports($resource, $type = null): bool
{
return false;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Propel/Tests/Runtime/Connection/PropelPDOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class LastMessageHandler extends AbstractHandler
*
* @return bool
*/
public function handle(array $record): bool
public function handle($record): bool
{
$this->latestMessage = (string)$record['message'];

Expand Down
66 changes: 66 additions & 0 deletions tests/composer/composer-symfony7-max.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "propel/propel",
"type": "library",
"description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.5 and up.",
"keywords": [
"ORM",
"persistence",
"Active Record"
],
"homepage": "http://www.propelorm.org/",
"license": "MIT",
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com"
}
],
"require": {
"php": ">=8.2",
"symfony/yaml": "^7.0.0",
"symfony/config": "^7.0.0",
"symfony/console": "^7.0.0",
"symfony/filesystem": "^7.0.0",
"symfony/finder": "^7.0.0",
"symfony/translation": "^7.0.0",
"symfony/validator": "^7.0.0",
"psr/log": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"ext-pdo": "*",
"ext-json": "*",
"ext-xml": "*",
"monolog/monolog": "^1.3 || ^2.3 || ^3.0",
"phpstan/phpstan": "^1.2",
"phpunit/phpunit": "^9.5.0",
"spryker/code-sniffer": "^0.17.2",
"psalm/phar": "^4.23",
"mikey179/vfsstream": "^1.6"
},
"suggest": {
"monolog/monolog": "The recommended logging library to use with Propel."
},
"autoload": {
"psr-4": {
"Propel\\": "src/Propel/"
}
},
"bin": [
"bin/propel"
],
"scripts": {
"stan": [
"vendor/bin/phpstan analyze -l 1 -c tests/phpstan.neon src/"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
66 changes: 66 additions & 0 deletions tests/composer/composer-symfony7-min.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "propel/propel",
"type": "library",
"description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.5 and up.",
"keywords": [
"ORM",
"persistence",
"Active Record"
],
"homepage": "http://www.propelorm.org/",
"license": "MIT",
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com"
}
],
"require": {
"php": ">=8.2",
"symfony/yaml": "~7.0.0",
"symfony/config": "~7.0.0",
"symfony/console": "~7.0.0",
"symfony/filesystem": "~7.0.0",
"symfony/finder": "~7.0.0",
"symfony/translation": "~7.0.0",
"symfony/validator": "~7.0.0",
"psr/log": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"ext-pdo": "*",
"ext-json": "*",
"ext-xml": "*",
"monolog/monolog": "^1.3 || ^2.3 || ^3.0",
"phpstan/phpstan": "^1.2",
"phpunit/phpunit": "^9.5.0",
"spryker/code-sniffer": "^0.17.2",
"psalm/phar": "^4.23",
"mikey179/vfsstream": "^1.6"
},
"suggest": {
"monolog/monolog": "The recommended logging library to use with Propel."
},
"autoload": {
"psr-4": {
"Propel\\": "src/Propel/"
}
},
"bin": [
"bin/propel"
],
"scripts": {
"stan": [
"vendor/bin/phpstan analyze -l 1 -c tests/phpstan.neon src/"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit f4889ff

Please sign in to comment.