-
Notifications
You must be signed in to change notification settings - Fork 110
Fix tests #350
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
Fix tests #350
Conversation
ff4d82c
to
b3d5485
Compare
I think instead of setting |
@@ -0,0 +1,41 @@ | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experience this file can change randomly when running on different devices.
I suggest this: https://symfony.com/doc/current/components/phpunit_bridge.html#ignoring-deprecations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ignoreFile
option is only available since Symfony 6.1
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sad :(
tests/allowed.json
Outdated
"message": "Since symfony/framework-bundle 5.1: Not setting the \"framework.router.utf8\" configuration option is deprecated, it will default to \"true\" in version 6.0.", | ||
"count": 41 | ||
}, | ||
{ | ||
"message": "Since symfony/framework-bundle 6.4: Not setting the \"framework.handle_all_throwables\" config option is deprecated. It will default to \"true\" in 7.0.", | ||
"count": 82 | ||
}, | ||
{ | ||
"message": "Since symfony/framework-bundle 6.4: Not setting the \"framework.php_errors.log\" config option is deprecated. It will default to \"true\" in 7.0.", | ||
"count": 82 | ||
}, | ||
{ | ||
"message": "Since symfony/framework-bundle 6.4: Enabling the integration of Doctrine annotations is deprecated. Set the \"framework.annotations.enabled\" config option to false.", | ||
"count": 41 | ||
}, | ||
{ | ||
"message": "Since symfony/framework-bundle 6.4: The \"annotation_reader\" service alias is deprecated without replacement. It is being referenced by the \"routing.loader.attribute\" service.", | ||
"count": 41 | ||
}, | ||
{ | ||
"message": "Since symfony/framework-bundle 6.4: The \"annotation_reader\" service alias is deprecated without replacement. It is being referenced by the \"doctrine.orm.metadata.annotation_reader\" alias.", | ||
"count": 5 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw these should be fixed, not ignored ;)
13c9e58
to
0e88735
Compare
8c4725c
to
090eef4
Compare
.github/workflows/ci.yml
Outdated
uses: actions/checkout@4 | ||
|
||
- name: "Configure Symfony" | ||
run: composer config extra.symfony.require "${{ matrix.sf_version }}" | ||
|
||
- name: "Install Composer dependencies" | ||
uses: "ramsey/composer-install@v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: "ramsey/composer-install@v2" | |
uses: "ramsey/composer-install@v2" | |
env: | |
SYMFONY_REQUIRE: ${{ matrix.sf_version }} |
.github/workflows/ci.yml
Outdated
uses: actions/checkout@4 | ||
|
||
- name: "Configure Symfony" | ||
run: composer config extra.symfony.require "${{ matrix.sf_version }}" | ||
|
||
- name: "Install Composer dependencies" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/checkout@4 | |
- name: "Configure Symfony" | |
run: composer config extra.symfony.require "${{ matrix.sf_version }}" | |
- name: "Install Composer dependencies" | |
uses: actions/checkout@v4 | |
- name: "Install Composer dependencies" |
.editorconfig
Outdated
[*.json] | ||
indent_size = 2 | ||
|
||
[.github/**/*.yml] | ||
indent_size = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what's the point of these changes if PR targets at fixing tests :) only hardens the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I modify the composer.json
or the ci.yml
my IDE indents the additions with 4 spaces as defined in the .editorconfig whereas they are indented with 2 spaces, these 2 lines save me from having to correct the indentation manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im ok with these changes but they pollute the PR, could you split into separate PR later?
tests/allowed.json
Outdated
{ | ||
"location": "Bazinga\\GeocoderBundle\\Tests\\Functional\\GeocoderListenerTest::testPersistForProperty", | ||
"message": "Since doctrine/doctrine-bundle 2.11: Not setting \"enable_lazy_ghost_objects\" to true is deprecated.", | ||
"count": 1 | ||
}, | ||
{ | ||
"location": "Bazinga\\GeocoderBundle\\Tests\\Functional\\GeocoderListenerTest::testPersistForGetter", | ||
"message": "Since doctrine/doctrine-bundle 2.11: Not setting \"enable_lazy_ghost_objects\" to true is deprecated.", | ||
"count": 1 | ||
}, | ||
{ | ||
"location": "Bazinga\\GeocoderBundle\\Tests\\Functional\\GeocoderListenerTest::testPersistForInvalidGetter", | ||
"message": "Since doctrine/doctrine-bundle 2.11: Not setting \"enable_lazy_ghost_objects\" to true is deprecated.", | ||
"count": 1 | ||
}, | ||
{ | ||
"location": "Bazinga\\GeocoderBundle\\Tests\\Functional\\GeocoderListenerTest::testPersistForEmptyProperty", | ||
"message": "Since doctrine/doctrine-bundle 2.11: Not setting \"enable_lazy_ghost_objects\" to true is deprecated.", | ||
"count": 1 | ||
}, | ||
{ | ||
"location": "Bazinga\\GeocoderBundle\\Tests\\Functional\\GeocoderListenerTest::testDoesNotGeocodeIfAddressNotChanged", | ||
"message": "Since doctrine/doctrine-bundle 2.11: Not setting \"enable_lazy_ghost_objects\" to true is deprecated.", | ||
"count": 1 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these could be resolved with:
if (method_exists(Configuration::class, 'setLazyGhostObjectEnabled') && Kernel::VERSION_ID >= 60100) {
$container->prependExtensionConfig('doctrine', [
'orm' => [
'enable_lazy_ghost_objects' => true,
],
]);
}
4d3dfd0
to
3d1ace7
Compare
@norkunas I'm sorry, but I think I'm going to give up because there are far too many deprecations to manage with version 4.4. Every time I fix one, another pops up right after it, it's hellish! |
Sorry to hear that 😞 I'll try to complete it then |
94a02d1
to
44663a7
Compare
@norkunas Holy Moly, tests are green 🥳 🎉 ! https://github.com/ker0x/geocoder-php-geocoder-bundle/actions/runs/7708347743 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm merging as is, but we should probably resolve some deprecations in follow up PR's because there are way too many of them :)
Thank you @ker0x ! |
No description provided.