Skip to content

Extract autoEncryption driver options in MongoDB\Driver\Manager::__construct() #4754

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Jun 30, 2025

Fix the $driverOptions parameter table this page to prevent unreadable nested array: https://www.php.net/manual/en/mongodb-driver-manager.construct.php#mongodb-driver-manager.construct-driveroptions
This page is not modified: https://www.php.net/manual/en/mongodb-driver-manager.createclientencryption.php

Question: I would like to optimize the column width to give more space to the description.

https://jira.mongodb.org/browse/PHPC-2573

@GromNaN GromNaN force-pushed the flat-autoEncryption branch 3 times, most recently from 5ca64a5 to dbba6f6 Compare June 30, 2025 18:02
@GromNaN GromNaN requested review from alcaeus and jmikola July 1, 2025 07:00
@GromNaN

This comment was marked as outdated.

@GromNaN GromNaN marked this pull request as ready for review July 1, 2025 07:02
@GromNaN GromNaN force-pushed the flat-autoEncryption branch from dbba6f6 to 34e1c54 Compare July 1, 2025 07:06
Copy link
Contributor

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with extracting the table. I would suggest creating a separate table for autoEncryption options as opposed to adding them as rows to the driverOptions table.

<entry><classname>MongoDB\Driver\Manager</classname></entry>
<entry>The Manager used to route data key queries to a separate MongoDB cluster. By default, the current Manager and cluster is used.</entry>
</row>
<entry xmlns="http://docbook.org/ns/docbook">The Manager used to route data key queries to a separate MongoDB cluster. By default, the current Manager and cluster is used.</entry>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation looks off by one space here and all other snippets.

@@ -659,129 +659,6 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][
<literal>bypassAutoEncryption</literal> is &true;.
</para>
</note>
<para>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add a note that these are explained separately below? We could also close out the current <table> and <para>, then add a new <para> with a title of "Auto encryption options" to create a separate table for them. That table could specifies that "these keys are available in the autoEncryption driver option, which would allow you to skip refactoring of the language snippets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked the PR to create a new table and keep the full row entities.

@GromNaN GromNaN force-pushed the flat-autoEncryption branch from 34e1c54 to dd2f36e Compare July 2, 2025 08:25
@@ -636,7 +636,7 @@ mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][
<entry>
<para>
Provides options to enable automatic client-side field level
encryption.
encryption. The list of options is described in the table below.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to add a link to a reference in the page.

Options supported by automatic encryption:
<table>
<title>autoEncryption</title>
<tgroup cols="3">
Copy link
Member Author

@GromNaN GromNaN Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could add this to set the column widths, but this is not using % anywhere.

Suggested change
<tgroup cols="3">
<tgroup cols="3">
<colspec colwidth="25%" colname="option"/>
<colspec colwidth="10%" colname="type"/>
<colspec colwidth="65%" colname="description"/>

In few places it's using 2* notation that is not handled by the website.

<tgroup cols="2">
<colspec colwidth="1*" colname="element"/>
<colspec colwidth="2*" colname="description"/>

The website CSS should use table-layout: auto instead of fixed so that the column width are adjusted automatically.

@GromNaN GromNaN requested review from alcaeus and removed request for jmikola July 2, 2025 08:46
@GromNaN GromNaN changed the title Flatten autoEncryption driver options in MongoDB\Driver\Manager::__construct() Extract autoEncryption driver options in MongoDB\Driver\Manager::__construct() Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants