Skip to content

Commit 4d951ea

Browse files
committed
Merge remote-tracking branch 'upstream/php-standardization' into DOCSP-41952-download-install
2 parents 0582736 + 2419c76 commit 4d951ea

11 files changed

+281
-1
lines changed

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Pull Request Info
2+
3+
[PR Reviewing Guidelines](https://github.com/mongodb/docs-php-library/blob/master/REVIEWING.md)
4+
5+
JIRA - <https://jira.mongodb.org/browse/DOCSP-NNNNN>
6+
Staging - <https://docs-mongodbcom-staging.corp.mongodb.com/drivers/docsworker-xlarge/NNNNN/>
7+
8+
## Self-Review Checklist
9+
10+
- [ ] Is this free of any warnings or errors in the RST?
11+
- [ ] Did you run a spell-check?
12+
- [ ] Did you run a grammar-check?
13+
- [ ] Are all the links working?
14+
- [ ] Are the [facets and meta keywords](https://wiki.corp.mongodb.com/display/DE/Docs+Taxonomy) accurate?
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Check Autobuilder for Errors
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "source/**"
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: cbush/snooty-autobuilder-check@main
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Copy Files to docs-shared
2+
3+
on:
4+
workflow_dispatch: {} # use to manually trigger workflow
5+
push:
6+
branches:
7+
- "master"
8+
paths:
9+
- "source/includes/mongodb-compatibility-table-php.rst"
10+
- "source/includes/language-compatibility-table-php.rst"
11+
12+
jobs:
13+
copy-file:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Copy mongodb-compat table
20+
uses: dmnemec/copy_file_to_another_repo_action@main
21+
env:
22+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
23+
with:
24+
source_file: "source/includes/mongodb-compatibility-table-php.rst"
25+
destination_repo: "10gen/docs-shared"
26+
destination_folder: "dbx"
27+
user_email: "[email protected]"
28+
user_name: "docs-builder-bot"
29+
commit_message: "Auto-import from docs-php-library"
30+
31+
- name: Copy language-compat table
32+
uses: dmnemec/copy_file_to_another_repo_action@main
33+
env:
34+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
35+
with:
36+
source_file: "source/includes/language-compatibility-table-php.rst"
37+
destination_repo: "10gen/docs-shared"
38+
destination_folder: "dbx"
39+
user_email: "[email protected]"
40+
user_name: "docs-builder-bot"
41+
commit_message: "Auto-import from docs-php-library"

.github/workflows/vale-tdbx.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: vale-checks
2+
on:
3+
pull_request:
4+
paths:
5+
- "source/**"
6+
7+
jobs:
8+
vale:
9+
name: TDBX Vale rules
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout
13+
uses: actions/checkout@v4
14+
15+
- id: files
16+
uses: masesgroup/retrieve-changed-files@v2
17+
with:
18+
format: 'csv'
19+
20+
- name: checkout-latest-rules
21+
uses: actions/checkout@v4
22+
with:
23+
repository: mongodb/mongodb-vale-action
24+
path: './tdbx-vale-rules'
25+
token: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: move-files-for-vale-action
28+
run: |
29+
cp tdbx-vale-rules/.vale.ini .vale.ini
30+
mkdir -p .github/styles/
31+
cp -rf tdbx-vale-rules/.github/styles/ .github/
32+
33+
- name: run-vale
34+
uses: errata-ai/vale-action@reviewdog
35+
with:
36+
reporter: github-pr-check
37+
files: ${{steps.files.outputs.added_modified}}
38+
fail_on_error: true
39+
token: ${{secrets.GITHUB_TOKEN}}

REVIEWING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Pull Request Reviewing Guidelines for MongoDB PHP Library Documentation
2+
3+
Contributions to the set of documents in this repository can receive reviews from one or both of the following types of reviews:
4+
5+
1. A **copy review**, which focuses on information structure and wording; typically performed by a MongoDB Documentation Team member
6+
2. A **technical review**, which addresses code snippets and the technical correctness of prose; typically performed by a MongoDB engineer.
7+
8+
See the following sections for reviewer expectations for each type of pull request (PR) review:
9+
10+
## Copy Review
11+
12+
Review the structure, wording, and flow of the information in the PR, and correct it if necessary.
13+
14+
### What to Review
15+
16+
- Wording
17+
- Page structure
18+
- Technical content to the extent of the reviewer's understanding.
19+
- Whether the PR fulfills the Acceptance Criteria described in the
20+
linked JIRA ticket.
21+
22+
### What Not to Review
23+
24+
Nothing is completely off-limits to a copy review of a PR -- if you notice a technical issue, it's best to call it out early.
25+
Copy reviewers should constrain their reviews to content within the scope of the JIRA ticket, or otherwise create PRs to address anything unrelated.
26+
27+
## Technical Review
28+
29+
Review the technical accuracy and completeness of a PR and correct it if necessary.
30+
31+
### What to Review
32+
33+
- Code snippets; ensure the code is idiomatic and that all technical claims are correct. e.g. ("To create a `Foo`, use the `Bar.createFoo()` method")
34+
- Problematic explanations that could trip up users who try to follow the documentation.
35+
36+
### What Not to Review
37+
38+
While we welcome any recommendations on wording and structure, avoid blocking approval based on any copy edits. Please entrust the author to make the writing decisions based on style guidelines and team-specific writing conventions, and to create PRs to address anything they deem outside the technical review scope.
39+
40+
- Wording of sentences, although corrections to technical claims are welcome
41+
- Structure of the page
42+
- Any unchanged lines outside the PR unless relevant to the ticket acceptance criteria.

source/get-started.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Get Started with the PHP Library
2121
.. toctree::
2222

2323
/get-started/download-and-install/
24+
/get-started/create-a-deployment/
25+
/get-started/create-a-connection-string/
26+
/get-started/next-steps/
2427

2528
Overview
2629
--------
@@ -38,4 +41,5 @@ connect to a MongoDB cluster hosted on MongoDB Atlas and query data in your clus
3841

3942
Follow this guide to connect a sample PHP application to a MongoDB Atlas
4043
deployment. If you prefer to connect to MongoDB using a different driver or
41-
programming language, see our :driver:`list of official drivers <>`.
44+
programming language, see our :driver:`list of official drivers <>`.
45+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.. _php-connection-string:
2+
3+
==========================
4+
Create a Connection String
5+
==========================
6+
7+
.. facet::
8+
:name: genre
9+
:values: tutorial
10+
11+
.. meta::
12+
:keywords: uri, atlas
13+
14+
You can connect to your MongoDB deployment by providing a
15+
**connection URI**, also called a *connection string*, which
16+
instructs the driver on how to connect to a MongoDB deployment
17+
and how to behave while connected.
18+
19+
The connection string includes the hostname or IP address and
20+
port of your deployment, the authentication mechanism, user credentials
21+
when applicable, and connection options.
22+
23+
.. TODO:
24+
To connect to an instance or deployment not hosted on Atlas, see
25+
:ref:`php-connection-targets`.
26+
27+
.. procedure::
28+
:style: connected
29+
30+
.. step:: Find your MongoDB Atlas Connection String
31+
32+
To retrieve your connection string for the deployment that
33+
you created in the :ref:`previous step <php-create-deployment>`,
34+
log in to your Atlas account and navigate to the
35+
:guilabel:`Database` section and click the :guilabel:`Connect` button
36+
for your new deployment.
37+
38+
.. figure:: /includes/figures/atlas_connection_select_cluster.png
39+
:alt: The connect button in the clusters section of the Atlas UI
40+
41+
Then, select your user from the :guilabel:`Select database user`
42+
selection menu. Select "PHP" from the :guilabel:`Driver` selection
43+
menu and the version that best matches the version you installed
44+
from the :guilabel:`Version` selection menu.
45+
46+
Select the :guilabel:`String` tab in the :guilabel:`Add connection string into your application code`
47+
step to view only the connection string.
48+
49+
.. step:: Copy your Connection String
50+
51+
Click the button on the right of the connection string to copy it
52+
to your clipboard, as shown in the following screenshot:
53+
54+
.. figure:: /includes/figures/atlas_connection_copy_string_php.png
55+
:alt: The copy button next to the connection string in the Atlas UI
56+
57+
.. step:: Update the Placeholders
58+
59+
Paste this connection string into a file in your preferred text editor
60+
and replace the ``<username>`` and ``<password>`` placeholders with
61+
your database user's username and password.
62+
63+
Save this file to a safe location for use in the next step.
64+
65+
After completing these steps, you have a connection string that
66+
corresponds to your Atlas cluster.
67+
68+
.. include:: /includes/get-started/troubleshoot.rst
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _php-create-deployment:
2+
3+
===========================
4+
Create a MongoDB Deployment
5+
===========================
6+
7+
.. facet::
8+
:name: genre
9+
:values: tutorial
10+
11+
.. meta::
12+
:keywords: cloud, host, atlas
13+
14+
You can create a free tier MongoDB deployment on MongoDB Atlas
15+
to store and manage your data. MongoDB Atlas hosts and manages
16+
your MongoDB database in the cloud.
17+
18+
.. procedure::
19+
:style: connected
20+
21+
.. step:: Create a free MongoDB deployment on Atlas
22+
23+
Complete the :atlas:`Get Started with Atlas </getting-started>`
24+
guide to set up a new Atlas account and load sample data into a new free
25+
tier MongoDB deployment.
26+
27+
.. step:: Save your credentials
28+
29+
After you create your database user, save that user's
30+
username and password to a safe location for use in an upcoming step.
31+
32+
After you complete these steps, you have a new free tier MongoDB
33+
deployment on Atlas, database user credentials, and sample data loaded
34+
into your database.
35+
36+
.. include:: /includes/get-started/troubleshoot.rst

source/get-started/next-steps.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _php-next-steps:
2+
3+
==========
4+
Next Steps
5+
==========
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: learn more
13+
14+
Congratulations on completing the quick start tutorial!
15+
16+
In this tutorial, you created a PHP application that
17+
connects to a MongoDB deployment hosted on MongoDB Atlas
18+
and retrieves a document that matches a query.
19+
20+
.. TODO:
21+
Learn more about the {+php-library+} from the following resources:
22+
- Learn how to perform read operations in the :ref:`<php-read>` section.
23+
- Learn how to perform write operations in the :ref:`<php-write>` section.
144 KB
Loading

0 commit comments

Comments
 (0)