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/drupal10anchor_link
cd /var/www/html/sandboxes/drupal10anchor_link/
composer require drupal/anchor_link;
is having the following problem
Using version ^2.5 for drupal/anchor_link
./composer.json has been updated
Running composer update drupal/anchor_link
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/anchor_link 2.x-dev is an alias of drupal/anchor_link dev-2.x and thus requires it to be installed too.
- drupal/anchor_link[dev-2.x, 2.5.0] require drupal/fakeobjects ^1.0 -> satisfiable by drupal/fakeobjects[1.0.0, 1.1.0, 1.x-dev].
- drupal/fakeobjects 1.0.0 requires drupal/core ^8 -> found drupal/core[8.0.0-beta6, ..., 8.9.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.
- drupal/fakeobjects[1.1.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.
- Root composer.json requires drupal/anchor_link ^2.5 -> satisfiable by drupal/anchor_link[2.5.0, 2.x-dev (alias of dev-2.x)].
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/anchor_link:*" to figure out if any version is installable, or "composer require drupal/anchor_link:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9anchor_link
cd /var/www/html/sandboxes/drupal9anchor_link/
composer config minimum-stability dev
composer require drupal/anchor_link:1.x-dev
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/anchor_link/
Output:
4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------------------
Line src/Plugin/CKEditorPlugin/AnchorLink.php
------ --------------------------------------------------------------------
23 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.
56 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.
60 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.
64 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.
------ --------------------------------------------------------------------
------ --------------------------------------------------------------------
Line src/Plugin/CKEditorPlugin/FakeObjects.php
------ --------------------------------------------------------------------
24 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.
------ --------------------------------------------------------------------
------ -----------------------------------------------------------------------
Line src/Plugin/Linkit/Matcher/CKEditorAnchorLinkMatcher.php
------ -----------------------------------------------------------------------
18 Class
Drupal\anchor_link\Plugin\Linkit\Matcher\CKEditorAnchorLinkMatcher
extends unknown class Drupal\linkit\MatcherBase.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
24 Instantiated class Drupal\linkit\Suggestion\SuggestionCollection not
found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
28 Instantiated class Drupal\linkit\Suggestion\DescriptionSuggestion not
found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
29 Call to an undefined method
Drupal\anchor_link\Plugin\Linkit\Matcher\CKEditorAnchorLinkMatcher::t
().
29 Call to method setLabel() on an unknown class
Drupal\linkit\Suggestion\DescriptionSuggestion.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
31 Call to an undefined method
Drupal\anchor_link\Plugin\Linkit\Matcher\CKEditorAnchorLinkMatcher::t
().
33 Call to method addSuggestion() on an unknown class
Drupal\linkit\Suggestion\SuggestionCollection.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -----------------------------------------------------------------------
[ERROR] Found 12 errors
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
- Support Drupal ~10 and change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
- Real physical testing with Drupal ~10
- Automated upgrade to Drupal ~10
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ➖ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ➖ Documentation
- ✅ Code review by maintainers
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Release notes snippet
- ✅ Release anchor_link-1.10.0 , anchor_link-2.6.0
API changes
Data model changes
Release notes snippet
- Issue #3277445 by Rajab Natshah: Support Drupal 10 and update all use of deprecation in the CKEditor Anchor Link module
Comments
Comment #2
rajab natshahComment #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshahComment #9
rajab natshahComment #10
rajab natshahComment #11
rajab natshahComment #12
rajab natshahComment #13
rajab natshahFurther drupal-check on
Comment #14
rajab natshahComment #15
rajab natshahComment #16
rajab natshahComment #17
rajab natshahComment #18
rassoni commentedComment #19
rassoni commentedVersion 3.0.x-dev branch not generating any issue.
Please check image for reference.
Comment #20
rassoni commentedComment #21
rajab natshahNo change to code was proposed.
Back to Needs work
Comment #22
rajab natshahComment #23
rajab natshahComment #24
rajab natshahComment #25
rajab natshahComment #26
rajab natshahComment #27
rajab natshahComment #28
rajab natshah✅ Released anchor_link-1.10.0
At this time hoping to have
Works with Drupal: ^8 || ^9 || ^10and
Works with CKEditor: 4Comment #29
rajab natshahComment #30
rajab natshahKevin had a commit for CKEditor FakeObjects module to support Drupal 10
#3287457: Automated Drupal 10 compatibility fixes
Comment #33
rajab natshahHad a Real physical testing round for CKEditor Anchor Link with CKEditor FakeObjects
Using the following bash commands
Real physical testing round for CKEditor Anchor Link with CKEditor FakeObjects.zip
For
8.x-1.xbranch with Drupal ~9.08.x-2.xbranch with Drupal ~9.0 + CKEditor FakeObjects8.x-1.xbranch8.x-1.xbranch with Drupal ~10.08.x-2.xbranch with Drupal ~10.0 + CKEditor FakeObjects8.x-1.xbranchComment #34
rajab natshahFakeobjects 8.x-1.2 was released on: 26 Jan 2023 by: kevinquillen
https://www.drupal.org/project/fakeobjects/releases/8.x-1.2
Thanks, Kevin
Comment #35
rajab natshahComment #36
rajab natshahComment #37
rajab natshahphpcs --standard=Drupal
rajab@vardot-dev:/var/www/html/products/anchor_link$ phpcs --standard=Drupal --extensions=php,inc,install,test,profile,theme,css,info,txt,md,yml,js /var/www/html/products/anchor_linkphpcs --standard=DrupalPractice
rajab@vardot-dev:/var/www/html/products/anchor_link$ phpcs --standard=DrupalPractice --extensions=php,inc,install,test,profile,theme,css,info,txt,md,yml,js /var/www/html/products/anchor_linkComment #38
rajab natshahComment #39
rajab natshahHad a Real physical testing round for CKEditor Anchor Link with CKEditor FakeObjects
Using the following bash commands
bash FRPTR-d10-anchor_link-8-x-2-x.sh ; bash FRPTR-d9-anchor_link-8-x-2-x.sh ;fromReal physical testing round for CKEditor Anchor Link with CKEditor FakeObjects.zip
For
8.x-2.xbranch with Drupal ~9.0 + CKEditor FakeObjects8.x-1.2branch8.x-2.xbranch with Drupal ~10.0 + CKEditor FakeObjects8.x-1.2branchComment #40
rajab natshahComment #41
rajab natshah✅ Released anchor_link-2.6.0