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/drupal10bootstrap_layouts
cd  /var/www/html/sandboxes/drupal10bootstrap_layouts/

composer config minimum-stability dev 

composer require drupal/bootstrap_layouts

is having the following problem

Using version ^5.2 for drupal/bootstrap_layouts
./composer.json has been updated
Running composer update drupal/bootstrap_layouts
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/bootstrap_layouts ^5.2 -> satisfiable by drupal/bootstrap_layouts[5.2.0, 5.x-dev].
    - drupal/bootstrap_layouts[5.2.0, ..., 5.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/bootstrap_layouts:*" to figure out if any version is installable, or "composer require drupal/bootstrap_layouts:^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/drupal9bootstrap_layouts

cd /var/www/html/sandboxes/drupal9bootstrap_layouts/

composer config minimum-stability dev

composer require drupal/bootstrap_layouts

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/bootstrap_layouts/

Output:

bootstrap_layouts--drupal-check--report.txt

 ------ ----------------------------------------------------------------- 
  Line   bootstrap_layouts.install                                        
 ------ ----------------------------------------------------------------- 
  54     Variable $bootstrap_layouts_manager in PHPDoc tag @var does not  
         exist.                                                           
 ------ ----------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   src/BootstrapLayoutsManager.php                                      
 ------ --------------------------------------------------------------------- 
  287    Function drupal_set_message not found.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
  289    Function drupal_set_message not found.                               
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols   
 ------ --------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/BootstrapLayoutsPluginManager.php                                 
 ------ ---------------------------------------------------------------------- 
  56     Constructor of class                                                  
         Drupal\bootstrap_layouts\BootstrapLayoutsPluginManager has an unused  
         parameter $cache_backend.                                             
 ------ ---------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   src/Plugin/BootstrapLayouts/BootstrapLayoutsUpdateBase.php          
 ------ -------------------------------------------------------------------- 
  33     Call to deprecated function drupal_get_path():                      
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use              
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.  
  33     Call to deprecated function drupal_get_path():                      
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use              
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.  
 ------ -------------------------------------------------------------------- 

 [ERROR] Found 6 errors                                                         



Proposed resolution

  • Change from ^8 || ^9 to core_version_requirement: ^8 || ^9 || ^10 in the bootstrap_layouts.info.yml
  • Change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way

Remaining tasks

  • ➖ Change to ^8 || ^9 || ^10
  • ➖ This will ease the work on further drupal-check issues
  • ➖ Real physical testing with Drupal ~10

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Closing as duplicate.
Moving the conversion to
#3286322: Automated Drupal 10 compatibility fixes

rajab natshah’s picture

Status: Active » Closed (duplicate)