📌 | Feeds LDAP | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
🇮🇳India atuliet05
📌 | Feeds LDAP | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
🇮🇳India atuliet05
Steps to solve the issue.
1. We install the module in my local machine using git clone.
2. We setup phpcs in my local machine.
3. After that we test all the file inside module(feeds_ladap) using phpcs. lando phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ./web/modules/contrib/feeds_ldap/ and we got 2 warnings related to t() function.
4. Then we download and apply patch #3 ( https://git.drupalcode.org/project/feeds_ldap/-/merge_requests/5.patch )
5. Again we run phpcs command as above.
6. Now we not got those warnings .
📌 | Feeds LDAP | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
🇮🇳India atuliet05
🐛 | Custom Body Class | Custom Body Class triggers PHP 8.2 warning: Deprecated function: preg_match(): Passing null to parameter #2
🇮🇳India atuliet05
I've applied the attached patch and tested this. The reported warning is no longer triggered.
Marking this as RTBC.