I try to decorate some services, that is why I need, that the interface is used instead of the class.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 3432628-20.diff | 30.57 KB | mhh |
| #12 | 3432628-12.diff | 24.74 KB | drupatz |
| #11 | 3432628-11.diff | 32.37 KB | drupatz |
Issue fork simple_sitemap-3432628
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 #3
antonín slejška commentedComment #4
hydra commentedThis looks reasonable to me.
Comment #5
walkingdexter commentedFirst of all, PHPStan errors need to be fixed https://git.drupalcode.org/issue/simple_sitemap-3432628/-/jobs/1121610.
Comment #6
antonín slejška commentedAll tests are green now: https://git.drupalcode.org/issue/simple_sitemap-3432628/-/pipelines/126286
Comment #7
gbyteThanks for looking into this. The generator should have its own interface 'GeneratorInterface' and additionaly implement the existing 'SitemapGetterInterface'. 'GeneratorInterface' should not extend 'SitemapGetterInterface'.
Comment #8
antonín slejška commentedHi @gbyte, I have implemented it, as you suggested. It works by me locally, but it causes the following issues:
https://git.drupalcode.org/issue/simple_sitemap-3432628/-/jobs/1132670
Comment #9
antonín slejška commentedComment #10
antonín slejška commentedI have added the methods setSitemaps and getSitemaps to the GeneratorInterface. It works: https://git.drupalcode.org/issue/simple_sitemap-3432628/-/pipelines/126371
But I'm not sure, if it is the best solution. Why not to use 'extend'?
Comment #11
drupatz commentedThe patches aren't applicable to version 4.2.1, so here's a rewritten patch that will apply
Comment #12
drupatz commentedPatch from #11 doesn't apply in 4.2.2, therefore here another rewrite
Comment #20
mhh commentedI've created a new MR with all the changes that work with the current 4.x branch (MR !126). I've also rewritten it as a patch to work with 4.2.2.
Comment #21
jepster_This changes currently do not work. If I do open the config page at /admin/config/search/simplesitemap, then I do get this error:
Tested with version 4.2.2 of simple sitemap.
Comment #22
jepster_Comment #23
jepster_The circumstances are different. The MR is against the 4.x-dev branch. There it works. Against version 4.2.2 it just does not apply. Because there are various changes in the 4.x-dev branch which differ from the 4.2.2 release.
I do recommend to merge the changes in 4.x-dev and then create an new patch release (e.g. 4.2.3).
Comment #24
jepster_I can confirm that the patch from #20 does also work, if applied against version 4.2.2.
Comment #25
walkingdexter commented@gbyte The changes look good to me, please review.
Comment #26
jepster_Comment #27
gbyteI'm afraid this needs another pass for 4.x before it is merged. I'm happy to merge it afterwards!
Comment #28
jepster_Comment #30
gbyteThanks!