Prepare Drupal 10 compatibility (planned for August 2022).
Running drupal-check reports:
FILE: allowed_formats.info.yml
STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 0 Value of core_version_requirement: ^8.8 || ^9 is not
compatible with the next major version of Drupal core. See
https://drupal.org/node/3070687.
--------------------------------------------------------------------------------
FILE: composer.json
STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 0 The drupal/core requirement is not compatible with the next
major version of Drupal. Either remove it or update it to be
compatible. See
https://drupal.org/node/2514612#s-drupal-9-compatibility.
--------------------------------------------------------------------------------
Thank's
Thank you so much for the
Drupal Core team
Following with
Drupal 10.0.0 is coming soon. Help us test it today!
A snapshot to allow module and theme developers to test compatibility with the next major release. No upgrade path is provided between alpha releases and many additional changes will be included prior to 10.0.0.
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/drupal10allowed_formats
cd /var/www/html/sandboxes/drupal10allowed_formats/
composer require drupal/allowed_formats;
is having the following problem
Using version ^1.5 for drupal/allowed_formats
./composer.json has been updated
Running composer update drupal/allowed_formats
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/allowed_formats ^1.5 -> satisfiable by drupal/allowed_formats[1.5.0, 1.x-dev].
- drupal/allowed_formats[1.5.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/allowed_formats:*" to figure out if any version is installable, or "composer require drupal/allowed_formats:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
<code>
<hr />
<h4>Farther <strong><a href="https://github.com/mglaman/drupal-check">drupal-check</a></strong> on</h4>
<code>
composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9allowed_formats
cd /var/www/html/sandboxes/drupal9allowed_formats/
composer require drupal/allowed_formats
composer require drupal/core-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/allowed_formats/
Output:
allowed_formats--drupal-check--report.txt
------ ----------------------------------------------
Line allowed_formats.module
------ ----------------------------------------------
20 Call to an undefined method
Drupal\Core\Form\FormInterface::getEntity().
------ ----------------------------------------------
[ERROR] Found 1 error
Comments
Comment #2
victoria-marina commentedI'll work on this.
Comment #3
victoria-marina commentedHere is a patch. Kindly review it.
Comment #4
Guilherme Rabelo commentedI will review this patch.
Comment #5
s3b0un3tThank you @victoria-marina for your responsiveness.
I thought to provide a patch as soon as possible
Comment #6
Guilherme Rabelo commentedWhen i ran the drupal-check command after applying the patch, it didn't show any error messages. For this reason i believe that everything is right.
Moving to RTBC!
Comment #7
victoria-marina commentedHi! I just provided a new small patch to fix the test error.
Comment #8
victoria-marina commentedOne more small patch. The other problem happening on tests, unfortunately I don't know exactly how to solve it.
Comment #9
andregp commentedNeeds work (still has failing tests).
Comment #10
rajab natshahThank you so much for the Drupal Core team
Following with
Drupal 10.0.0 is coming soon. Help us test it today!
Drupal core 10.0.0-alpha4
Released May 06 2022
The current composer require status for this module under Drupal 10
is having the following problem
Comment #11
rassoni commentedComment #12
rassoni commentedFixed all issues Please review my patch.
I am sharing with you a screenshot of the result.
Comment #13
rassoni commentedComment #14
berdirThis is not about Drupal 10 compatibility, drupal-check now includes more strict phpstan checks and not only
d10 related issues. It could be kept if it's a small thing, but it either needs to be rewritten or the whole section inside would need to be indented.
I went back to #8 which has more fixes anyway and fixed the tests because on change is missing. The tools don't report on the subtle but important hook rename that this module relies on. That also means we require at least Drupal 9.2
Comment #15
luke.leberThe CR for the hook rename that #14 refers to: https://www.drupal.org/node/3180429.
Comment #16
Tauany Bueno commentedhi, i'll review it :)
Comment #17
Tauany Bueno commentedhi!
I reviewed the last patch and all it didn't show any warnings or errors.
The correction mentioned on #15 was already made on the patch. I believe everything is right, so I'm changing it to RTBC.
Comment #18
kristen polThanks for the patch and testing.
@tauanygb Did you test on Drupal 9 or 10 or both?
Comment #19
Tauany Bueno commented@Kristen Pol I tested it on a Drupal 9 environment, and ran drupal-check.
Comment #20
luke.leberAdditional +1 RTBC to #14. Manually tested against 10.0.x-dev and 9.5.x-dev; the patch and automated test results look great.
Comment #22
nord102Thank you all for the work on this issue. This has been committed to the dev version and will be included in the next release.
Comment #24
claudiu.cristea@nord102, could you, please, tag a new release to include this change?
Comment #25
nord102@claudiu.cristea
I have tagged a new release for this