Skip to content

Typed constants in sqlite extension #12379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ PHP 8.4 UPGRADE NOTES
- Spl:
. The class constants are typed now.

- Sqlite:
. The class constants are typed now.

========================================
10. New Global Constants
========================================
Expand Down
111 changes: 37 additions & 74 deletions ext/sqlite3/sqlite3.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,234 +79,197 @@ class SQLite3Exception extends \Exception
class SQLite3
{
/**
* @var int
* @cvalue SQLITE_OK
* @link sqlite3.class.constants.ok
*/
public const OK = UNKNOWN;
public const int OK = UNKNOWN;

/* Constants for authorizer return */

/**
* @var int
* @cvalue SQLITE_DENY
* @link sqlite3.class.constants.deny
*/
public const DENY = UNKNOWN;
public const int DENY = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_IGNORE
* @link sqlite3.class.constants.ignore
*/
public const IGNORE = UNKNOWN;
public const int IGNORE = UNKNOWN;

/* Constants for authorizer actions */

/**
* @var int
* @cvalue SQLITE_CREATE_INDEX
* @link sqlite3.class.constants.create-index
*/
public const CREATE_INDEX = UNKNOWN;
public const int CREATE_INDEX = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TABLE
* @link sqlite3.class.constants.create-table
*/
public const CREATE_TABLE = UNKNOWN;
public const int CREATE_TABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TEMP_INDEX
* @link sqlite3.class.constants.create-temp-index
*/
public const CREATE_TEMP_INDEX = UNKNOWN;
public const int CREATE_TEMP_INDEX = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TEMP_TABLE
* @link sqlite3.class.constants.create-temp-table
*/
public const CREATE_TEMP_TABLE = UNKNOWN;
public const int CREATE_TEMP_TABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TEMP_TRIGGER
* @link sqlite3.class.constants.create-temp-trigger
*/
public const CREATE_TEMP_TRIGGER = UNKNOWN;
public const int CREATE_TEMP_TRIGGER = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TEMP_VIEW
* @link sqlite3.class.constants.create-temp-view
*/
public const CREATE_TEMP_VIEW = UNKNOWN;
public const int CREATE_TEMP_VIEW = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_TRIGGER
* @link sqlite3.class.constants.create-trigger
*/
public const CREATE_TRIGGER = UNKNOWN;
public const int CREATE_TRIGGER = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_VIEW
* @link sqlite3.class.constants.create-view
*/
public const CREATE_VIEW = UNKNOWN;
public const int CREATE_VIEW = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DELETE
* @link sqlite3.class.constants.delete
*/
public const DELETE = UNKNOWN;
public const int DELETE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_INDEX
* @link sqlite3.class.constants.drop-index
*/
public const DROP_INDEX = UNKNOWN;
public const int DROP_INDEX = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TABLE
* @link sqlite3.class.constants.drop-table
*/
public const DROP_TABLE = UNKNOWN;
public const int DROP_TABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TEMP_INDEX
* @link sqlite3.class.constants.drop-temp-index
*/
public const DROP_TEMP_INDEX = UNKNOWN;
public const int DROP_TEMP_INDEX = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TEMP_TABLE
* @link sqlite3.class.constants.drop-temp-table
*/
public const DROP_TEMP_TABLE = UNKNOWN;
public const int DROP_TEMP_TABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TEMP_TRIGGER
* @link sqlite3.class.constants.drop-temp-trigger
*/
public const DROP_TEMP_TRIGGER = UNKNOWN;
public const int DROP_TEMP_TRIGGER = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TEMP_VIEW
* @link sqlite3.class.constants.drop-temp-view
*/
public const DROP_TEMP_VIEW = UNKNOWN;
public const int DROP_TEMP_VIEW = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_TRIGGER
* @link sqlite3.class.constants.drop-trigger
*/
public const DROP_TRIGGER = UNKNOWN;
public const int DROP_TRIGGER = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_VIEW
* @link sqlite3.class.constants.drop-view
*/
public const DROP_VIEW = UNKNOWN;
public const int DROP_VIEW = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_INSERT
* @link sqlite3.class.constants.insert
*/
public const INSERT = UNKNOWN;
public const int INSERT = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_PRAGMA
* @link sqlite3.class.constants.pragma
*/
public const PRAGMA = UNKNOWN;
public const int PRAGMA = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_READ
* @link sqlite3.class.constants.read
*/
public const READ = UNKNOWN;
public const int READ = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_SELECT
* @link sqlite3.class.constants.select
*/
public const SELECT = UNKNOWN;
public const int SELECT = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_TRANSACTION
* @link sqlite3.class.constants.transaction
*/
public const TRANSACTION = UNKNOWN;
public const int TRANSACTION = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_UPDATE
* @link sqlite3.class.constants.update
*/
public const UPDATE = UNKNOWN;
public const int UPDATE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_ATTACH
* @link sqlite3.class.constants.attach
*/
public const ATTACH = UNKNOWN;
public const int ATTACH = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DETACH
* @link sqlite3.class.constants.detach
*/
public const DETACH = UNKNOWN;
public const int DETACH = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_ALTER_TABLE
* @link sqlite3.class.constants.alter-table
*/
public const ALTER_TABLE = UNKNOWN;
public const int ALTER_TABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_REINDEX
* @link sqlite3.class.constants.reindex
*/
public const REINDEX = UNKNOWN;
public const int REINDEX = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_ANALYZE
* @link sqlite3.class.constants.analyze
*/
public const ANALYZE = UNKNOWN;
public const int ANALYZE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_CREATE_VTABLE
* @link sqlite3.class.constants.create-vtable
*/
public const CREATE_VTABLE = UNKNOWN;
public const int CREATE_VTABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_DROP_VTABLE
* @link sqlite3.class.constants.drop-vtable
*/
public const DROP_VTABLE = UNKNOWN;
public const int DROP_VTABLE = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_FUNCTION
* @link sqlite3.class.constants.function
*/
public const FUNCTION = UNKNOWN;
public const int FUNCTION = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_SAVEPOINT
* @link sqlite3.class.constants.savepoint
*/
public const SAVEPOINT = UNKNOWN;
public const int SAVEPOINT = UNKNOWN;
/**
* @var int
* @cvalue SQLITE_COPY
* @link sqlite3.class.constants.copy
*/
public const COPY = UNKNOWN;
public const int COPY = UNKNOWN;
#ifdef SQLITE_RECURSIVE
/**
* @var int
* @cvalue SQLITE_RECURSIVE
* @link sqlite3.class.constants.recursive
*/
public const RECURSIVE = UNKNOWN;
public const int RECURSIVE = UNKNOWN;
#endif

/**
Expand Down
Loading