3.0.0
Backwards incompatible changes
This release changes the way Server objects are created in a backwards incompatible way.
old:
if (\Icewind\SMB\Server::NativeAvailable()) {
$server = new \Icewind\SMB\NativeServer($host, $user, $password);
} else {
$server = new \Icewind\SMB\Server($host, $user, $password);
}
new:
$auth = new \Icewind\SMB\BasicAuth($user, $workgroup, $password);
$serverFactory = new \Icewind\SMB\ServerFactory();
$server = $serverFactory->createServer($host, $auth);
The new ServerFactory
will automatically pick the native backend where available..
Additionally the NativeServer
, Server
and their related classes have been separated into their own namespaces (Icewind\SMB\Native
and Icewind\SMB\Wrapped
respectively)
New Features
This release adds support for multiple authentication methods, currently the following methods are supported:
BasicAuth
: basic username/password authenticationAnonymousAuth
: connect as anonymouslyKerberosAuth
: Use a kerberos ticket to authenticate (note that you'll need to ensure that kerberos ticket is available for php yourself)
You can pick an authentication method by creating an instance of the desired authentication class backend and passing it to the server factory.