Problem/Motivation

Fixes coding Standards for modern Drupal.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork tarpit-2833166

Command icon 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

cebasqueira created an issue. See original summary.

cebasqueira’s picture

Assigned: Unassigned » cebasqueira
Status: Active » Needs review
StatusFileSize
new6.43 KB

Hi @Pol, more improvements!

Thanks my friend!

pol’s picture

Status: Needs review » Needs work
+++ b/modules/tarpit_ban/tarpit_ban.services.yml
@@ -3,4 +3,4 @@ services:
+    arguments: ['@requestStack', '@ban.ip_manager', '@logger.channel.tarpit']

Are you sure about this ?

cebasqueira’s picture

Yes, because I changed the variable name on Ban Class of $request_stack to $requestStack, right?

pol’s picture

No it has nothing to do with variables.

@request_stack is a service !

cebasqueira’s picture

You is right, sorry, I will update the patch

cebasqueira’s picture

Status: Needs work » Needs review
StatusFileSize
new5.82 KB
hgunicamp’s picture

Assigned: cebasqueira » hgunicamp
StatusFileSize
new4.92 KB
new187.87 KB

I applied the 'coding_standards_for_d8-2833166-7.patch' and it was removing a function commentary.
I generated a new patch file ('coding_standards_for_d8-2833166-8.patch ') to fix this problem.

Then rechecked the code standard using the following command without further complains:
find . -type f \( -name '*.php' -or -name '*.yml' -or -name '*.module' \) -exec phpcs --standard=Drupal {} \+

Then I load the patched module in my environment without mistakes using drupal console as shown in the picture 'loading_tarpit.png'.

hgunicamp’s picture

Assigned: hgunicamp » Unassigned
faline’s picture

Some dependency injection and standards fixes

rodrigoac’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new4.53 KB

Hello People !

I apply the patch and check the standards.

All looks fine by me !

Thanks @faline !

ressa’s picture

Version: 8.x-1.0 » 8.x-1.1
Category: Bug report » Task
Status: Reviewed & tested by the community » Needs work

Updating the version to the latest release.

ressa’s picture

Title: Coding Standards for D8 Version » Coding Standards for modern Drupal
Issue summary: View changes
Status: Needs work » Needs review

Thanks everyone for working on this, now more than eight years ago :)

The Tarpit module has become potentially very useful, since it can help block bot attacks for web sites using Facets 2, by offering them Honeypot links, and a ban if they follow them:

- https://www.drupal.org/docs/administering-a-drupal-site/security-in-drup...
- https://www.drupal.org/forum/support/post-installation/2025-02-20/drupal...

I created a GitLab Merge Request based on the last patch from comment #10. There were a few additional deprecations since then, which are also fixed in the MR, and the module works well in Drupal 10.