-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathdeprecation-index.yml
270 lines (270 loc) · 15.1 KB
/
deprecation-index.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
'drupal_set_message()':
Rector: DrupalSetMessageRector.php
PHPStan: 'Call to deprecated function drupal_set_message(). Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\Core\Messenger\MessengerInterface::addMessage() instead.'
Examples:
- drupal_set_message.php
- DrupalSetMessageStatic.php
- DrupalSetMessageWithTrait.php
'Drupal::entityManager()':
Rector: EntityManagerRector.php
PHPStan: 'Call to deprecated method entityManager() of class Drupal. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal::entityTypeManager() instead in most cases. If the needed method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the deprecated \Drupal\Core\Entity\EntityManager to find the correct interface or service.'
Examples:
- entity_manager.php
- EntityManagerStatic.php
'ControllerBase::entityManager()':
Rector: EntityManagerRector.php
PHPStan: 'Call to deprecated method entityManager() of class Drupal\Core\Controller\ControllerBase. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Most of the time static::entityTypeManager() is supposed to be used instead.'
Examples:
- EntityManagerController.php
'db_insert()':
Rector: DBInsertRector.php
PHPStan: 'Call to deprecated function db_insert(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call insert() on it. For example,'
Examples:
- db_insert.php
- DBInsertStatic.php
'db_select()':
Rector: DBSelectRector.php
PHPStan: 'Call to deprecated function db_select(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call select() on it. For example,'
Examples:
- db_select.php
- DBSelectStatic.php
'db_query()':
Rector: DBQueryRector.php
PHPStan: 'Call to deprecated function db_query(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call query() on it. For example,'
Examples:
- db_query.php
- DBQueryStatic.php
'db_delete()':
Rector: DBDeleteRector.php
PHPStan: 'Call to deprecated function db_delete(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call delete() on it. For example,'
Examples:
- db_delete.php
- DBDeleteStatic.php
'db_update()':
Rector: DBUpdateRector.php
PHPStan: 'Call to deprecated function db_update(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container and call update() on it. For example,'
Examples:
- db_update.php
- DBUpdateStatic.php
'file_prepare_directory()':
Rector: FilePrepareDirectoryRector.php
PHPStan: 'Call to deprecated function file_prepare_directory(). Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::prepareDirectory().'
Examples:
- file_prepare_directory.php
- FilePrepareDirectoryStatic.php
'file_scan_directory()':
Rector: FileScanDirectoryRector.php
PHPStan: 'Call to deprecated function file_scan_directory(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::scanDirectory() instead.'
Examples:
- file_scan_directory.php
- FileScanDirectoryStatic.php
'BrowserTestBase::getMock()':
Rector: BrowserTestBaseGetMock.php
PHPStan: 'Call to deprecated method getMock() of class Drupal\Tests\BrowserTestBase. Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.'
Examples:
- BrowserTestBaseGetMock.php
'KernelTestBase::getMock()':
Rector: KernelTestBaseGetMock.php
PHPStan: 'Call to deprecated method getMock() of class Drupal\KernelTests\KernelTestBase. Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.'
Examples:
- KernelTestBaseGetMock.php
'UnitTestCase::getMock()':
Rector: UnitTestCaseGetMock.php
PHPStan: 'Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase. Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.'
Examples:
- UnitTestCaseGetMock.php
'Drupal::url()':
Rector: DrupalURLRector.php
PHPStan: 'Call to deprecated method url() of class Drupal. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Instead create a \Drupal\Core\Url object directly, for example using Url::fromRoute().'
Examples:
- url.php
- DrupalURLStatic.php
'format_date()':
Rector: FormatDateRector.php
PHPStan: 'Call to deprecated function format_date(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal::service(''date.formatter'')->format().'
Examples:
- format_date.php
- FormatDateStatic.php
'Unicode::strlen()':
Rector: UnicodeStrtolowerRector.php
PHPStan: 'Call to deprecated method strlen() of class Drupal\Component\Utility\Unicode. Deprecated in drupal:8.6.0 and is removed from drupal:9.0.0. Use mb_strlen() instead.'
Examples:
- unicode_strlen.php
'Unicode::strtolower()':
Rector: UnicodeStrtolowerRector.php
PHPStan: 'Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode. Deprecated in drupal:8.6.0 and is removed from drupal:9.0.0. Use mb_strtolower() instead.'
Examples:
- unicode_strtolower.php
- UnicodeStrtolowerStatic.php
'Unicode::substr()':
Rector: UnicodeStrtolowerRector.php
PHPStan: 'Call to deprecated method substr() of class Drupal\Component\Utility\Unicode. Deprecated in drupal:8.6.0 and is removed from drupal:9.0.0. Use mb_substr() instead.'
Examples:
- unicode_substr.php
'FILE_CREATE_DIRECTORY':
Rector: FileCreateDirectoryRector.php
PHPStan: 'Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.'
Examples:
- file_create_directory.php
- FileCreateDirectoryNoUseStatement.php
'FILE_EXISTS_REPLACE':
Rector: FileExistsReplaceRector.php
PHPStan: 'Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.'
Examples:
- file_exists_replace.php
- FileExistsReplaceNoUseStatement.php
'FILE_EXISTS_RENAME':
Rector: FileExistsRenameRector.php
PHPStan: 'Call to deprecated constant FILE_EXISTS_RENAME: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::EXISTS_RENAME.'
Examples:
- file_exists_rename.php
- FileExistsRenameNoUseStatement.php
'FILE_MODIFY_PERMISSIONS':
Rector: FileModifyPermissionsRector.php
PHPStan: 'Call to deprecated constant FILE_MODIFY_PERMISSIONS: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::MODIFY_PERMISSIONS.'
Examples:
- file_modify_permissions.php
- FileModifyPermissionsNoUseStatement.php
'Drupal::l()':
Rector: DrupalLRector.php
PHPStan: 'Call to deprecated method l() of class Drupal. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Link::fromTextAndUrl() instead.'
Examples:
- drupal_l.php
- DrupalLStatic.php
'LinkGeneratorTrait::l()':
Rector: LinkGeneratorTraitLRector.php
PHPStan: '\LinkGeneratorTrait::l() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Link::fromTextAndUrl() instead. See https://www.drupal.org/node/2614344.'
Examples:
- LinkGeneratorLWithTrait.php
'drupal_render()':
Rector: DrupalRenderRector.php
PHPStan: 'Call to deprecated function drupal_render(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the'
Examples:
- DrupalRenderStatic.php
- drupal_render.php
'drupal_render_root()':
Rector: DrupalRenderRootRector.php
PHPStan: 'Call to deprecated function drupal_render_root(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Render\RendererInterface::renderRoot() instead.'
Examples:
- DrupalRenderRootStatic.php
- drupal_render_root.php
'file_unmanaged_save_data()':
Rector: FileUnmanagedSaveDataRector.php
PHPStan: 'Call to deprecated function file_unmanaged_save_data(). Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::saveData().'
Examples:
- file_unmanaged_save_data.php
- FileUnmanagedSaveDataStatic.php
'REQUEST_TIME':
Rector: RequestTimeConstRector.php
PHPStan: 'Call to deprecated const REQUEST_TIME. Deprecated in drupal:8.3.0 and is removed from drupal:10.0.0. Use Drupal::time()->getRequestTime().'
Examples:
- request_time_const.php
'entity_get_display()':
Rector: EntityGetDisplayRector.php
PHPStan: 'Call to deprecated function entity_get_display(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use EntityDisplayRepositoryInterface::getViewDisplay() instead.'
Examples:
- entity_get_display.php
- EntityGetDisplayStatic.php
'entity_get_form_display()':
Rector: EntityGetFormDisplayRector.php
PHPStan: 'Call to deprecated function entity_get_form_display(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use EntityDisplayRepositoryInterface::getFormDisplay() instead.'
Examples:
- entity_get_form_display.php
- EntityGetFormDisplayStatic.php
'file_default_scheme()':
Rector: FileDefaultSchemeRector.php
PHPStan: 'Call to deprecated function file_default_scheme(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal::config(''system.file'')->get(''default_scheme'') instead.'
Examples:
- file_default_scheme.php
- FileDefaultSchemeStatic.php
'EntityInterface:urlInfo()':
Rector: EntityInterfaceUrlInfoRector.php
PHPStan: 'Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\Entity\EntityInterface::toUrl() instead.'
Examples:
- entity_interface_url_info.php
'EntityInterface:link()':
Rector: EntityInterfaceLinkRector.php
PHPStan: 'Call to deprecated method link() of class Drupal\Core\Entity\EntityInterface. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\EntityInterface::toLink()->toString() instead.'
Examples:
- entity_interface_link.php
'entity_load()':
Rector: EntityLoadRector.php
PHPStan: 'Call to deprecated function entity_load(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the entity type storage''s load() method.'
Examples:
- entity_load.php
'entity_view()':
Rector: EntityViewRector.php
PHPStan: 'Use the entity view builder''s view() method for creating a render array'
Examples:
- entity_view.php
'node_load()':
Rector: NodeLoadRector.php
PHPStan: 'Call to deprecated function node_load(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\node\Entity\Node::load().'
Examples:
- node_load.php
'file_load()':
Rector: FileLoadRector.php
PHPStan: 'Call to deprecated function file_load(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\file\Entity\File::load().'
Examples:
- file_load.php
'user_load()':
Rector: UserLoadRector.php
PHPStan: 'Call to deprecated function user_load(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\user\Entity\User::load().'
Examples:
- user_load.php
'file_directory_temp()':
Rector: FileDirectoryTempRector.php
PHPStan: 'Call to deprecated function file_directory_temp(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.'
Examples:
- file_directory_temp.php
'file_directory_os_temp()':
Rector: FileDirectoryOsTempRector.php
PHPStan: 'Call to deprecated function file_directory_os_temp(). Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory().'
Examples:
- file_directory_os_temp.php
'drupal_realpath()':
Rector: DrupalRealpathRector.php
PHPStan: 'Call to deprecated function drupal_realpath(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Core\File\FileSystem::realpath().'
Examples:
- drupal_realpath.php
- DrupalRealpathStatic.php
'file_uri_target()':
Rector: FileUriTargetRector.php
PHPStan: 'Call to deprecated function file_uri_target(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() instead.'
Examples:
- file_uri_target.php
'entity_create()':
Rector: EntityCreateRector.php
PHPStan: 'Call to deprecated function entity_create(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use The method overriding Entity::create() for the entity type, e.g. \Drupal\node\Entity\Node::create() if the entity type is known. If the entity type is variable, use the entity storage''s create() method to construct a new entity:'
Examples:
- entity_create.php
'entity_delete_multiple()':
Rector: EntityDeleteMultipleRector.php
PHPStan: 'Call to deprecated function entity_delete_multiple(). Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the entity storage''s delete() method to delete multiple entities.'
Examples:
- entity_delete_multiple.php
'SafeMarkup::format()':
Rector: SafeMarkupFormatRector.php
PHPStan: 'Call to deprecated method format() of class Drupal\Component\Utility\SafeMarkup. Deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use Drupal\Component\Render\FormattableMarkup.'
Examples:
- safe_markup_format.php
'DATETIME_DATE_STORAGE_FORMAT':
Rector: DatetimeDateStorageFormatRector.php
PHPStan: 'Call to deprecated constant DATETIME_DATE_STORAGE_FORMAT: Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATE_STORAGE_FORMAT instead.'
Examples:
- datetime_date_storage_format.php
'DATETIME_DATETIME_STORAGE_FORMAT':
Rector: DatetimeDatetimeStorageFormatRector.php
PHPStan: 'Call to deprecated constant DATETIME_DATETIME_STORAGE_FORMAT: Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::DATETIME_STORAGE_FORMAT instead.'
Examples:
- datetime_datetime_storage_format.php
'DATETIME_STORAGE_TIMEZONE':
Rector: DatetimeStorageTimezoneRector.php
PHPStan: 'Call to deprecated constant DATETIME_STORAGE_TIMEZONE: Deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface::STORAGE_TIMEZONE instead.'
Examples:
- datetime_storage_timezone.php
'EntityType::getLowercaseLabel()':
Rector: EntityTypeGetLowercaseLabelRector.php
PHPStan: 'Call to deprecated method EntityType::getLowercaseLabel(). Deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use EntityType::getSingularLabel().'
Examples:
- entity_type_get_lowercase_label.php