[TASK] Deprecate AbstractService
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Deprecation-94313-ClassAbstractService.rst
1 .. include:: ../../Includes.txt
2
3 ===========================================
4 Deprecation: #94313 - AbstractService class
5 ===========================================
6
7 See :issue:`94313`
8
9 Description
10 ===========
11
12 The :php:`TYPO3\CMS\Core\Service\AbstractService` class is part of the ancient
13 `Service API <https://docs.tyexpectpo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Services/Developer/ServiceApi.html>`__.
14 This API did not really prevail, except it's usage for the authentication process.
15
16 Since the authentication service related functionality was already
17 decoupled over the last years, the :php:`AbstractService` got finally
18 unused in Core since :issue:`88646`. Therefore it has now been marked
19 as deprecated.
20
21 Impact
22 ======
23
24 Extending this class does *not* raise a deprecation error level log entry.
25 The class contains only a `@deprecated` class annotation. Extension classes
26 can still extend this class in v11 without impact, it will raise a PHP fatal
27 error in v12, when the class is dropped.
28
29
30 Affected Installations
31 ======================
32
33 As mentioned, the Service API never found many usages in casual extensions.
34 It is therefore pretty unlikely that well maintained projects are affected.
35 The extension scanner will find any class usages as a strong match.
36
37 Migration
38 =========
39
40 Remove any usage of this class in your extension. In case you currently
41 extend :php:`AbstractService` for use in an authentication service, which
42 might be the most common scenario, you have to change your service class
43 to extend from :php:`AbstractAuthenticationService` instead.
44
45 In case you currently extend :php:`AbstractService` for another kind of
46 service, which is rather unlikely, you have to implement the necessary
47 methods in your service class yourself. Please see `Service Implementation
48 <https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Services/Developer/ServiceApi.html#service-implementation>`__
49 for more details about the required methods. However, even better would be to
50 completely migrate away from the Service API (look for :php:`GeneralUtility::makeInstanceService()`),
51 since the core will deprecate these related methods as well.
52
53 .. index:: PHP-API, FullyScanned, ext:core