diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 7d12e08bb..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: "Docs" - -on: - merge_group: - pull_request: - branches: - - "v*.*" - - "master" - - "feature/*" - paths: - - "docs/**" - push: - branches: - - "v*.*" - - "master" - - "feature/*" - paths: - - "docs/**" - -jobs: - giza: - name: "Build Docs" - runs-on: "ubuntu-20.04" - container: - image: python:2.7.18-buster - - steps: - - name: "Checkout library" - uses: "actions/checkout@v4" - with: - path: library - fetch-depth: 2 - - - name: "Checkout docs" - uses: "actions/checkout@v4" - with: - repository: mongodb/docs-php-library - path: docs - fetch-depth: 2 - - # python:2.7.18-buster does not include rsync - - name: "Install rsync" - run: "apt-get update && apt-get -y install rsync" - - # The requirements file installs urllib3 with an incompatible version; we replace it with one that works - - name: "Install giza" - run: | - pip install -r https://raw.githubusercontent.com/mongodb/docs-tools/master/giza/requirements.txt - pip install urllib3==1.25.2 - - - name: "Sync documentation" - run: "rsync -a library/docs/ docs/source/" - - - name: "Run Giza" - run: "giza make publish" - working-directory: docs - - - name: "Upload built documentation" - uses: actions/upload-artifact@v4 - with: - name: php-library-docs.tar.gz - path: docs/build/public/master/php-library.tar.gz diff --git a/.github/workflows/merge-up.yml b/.github/workflows/merge-up.yml index 4abb8dc0c..cb5a3df02 100644 --- a/.github/workflows/merge-up.yml +++ b/.github/workflows/merge-up.yml @@ -29,3 +29,4 @@ jobs: ref: ${{ github.ref_name }} branchNamePattern: 'v.' fallbackBranch: 'master' + enableAutoMerge: true diff --git a/docs/includes/extracts-option-requires.yaml b/docs/includes/extracts-option-requires.yaml index 3b65fbbab..edc1c0d37 100644 --- a/docs/includes/extracts-option-requires.yaml +++ b/docs/includes/extracts-option-requires.yaml @@ -1,48 +1,47 @@ +ref: _option-requires-version +content: | + This option is available since MongoDB {{version}} and will result in an + exception at execution time if specified for an older server version. --- ref: option-requires-4.2 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "4.2" --- ref: option-requires-4.4 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "4.4" --- ref: option-requires-5.0 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "5.0" --- ref: option-requires-5.3 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "5.3" --- ref: option-requires-6.0 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "6.0" --- ref: option-requires-7.0 source: - ref: option-requires-version file: extracts-option-requires.yaml + ref: _option-requires-version replacement: version: "7.0" ---- -ref: option-requires-version -content: | - This option is available since MongoDB {{version}} and will result in an - exception at execution time if specified for an older server version. ... diff --git a/docs/reference.txt b/docs/reference.txt index 8e2e0f1a7..2dd51527c 100644 --- a/docs/reference.txt +++ b/docs/reference.txt @@ -12,8 +12,6 @@ API Documentation /reference/class/MongoDBDatabase /reference/class/MongoDBCollection /reference/class/MongoDBGridFSBucket - /reference/write-result-classes /reference/result-classes - /reference/enumeration-classes /reference/functions /reference/exception-classes diff --git a/docs/reference/method/MongoDBCollection-bulkWrite.txt b/docs/reference/method/MongoDBCollection-bulkWrite.txt index db4bfb8f3..ad31f0623 100644 --- a/docs/reference/method/MongoDBCollection-bulkWrite.txt +++ b/docs/reference/method/MongoDBCollection-bulkWrite.txt @@ -30,12 +30,12 @@ Parameters ``$operations`` : array An array containing the write operations to perform. :phpmethod:`MongoDB\Collection::bulkWrite()` supports - :phpmethod:`deleteMany() `, - :phpmethod:`deleteOne() `, - :phpmethod:`insertOne() `, - :phpmethod:`replaceOne() `, - :phpmethod:`updateMany() `, and - :phpmethod:`updateOne() ` operations in the + :phpmethod:`MongoDB\Collection::deleteMany()`, + :phpmethod:`MongoDB\Collection::deleteOne()`, + :phpmethod:`MongoDB\Collection::insertOne()`, + :phpmethod:`MongoDB\Collection::replaceOne()`, + :phpmethod:`MongoDB\Collection::updateMany()`, and + :phpmethod:`MongoDB\Collection::updateOne()` operations in the following array structure: .. code-block:: php diff --git a/docs/reference/method/MongoDBCollection-dropIndex.txt b/docs/reference/method/MongoDBCollection-dropIndex.txt index 67ba427e3..d1aa937cb 100644 --- a/docs/reference/method/MongoDBCollection-dropIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropIndex.txt @@ -29,8 +29,7 @@ Parameters ``$indexName`` : string| :phpclass:`MongoDB\Model\IndexInfo` The name or model object of the index to drop. View the existing indexes on - the collection using the :phpmethod:`listIndexes() - ` method. + the collection by using the :phpmethod:`MongoDB\Collection::listIndexes()` method. ``$options`` : array An array specifying the desired options. diff --git a/docs/reference/method/MongoDBCollection-dropIndexes.txt b/docs/reference/method/MongoDBCollection-dropIndexes.txt index 52595c71e..6e052cb27 100644 --- a/docs/reference/method/MongoDBCollection-dropIndexes.txt +++ b/docs/reference/method/MongoDBCollection-dropIndexes.txt @@ -28,7 +28,7 @@ Parameters ``$indexName`` : string| :phpclass:`MongoDB\Model\IndexInfo` The name or model object of the index to drop. View the existing indexes on the collection using the :phpmethod:`listIndexes() - ` method. + ` method. ``$options`` : array An array specifying the desired options. diff --git a/docs/reference/method/MongoDBCollection-explain.txt b/docs/reference/method/MongoDBCollection-explain.txt index 592f717e0..03619755a 100644 --- a/docs/reference/method/MongoDBCollection-explain.txt +++ b/docs/reference/method/MongoDBCollection-explain.txt @@ -29,7 +29,7 @@ Definition Parameters ---------- -``$explainable`` : :phpclass:`MongoDB\Operation\Explainable` +``$explainable`` : ``MongoDB\Operation\Explainable`` The command to explain. ``$options`` : array diff --git a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt index f4077b344..19849ad3c 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt @@ -33,7 +33,7 @@ Parameters ``$update`` : array|object Specifies the field and value combinations to update and any relevant update - operators. ``$update`` uses MongoDB's :method:`update operators + operators. ``$update`` uses MongoDB's :manual:`update operators `. Starting with MongoDB 4.2, an `aggregation pipeline `_ can be passed as this parameter. diff --git a/docs/reference/method/MongoDBCollection-updateMany.txt b/docs/reference/method/MongoDBCollection-updateMany.txt index 2b0772209..9d567ec34 100644 --- a/docs/reference/method/MongoDBCollection-updateMany.txt +++ b/docs/reference/method/MongoDBCollection-updateMany.txt @@ -33,7 +33,7 @@ Parameters ``$update`` : array|object Specifies the field and value combinations to update and any relevant update - operators. ``$update`` uses MongoDB's :method:`update operators + operators. ``$update`` uses MongoDB's :manual:`update operators `. Starting with MongoDB 4.2, an `aggregation pipeline `_ can be passed as this parameter. diff --git a/docs/reference/method/MongoDBCollection-updateOne.txt b/docs/reference/method/MongoDBCollection-updateOne.txt index 321103c24..42877e730 100644 --- a/docs/reference/method/MongoDBCollection-updateOne.txt +++ b/docs/reference/method/MongoDBCollection-updateOne.txt @@ -35,7 +35,7 @@ Parameters ``$update`` : array|object Specifies the field and value combinations to update and any relevant update - operators. ``$update`` uses MongoDB's :method:`update operators + operators. ``$update`` uses MongoDB's :manual:`update operators `. Starting with MongoDB 4.2, an `aggregation pipeline `_ can be passed as this parameter. diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index 3c45debc9..8b49e901b 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -296,7 +296,7 @@ Parameters rules or expressions. You can specify the expressions using the same operators as MongoDB's :manual:`query operators ` with the - exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`, + exception of :query:`$near`, :query:`$nearSphere`, :query:`$text`, and :query:`$where`. .. note:: diff --git a/docs/reference/result-classes.txt b/docs/reference/result-classes.txt index db5ff7590..b59f480cd 100644 --- a/docs/reference/result-classes.txt +++ b/docs/reference/result-classes.txt @@ -10,7 +10,7 @@ Result Classes BulkWriteResult Class DeleteResult Class InsertManyResult Class - InsertOneResult Class + InsertOneResult Class UpdateResult Class ChangeStream Class MapReduceResult Class diff --git a/docs/tutorial/gridfs.txt b/docs/tutorial/gridfs.txt index 4688aefb3..dc6afa15d 100644 --- a/docs/tutorial/gridfs.txt +++ b/docs/tutorial/gridfs.txt @@ -35,7 +35,7 @@ The bucket can be constructed with various options: needed. The default size is ``261120`` (i.e. 255 KiB). - ``readConcern``, ``readPreference`` and ``writeConcern`` options can be used to specify defaults for read and write operations, much like the - :phpclass:`MongoDB\GridFS\Collection` options. + :phpclass:`MongoDB\Collection` options. Uploading Files with Writable Streams -------------------------------------