Moodle Plugins directory: Class aliases: Versions: 2.1 | Moodle.org
Class aliases
Class aliases 2.1
Class Aliases
This is intended for development purposes only. Do not use on Production sites; it's not needed.
Moodle has started namespacing lots of old classes using the class_alias function.
Trouble is VSCode doesn't recognise these class aliases as they are only parsed at runtime (apparently this isn't a problem in PHPStorm), this will mean that VSCode will red-underline these classes.
To work-around this, this plugin uses "extends" to map the old class name with the new one. It isn't intended for the code to see these extends, so they are simply listed in a file that is not read. VScode will pick up on the extends and won't show the red underline anymore.
Eventually, these class_alias mappings will be dropped, so do migrate any instances you find in your code, rather than relying on this mapping.
Version information
- Version build number
- 2025092901
- Version release name
- 2.1
- Maturity
- Version stable
- MD5 Sum
- 64316a690760d4512bde1e61c821f540
- Supported software
- Moodle 5.1
- Latest release for Moodle 5.1
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
- VCS tag
- v2.1
Default installation instructions for plugins of the type Local plugins
- Make sure you have all the required versions.
- Download and unpack the module.
- Place the folder in the "local" subdirectory.
- Visit http://yoursite.com/admin to finish the installation.