-
Notifications
You must be signed in to change notification settings - Fork 156
Description
The Craft 2 plugin development documentation included information about Models, Records and Controllers which is no longer contained at all in the Craft 3 docs.
The current upgrade guide only mentions a very vague reference back to the Yii documentation for all of these concepts, without any specific instruction on how to port plugins that used them in Craft 2:
See its comprehensive upgrade guide to learn about how things have changed under the hood.
Considering the big changes (e.g. using actual PHP attributes instead of defineAttributes() on models), this really hinders efforts to migrate plugins to Craft 3. It also led me to believe that Models and Records were no longer supported classes for Craft 3 plugins, until I delved into official P&T plugins like Digital Products to notice that they are indeed still used! This has us piecing up classes from the Craft 2 docs, Yii 2 upgrade docs, and reverse engineering... Far from ideal.
Here's the current table of core classes that are documented, which I'm making partly for myself to keep navigate through the upgrade process...
| Craft 2 | Craft 3 | Craft Update Notes | Yii Update Notes |
|---|---|---|---|
| Models | Missing | Missing | Models |
| Records | Missing | DB Queries | Active Record |
| Controllers | Missing | (Multiple) | Controllers |
| Element Actions | Element Actions | Missing | N/A |
| Dashboard Widgets | Widget Types | Missing | N/A |
| Field Types | Field Types | Components | N/A |
| Services | Services | Missing | N/A |
| Template Variables | Extending Twig | Template Variables | N/A |
Is there an update planned for the core Models/Records/Controllers documentation, along with examples of how to create and use them in Craft 3?