Commit f598699
authored
Use FQCN in modResource and modUser (#16919)
### What does it do?
Replaces two remaining short `mod*` class name strings in core xPDO
calls with FQCN:
- `modResource::isPreviewable()` — `getObject('modResource', …)` →
`getObject(modResource::class, …)`
- `modUser::getResourceGroups()` —
`loadAttributes(['modAccessResourceGroup'], …)` →
`loadAttributes([modAccessResourceGroup::class], …)`
Earlier iterations that changed the schema or added `modX::loadClass()`
normalization were reverted per review feedback.
### Why is it needed?
MODX 3.0 deprecates short `mod*` class names in favor of PSR-4 FQCN.
These two core call sites still passed bare strings into xPDO, which
could trigger deprecation notices in the profiler. Fixing them at the
call site follows the intended v3.0 migration path without masking
warnings globally.
### How to test
1. Enable the profiler or deprecation log.
2. Exercise resource preview checks (`modResource::isPreviewable()`).
3. Exercise user resource group loading (`modUser::getResourceGroups()`,
used via `modResourceGroup::hasAccess()`).
4. Confirm no v3.0 short-class deprecation warnings from these paths.
### Related issue(s)/PR(s)
None.1 parent 6f6b755 commit f598699
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
1694 | | - | |
| 1694 | + | |
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
| 626 | + | |
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| |||
0 commit comments