Problem/Motivation
There are only two more functions I am aware of that must reside in .profile files, magic autoloading of .profile files can be the source of some very hard to find bugs.
There is a simple script to assist with converting the hooks in profiles and remaining functions can almost just be copy pasted.
We should deprecate the .profile file extension
Important to note: This is not about deprecating the Extension type of profile, just the procedural .profile files.
Steps to reproduce
N/A
Proposed resolution
Deprecate with a CR
Final fix is in #3623380: Create OOP replacement for hook_install_tasks and hook_install_tasks_alter
Remaining tasks
Check for .module extension files during hook collection.
Use the ExtensionFileIsConverted attribute core and contrib can use to skip deprecations.
Emit deprecations for any .module files without that attribute.
Identify documentation to update
Update general documentation
Add requirements check: #3587107: Add requirements check for deprecated .theme file extensions: Add requirements check for deprecated .profile file extensions
User interface changes
N/A
Introduced terminology
N/A
API changes
.profile files are deprecated
Data model changes
N/A
Release notes snippet
.profile file extensions have been deprecated, all code in .module files should be converted to classes. See https://www.drupal.org/node/3624829 for more guidance.
Comments
Comment #2
nicxvan commentedComment #3
nicxvan commented