Skip to content

Commit 74ba916

Browse files
authored
Typed constants in sqlite extension (#12379)
1 parent 9ad7844 commit 74ba916

File tree

3 files changed

+78
-112
lines changed

3 files changed

+78
-112
lines changed

UPGRADING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ PHP 8.4 UPGRADE NOTES
152152
- Spl:
153153
. The class constants are typed now.
154154

155+
- Sqlite:
156+
. The class constants are typed now.
157+
155158
========================================
156159
10. New Global Constants
157160
========================================

ext/sqlite3/sqlite3.stub.php

Lines changed: 37 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -79,234 +79,197 @@ class SQLite3Exception extends \Exception
7979
class SQLite3
8080
{
8181
/**
82-
* @var int
8382
* @cvalue SQLITE_OK
8483
* @link sqlite3.class.constants.ok
8584
*/
86-
public const OK = UNKNOWN;
85+
public const int OK = UNKNOWN;
8786

8887
/* Constants for authorizer return */
8988

9089
/**
91-
* @var int
9290
* @cvalue SQLITE_DENY
9391
* @link sqlite3.class.constants.deny
9492
*/
95-
public const DENY = UNKNOWN;
93+
public const int DENY = UNKNOWN;
9694
/**
97-
* @var int
9895
* @cvalue SQLITE_IGNORE
9996
* @link sqlite3.class.constants.ignore
10097
*/
101-
public const IGNORE = UNKNOWN;
98+
public const int IGNORE = UNKNOWN;
10299

103100
/* Constants for authorizer actions */
104101

105102
/**
106-
* @var int
107103
* @cvalue SQLITE_CREATE_INDEX
108104
* @link sqlite3.class.constants.create-index
109105
*/
110-
public const CREATE_INDEX = UNKNOWN;
106+
public const int CREATE_INDEX = UNKNOWN;
111107
/**
112-
* @var int
113108
* @cvalue SQLITE_CREATE_TABLE
114109
* @link sqlite3.class.constants.create-table
115110
*/
116-
public const CREATE_TABLE = UNKNOWN;
111+
public const int CREATE_TABLE = UNKNOWN;
117112
/**
118-
* @var int
119113
* @cvalue SQLITE_CREATE_TEMP_INDEX
120114
* @link sqlite3.class.constants.create-temp-index
121115
*/
122-
public const CREATE_TEMP_INDEX = UNKNOWN;
116+
public const int CREATE_TEMP_INDEX = UNKNOWN;
123117
/**
124-
* @var int
125118
* @cvalue SQLITE_CREATE_TEMP_TABLE
126119
* @link sqlite3.class.constants.create-temp-table
127120
*/
128-
public const CREATE_TEMP_TABLE = UNKNOWN;
121+
public const int CREATE_TEMP_TABLE = UNKNOWN;
129122
/**
130-
* @var int
131123
* @cvalue SQLITE_CREATE_TEMP_TRIGGER
132124
* @link sqlite3.class.constants.create-temp-trigger
133125
*/
134-
public const CREATE_TEMP_TRIGGER = UNKNOWN;
126+
public const int CREATE_TEMP_TRIGGER = UNKNOWN;
135127
/**
136-
* @var int
137128
* @cvalue SQLITE_CREATE_TEMP_VIEW
138129
* @link sqlite3.class.constants.create-temp-view
139130
*/
140-
public const CREATE_TEMP_VIEW = UNKNOWN;
131+
public const int CREATE_TEMP_VIEW = UNKNOWN;
141132
/**
142-
* @var int
143133
* @cvalue SQLITE_CREATE_TRIGGER
144134
* @link sqlite3.class.constants.create-trigger
145135
*/
146-
public const CREATE_TRIGGER = UNKNOWN;
136+
public const int CREATE_TRIGGER = UNKNOWN;
147137
/**
148-
* @var int
149138
* @cvalue SQLITE_CREATE_VIEW
150139
* @link sqlite3.class.constants.create-view
151140
*/
152-
public const CREATE_VIEW = UNKNOWN;
141+
public const int CREATE_VIEW = UNKNOWN;
153142
/**
154-
* @var int
155143
* @cvalue SQLITE_DELETE
156144
* @link sqlite3.class.constants.delete
157145
*/
158-
public const DELETE = UNKNOWN;
146+
public const int DELETE = UNKNOWN;
159147
/**
160-
* @var int
161148
* @cvalue SQLITE_DROP_INDEX
162149
* @link sqlite3.class.constants.drop-index
163150
*/
164-
public const DROP_INDEX = UNKNOWN;
151+
public const int DROP_INDEX = UNKNOWN;
165152
/**
166-
* @var int
167153
* @cvalue SQLITE_DROP_TABLE
168154
* @link sqlite3.class.constants.drop-table
169155
*/
170-
public const DROP_TABLE = UNKNOWN;
156+
public const int DROP_TABLE = UNKNOWN;
171157
/**
172-
* @var int
173158
* @cvalue SQLITE_DROP_TEMP_INDEX
174159
* @link sqlite3.class.constants.drop-temp-index
175160
*/
176-
public const DROP_TEMP_INDEX = UNKNOWN;
161+
public const int DROP_TEMP_INDEX = UNKNOWN;
177162
/**
178-
* @var int
179163
* @cvalue SQLITE_DROP_TEMP_TABLE
180164
* @link sqlite3.class.constants.drop-temp-table
181165
*/
182-
public const DROP_TEMP_TABLE = UNKNOWN;
166+
public const int DROP_TEMP_TABLE = UNKNOWN;
183167
/**
184-
* @var int
185168
* @cvalue SQLITE_DROP_TEMP_TRIGGER
186169
* @link sqlite3.class.constants.drop-temp-trigger
187170
*/
188-
public const DROP_TEMP_TRIGGER = UNKNOWN;
171+
public const int DROP_TEMP_TRIGGER = UNKNOWN;
189172
/**
190-
* @var int
191173
* @cvalue SQLITE_DROP_TEMP_VIEW
192174
* @link sqlite3.class.constants.drop-temp-view
193175
*/
194-
public const DROP_TEMP_VIEW = UNKNOWN;
176+
public const int DROP_TEMP_VIEW = UNKNOWN;
195177
/**
196-
* @var int
197178
* @cvalue SQLITE_DROP_TRIGGER
198179
* @link sqlite3.class.constants.drop-trigger
199180
*/
200-
public const DROP_TRIGGER = UNKNOWN;
181+
public const int DROP_TRIGGER = UNKNOWN;
201182
/**
202-
* @var int
203183
* @cvalue SQLITE_DROP_VIEW
204184
* @link sqlite3.class.constants.drop-view
205185
*/
206-
public const DROP_VIEW = UNKNOWN;
186+
public const int DROP_VIEW = UNKNOWN;
207187
/**
208-
* @var int
209188
* @cvalue SQLITE_INSERT
210189
* @link sqlite3.class.constants.insert
211190
*/
212-
public const INSERT = UNKNOWN;
191+
public const int INSERT = UNKNOWN;
213192
/**
214-
* @var int
215193
* @cvalue SQLITE_PRAGMA
216194
* @link sqlite3.class.constants.pragma
217195
*/
218-
public const PRAGMA = UNKNOWN;
196+
public const int PRAGMA = UNKNOWN;
219197
/**
220-
* @var int
221198
* @cvalue SQLITE_READ
222199
* @link sqlite3.class.constants.read
223200
*/
224-
public const READ = UNKNOWN;
201+
public const int READ = UNKNOWN;
225202
/**
226-
* @var int
227203
* @cvalue SQLITE_SELECT
228204
* @link sqlite3.class.constants.select
229205
*/
230-
public const SELECT = UNKNOWN;
206+
public const int SELECT = UNKNOWN;
231207
/**
232-
* @var int
233208
* @cvalue SQLITE_TRANSACTION
234209
* @link sqlite3.class.constants.transaction
235210
*/
236-
public const TRANSACTION = UNKNOWN;
211+
public const int TRANSACTION = UNKNOWN;
237212
/**
238-
* @var int
239213
* @cvalue SQLITE_UPDATE
240214
* @link sqlite3.class.constants.update
241215
*/
242-
public const UPDATE = UNKNOWN;
216+
public const int UPDATE = UNKNOWN;
243217
/**
244-
* @var int
245218
* @cvalue SQLITE_ATTACH
246219
* @link sqlite3.class.constants.attach
247220
*/
248-
public const ATTACH = UNKNOWN;
221+
public const int ATTACH = UNKNOWN;
249222
/**
250-
* @var int
251223
* @cvalue SQLITE_DETACH
252224
* @link sqlite3.class.constants.detach
253225
*/
254-
public const DETACH = UNKNOWN;
226+
public const int DETACH = UNKNOWN;
255227
/**
256-
* @var int
257228
* @cvalue SQLITE_ALTER_TABLE
258229
* @link sqlite3.class.constants.alter-table
259230
*/
260-
public const ALTER_TABLE = UNKNOWN;
231+
public const int ALTER_TABLE = UNKNOWN;
261232
/**
262-
* @var int
263233
* @cvalue SQLITE_REINDEX
264234
* @link sqlite3.class.constants.reindex
265235
*/
266-
public const REINDEX = UNKNOWN;
236+
public const int REINDEX = UNKNOWN;
267237
/**
268-
* @var int
269238
* @cvalue SQLITE_ANALYZE
270239
* @link sqlite3.class.constants.analyze
271240
*/
272-
public const ANALYZE = UNKNOWN;
241+
public const int ANALYZE = UNKNOWN;
273242
/**
274-
* @var int
275243
* @cvalue SQLITE_CREATE_VTABLE
276244
* @link sqlite3.class.constants.create-vtable
277245
*/
278-
public const CREATE_VTABLE = UNKNOWN;
246+
public const int CREATE_VTABLE = UNKNOWN;
279247
/**
280-
* @var int
281248
* @cvalue SQLITE_DROP_VTABLE
282249
* @link sqlite3.class.constants.drop-vtable
283250
*/
284-
public const DROP_VTABLE = UNKNOWN;
251+
public const int DROP_VTABLE = UNKNOWN;
285252
/**
286-
* @var int
287253
* @cvalue SQLITE_FUNCTION
288254
* @link sqlite3.class.constants.function
289255
*/
290-
public const FUNCTION = UNKNOWN;
256+
public const int FUNCTION = UNKNOWN;
291257
/**
292-
* @var int
293258
* @cvalue SQLITE_SAVEPOINT
294259
* @link sqlite3.class.constants.savepoint
295260
*/
296-
public const SAVEPOINT = UNKNOWN;
261+
public const int SAVEPOINT = UNKNOWN;
297262
/**
298-
* @var int
299263
* @cvalue SQLITE_COPY
300264
* @link sqlite3.class.constants.copy
301265
*/
302-
public const COPY = UNKNOWN;
266+
public const int COPY = UNKNOWN;
303267
#ifdef SQLITE_RECURSIVE
304268
/**
305-
* @var int
306269
* @cvalue SQLITE_RECURSIVE
307270
* @link sqlite3.class.constants.recursive
308271
*/
309-
public const RECURSIVE = UNKNOWN;
272+
public const int RECURSIVE = UNKNOWN;
310273
#endif
311274

312275
/**

0 commit comments

Comments
 (0)