-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v2.x' into merge-v1.x-into-v2.x-1727254882102
* v2.x: PHPLIB-954: Add return types to all methods (#1391) PHPLIB-797: Remove unused methods in UnsupportedException (#1436) Revert "Add final annotations to non-internal Operation classes (#1410)" PHPLIB-953 Make internal classes and Operation classes final (#1392) PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
- Loading branch information
Showing
114 changed files
with
770 additions
and
1,321 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,9 @@ on: | |
|
||
env: | ||
PHP_VERSION: "8.2" | ||
DRIVER_VERSION: "stable" | ||
# TODO: change to "stable" once 2.0.0 is released | ||
# DRIVER_VERSION: "stable" | ||
DRIVER_VERSION: "mongodb/[email protected]" | ||
|
||
jobs: | ||
phpcs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,9 @@ on: | |
|
||
env: | ||
PHP_VERSION: "8.2" | ||
DRIVER_VERSION: "stable" | ||
# TODO: change to "stable" once 2.0.0 is released | ||
# DRIVER_VERSION: "stable" | ||
DRIVER_VERSION: "mongodb/[email protected]" | ||
|
||
jobs: | ||
psalm: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,9 @@ on: | |
- "feature/*" | ||
|
||
env: | ||
DRIVER_VERSION: "stable" | ||
# TODO: change to "stable" once 2.0.0 is released | ||
# DRIVER_VERSION: "stable" | ||
DRIVER_VERSION: "mongodb/[email protected]" | ||
|
||
jobs: | ||
phpunit: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
UPGRADE FROM 1.x to 2.0 | ||
======================== | ||
|
||
* Classes in the namespace `MongoDB\Operation\` are `final`. | ||
* All methods in interfaces and classes now define a return type. | ||
|
||
GridFS | ||
------ | ||
|
||
* The `md5` is no longer calculated when a file is uploaded to GridFS. | ||
Applications that require a file digest should implement it outside GridFS | ||
and store in metadata. | ||
|
||
```php | ||
$hash = hash_file('sha256', $filename); | ||
$bucket->openUploadStream($fileId, ['metadata' => ['hash' => $hash]]); | ||
``` | ||
|
||
* The fields `contentType` and `aliases` are no longer stored in the `files` | ||
collection. Applications that require this information should store it in | ||
metadata. | ||
|
||
**Before:** | ||
```php | ||
$bucket->openUploadStream($fileId, ['contentType' => 'image/png']); | ||
``` | ||
|
||
**After:** | ||
```php | ||
$bucket->openUploadStream($fileId, ['metadata' => ['contentType' => 'image/png']]); | ||
``` | ||
|
||
UnsupportedException method removals | ||
------------------------------------ | ||
|
||
The following methods have been removed from the | ||
`MongoDB\Exception\UnsupportedException` class: | ||
* `allowDiskUseNotSupported` | ||
* `arrayFiltersNotSupported` | ||
* `collationNotSupported` | ||
* `explainNotSupported` | ||
* `readConcernNotSupported` | ||
* `writeConcernNotSupported` | ||
|
||
The remaining methods have been marked as internal and may be removed in a | ||
future minor version. Only the class itself is covered by the BC promise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.