-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-41992 Upgrade versions #152
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
Merged
lindseymoore
merged 13 commits into
mongodb:php-standardization
from
lindseymoore:DOCSP-41992
Sep 27, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
585da96
DOCSP-41992 Upgrade versions
lindseymoore 15e475f
toc
lindseymoore 9670327
edits
lindseymoore 8482514
how to upgrade sections
lindseymoore dfe83b7
style
lindseymoore 6e3538d
edit
lindseymoore 6610b56
edit
lindseymoore 8988322
review comments
lindseymoore ce8408f
ref
lindseymoore 9a7aa08
add ext upgrade command
lindseymoore 807fc78
edit
lindseymoore f03e46c
edit copy
lindseymoore 953a10e
Merge branch 'php-standardization' into DOCSP-41992
lindseymoore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -24,6 +24,7 @@ MongoDB PHP Library | |
/data-formats | ||
/compatibility | ||
/whats-new | ||
/upgrade | ||
FAQ </faq> | ||
/reference | ||
|
||
|
This file contains hidden or 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,99 @@ | ||
.. _php-upgrade: | ||
|
||
======================= | ||
Upgrade Driver Versions | ||
======================= | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 1 | ||
:class: singlecol | ||
|
||
.. facet:: | ||
:name: genre | ||
:values: reference | ||
|
||
.. meta:: | ||
:keywords: compatibility, backwards compatibility | ||
|
||
Overview | ||
-------- | ||
|
||
On this page, you can learn how to upgrade your driver to a new version. This | ||
page also includes the changes you must make to your application when you | ||
upgrade to a new version of the {+php-library+}. | ||
|
||
How to Upgrade | ||
-------------- | ||
|
||
Before you upgrade, perform the following actions: | ||
|
||
- Ensure the new {+driver-short+} version is compatible with the {+mdb-server+} versions | ||
your application connects to and the PHP version your | ||
application compiles with. For version compatibility information, see the | ||
:ref:`{+php-library+} Compatibility <php-compatibility>` | ||
page. | ||
- Address any breaking changes between the driver version | ||
your application is using and your planned upgrade version in the | ||
:ref:`Breaking Changes <php-breaking-changes>` section. | ||
|
||
.. tip:: | ||
|
||
To ensure compatibility across {+mdb-server+} versions when | ||
upgrading driver versions, use the :ref:`{+stable-api+} <php-stable-api>`. | ||
|
||
Major and minor versions of the PHP extension and library are in sync. This | ||
means you can run an upgrade command for the extension to also upgrade the PHP | ||
library. | ||
|
||
Patch versions (x.x.x) for the library and extension are not in sync. Run the | ||
respective commands to update to the patch versions for the library or extension. | ||
|
||
To upgrade the PHP extension, replace ``<version-number>`` with the version number | ||
you want to upgrade to and run the following command in your application's | ||
directory: | ||
|
||
.. code-block:: bash | ||
|
||
pecl upgrade mongodb-<version-number> | ||
|
||
To upgrade the PHP library version, replace ``<version-number>`` with the | ||
version number you want to upgrade to and run the following command in your | ||
application's directory: | ||
|
||
.. code-block:: bash | ||
|
||
composer require mongodb/mongodb:<version-number> | ||
|
||
Detailed installation instructions may be found in the | ||
:php:`PHP.net documentation <manual/en/mongodb.installation.php>`. | ||
|
||
.. _php-breaking-changes: | ||
|
||
Breaking Changes | ||
---------------- | ||
|
||
A breaking change is a change of a convention or a behavior starting in a specific | ||
version of the driver. This type of change may prevent your application from working | ||
properly if not addressed before upgrading the driver. | ||
|
||
The breaking changes in this section are categorized by the driver version that introduced | ||
them. When upgrading driver versions, address all the breaking changes between the current | ||
and upgrade versions. | ||
|
||
For more information on release changes, see the release notes and associated | ||
JIRA tickets for each release on `GitHub <https://github.com/mongodb/mongo-php-library/releases>`__. | ||
|
||
Version 1.20 Breaking Changes | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
This driver version introduces the following breaking changes: | ||
|
||
- Drops support for {+mdb-server+} 3.6. | ||
|
||
Version 1.19 and Earlier | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
For driver versions 1.19 and earlier, see the release notes and associated | ||
JIRA tickets for each release on `GitHub <https://github.com/mongodb/mongo-php-library/releases>`__. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of notes here:
To summarise, this section should mention that we will make breaking changes only in a new major version, and we're also providing an upgrade file to go along with that version, along with deprecating any functionality to be removed. For example, we're currently working on version 2.0 of the extension, and the corresponding upgrade file lists everything that is removed. Note that this is a work in progress and should not yet be added to the docs.
We can list dropping support for MongoDB 3.6 in version 1.20 as a breaking change, but the other changes listed are not breaking changes in a traditional sense and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur with reserving the term "breaking changes" for the driver API and thus new major versions; however, we should make sure all driver docs are on the same page here.
Removing support for EOL server and PHP versions is something communicated in release notes, and DBX also has a policy of announcing server compatibility changes in advance.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove all the deprecation notes other than the dropped support for MongoDB Server 3.6 for Version 1.20.
Once version 2.0 is released, we can add a note about upgrade files, as there are no other upgrade files for current versions out (the last one I see was for upgrading to 1.5 which is now the oldest relevant version according to compatibility table).
Let me know if this looks good, thanks!