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_content_permissions
cd /var/www/html/sandboxes/drupal10block_content_permissions/
composer config minimum-stability dev
composer require drupal/block_content_permissions
is having the following problem
Using version ^1.10 for drupal/block_content_permissions
./composer.json has been updated
Running composer update drupal/block_content_permissions
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/block_content_permissions ^1.10 -> satisfiable by drupal/block_content_permissions[1.10.0, 1.x-dev].
- drupal/block_content_permissions[1.10.0, ..., 1.x-dev] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.0.0-alpha4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/block_content_permissions:*" to figure out if any version is installable, or "composer require drupal/block_content_permissions:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Further drupal-check on
composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9block_content_permissions
cd /var/www/html/sandboxes/drupal9block_content_permissions/
composer config minimum-stability dev
composer require drupal/block_content_permissions
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_content_permissions/
Output:
block_content_permissions--drupal-check--report.txt
5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% ------ -------------------------------------------------------------- Line block_content_permissions.module ------ -------------------------------------------------------------- 110 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addWhere(). 113 Call to an undefined method Drupal\views\Plugin\views\query\QueryPluginBase::addWhere(). 117 Offset 'type' on string in empty() does not exist. ------ -------------------------------------------------------------- [ERROR] Found 3 errors
Proposed resolution
- Change to
core_version_requirement: ^8 || ^9 || ^10in the block_content_permissions.info.yml - Change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
Remaining tasks
- ➖ Change to
core_version_requirement: ^8 || ^9 || ^10in theblock_content_permissions.info.ymlfile - ➖ This will ease the work on further 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 |
|---|---|---|---|
| block_content_permissions--drupal-check--report.txt | 1.2 KB | rajab natshah |
Comments
Comment #2
rajab natshahComment #3
rajab natshahComment #4
adarshsri786 commentedComment #5
adarshsri786 commentedComment #6
rajab natshahClosing as duplicate.
Moving the conversion to
#3286264: Automated Drupal 10 compatibility fixes