Skip to content

Commit

Permalink
Document the changes for making a server proxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadSikorra committed Aug 5, 2023
1 parent affa000 commit 8e411e0
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions UPGRADE-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,50 @@ $ldap = new LdapServer(
->setPort(33389)
);
```

Proxy Server Options
--------------------

When instantiating an `LdapServer` instance with `LdapServer::makeProxy()`, options are now an options object instead
of an associative array.

**Before**:

```php
use FreeDSx\Ldap\LdapServer;

$server = LdapServer::makeProxy(
// The LDAP server to proxy connections to...
'ldap.example.com',
// Any additional LdapClient options for the proxy...
[
// Perhaps the server to proxy is on some non-standard port?
'port' => 3389,
],
// Any additional LdapServer options. In this case, also run this server over port 3389
[
'port' => 3389,
]
);
```

**After**:

```php
use FreeDSx\Ldap\LdapServer;
use FreeDSx\Ldap\ClientOptions;
use FreeDSx\Ldap\ServerOptions;

$server = LdapServer::makeProxy(
// The LDAP server to proxy connections to...
'ldap.example.com',
// Any additional LdapClient options for the proxy...
(new ClientOptions)
// Perhaps the server to proxy is on some non-standard port?
->setPort(3389)
,
// Any additional LdapServer options. In this case, also run this server over port 3389
(new ServerOptions)
->setPort(3389)
);
```

0 comments on commit 8e411e0

Please sign in to comment.