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

composer config minimum-stability dev

composer config repositories.assets composer https://asset-packagist.org
composer config --json extra.installer-types '["npm-asset", "bower-asset"]'
composer config --json extra.installer-paths.web\/libraries\/ace '["npm-asset/ace-builds"]'
composer config --unset extra.installer-paths.web\/libraries\/\{\$name\}
composer config --json extra.installer-paths.web\/libraries\/\{\$name\} '["type:drupal-library", "type:bower-asset", "type:npm-asset"]'

composer require drupal/ace_editor;


is having the following problem

Using version ^1.3 for drupal/ace_editor
./composer.json has been updated
Running composer update drupal/ace_editor
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/ace_editor ^1.3 -> satisfiable by drupal/ace_editor[1.3.0, 1.x-dev].
    - drupal/ace_editor[1.3.0, ..., 1.x-dev] require drupal/core ^8.8 || ^9 -> found drupal/core[8.8.0-alpha1, ..., 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/ace_editor:*" to figure out if any version is installable, or "composer require drupal/ace_editor:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Proposed resolution

  • Add a 2.0.x branch
  • Change to core_version_requirement: ^8.8 || ^9 || ^10 in the ace_editor.info.yml file
  • Release a 2.0.x-dev development version
  • Change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way

Further drupal-check on

cd /var/www/html/sandboxes/drupal10ace_editor

composer config minimum-stability dev

composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev 

Output:

ace_editor--drupal-check--report.txt

Remaining tasks

  • ✅ Add a 2.0.x branch
  • ✅ Change to core_version_requirement: ^8.8 || ^9 || ^10 in the ace_editor.info.yml file
  • ✅ Release a 2.0.x-dev development version
  • ✅ This will ease the work on further issues
  • ✅ Real physical testing with Drupal ~10
  • drupal-check on the code
  • ✅ Testing to ensure no regression
  • ✅ Full testing and approval
  • ➖ Automated functional testing coverage

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Issue fork ace_editor-3279534

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

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
interdruper’s picture

2.0.x-dev release created. Tests & patches are welcome. Thanks @rajab-natshah for the initiative.

rajab natshah’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Issue summary: View changes
Issue tags: +Drupal 10 compatibility

Thanks, Gonzalo :)

Works with Drupal: ^8.8 || ^9 || ^10

$ composer require 'drupal/ace_editor:2.0.x-dev@dev'

Following on more real physical testing with Drupal ~10

composer create-project drupal/recommended-project:10.0.0-alpha4@alpha /var/www/html/sandboxes/drupal10ace_editor

cd /var/www/html/sandboxes/drupal10ace_editor/

composer config repositories.assets composer https://asset-packagist.org
composer config --json extra.installer-types '["npm-asset", "bower-asset"]'
composer config --json extra.installer-paths.web\/libraries\/ace '["npm-asset/ace-builds"]'
composer config --unset extra.installer-paths.web\/libraries\/\{\$name\}
composer config --json extra.installer-paths.web\/libraries\/\{\$name\} '["type:drupal-library", "type:bower-asset", "type:npm-asset"]'

composer require 'drupal/ace_editor:2.0.x-dev@dev'

Further drupal-check on the code and behaviors

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

Status: Active » Needs review
rajab natshah’s picture

Issue summary: View changes

Further drupal-check on

cd /var/www/html/sandboxes/drupal10ace_editor

composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev 

php vendor/bin/drupal-check -d web/modules/contrib/ace_editor/

 5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ --------------------------------------------------------------------- 
  Line   ace_editor.module                                                    
 ------ --------------------------------------------------------------------- 
  20     Function drupal_get_path not found.                                  
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
  21     Function drupal_get_path not found.                                  
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------- 
  Line   src/Plugin/Field/FieldFormatter/AceFormatter.php   
 ------ --------------------------------------------------- 
  94     Undefined variable: $this                          
  211    Access to an undefined property                    
         Drupal\Core\TypedData\TypedDataInterface::$value.  
 ------ --------------------------------------------------- 

 [ERROR] Found 4 errors                                                         

Thanks for using drupal-check!

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new1.2 KB
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

interdruper’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Thank you, Gonzalo for the new branch and support.
Hoping for a tag release. To speed up further testing.
Tested the 2.0.x-dev development branch before.
#3331798: Release ACE Code Editor 2.0.0-alpha1 to work with Drupal 10

rajab natshah’s picture