Skip to content

docs(getservice): mark getService deprecated, document $modx->services - #615

Merged
Ibochkarev merged 1 commit into
modxorg:3.xfrom
Ibochkarev:docs/issue-449-getservice-deprecated
Sep 3, 2026
Merged

docs(getservice): mark getService deprecated, document $modx->services#615
Ibochkarev merged 1 commit into
modxorg:3.xfrom
Ibochkarev:docs/issue-449-getservice-deprecated

Conversation

@Ibochkarev

Copy link
Copy Markdown
Collaborator

Description

$modx->getService() is deprecated in 3.x. xPDO phpdoc (and PhpStorm) still say it will be removed in 3.1. That did not happen. Mark Hamstra noted on the issue that the method stays because core and extras still call it.

The getService page now states the deprecation, keeps the old examples (they still run), and shows the 3.x replacement: $modx->services->has() / add() / get(), including the modError pattern from modxcms/revolution#15807. Upgrade index, class-names, Services, and DI container pages point at the same thing.

Checked against Revolution origin/3.x: xPDO::getService() (@deprecated … Will be removed in 3.1), modX::$services, modX::runProcessor().

Affected versions

3.x

Relevant issues

Fixes #449

PhpStorm warns about a 3.1 removal from xPDO phpdoc. The method is
still in 3.x and the core still uses it. Point extras at the DI
container. Fixes modxorg#449.
@Ibochkarev
Ibochkarev requested a review from Mark-H August 18, 2026 01:30
@Ibochkarev
Ibochkarev merged commit 955fd5e into modxorg:3.x Sep 3, 2026
2 checks passed
@Ibochkarev
Ibochkarev deleted the docs/issue-449-getservice-deprecated branch September 3, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue on extending-modx/modx-class/reference/modx.getservice

1 participant