Permalink
Browse files

Updating hack declared interface for PHP Data objects

Summary:
Adding missing constants that already present in the pdo code:
```
fbsource/fbcode/hphp/runtime/ext/pdo/ext_pdo.cpp [blame][history] [copy path] [copy filename]
    HHVM_RCC_INT(PDO, MYSQL_ATTR_SSL_CA, PDO_MYSQL_ATTR_SSL_CA);
    HHVM_RCC_INT(PDO, MYSQL_ATTR_SSL_CAPATH, PDO_MYSQL_ATTR_SSL_CAPATH);
    HHVM_RCC_INT(PDO, MYSQL_ATTR_SSL_CERT, PDO_MYSQL_ATTR_SSL_CERT);
    HHVM_RCC_INT(PDO, MYSQL_ATTR_SSL_KEY, PDO_MYSQL_ATTR_SSL_KEY);
    HHVM_RCC_INT(PDO, MYSQL_ATTR_SSL_CIPHER, PDO_MYSQL_ATTR_SSL_CIPHER);

fbsource/fbcode/hphp/runtime/ext/pdo_mysql/pdo_mysql.cpp
    ssl_ca = pdo_attr_strval(options, PDO_MYSQL_ATTR_SSL_CA,
    ssl_capath = pdo_attr_strval(options, PDO_MYSQL_ATTR_SSL_CAPATH,
    ssl_key = pdo_attr_strval(options, PDO_MYSQL_ATTR_SSL_KEY,
    ssl_cert = pdo_attr_strval(options, PDO_MYSQL_ATTR_SSL_CERT,
    ssl_cipher = pdo_attr_strval(options, PDO_MYSQL_ATTR_SSL_CIPHER,

fbsource/fbcode/hphp/runtime/ext/pdo_mysql/pdo_mysql.h
  PDO_MYSQL_ATTR_SSL_CA,
  PDO_MYSQL_ATTR_SSL_CAPATH,
  PDO_MYSQL_ATTR_SSL_CERT,
  PDO_MYSQL_ATTR_SSL_CIPHER,
  PDO_MYSQL_ATTR_SSL_KEY,
```

Reviewed By: periodic1236

Differential Revision: D7001644

fbshipit-source-id: 028fbd3a1663bda32bdacdcd316ad8b681402f17
  • Loading branch information...
Alexey Savva authored and hhvm-bot committed Feb 22, 2018
1 parent e22e23d commit 3a26cbb283169d0568145e932d841e5294903683
Showing with 5 additions and 0 deletions.
  1. +5 −0 hphp/hack/hhi/stdlib/builtins_pdo.hhi
@@ -92,6 +92,11 @@ class PDO {
const MYSQL_ATTR_DIRECT_QUERY = 0;
const MYSQL_ATTR_FOUND_ROWS = 0;
const MYSQL_ATTR_IGNORE_SPACE = 0;
const MYSQL_ATTR_SSL_CA = 0;
const MYSQL_ATTR_SSL_CAPATH = 0;
const MYSQL_ATTR_SSL_CERT = 0;
const MYSQL_ATTR_SSL_KEY = 0;
const MYSQL_ATTR_SSL_CIPHER = 0;
const HH_MYSQL_ATTR_READ_TIMEOUT = 0;
const HH_MYSQL_ATTR_WRITE_TIMEOUT = 0;
public function __construct($dsn, $username = null, $password = null, $options = null) { }

0 comments on commit 3a26cbb

Please sign in to comment.