- Issue created by @Gnanagowthaman sankar
- 🇮🇳India Gnanagowthaman sankar Puducherry
Hi Everyone, The above PR to fix the dependency issue and the phpcs issue.
- @ayushpandey opened merge request.
- 🇮🇳India ayush.pandey
I have checked the PR, but it does not resolve the issue completely. It throws an error
Class "Drupal\simple_sitemap\Controller\SimplesitemapController" not found in include() (line 17 of modules/contrib/domain_simple_sitemap/src/Controller/DomainSimpleSitemapController.php).
Also, the change added in PR,public static function create(ContainerInterface $container): DomainSitemapController
, will resolve the issue for create function, but will throw error for getSitemap child function. - 🇮🇳India Gnanagowthaman sankar Puducherry
Hi @ayush.pandey ,
In your local site did you installed the simple_sitemap module ?
Regarding comment #8: There is an issue with Class naming between domain_simple_sitemap and simple_sitemap.
Drupal\simple_sitemap\Controller\SimplesitemapController. (Notice Simplesitemap Vs SimpleSitemap).
May need to install the compatible versions with correct naming to fix this issue.
Please verify the source control system (eg: git) to make sure that the updates to the files are properly done after an update of the simple_sitemap module to fix the names.When simple_sitemap is upgraded to 4.1, I am also seeing the Container Dependency issue:
Fatal error: Declaration of Drupal\domain_simple_sitemap\Controller\DomainSimpleSitemapController::create(Symfony\Component\DependencyInjection\ContainerInterface $container) must be compatible with Drupal\simple_sitemap\Controller\SimpleSitemapController::create(Symfony\Component\DependencyInjection\ContainerInterface $container): Drupal\simple_sitemap\Controller\SimpleSitemapController in /app/web/modules/contrib/domain_simple_sitemap/src/Controller/DomainSimpleSitemapController.php on line 59This is a blocker for us to upgrade simple_sitemap to 4.1
- Issue was unassigned.
- Status changed to Needs work
7 months ago 7:01am 6 May 2024 - 🇧🇪Belgium tim-diels Belgium 🇧🇪
You need to update to the 3.x version. It is not reproducable anymore with the next versions:
We're on the next versions:
- domain_simple_sitemap 3.0.0-beta1
- simple_sitemap 4.1.9
And if you see there, your fix is also not correct.
Also the bug report is not clear. You talk about a faulty declaration but also provide a (partially) PHP CS report?
FILE: modules/contrib/domain_simple_sitemap/src/Controller/DomainSimpleSitemapController.php ----------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------- 16 | WARNING | The class short comment should describe what the class does and not simply repeat the class name -----------------------------------------------------------------------------------------------------------------
And if you want to solve the CS issue, please read carefully how to do that as your provided solution is not correct. The comment should be descriptive and not just being fixed with adding an 'of' between.
I would say we close this issue? At least it needs work.