Problem/Motivation
Currently, there is no automated testing through DrupalCI enabled. If there was, we'd also see that there are numerous PHPCS failures as well. This issue should focus on resolving these failures to get DrupalCI running on all commits and submitted changes for clean output moving forward.
Steps to reproduce
Any of the following actions demonstrate the issues this issues seeks to fix:
- Run PHPCS with Drupal standards on the Patternkit module folder
- Run available Functional, Kernel, and Unit tests in the Patternkit module and note deprecation warnings
- Attempt to install and run with minimum specified PHP and Drupal core version requirements
Proposed resolution
The overall solution for this issue aims to bring the module's specifications up to date, narrow the scope of supported versions and platform requirements, and address baseline coding standards and expectations for existing code to prepare for ongoing enhancements.
I propose addressing these issues through the following actions:
- Fix all reported PHPCS warnings using the Drupal and DrupalPractice coding standards
- Ensure all existing automated tests pass successfully
- Drop support for Drupal 8 to ease ongoing maintenance and address of deprecations
- Bump minimum PHP version requirement to v7.4 to match minimum support of current stable core release (9.4)
- Embrace PHP 7.4 features by adding property and parameter type hinting where possible
- Update composer.json dependencies to reflect current requirements
- Configure automated testing for the Patternkit module using current requirements and future core versions
Remaining tasks
- Needs code review
- Needs manual testing
- Draft and publish release notes
- Draft and publish change records
User interface changes
None.
API changes
- Most function signatures now enforce type hinting for expected parameters and return types where possible.
- Most class properties have assigned type hinting where possible.
Data model changes
None.
Release notes snippet
Dropping Drupal 8 support
Since Drupal 8 has reached end of life, we've dropped support for it to ease ongoing maintenance and the addressing of deprecations. Starting with release 9.1-Beta4, the minimum supported version of Drupal core is Drupal 9.
Minimum PHP version is now 7.4
Starting with the 9.1-Beta4 release of Patternkit, the minimum supported version of PHP is v7.4. This aligns with PHP v7.3 having reached end of life, and Drupal core dropping support for it beginning with the 9.4 release.
Issue fork patternkit-3293210
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
Comment #3
sluceroComment #4
sluceroComment #5
sluceroReady for review and manual testing.
Comment #6
sluceroComment #10
sluceroMerged for inclusion in the beta 4 release.
Comment #11
sluceroThe change records for this issue being merged have been published:
Comment #12
sluceroThe fix for this deprecation resulted in lost support for Drupal < 9.4 as described in #3295521: Call to undefined method Drupal\Core\Extension\ModuleHandler::hasImplementations() for Drupal 9 < 9.4. As such, I've rolled back that specific change and follow up work will have to resolve it more completely.