Drupal 10 compatibility
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3269869. -->
Reported by: [s3b0un3t](https://www.drupal.org/user/2989133)
>>>
<p>Prepare Drupal 10 compatibility (planned for August 2022).</p>
<p>Running drupal-check reports:</p>
<pre>FILE: allowed_formats.info.yml<br><br>STATUS LINE MESSAGE <br>--------------------------------------------------------------------------------<br>Check manually 0 Value of core_version_requirement: ^8.8 || ^9 is not <br> compatible with the next major version of Drupal core. See <br> https://drupal.org/node/3070687. <br>--------------------------------------------------------------------------------<br><br>FILE: composer.json<br><br>STATUS LINE MESSAGE <br>--------------------------------------------------------------------------------<br>Check manually 0 The drupal/core requirement is not compatible with the next <br> major version of Drupal. Either remove it or update it to be<br> compatible. See <br> https://drupal.org/node/2514612#s-drupal-9-compatibility. <br>--------------------------------------------------------------------------------</pre><p>Thank's</p>
<hr>
<blockquote><h2><a href="https://www.drupal.org/about/core/policies/core-release-cycles/schedule#drupal-10">Drupal 10.0 development</a></h2>
</blockquote>
<hr>
Thank you so much for the <strong>Drupal Core</strong> team
<p> Following with </p>
<div class="view view-project-downloads view-id-project_downloads view-display-id-recommended">
<div class="attachment attachment-after">
<div class="view view-project-downloads view-id-project_downloads view-display-id-prereleases">
<div class="view-content">
<div class="views-row views-row-1 views-row-odd views-row-first">
<div class="views-row views-row-1 views-row-odd views-row-first">
<div>
<h3>Drupal 10.0.0 is coming soon. Help us test it today!</h3>
</div>
<div class="views-field views-field-field-release-version">
<div class="field-content"><a href="https://www.drupal.org/project/drupal/releases/10.0.0-alpha4">
<h4>Drupal core 10.0.0-alpha4</h4>
<p> <span class="release-date">Released May 06 2022</span><br>
</p></a></div>
</div>
<div class="views-field views-field-field-release-short-description">
<div class="field-content">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.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<p>The current composer require status for this module under Drupal 10</p>
<pre>composer create-project drupal/recommended-project:10.0.0-alpha4@alpha /var/www/html/sandboxes/drupal10allowed_formats<br>cd /var/www/html/sandboxes/drupal10allowed_formats/<br><br>composer require drupal/allowed_formats;</pre><p>
is having the following problem</p>
<pre>Using version ^1.5 for drupal/allowed_formats<br>./composer.json has been updated<br>Running composer update drupal/allowed_formats<br>Loading composer repositories with package information<br>Updating dependencies<br>Your requirements could not be resolved to an installable set of packages.<br><br> Problem 1<br> - Root composer.json requires drupal/allowed_formats ^1.5 -> satisfiable by drupal/allowed_formats[1.5.0, 1.x-dev].<br> - 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.<br><br>Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.<br>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.<br><br>Installation failed, reverting ./composer.json and ./composer.lock to their original content.<br><code><br><br><hr /><br><h4>Farther <strong><a href="https://github.com/mglaman/drupal-check">drupal-check</a></strong> on</h4><br><br><code><br>composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9allowed_formats<br><br>cd /var/www/html/sandboxes/drupal9allowed_formats/<br><br>composer require drupal/allowed_formats<br><br>composer require drupal/core-dev --with-all-dependencies<br>composer require mglaman/drupal-check --dev<br>composer require phpspec/prophecy-phpunit:^2 --dev <br><br>php vendor/bin/drupal-check -d web/modules/contrib/allowed_formats/</pre><blockquote><h4>Output: </h4>
<p><a href="https://www.drupal.org/files/issues/2022-05-11/allowed_formats--drupal-check--report.txt">allowed_formats--drupal-check--report.txt</a></p>
<pre> ------ ---------------------------------------------- <br> Line allowed_formats.module <br> ------ ---------------------------------------------- <br> 20 Call to an undefined method <br> Drupal\Core\Form\FormInterface::getEntity(). <br> ------ ---------------------------------------------- <br><br><br> [ERROR] Found 1 error </pre></blockquote>
issue