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

allow Symfony v7 #1992

Merged
merged 6 commits into from
Mar 23, 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
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like the right time to drop 4x support 😈

"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": "[email protected]"
}
],
"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": "[email protected]"
}
],
"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
}
}
}
Loading