Skip to content

Commit 99c0237

Browse files
authored
DOCSP-31115: Demonstrate including the Composer autoloader (#890)
This is analogous to reminding users to load the extension in php.ini. Both are also covered in the linked PHPLIB docs, but it makes sense to duplicate the information here for users that don't click through.
1 parent 3210696 commit 99c0237

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/php.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ The preferred method of installing the PHP library is with
9797

9898
$ composer require mongodb/mongodb
9999

100+
Once you have installed the library, ensure that your application includes
101+
Composer's autoloader as in the following example:
102+
103+
.. code-block:: php
104+
105+
<?php
106+
107+
require_once __DIR__ . '/vendor/autoload.php';
100108

101109
Additional installation instructions may be found in the
102110
`library documentation <https://www.mongodb.com/docs/php-library/current/tutorial/install-php-library/>`_.

0 commit comments

Comments
 (0)