pablonicolas β created an issue.
Done @liam morland. The merge request now only contains commits linked to this specific issue. I will create a new issue soon to fix the PHPCS and PHPCBF warnings.
Thank you!
pablonicolas β changed the visibility of the branch 3473045-autocomplete-field-with to hidden.
pablonicolas β changed the visibility of the branch 3473045-fix-starts-with-autocompletion to hidden.
Hello @alyaj2a and @amit.rawat777
I had a similar issue before and fixed adding /* phpcs:ignoreFile */
to the beginning of the file. On PHP files we can ignore specific blocks of code but it wasn't possible on CSS. See more at https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignorin....
The tests are passing now, also fixed some deprecated code and PHPCS warnings.
Hello Liam.
It took me a little while to figure out how to run the tests on my local environments and IDE, but now we have tests for this specific operator.
Do you mind having a look?
PS: For those having the same difficulties I had with tests, here is an excellent article on how to integrate Unit tests with DDEV and PHP Storm: https://drupalize.me/blog/debug-any-drupals-phpunit-tests-phpstorm-ddev-...
pablonicolas β changed the visibility of the branch 3398317-drupal-calls-should to hidden.
breidert β credited pablonicolas β .
Cool, just using the switch statement was not enough, but putting a break;
on STARTS_WITH case does the trick.
About testing, I'm not very used to writing unit tests, following the existing ones I added a few lines and it seemed correct, but I could not test it using PHPUnit using ddev :/
If someone could shed light on how to do the tests properly I would give it a shot.
Thank you!
At first glance, I had the same thought as you, but the difference when we split it into a nested if
is that the logic does not fall on the elseif
block. This block just validates the query is not FALSE and uses the CONTAINS operator.
elseif (stripos($label, $q) !== FALSE)
Another suggestion would be validating that the operator is empty or equals CONTAINS. Both solutions achieve the same result.
Hello there!
I tested the patch and can confirm it is working as expected! The merge request uses spaces rather than TAB to indent, I might need more time to work on the tests, but I hope to commit something by tomorrow.
Thank you!
pablonicolas β made their first commit to this issueβs fork.
I was unable to finish executing feeds-import because some data came in as NULL, triggering the exception and interrupting the batch import. I took the MR diff and applied it as a composer patch, it worked perfectly for me!
Thank you!
This patch fixed my problem. Thank you very much!
PabloNicolas β made their first commit to this issueβs fork.
Thank you for helping on this one mitthukumawat!
My last commit fixed the remaining coding standards warning.
PabloNicolas β changed the visibility of the branch 3441260-update-module-to to active.
PabloNicolas β changed the visibility of the branch 3441260-update-module-to to hidden.
PabloNicolas β created an issue.
PabloNicolas β created an issue. See original summary β .
- Teaching a different way to fix the problem, which can be adapted to each case. In my opinion, is the easiest way to do the trick
- Also, I've made a few corrections of typos and formating