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

tests: Fix the Symfony bridge tests #280

Merged
merged 5 commits into from
Nov 13, 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
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- test_symfony_eloquent_bridge_proxy_manager
variant:
- 'no-change'
- '"symfony/symfony:^6.4"'
- '"symfony/symfony:^6.4.14"'
# To keep in sync with docker-compose.yml
services:
mysql:
Expand Down Expand Up @@ -126,14 +126,14 @@ jobs:

- name: Install Doctrine PHPCR Composer bin dependencies
uses: ramsey/composer-install@v3
if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge'"
if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge' || matrix.make-test == 'test_symfony_doctrine_bridge'"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-flags }}"
working-directory: vendor-bin/doctrine_phpcr
- name: Repeat "Install Doctrine PHPCR Composer bin dependencies"
uses: ramsey/composer-install@v3
if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge'"
if: "matrix.make-test == 'test_doctrine_phpcr_bridge' || matrix.make-test == 'test_symfony_bridge' || matrix.make-test == 'test_symfony_doctrine_bridge'"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-flags }}"
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"conflict": {
"doctrine/data-fixtures": "<1.7.0",
"doctrine/orm": "<2.20",
"doctrine/doctrine-bundle": "<2.11.0",
"doctrine/mongodb-odm-bundle": "<5.1.0",
"doctrine/mongodb-odm": "<2.6.0",
"doctrine/phpcr-bundle": "<3.0",
"doctrine/phpcr-odm": "<2.0.0",
"doctrine/dbal": "<3.0",
"doctrine/persistence": "<2.0",
Expand Down
2 changes: 1 addition & 1 deletion doctrine-phpcr-db-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
'dbname' => get_param('DOCTRINE_PHPCR_DB_NAME', 'fidry_alice_data_fixtures'),
'host' => get_param('DOCTRINE_PHPCR_DB_HOST', '127.0.0.1'),
'port' => get_param('DOCTRINE_PHPCR_DB_PORT', 3307),
'charset' => get_param('DOCTRINE_PHPCR_DB_CHARSET', 'utf8mb4'),
'charset' => get_param('DOCTRINE_PHPCR_DB_CHARSET', 'UTF8'),
];
5 changes: 5 additions & 0 deletions fixtures/Bridge/Symfony/SymfonyApp/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#

framework:
http_method_override: false
handle_all_throwables: false
php_errors:
log: true
secret: test
router:
resource: ~
Expand All @@ -16,6 +20,7 @@ framework:
enabled: false
validation:
enabled: true
email_validation_mode: html5
session:
enabled: false
test: ~
Expand Down
3 changes: 3 additions & 0 deletions fixtures/Bridge/Symfony/SymfonyApp/config/config_doctrine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ doctrine:
1002: "SET NAMES 'UTF8' COLLATE 'utf8_unicode_ci'"
orm:
auto_mapping: true
controller_resolver:
auto_mapping: false
enable_lazy_ghost_objects: true
mappings:
fixture_entities:
type: xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
#

framework:
http_method_override: false
handle_all_throwables: false
php_errors:
log: true
secret: test
router:
resource: ~
form:
enabled: false
validation:
enabled: true
email_validation_mode: html5
session: ~
test: ~
8 changes: 0 additions & 8 deletions tests/Bridge/Symfony/Doctrine/PhpcrLoaderIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ public static function setUpBeforeClass(): void

public function setUp(): void
{
if (PHP_VERSION_ID < 80000) {
$this->markTestSkipped('The annotation reader is not available: the "enable_annotations" on the validator cannot be set as the PHP version is lower than 8');
}

if (PHP_VERSION_ID >= 80000) {
$this->markTestSkipped('Not compatible yet with PHP 8.0');
}

$this->kernel = new DoctrinePhpcrKernel(static::$seed, true);
$this->kernel->boot();

Expand Down
4 changes: 2 additions & 2 deletions vendor-bin/proxy-manager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"doctrine/phpcr-odm": "*",
"jackalope/jackalope-doctrine-dbal": "*",
"friendsofphp/proxy-manager-lts": "*",
"monolog/monolog": "*",
"symfony/symfony": "^5.4 || ^6.4",
"monolog/monolog": ">=2.0",
"symfony/symfony": "^6.4.14",
"theofidry/composer-inheritance-plugin": "^1.2",
"wouterj/eloquent-bundle": "*"
},
Expand Down
7 changes: 3 additions & 4 deletions vendor-bin/symfony/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
]
},
"require": {
"symfony/doctrine-messenger": "^4.4 || ^5.4 || ^6.0"
"symfony/doctrine-messenger": "^4.4 || ^5.4 || ^6.4"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "*",
"doctrine/annotations": "*",
"doctrine/data-fixtures": "*",
"doctrine/doctrine-bundle": "*",
"doctrine/mongodb-odm": "*",
"doctrine/mongodb-odm-bundle": "*",
"doctrine/orm": "*",
"doctrine/phpcr-bundle": "*",
"doctrine/phpcr-odm": "*",
"jackalope/jackalope-doctrine-dbal": "*",
"monolog/monolog": "^2.0",
"symfony/symfony": "^5.4 || ^6.4",
"monolog/monolog": ">=2.0",
"symfony/symfony": "^6.4.14",
"theofidry/composer-inheritance-plugin": "^1.2",
"wouterj/eloquent-bundle": "*"
},
Expand Down
Loading