mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-24 00:48:02 +02:00
dadb93fb34
v1.14 pointed to libmongoc 1.14.2, which was released some time after the submodule target in the master branch (a dev commit before libmongoc 1.23.0). To resolve this conflict, the libmongoc submodule has been bumped to 1.23.0. Note: a libmongoc 1.23.1 tag also exists, but that bump can be done in a subsequent PHPC ticket related to the libmongoc changes therein. This also adds a section to CONTRIBUTING.md to provide guidance on resolving submodule merge conflicts.
42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
--TEST--
|
|
MongoDB\Driver\Manager::__construct(): crypt_shared is required and unavailable
|
|
--SKIPIF--
|
|
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
|
|
<?php skip_if_not_libmongocrypt(); ?>
|
|
<?php skip_if_crypt_shared(); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require_once __DIR__ . '/../utils/basic.inc';
|
|
|
|
$baseOptions = [
|
|
'keyVaultNamespace' => CSFLE_KEY_VAULT_NS,
|
|
'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(CSFLE_LOCAL_KEY, 0)]],
|
|
];
|
|
|
|
$tests = [
|
|
['extraOptions' => ['cryptSharedLibPath' => '/not/found']],
|
|
['extraOptions' => ['cryptSharedLibRequired' => true]],
|
|
];
|
|
|
|
foreach ($tests as $autoEncryptionOptions) {
|
|
echo throws(function() use ($autoEncryptionOptions, $baseOptions) {
|
|
create_test_manager(null, [], ['autoEncryption' => $autoEncryptionOptions + $baseOptions]);
|
|
}, MongoDB\Driver\Exception\EncryptionException::class), "\n\n";
|
|
}
|
|
|
|
var_dump(get_module_info('crypt_shared library version'));
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECTF--
|
|
OK: Got MongoDB\Driver\Exception\EncryptionException
|
|
A crypt_shared override path was specified [/not/found], but we failed to open a dynamic library at that location
|
|
|
|
OK: Got MongoDB\Driver\Exception\EncryptionException
|
|
Option 'cryptSharedLibRequired' is 'true', but failed to load the crypt_shared runtime library
|
|
|
|
string(7) "unknown"
|
|
===DONE===
|