Problem/Motivation
Drupal 10.0 development
Thank you so much for the Drupal Core team
Following with
The current composer require status for this module under Drupal 10
composer create-project drupal/recommended-project:10.0.0-alpha4@alpha /var/www/html/sandboxes/drupal10block_class
cd /var/www/html/sandboxes/drupal10block_class/
composer require 'drupal/block_class:2.0.x-dev@dev'
is having the following problem
- drupal/block_class dev-2.0.x requires drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev].
- You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.0.x-dev].
- You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta12, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.0.x-dev].
- You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta16, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.0.x-dev].
- You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-rc3, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.0.x-dev].
- You can only install one version of a package, so only one of these can be installed: drupal/core[8.4.0-rc1, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev, 10.0.0-alpha1, ..., 10.0.x-dev].
- drupal/core-recommended 10.0.x-dev requires drupal/core 10.0.x-dev -> satisfiable by drupal/core[10.0.x-dev].
- Root composer.json requires drupal/core-recommended ^10.0 -> satisfiable by drupal/core-recommended[10.0.0-alpha1, ..., 10.0.x-dev].
Farther drupal-check on
composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9block_class
cd /var/www/html/sandboxes/drupal9block_class/
composer config minimum-stability dev
composer require drupal/block_class
composer require drupal/core-dev:~9 --with-all-dependencies
composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev
php vendor/bin/drupal-check -d web/modules/contrib/block_class/
Output:
block_class--drupal-check--report.txt
------ ---------------------------------------------- Line block_class.module ------ ---------------------------------------------- 56 Call to an undefined method Drupal\Core\Form\FormInterface::getEntity(). ------ ---------------------------------------------- ------ -------------------------------------------------------- Line tests/src/Functional/BlockClassTest.php ------ -------------------------------------------------------- 58 Call to deprecated method assertRaw() of class Drupal\Tests\BrowserTestBase: in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() instead. 60 Call to deprecated method assertRaw() of class Drupal\Tests\BrowserTestBase: in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseContains() instead. ------ -------------------------------------------------------- [ERROR] Found 3 errors
Proposed resolution
- Change to
^8 || ^9 || ^10in thecomposer.jsonfile - Change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
Remaining tasks
- ➖ Change to
^8 || ^9 || ^10in thecomposer.jsonfile - ➖ This will ease the work on farther drupal-check issues
- ➖ Real physical testing with Drupal ~10
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | block_class--drupal-check--report.txt | 1.18 KB | rajab natshah |
Issue fork block_class-3279758
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
rajab natshahComment #3
rajab natshahComment #6
rajab natshahClosing as a duplicate
Moving the conversion if needed to
#3296649: Automated Drupal 10 compatibility fixes for Block Class
Comment #7
dydave commentedSome interesting changes in this merge request:
https://git.drupalcode.org/project/block_class/-/merge_requests/5
Needs re-roll though: Create a new merge request on 4.0.x with the same changes.
(Could be moved manually, since there are very few changes)
Moving to Needs review, for now, as an attempt to get more attention and help with the re-roll, testing and review.
Feel free to let us know if you have any questions or concerns on any aspects of the latest code changes or the module in general, we would surely be glad to hear your feedback. 😊
Thanks in advance!
Comment #8
dydave commentedComment #9
rajab natshahThis issue was Closed (duplicate), also it is outdated.
to my knowledge it could be fixed in #3296649: Automated Drupal 10 compatibility fixes for Block Class
David, feel free to file a new issue.
Comment #10
dydave commentedThanks Rajab (@rajab natshah)!
Sure, I understand and saw the history on this issue but if possible we would like to keep this merge request opened:
I "think" we might still want to merge these changes, but haven't had time to test or review them properly myself yet.
No problem for creating a new ticket with a new merge request, since this one doesn't apply anymore.
But if possible it would be good to keep this issue opened a little bit longer so these changes are not buried. 😅
We should create a follow-up ticket from this issue, with the same changes, and move this one back to Duplicate. 👌
Any advice, comments or suggestions would be greatly appreciated.
Thanks in advance! 😊
Comment #11
csakiistvan@dydave, @rajab natshah — the surviving changes from MR !5 now have their own tickets on 4.0.x, so this one can go back to Closed (duplicate) as suggested in #7 and #10:
{operation}route parameter is free-form so any unmatched value renders the warning.Two of the four changes in MR !5 were left out on purpose: the
useDrupal\block\Entity\Blockdocblock typo is already fixed on 4.0.x, and thehelp_text_qty_itemshunk replaces the empty check with an unconditional$help_text_qty_items = '';, which discards the incoming value. That is a behaviour change rather than a clean-up, so it needs its own decision — happy to open a third ticket if you want it kept.The original Drupal 10 compatibility report is resolved:
block_class.info.ymlis oncore_version_requirement: ^9 || ^10 || ^11.