Problem/Motivation

Drupal 10.0.0 stable was released on: 15 Dec 2022 by the Drupal core team
https://www.drupal.org/project/drupal/releases/10.0.0


Thank you so much!

The current composer require status for this module under Drupal 10

composer create-project drupal/recommended-project:~10 /var/www/html/sandboxes/drupal10advanced_text_formatter
cd  /var/www/html/sandboxes/drupal10advanced_text_formatter/
composer require drupal/advanced_text_formatter;

Having the following issues

Using version ^2.1 for drupal/advanced_text_formatter
./composer.json has been updated
Running composer update drupal/advanced_text_formatter
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/advanced_text_formatter ^2.1 -> satisfiable by drupal/advanced_text_formatter[2.1.0, 2.1.1].
    - drupal/advanced_text_formatter[2.1.0, ..., 2.1.1] 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.1 (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/advanced_text_formatter:*" to figure out if any version is installable, or "composer require drupal/advanced_text_formatter:^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/drupal9advanced_text_formatter

cd /var/www/html/sandboxes/drupal9advanced_text_formatter/

composer config minimum-stability dev

composer require drupal/advanced_text_formatter

composer require drupal/core-dev:~9 --dev --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/advanced_text_formatter/

Output:

3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------- 
  Line   advanced_text_formatter.module                                      
 ------ -------------------------------------------------------------------- 
  303    PHPDoc tag @param for parameter $form_state with type array is      
         incompatible with native type Drupal\Core\Form\FormStateInterface.  
 ------ -------------------------------------------------------------------- 


 [ERROR] Found 1 error                                                          

Thanks for using drupal-check!

Consider sponsoring the development of the maintainers which make drupal-check possible:

- phpstan (ondrejmirtes): https://github.com/sponsors/ondrejmirtes
- phpstan-deprecation-rules (ondrejmirtes)): https://github.com/sponsors/ondrejmirtes
- phpstan-drupal (mglaman)): https://github.com/sponsors/mglaman
- drupal-check (mglaman)): https://github.com/sponsors/mglaman

Proposed resolution

  • Apply #3286004: Automated Drupal 10 compatibility fixes
  • Change to core_version_requirement: ^8 || ^9 || ^10 in the advanced_text_formatter.info.yml on the 2.1.x branch. Better to have a new branch in case of dropping support for Drupal 8 . like 3.0.x only with core_version_requirement: ^9 || ^10
  • Change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
  • Release Advanced Text Formatter 2.1.2

Remaining tasks

  • ➖ Change to core_version_requirement: ^8 || ^9 || ^10 in the advanced_text_formatter.info.yml file
  • ➖ 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
Command icon 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

    Rajab Natshah created an issue. See original summary.

    rajab natshah’s picture

    Issue summary: View changes
    rajab natshah’s picture

    rajab natshah’s picture

    Issue summary: View changes
    StatusFileSize
    new1.48 KB

    Further drupal-check on

    composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9advanced_text_formatter
    
    cd /var/www/html/sandboxes/drupal9advanced_text_formatter/
    
    composer require drupal/advanced_text_formatter
    
    composer require drupal/core-dev --dev --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/advanced_text_formatter/
    

    Output:

    advanced_text_formatter--drupal-check--report.txt

     ------ -------------------------------------------------------------------- 
      Line   advanced_text_formatter.module                                      
     ------ -------------------------------------------------------------------- 
      303    PHPDoc tag @param for parameter $form_state with type array is      
             incompatible with native type Drupal\Core\Form\FormStateInterface.  
     ------ -------------------------------------------------------------------- 
    
     ------ ----------------------------------------------------------- 
      Line   src/Plugin/Field/FieldFormatter/AdvancedTextFormatter.php  
     ------ ----------------------------------------------------------- 
      276    Access to an undefined property                            
             Drupal\Core\TypedData\TypedDataInterface::$value.          
      285    Call to an undefined method                                
             Drupal\Core\TypedData\TypedDataInterface::getLangcode().   
      302    Access to an undefined property                            
             Drupal\Core\TypedData\TypedDataInterface::$format.         
      302    Call to an undefined method                                
             Drupal\Core\TypedData\TypedDataInterface::getLangcode().   
      319    Call to an undefined method                                
             Drupal\Core\TypedData\TypedDataInterface::getLangcode().   
     ------ ----------------------------------------------------------- 
    
     [ERROR] Found 6 errors                                                         
    
    
    
    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

    Issue summary: View changes
    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

    rajab natshah’s picture

    Issue summary: View changes
    Status: Active » Needs review
    Related issues: +#3286004: Automated Drupal 10 compatibility fixes
    rajab natshah’s picture

    Status: Needs review » Closed (duplicate)