drupal-check report on dev branch
14/14 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -------------------------------------------------------------------------------
Line modules/shs_chosen/src/Plugin/views/filter/ShsChosenTaxonomyIndexTidDepth.php
------ -------------------------------------------------------------------------------
85 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
87 Call to deprecated function db_or():
in drupal:8.0.0 and is removed from drupal:9.0.0. Create
a \Drupal\Core\Database\Query\Condition object, specifying an OR
conjunction: new Condition('OR');
------ -------------------------------------------------------------------------------
------ ----------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/EntityReferenceShsFormatter.php
------ ----------------------------------------------------------------------------------
60 Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface:
in drupal:8.0.0 and is removed from drupal:9.0.0.
Use \Drupal\Core\Entity\EntityInterface::toUrl() instead.
------ ----------------------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php
------ -------------------------------------------------------------------------
85 Call to deprecated function db_select():
in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get
a database connection injected into your service from the container and
call select() on it. For example,
87 Call to deprecated function db_or():
in drupal:8.0.0 and is removed from drupal:9.0.0. Create
a \Drupal\Core\Database\Query\Condition object, specifying an OR
conjunction: new Condition('OR');
------ -------------------------------------------------------------------------
[ERROR] Found 6 errors
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | shs_d9_compatibility-3133245-25.patch | 7.81 KB | jastraat |
| #19 | Afterapplying3133245-16.mp4 | 28.41 MB | priyanka.sahni |
| #19 | Afterapplying3133245-16.png | 246.76 KB | priyanka.sahni |
| #16 | interdiff_13-16.txt | 3.6 KB | nitesh624 |
| #16 | interdiff_11-16.txt | 3.62 KB | nitesh624 |
Comments
Comment #2
drupalnesia commentedComment #3
nitesh624Upating the version of issue and desscription
Comment #4
nitesh624Comment #5
nitesh624drupal-check result after applying patch
Comment #6
nitesh624Comment #7
atul4drupal commentedHello nitesh624 thanks for the patch it certainly seems to fix the deprecated code issue, though it needs a minor improvement with respect to the spacing in your patch... you seems to have used 4 spaces instead of recommended 2. Do this small change and it should be good.
Thanks.
Comment #8
suresh prabhu parkala commentedPlease review!
Comment #9
nitesh624Comment #10
nitesh624Comment #11
nitesh624Fix spacing issue in #5
Comment #12
nitesh624Comment #13
wrd commentedThe shs_chosen module also needs its core_version_requirement set. This updated patch does so. I'm assuming that shs_chosen actually *is* updated for D9, based on the rest of the patch, but I don't know how to check; if not, this is obviously premature.
Comment #14
atul4drupal commented@wrd thanks for working on this... at #13 an interdiff would have been helpful though.
The patch at #13 looks clean for the fix. (courtesy to #11)
Its RTBC 1.
Comment #15
priyanka.sahni commentedIssues is not fixed.I have tested the issue on Safari , Chrome and sandbox.
Steps to replicate-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.
Current Result -
On clicking on add another item , it is moving to downwards direction and not able to add the created tags.
Attaching the video as well for reference.
Comment #16
nitesh624Good find @priyanka.sahni have updated the patch #16. pls test it
Comment #17
nitesh624Comment #18
priyanka.sahni commentedI have re-tested by applying the patch#16 , It is found fixed now.
Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.
Attached the video as well for reference
Comment #19
priyanka.sahni commentedI have re-tested by applying the patch#16 , It is found fixed now.
Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.
Attached the video as well for reference.
Comment #20
priyanka.sahni commentedAfter applying the patch#16 Issues is fixed.I have tested the issue.
Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.
Attached the video for reference as well.
Comment #21
priyanka.sahni commentedI have re-tested by applying the patch#16 , It is found fixed now.
Steps to test-
1. Go to admin/modules.
2. Search for the Simple hierarchical select.
3.Enable the module by selecting the checkbox and click on Install.
4.Go to -> admin/structure/types/manage/article/form-display
5. In the tags field , select Simple hierarchical select and click on Save.
6. Go to create Article content type.
7. Verify by clicking on Add another item.
Comment #22
priyanka.sahni commentedComment #23
nikolas.tatianenko commentedReviewed with Drupal 8.8 and Drupal 9-rc1
Also reviewed with a Chosen submodule. Looks great. Thank you
Comment #24
jastraat commentedThis may need more work. I tested this patch + the dev version of the module on Drupal 8.8 and got the following error:
ArgumentCountError: Too few arguments to function Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::__construct(), 3 passed in /web/modules/contrib/shs/src/Plugin/views/filter/ShsTaxonomyIndexTidDepth.php on line 41 and exactly 5 expected in Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid->__construct() (line 55 of core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php).
Comment #25
jastraat commentedUpdated patch to address issues from comment 24 + other depreciations. I did not test the chosen submodule, but the main module worked with Drupal 9.
Comment #26
rar9 commentedOn drupal 9.0.2 shs dev + patch 25 wont install
Problem 1
- Conclusion: remove doctrine/annotations 1.10.3
Comment #27
jastraat commentedI'm seeing that same composer error in a lot of tickets. This patch doesn't make any composer or dependency changes, so I'm not sure that's related.
What version of PHP are you running?
Is it only adding to the project with composer that doesn't work? Since the core version requirement addition to is part of this patch, I'm not sure that composer would see the project as compatible with D9 to pull and patch.
Comment #28
rar9 commentedphp 7.3x, but would like to use 7.4.x in future
Comment #29
rar9 commentedI´m getting:
composer require 'drupal/shs:1.x-dev'
./composer.json has been updated
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drupal/shs 1.x-dev -> satisfiable by drupal/shs[1.x-dev].
- Conclusion: remove drupal/core 9.0.2
- Conclusion: don't install drupal/core 9.0.2
- drupal/shs 1.x-dev requires drupal/core ^8 -> satisfiable by drupal/core[8.0.x-dev, 8.1.x-dev, 8.2.x-dev, 8.3.x-dev, 8.4.x-dev, 8.5.x-dev, 8.7.x-dev, 8.8.x-dev, 8.9.x-dev].
Comment #30
jastraat commented@Rar9 This patch hasn't been incorporated into the dev branch yet, so it is not compatible with D9. You wouldn't be able to require the module using composer.
Comment #31
rar9 commented@jastraat so this is a bit confusing... Title D9 Drupal 9 compatibility , and multiple patches.
Is there anyway to get this to work soon?
Comment #32
Hugo Chhor commented@jastraat and @Rar9
Hello,
The patch #25 works for me like charm with Composer.
Because this module has not been declared as compatible with D9, you will have a dependency error when you perform the upgrade to D9 using Composer.
Fortunately there is a trick to subvert this issue :
Just add an alias to your target D9 version with your current D8 version :
composer require "drupal/core:9.0.2 as 8.9.2" --no-update && composer updateHope it wood help.
Comment #33
rar9 commentedThis only messed up my Install as it downgrade other dev modules.... Thanks for this.
Comment #34
jastraat commented@Hugo Chhor Cool trick!
Would you want to mark as reviewed?
Comment #35
Hugo Chhor commentedThanks @jastraat for your feedback.
I have no downgrade issue on other dev modules as mentioned by @Rar9 (#33).
Perhaps because I use the last version of Composer installers :
"composer/installers": "^1.9"My Drupal 9 project template is "drupal/recommended-project".
For instance, there wasn't downgrade on
"drupal/field_group": "3.x-dev"and others.But this trick have a major issue :
if you want to update your Drupal core, you'll have to modify the core version on your composer.json before performing your
composer updatelike this example :from
"drupal/core:9.0.2 as 8.9.2"to"drupal/core:9.0.3 as 8.9.2"As mentioned in its module page, there is "No further development" on this module.
So I delete the line
"'drupal/shs": "1.x-dev'"from my composer.jsonand I move the "shs" folder from the "contrib" folder to the "custom" folder after applying the patch #25 because I ignore the "contrib" folder in my ".gitignore"
After this, everything goes well...hope there won't be further issue.
Comment #36
rar9 commentedThe && Composer update is basically what forced the downgrade of some modules
So for the time being I'm forced to update each module manually till this module is updated to install via composer for drupal 9 :-(
I checked and i also use 1.9 for composer installer
Comment #37
rar9 commentedWill this module be eventually be updated to be really Drupal 9 compatible, or might it be smarter to used the Client-side hierarchical select alternative?...
has anyone tried this with drupal 9
Comment #38
sam152 commentedWhile the module is minimally maintained, I don't think the committers will have a problem with adding D9 compatibility for the existing users.
Patch works great for me, thanks @jastraat. I'll see if I can contact @jhedstrom to get this in.
Comment #40
jhedstromThanks all!