Problem/Motivation
Hello project maintainers,
This is an automated issue to help make this module compatible with Drupal 12.
Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD12" tag from the issue to stop the bot from posting updates.
The changes will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.
Proposed resolution
You have a few options for how to use this issue:
- Accept automated changes until this issue is closed
If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD12" tag is left on this issue, new changes will be posted periodically if new deprecation fixes are needed.
As the Drupal Rector project improves and is able to fix more deprecated API uses, the changes posted here will cover more of the deprecated API uses in the module.
Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.
- Leave open but stop new automated changes.
If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD12" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD12" tag.
- Close it and don't use it
If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated changes will be posted here.
If the issue is reopened, then new automated changes will be posted.
If you are using another issue(s) to work on Drupal 12 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.
Remaining tasks
Using the patches
- Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
- Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.
Using the merge request
- Review the merge request and test it.
- Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
- Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.
Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!
Providing feedback
If there are problems with one of the changes posted by the Project Update Bot, such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue. For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue.
Issue fork field_ipaddress_pgsql-3598219
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:
- 3598219-automated-drupal-12
changes, plain diff MR !4
- project-update-bot-only
changes, plain diff MR !3
Comments
Comment #2
project update bot commentedThis is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 12 Compatibility
According to the Upgrade Status module, even with these changes, this module is not yet compatible with Drupal 12.
Currently Drupal Rector, version dev-main, cannot fix all Drupal 12 compatibility problems.
Therefore, these changes did not update the
info.ymlfile for Drupal 12 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot to post additional Drupal 12 compatibility fixes as they become available in Drupal Rector.
Debug information
These packages were used to generate the fixes:
Comment #4
project update bot commentedThis is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 12 Compatibility
According to the Upgrade Status module, even with these changes, this module is not yet compatible with Drupal 12.
Currently Drupal Rector, version 1.0.0-beta1, cannot fix all Drupal 12 compatibility problems.
Therefore, these changes did not update the
info.ymlfile for Drupal 12 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot to post additional Drupal 12 compatibility fixes as they become available in Drupal Rector.
Debug information
These packages were used to generate the fixes:
Comment #5
wombatbuddy commentedComment #6
wombatbuddy commentedPlan
1. Set `core_version_requirement: '^11.2 || ^12'` in the module's `.info.yml` file.
2. Clean up the codebase by removing obsolete `.module` and `.install` files (converting hooks to the new Drupal 11/12 OOP Attribute-based system).
3. Add the `drupal/upgrade_status` module to the `require-dev` section of `composer.json` (as it supports Drupal 12).
4. Add `COMPOSER_LENIENT_ALLOWED_PROJECTS: 'feeds'` to `.gitlab-ci.yml` to prevent Feeds dependencies from failing on the Drupal 12 environment.
5. Use the Upgrade Status module to scan the codebase for any remaining Drupal 12 deprecations or compatibility issues.
6. Enable GitLab CI testing for Drupal 12 by adding `OPT_IN_TEST_NEXT_MAJOR: '1'` to the variables section. Remove `OPT_IN_TEST_CURRENT: '1'` since it is enabled by default in core templates.
7. Address any discovered deprecations, then run local and remote CI tests/checks.
8. Merge the changes into the `3.0.x` branch and create an initial `3.0.0-alpha1` release.
Comment #7
project update bot commentedThis is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 12 Compatibility
According to the Upgrade Status module, even with these changes, this module is not yet compatible with Drupal 12.
Currently Drupal Rector, version 1.0.0-beta7, cannot fix all Drupal 12 compatibility problems.
Therefore, these changes did not update the
info.ymlfile for Drupal 12 compatibility.The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.
Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot to post additional Drupal 12 compatibility fixes as they become available in Drupal Rector.
Debug information
These packages were used to generate the fixes:
Comment #8
wombatbuddy commentedIt turns out that the third-party library "s1lentium/iptools": "1.2.0" used by this module triggers the "Non-canonical Scalar Type Casts are Deprecated" issue in PHP 8.5, which causes the tests to fail. At the same time, Drupal 12 is expected to run on PHP 8.5. Since the library's repository appears to be abandoned, one option would be to fork it, apply a fix, and reference that fork in composer.json. It would also make sense to raise the minimum supported Drupal version to ^11.3 — this would allow running the tests on PHP 8.5 on both Drupal versions.
Comment #9
wombatbuddy commentedWe realized that using the Upgrade Status module is not necessary, since DDEV Drupal Contrib allows running the same checks:
ddev phpunit Run PHPUnit tests.
ddev nightwatch Run Nightwatch tests, requires DDEV Selenium Standalone Chrome.
ddev phpcs Run PHP_CodeSniffer.
ddev phpcbf Fix phpcs findings.
ddev phpstan. Run phpstan on project files.
ddev eslint Run ESLint on JavaScript files.
ddev stylelint Run Stylelint on CSS files.
Comment #10
wombatbuddy commentedComment #11
wombatbuddy commentedTo fix the issue (non-canonical (integer) cast deprecated in PHP 8.5) in the "s1lentium/iptools" library, I created a fork of its repository: https://github.com/wombatbuddy/IPTools
Also, due to the requirements described in "Managing dependencies for a contributed project", the library release needs to be published on Packagist.
Comment #12
wombatbuddy commentedA fixed fork of the IPTools library has been published on Packagist (https://packagist.org/packages/wombatbuddy/iptools) and is ready for use by the module.
Comment #13
wombatbuddy commentedSubmitted a pull request (https://github.com/S1lentium/IPTools/pull/53) with the PHP 8.5 deprecation fix for the original IPTools library repository.
Comment #17
wombatbuddy commentedComment #19
wombatbuddy commentedComment #20
wombatbuddy commentedDrupal 12 has raised the minimum required PostgreSQL version to 18
(previously 16 for Drupal 11):
https://www.drupal.org/about/core/blog/announcing-drupal-1200-platform-r...
The "phpunit (next major)" job (triggered via OPT_IN_TEST_NEXT_MAJOR: 1)
still provisions a PostgreSQL 16 service container while testing against
Drupal 12.0-dev. As a result, every functional test fails at the
installation step, because Drupal 12's installer correctly refuses to run
on a database version below its stated minimum.
I've opened an issue for this: PostgreSQL "next major" (Drupal 12) test jobs use PostgreSQL 16, but Drupal 12 requires PostgreSQL 18.