Skip to content

3.0.0

Compare
Choose a tag to compare
@icewind1991 icewind1991 released this 24 May 10:10
· 172 commits to master since this release

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 authentication
  • AnonymousAuth: connect as anonymously
  • KerberosAuth: 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.