- Issue created by @chaitanyadessai
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 4:39am 11 March 2024 - last update
about 1 year ago 660 pass, 18 fail The last submitted patch, 2: 3426951-2.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
about 1 year ago 660 pass, 17 fail - 🇳🇱Netherlands megachriz
I think that at least some of the failing tests are caused by the following:
+++ b/modules/log/src/Plugin/Field/FieldFormatter/FileUriLinkFormatter.php @@ -19,6 +21,32 @@ use Drupal\Core\Url; + * @param \Drupal\Core\File\FileSystemInterface $file_url_generator + * The file URL generator. + */ + public function __construct(FileSystemInterface $file_url_generator) { + $this->fileUrlGenerator = $file_url_generator; + }
The service 'file_url_generator' does probably not implement FileSystemInterface, so an other interface would need to be used here.
- 🇳🇱Netherlands megachriz
+++ b/tests/modules/feeds_test_events/src/EventSubscriber/FeedsSubscriber.php @@ -22,6 +24,34 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; class FeedsSubscriber implements EventSubscriberInterface { + ... + /** + * The state handler service. + * + * @var \Drupal\Core\State\StateInterface + */ + protected $state; + + /** + * Constructs a FeedsSubscriber object. + * + * @param \Drupal\Core\State\StateInterface $state + * The state handler service. + */ + public function __construct(StateInterface $state) { + $this->state = $state; + } + + /** + * {@inheritDoc} + */ + public static function create(ContainerInterface $container) { + return new static( + $container->get('state'), + ); + }
For classes that are a service, the services it depends on need to be declared in a [module].services.yml file. In this case that would be in "feeds_test_events.services.yml". And the service class should not have a static
create()
method as above.I see also some extra returns in the patch file that could be removed.
Thanks for working on this. :)
- Assigned to chaitanyadessai
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 10:01am 11 March 2024 - last update
about 1 year ago 709 pass, 2 fail - last update
about 1 year ago 709 pass, 2 fail The last submitted patch, 7: 3426951-7.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.The last submitted patch, 8: 3426951-8.patch, failed testing. View results →
- last update
12 months ago 716 pass - Status changed to Needs review
12 months ago 3:31pm 20 March 2024 - 🇳🇱Netherlands megachriz
In FileUriLinkFormatter, I made sure that the parent constructor gets called with the right parameters. Let's see if that makes the tests pass.
- last update
12 months ago 716 pass - last update
12 months ago 716 pass -
MegaChriz →
committed 83dd717e on 8.x-3.x
Issue #3426951 by chaitanyadessai, MegaChriz: Fixed a few \Drupal calls...
-
MegaChriz →
committed 83dd717e on 8.x-3.x
- Status changed to Fixed
12 months ago 11:21am 22 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.