$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml organigrams/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(
FILE: C:\Users\SI-001\Downloads\organigrams\css\orgchart-layout.css
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
57 | ERROR | [x] CSS colours must be defined in lowercase; expected #cccccc but found #CCCCCC
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: C:\Users\SI-001\Downloads\organigrams\organigrams.api.php
------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------
27 | ERROR | Doc comment for parameter $object does not match actual variable name $term
------------------------------------------------------------------------------------------
FILE: C:\Users\SI-001\Downloads\organigrams\organigrams.install
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: C:\Users\SI-001\Downloads\organigrams\src\TaxonomyTermTree.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
155 | ERROR | Doc comment for parameter $fields does not match actual variable name $positions
------------------------------------------------------------------------------------------------
Time: 646ms; Memory: 12MB
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | organigrams-3301295-10.patch | 7.47 KB | mauryarahul11 |
| #7 | coding-standards-3301295-7.patch | 7.2 KB | urvashi_vora |
| #4 | patch-applied.png | 56.7 KB | urvashi_vora |
| #2 | drupal-coding-standard-issue-3301295-2.patch | 1.52 KB | rakhi soni |
Issue fork organigrams-3301295
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
Comment #2
rakhi soni commentedKindly review patch,,
Comment #3
urvashi_vora commentedHi @Rakhi,
I will review your patch.
Thanks
Comment #4
urvashi_vora commentedHey @Rakhi,
I reviewed your patch. It applied cleanly.
Thanks for the patch.
Comment #5
urvashi_vora commentedBut,
Still there are certain issues, so moving this to "Needs work".
Comment #6
urvashi_vora commentedI am working on them.
Comment #7
urvashi_vora commentedHi,
I worked on them. Providing a patch, please review.
Thanks
Comment #8
patrickscheffer commentedThank you for your work! I applied your patch on the dev branch in a clean Drupal 9 environment and ran into the following issues:
1. Go to /admin/structure/taxonomy
2. Click on "Add organigram".
3. The following error shows: ArgumentCountError: Too few arguments to function Drupal\organigrams\TaxonomyTermTree::__construct(), 2 passed in /drupal9_data/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 and exactly 3 expected in Drupal\organigrams\TaxonomyTermTree->__construct() (line 52 of modules/contrib/organigrams/src/TaxonomyTermTree.php).
This can easily be fixed by adding @module_handler as argument to organigrams.services.yml.
Then, the next issue arose:
1. After fixing the missing argument, go to /admin/structure/taxonomy/add/organigram
2. Click on "Import Drupal 7 organigram".
3. The following error shows: Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.query". Did you mean one of these: "entity.query.config", "entity.query.sql", "pgsql.entity.query.sql", "entity.query.null", "entity.query.keyvalue"? in Drupal\Component\DependencyInjection\Container->get() (line 156 of core/lib/Drupal/Component/DependencyInjection/Container.php).
I'm not sure what to do with this one.
Comment #9
mauryarahul11After applying the patch #7, i got the following phpcs warnings-
So, I have fixed the above warnings along with @PatrickScheffer's first points after reviewing module in D8 and created a new patch.
and @PatrickScheffer, about your 2nd concern, it is because
entity.querygot deprecated in D9, see this - entity.query service deprecated in favor of EntityStorageInterface::getQuery()So, attached patch fixes the phpcs warnings and fatal error of
ArgumentCountError: Too few arguments to function Drupal\organigrams\TaxonomyTermTreeandYou have requested a non-existent service "entity.query"Comment #10
mauryarahul11here is the updated patch -
Comment #11
juancec commentedHi, I reviewed patch #10 and all the PHPCS issues have been fixed. Moving it to RTBC, Good job =)
Comment #13
patrickscheffer commentedThank you all for your contributions! I have applied patch #10 and also added access checks to the entity queries because that gave some errors as well. Can someone do a final test on the 8.x-2.x branch before I create a new release?
Comment #14
juancec commentedHi Patrick, I've tested the 8.x-2.x branch and the issues related to acces to the entity queries have been fixed. Hence I move it to RTBC.
Comment #15
patrickscheffer commentedThanks to you all! I released version 8.x-2.3.
Comment #16
patrickscheffer commented