- Issue created by @urvashi_vora
- Status changed to Needs work
11 months ago 11:34am 10 January 2024 - ๐ฎ๐ณIndia Ashutosh Ahirwal India
Provided patch not get applied throwing error.
chat_ai % git apply -v dependency-injections-added.patch
Checking patch src/ChatAI.php...
Checking patch src/Embeddings.php...
Hunk #7 succeeded at 345 (offset 18 lines).
Hunk #8 succeeded at 441 (offset 17 lines).
Checking patch src/Form/ChatBlockForm.php...
Checking patch src/Form/EmbeddingsForm.php...
Hunk #1 succeeded at 88 (offset -1 lines).
error: while searching for:
public function buildForm(array $form, FormStateInterface $form_state) {// Debug.
$entity = Node::load(1);
$embeddings = \Drupal::service('chat_ai.embeddings');
dpm($embeddings->shouldIndex($entity));
// ..
$config = json_decode($this->config('chat_ai.settings')->get('include') ?? '', TRUE);error: patch failed: src/Form/EmbeddingsForm.php:116
error: src/Form/EmbeddingsForm.php: patch does not apply
Checking patch src/Plugin/Block/ChatAIBlock.php... - First commit to issue fork.
- Assigned to pray_12
- Issue was unassigned.
- Status changed to Needs review
10 months ago 8:20am 15 January 2024 - Assigned to realsp
- ๐ฎ๐ณIndia realsp
Getting following errors in the issue's fork commit #3,
FILE: /home/contribution/drupal/web/modules/contrib/chat_ai/tests/src/Functional/SettingsPageTest.php -------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------- 35 | WARNING | Possible useless method overriding detected -------------------------------------------------------------------------------------------------------- FILE: /home/contribution/drupal/web/modules/contrib/chat_ai/src/Form/SettingsForm.php ---------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------- 91 | WARNING | Possible useless method overriding detected ---------------------------------------------------------------------------------------- FILE: /home/contribution/drupal/web/modules/contrib/chat_ai/src/Form/EmbeddingsForm.php ------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------ 231 | WARNING | Possible useless method overriding detected ------------------------------------------------------------------------------------------ FILE: /home/contribution/drupal/web/modules/contrib/chat_ai/src/Form/ChatBlockForm.php ----------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------- 141 | WARNING | Possible useless method overriding detected -----------------------------------------------------------------------------------------
- Issue was unassigned.
- ๐ฎ๐ณIndia realsp
The possible useless methods were empty validate form methods in 'Form' files, and a separate 'setup()' method call without any definitions, hence can be removed. Please review the MR, Thank you.
- Status changed to Needs work
4 months ago 3:48pm 30 July 2024 - ๐ต๐ญPhilippines roberttabigue
Hi @realsp,
After reviewing and applied the MR!1 to the Chat AI module against 1.0.0-alpha on Drupal 10, not all of the PHPCS errors were resolved.
See below:FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/Form/SettingsForm.php ------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------ 46 | ERROR | [x] Multi-line function declaration not indented correctly; expected 2 spaces but found 4 ------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------ FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/Form/ChatBlockForm.php ------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------- 70 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------- FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/Form/EmbeddingsForm.php -------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------- 90 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 91 | ERROR | [x] Multi-line function declaration not indented correctly; expected 2 spaces but found 4 -------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------- FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/Embeddings.php ----------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------- 137 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 138 | ERROR | [x] Multi-line function declaration not indented correctly; expected 2 spaces but found 4 ----------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------- FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/Supabase.php --------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------- 97 | ERROR | [x] Multi-line function declaration not indented correctly; expected 2 spaces but found 4 246 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter --------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------- FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/chat_ai/src/ChatAI.php --------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------- 102 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 103 | ERROR | [x] Multi-line function declaration not indented correctly; expected 2 spaces but found 4 --------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js chat_ai/
I'm moving this to โNeeds workโ for now.
Thank you!
- Assigned to kulpratap2002