Skip to content

Commit

Permalink
Deprecation sftp v2 in favor v3
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias committed Jun 30, 2022
1 parent 670df21 commit a847979
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 1 deletion.
5 changes: 5 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
</exclude>
</whitelist>
</filter>
<groups>
<exclude>
<group>legacy</group>
</exclude>
</groups>
</phpunit>
3 changes: 3 additions & 0 deletions src/PhpseclibV2/ConnectionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use phpseclib\Net\SFTP;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\ConnectionProvider" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\ConnectionProvider" instead.
*/
interface ConnectionProvider
{
public function provideConnection(): SFTP;
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/ConnectivityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use phpseclib\Net\SFTP;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\ConnectivityChecker" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\ConnectivityChecker" instead.
*/
interface ConnectivityChecker
{
public function isConnected(SFTP $connection): bool;
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/FixatedConnectivityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use phpseclib\Net\SFTP;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\FixatedConnectivityChecker" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\FixatedConnectivityChecker" instead.
*/
class FixatedConnectivityChecker implements ConnectivityChecker
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/PhpseclibV2/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CAUTION: This package is deprecated since Flysystem 3.0 Instead, use the [Flysystem for SFTP v3](https://github.com/thephpleague/flysystem-sftp-v3)

## Sub-split of Flysystem for SFTP using phpseclib2.

> ⚠️ this is a sub-split, for pull requests and issues, visit: https://github.com/thephpleague/flysystem
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/SftpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

use function rtrim;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\SftpAdapter" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\SftpAdapter" instead.
*/
class SftpAdapter implements FilesystemAdapter
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/PhpseclibV2/SftpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* @group sftp
* @group legacy
*/
class SftpAdapterTest extends FilesystemAdapterTestCase
{
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/SftpConnectionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use phpseclib\System\SSH\Agent;
use Throwable;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\SftpConnectionProvider" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\SftpConnectionProvider" instead.
*/
class SftpConnectionProvider implements ConnectionProvider
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/PhpseclibV2/SftpConnectionProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/**
* @group sftp
* @group sftp-connection
* @group legacy
*/
class SftpConnectionProviderTest extends TestCase
{
Expand Down
2 changes: 2 additions & 0 deletions src/PhpseclibV2/SftpStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* @internal This is only used for testing purposes.
*
* @deprecated The "League\Flysystem\PhpseclibV2\SftpStub" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\SftpStub" instead.
*/
class SftpStub extends SFTP
{
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/SimpleConnectivityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use phpseclib\Net\SFTP;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\SimpleConnectivityChecker" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\SimpleConnectivityChecker" instead.
*/
class SimpleConnectivityChecker implements ConnectivityChecker
{
public function isConnected(SFTP $connection): bool
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/StubSftpConnectionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use phpseclib\Net\SFTP;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\StubSftpConnectionProvider" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\StubSftpConnectionProvider" instead.
*/
class StubSftpConnectionProvider implements ConnectionProvider
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/UnableToAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use League\Flysystem\FilesystemException;
use RuntimeException;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\UnableToAuthenticate" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\UnableToAuthenticate" instead.
*/
class UnableToAuthenticate extends RuntimeException implements FilesystemException
{
public static function withPassword(): UnableToAuthenticate
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/UnableToConnectToSftpHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use League\Flysystem\FilesystemException;
use RuntimeException;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\UnableToConnectToSftpHost" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\UnableToConnectToSftpHost" instead.
*/
class UnableToConnectToSftpHost extends RuntimeException implements FilesystemException
{
public static function atHostname(string $host): UnableToConnectToSftpHost
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/UnableToEstablishAuthenticityOfHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use League\Flysystem\FilesystemException;
use RuntimeException;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\UnableToEstablishAuthenticityOfHost" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\UnableToEstablishAuthenticityOfHost" instead.
*/
class UnableToEstablishAuthenticityOfHost extends RuntimeException implements FilesystemException
{
public static function becauseTheAuthenticityCantBeEstablished(string $host): UnableToEstablishAuthenticityOfHost
Expand Down
3 changes: 3 additions & 0 deletions src/PhpseclibV2/UnableToLoadPrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use League\Flysystem\FilesystemException;
use RuntimeException;

/**
* @deprecated The "League\Flysystem\PhpseclibV2\UnableToLoadPrivateKey" class is deprecated since Flysystem 3.0, use "League\Flysystem\PhpseclibV3\UnableToLoadPrivateKey" instead.
*/
class UnableToLoadPrivateKey extends RuntimeException implements FilesystemException
{
public function __construct(string $message = "Unable to load private key.")
Expand Down
3 changes: 2 additions & 1 deletion src/PhpseclibV2/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"name": "Frank de Jonge",
"email": "[email protected]"
}
]
],
"abandoned": "league/flysystem-sftp-v3"
}

0 comments on commit a847979

Please sign in to comment.