Closed (fixed)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2021 at 14:41 UTC
Updated:
31 May 2022 at 09:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
maithri shetty commentedComment #4
dspachos commentedSeems like tests need to be updated as well?
Comment #5
megachrizI think that FeedsDrushCommands needs to implement an additional interface, ContainerInjectionInterface, if I'm correct:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Dependenc...
Comment #6
dspachos commentedFor
FeedsDrushCommandsI created a separate issue (#3259633), as theentity_type.managershould be also declared indrush.services.yml.Still needs work for other classes, though.
Comment #7
tmaiochi commentedI'll work on this!
Comment #8
tmaiochi commentedThere's my patch, I didn't fix the
FeedsDrushCommandsbecause it has already been fixed in #3259633: Dependency injection for FeedsDrushCommands classComment #10
tmaiochi commentedHey everyone!
I worked on this patch and there were some errors in tests, but I believe that happened because some changes made in patch, so maybe will be need to change tests, but it isn't scope of this issue.
Comment #11
bruno.bicudoI reviewed #8's patch and worked a little bit on it, as it has an error which was breaking the site (related to DefaultEntityProcessorForm). Also included User::load service dependency injection.
I sent the same patch here: #2939688-47: Fix the errors/warnings reported by PHP_CodeSniffer as a part of Coding Standards Fix.
Also didn't touch
FeedsDrushCommandsbecause it has already been fixed in #3259633.Comment #12
bruno.bicudoComment #13
megachriz@bruno.bicudo
Thanks for the update. I changed the variable names and code comments a bit. Otherwise it looks good!
Compared to the patch in #8, I see that for some files dependency injection fixes are no longer included. So after committing this patch, I'll leave this issue open for that.
Comment #14
megachrizI see I forgot to update referencing the right class at the top of the file. Tests didn't fail upon that, so that means DefaultEntityProcessorForm isn't covered by tests. It would be good to add these.
Comment #15
bruno.bicudoI'll try to work on this.
Comment #16
bruno.bicudoI worked on a simple test which creates and edits a test feed.
After revision i'll try to work on extra Dependency Injections on the module.
Needs review :)
Comment #17
megachriz@bruno.bicudo
Thanks for working on the test! It looks mostly good. Things I would change/add:
For checking the processor configuration, you first would need to call a method to get the processor plugin and than another to get the processor plugin configuration. If I'm not mistaken, you would get it this way (not tested):
$feed_type->getProcessor()->getConfiguration()$feed_type = $this->createFeedType();Thanks so far!
Comment #18
bruno.bicudoI'll work on the pointed changes. Thanks for the feedback :)
Comment #19
bruno.bicudoI worked on what was pointed on #17.1 and #17.2.
I also tried to create the edition test based on what's stated on #17.3.
Needs review :)
Comment #20
megachriz@bruno.bicudo
Thanks for working on the test! I went through it and made a few changes to the code comments and naming. The class is now called "FeedTypeTest". For #2904668: Explain why a feed type cannot be deleted in the UI I like to add test coverage for deleting feed types too, so I needed a more generic class name.
If the test passes, I'll commit the patch. Then #14 can be retested.
Comment #22
megachrizHm, maybe in #19 the tests were not executed because there was a namespace error in the patch. I made some corrections.
Comment #24
megachrizCommitted #22. Now #14 need to be retested by the testbot.
Comment #26
megachrizCommitted #14. Leaving open for remaining changes in #8. That one needs a reroll now (with the changes for DefaultEntityProcessorForm excluded, since these are now committed).
Comment #27
bruno.bicudoI'll work on it.
Comment #28
bruno.bicudoI rerolled #8 and made a few changes:
-
config.factoryservice injection forFeedSubscribermust be passed as an argument viafeeds_test_multiple_cron_runs.services.yml(arguments: ['@config.factory']). That's why CronRun test was stating an error.- I also edited
CsvController.phpto reflect the one i sent on #2939688: Fix the errors/warnings reported by PHP_CodeSniffer;Also, 2939688 includes a bunch of other corrected DIs.
Needs review :)
Comment #29
aldairsoares commentedI'll review it.
Comment #30
aldairsoares commentedI've just ran all tests and looked at the site. No errors found.
Everything is working fine as it should.
I'm moving it to RTBC.
Comment #31
aldairsoares commentedComment #32
aldairsoares commentedComment #34
megachrizI made some small to the patch from #28 changes and committed that. I see that the changes only affected test modules so as long the tests still pass, it should be good. The changes do not impact the usage of the module.