Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 10.
To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects
Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.
The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.
Proposed resolution
You have a few options for how to use this issue:
- Accept automated patches until this issue is closed
If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.
As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.
Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.
- Leave open but stop new automated patches.
If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.
If the issue is reopened, then new automated patches will be posted.
If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.
Providing feedback
If there are problems with one of the patches posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue.
| Comment | File | Size | Author |
|---|---|---|---|
| #94 | lingotek-n3288313-94.patch | 2.72 MB | npaudyal001 |
| #93 | inter.txt | 2.58 KB | npaudyal001 |
| #93 | lingotek-n3288313-93.patch | 2.72 MB | npaudyal001 |
| #92 | inter.txt | 784 bytes | npaudyal001 |
| #92 | lingotek-n3288313-92.patch | 2.72 MB | npaudyal001 |
Issue fork lingotek-3288313
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.12.0, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #4
penyaskitoCommitted b78e386 and pushed to 4.0.x.
Leaving this as needs work so we can get new automated patches.
Comment #5
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #7
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.13.0, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #8
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.13.1, cannot fix all Drupal 10 compatibility problems.
This patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #9
meeni_dhobale commentedThere is multiple deprecated functions warning shown while Drupal Check. I will work on it.
Comment #11
meeni_dhobale commentedDeprecated function errors are resolved, But some are remains there.
Trying to create MR for the issue but somehow facing some authentication issues, Adding patch for now. Please review.
Comment #12
reenaraghavan commentedComment #13
reenaraghavan commentedMade changes using rector.
Attached the patch with changes.
Needs review.
Comment #15
meeni_dhobale commented@reenaraghavan Thank you so much for the new patch. I reviewed and tested your patch. Maximum errors and warnings are resolved but some are also remains there.
Adding screenshots for the reference.
Before applying patch:
After applying patch:
Comment #16
project update bot commentedUpdating bot issue summary.See #3313904: Update project bot templates for RTBC status support and human interaction tips
Comment #17
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.13.1, cannot fix all Drupal 10 compatibility problems.
Therefore this patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #19
damienmckennaThe current 4.0.x branch has 7,543 errors, as reported by drupal-check.
With #17 we're down to 1,160. That's quite the improvement, but there's still a lot to go.
Comment #20
galactus86 commentedI ran the patch form #17 then fixed a few of the items found.
Now when running the test I am at - [ERROR] Found 1051 errors
Comment #21
damienmckennaGoing to do a quick reroll of the last patch.
Comment #22
damienmckennaRerolled.
Comment #23
damienmckennaWith #22 on the current codebase we're down to 1,027 errors.
Comment #24
damienmckennaA major problem seems to be that the expects() method doesn't exist in LingotekConfigurationServiceInterface.
Comment #25
damienmckennaMaking a few fixes.
Comment #26
damienmckennaMore fixes.
Comment #27
damienmckenna#26 is down to 782 errors.
Comment #28
npaudyal001 commentedFixed some more deprecated tests and module seems to be working from the surface. More tests need to be fixed
Comment #29
damienmckennaAn interdiff for #28.
Comment #30
damienmckennaThis is the same as #28 only it removes some lines that had been commented out instead of being removed.
Comment #31
damienmckennaWith #30 we're at 737 errors.
Comment #32
damienmckennaDown to 713 errors.
Comment #34
damienmckennaI think if we had working tests on the 4.0.x branch (#3361327: Fix test failures in 4.0.x (missing schema definition, etc)) we'd have a better idea of what changes were actually needed to make this work.
Comment #35
project update bot commentedThis is an automated patch generated by Drupal Rector. Please see the issue summary for more details.
It is important that any automated tests available are run with this patch and that you manually test this patch.
Drupal 10 Compatibility
According to the Upgrade Status module, even with this patch, this module is not yet compatible with Drupal 10.
Currently Drupal Rector, version 0.15.1, cannot fix all Drupal 10 compatibility problems.
Therefore this patch does not update the
info.ymlfile for Drupal 10 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot to post additional Drupal 10 compatibility fixes as they become available in Drupal Rector.
Debug info
This patch was created using these packages:
Comment #36
npaudyal001 commentedCommitting the yml file to support d10 in 4.0.x since the it doesn't get picked up by patches during automated testing
Comment #38
npaudyal001 commentedThis is #32 by removing the yml file diffs since a different commit to it was made.
Comment #39
npaudyal001 commentedUpdating the versions of webform and cohesion to be compatible with d10 in dev dependencies.
Comment #40
npaudyal001 commentedAdding cweagans/composer patches in extras to see if composer failures will go away.
Comment #41
npaudyal001 commentedFunctional tests should hopefully now be in the clear.
Comment #43
npaudyal001 commentedComment #44
npaudyal001 commentedComment #45
npaudyal001 commentedComment #46
murrow commentedI am on D 10.1.2 with PHP 8.2 using Drupal Check. Mostly, I am seeing annotation problems, but there are also some underlying library refactoring that is having an impact. I'm attaching an update to #44 that has some of these changes. Am I heading in the right direction or have aI gone too far?
Comment #47
npaudyal001 commented@murrow, This looks good. I am uploading the patch with some drupalCI fixes so we can run the test against drupal 10.
Comment #48
murrow commented@npaudyal001, I've almost reached a stage where I need the tests to work in order to proceed with any confidence. That is blocked by #3361327: Fix test failures in 4.0.x (missing schema definition, etc), which seems a long way from reaching D10. Should I shift my attention to the tests in this branch and not wait on #3361327: Fix test failures in 4.0.x (missing schema definition, etc) or do we continue with trying to sort out obvious issues here (underlying library changes, undefined parameters, annotations, etc) and hope that the test ticket catches up?
BTW, thanks for the drupalCI updates on cweagans. I could take a look at the PHP 8.2 build today to see what the problem is there.
Comment #49
npaudyal001 commented@murrow, Most of the failures that you see on the recent patch was introduced by
"Drupal\Core\Field\FieldStorageDefinitionListenerInterface"from the patch #46. As far as other errors, there were only 13 of them from the acquia/cohesion which I am having a hard time resolving but still working on it. I think we should focus on this issue as this is up to date and I will try and have some guys look at the test ticket to catch up.Comment #50
murrow commentedFurther updates. I'm still making my way through the code with Drupal Check.
Comment #51
npaudyal001 commentedMore fixes to the unit tests suggested by drupal check. Includes rewriting tests without at() matcher and withconsecutive().
Comment #52
murrow commentedThanks for this patch, @npaudyal001. I am almost there and should have a fresh patch coming over the next few days.
Comment #53
murrow commentedFurther updates, with some Unit tests. 23 tests failing.
Comment #54
murrow commentedRemoving whitespace
Comment #55
npaudyal001 commentedThanks @murrow. I apologize for disappearing all these days. Had some health issues. Here is a patch with some more updates.
Comment #56
npaudyal001 commentedFixing patch conflict
Comment #57
npaudyal001 commented@murrow, I am seeing some things missing from these patches. For example, I am not seeing the class
LingotekConfigurationTrait.phpfrom patch #46 in the recent patches which seems to be causing errors. Looking more into it.Comment #58
murrow commented@npaudyal001
LingotekConfigurationTrait.phpwas a file I added and the discovered it was not needed for outside of a single file. I put the functions in the trait into that class as private functions. I'm not seeing it mentioned in the errors here: https://www.drupal.org/pift-ci-job/2747512Comment #59
murrow commentedUndoing bad "fixes". The Lingotek metadata entity doesn't use getters and setters, just raw objects. PHPStan complains about this, but you have to leave it as it is or refactor the entity itself. I tried using getters and it was a mistake. So, rolling back …
Comment #60
murrow commentedComment #61
npaudyal001 commentedThanks @murrow. Updating composer.json with new d10 supporting webform module. This should fix the composer failure.
Comment #62
npaudyal001 commented@murrow, I am also seeing other changes in
LingotekContentTranslationService.phpandlingotek.module, where the fields are being set in a separate variable$content_metadata_entityand thus the original entity object remains unchanged. This is breaking functionalities. Were this changes made to handle PHPStan errors? We might need to roll that back too I suppose?Comment #63
murrow commentedReversing out
$content_metadata_entity. (A conversation for another day: shouldn't the metadata entities behave like other Drupal entities – i.e., with fields instead of "entity" attributes?)Comment #64
npaudyal001 commentedMore updates...
Comment #65
npaudyal001 commented@murrow Ignore this patch. I am testing one of the previous patches. There seems to be a lot of functionality breaking changes coming from phpstan fixes. Just trying to run the test with this patch and see whats the result.
Comment #66
npaudyal001 commentedFixing the corrupt patch, #65. Same with this... ignore this patch
Comment #67
npaudyal001 commentedFurther updates. Continuing from #64.
Comment #68
npaudyal001 commentedFurther fixes on functionals.
Comment #69
npaudyal001 commentedUnit test fixes + additional updates
Comment #70
sja112 commentedComment #71
npaudyal001 commentedFurther updates. Replaced some older diagnostic dumps with newer ones as drupal 10 required updated ones.
Comment #72
npaudyal001 commentedFixing CI error
Comment #73
npaudyal001 commentedIgnoring the legacy tests that required database snapshot from older lingotek database structure.
Comment #74
npaudyal001 commentedFixing changes related to group module and further updates
Comment #75
npaudyal001 commentedAdded missing binary files and fixed some file renames.
Comment #76
npaudyal001 commentedMetatag fix
Comment #77
murrow commented@npaudyal001, this is looking good. I will take a look into the coding standards errors now.
Comment #78
npaudyal001 commentedFurther fixes...
Comment #79
murrow commentedComment #80
sja112 commentedComment #81
sja112 commentedComment #82
npaudyal001 commentedFurther coding standard fixes.. Also, if you are applying this patch please include binary option to pull the diagnostic dump file thats added for the update tests.
Comment #83
murrow commented@npaudyal001 Do you need to update the project version control page to include the
--binaryoption ongit diff? https://www.drupal.org/project/lingotek/git-instructionsComment #84
npaudyal001 commentedTablefield module is not yet compatible with php8.2, thats why its throwing errors. Other than that, with this patch we should be good. And @murrow, its probably a good idea to update that page.
Comment #85
murrow commented@npaudyal001, I think only a maintainer has permission to update the project's version control page. Could I leave this to you, please?
Comment #86
npaudyal001 commented@murrow, I don't see a way to update that page. It looks like thats a drupal default version control page for all modules.
Comment #87
damienmckennaThere isn't any way to modify the git instructions page, you're limited to just adding a note to the project page.
Comment #88
sja112 commentedI applied patch#84 and executed cache clear command. I am seeing this error,
The service "lingotek.config_subscriber" has a dependency on a non-existent service "Drupal\Core\Field\FieldStorageDefinitionListenerInterface".
Shouldn't we use, "@field_storage_definition.listener" instead of "Drupal\Core\Field\FieldStorageDefinitionListenerInterface" in lingotek.services.yml?
Comment #89
sja112 commentedComment #90
sja112 commentedComment #91
sja112 commentedFixed:
error: patch failed: tests/src/Functional/LingotekLongTextFieldImportTest.php:70
error: tests/src/Functional/LingotekLongTextFieldImportTest.php: patch does not apply
Comment #92
npaudyal001 commented@sja112, thanks for pointing that out. Heres the updated patch.
Comment #93
npaudyal001 commentedDrupal core 9.5 still uses guzzle 6 which has deprecation issues with php 8 and >. Trying to include patches for that in composer.json file
Comment #94
npaudyal001 commentedNot very helpful! Trying to update the dependency through dupalCI custom commands.
Comment #95
jahanzaib_at_straker commentedComment #96
npaudyal001 commentedThis has been released on a new 4.1.x-dev branch and 4.1.0 official release branch. There are still drupal check errors associated with phpUnit 10 deprecations for which we will open a new issue. Thank you all!
Comment #97
npaudyal001 commented