Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Phpseclib adapter into its own namespace #441

Closed

Conversation

akerouanton
Copy link
Contributor

@akerouanton akerouanton commented Dec 15, 2016

See #440

@PedroTroller PedroTroller self-requested a review March 2, 2017 15:00
use Gaufrette\Adapter;
use phpseclib\Net\SFTP as SecLibSFTP;
use Gaufrette\Filesystem;
use Gaufrette\File;

/**
* @deprecated 0.4 This adapter is deprecated since version 0.4. Use Gaufrette\Adapters\Phpseclib\Sftp instead.
*/
class PhpseclibSftp implements Adapter,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the old classe should extends from the new one to not duplicates the code.

},
"require-dev": {
"phpspec/phpspec": "^3.1",
"phpunit/phpunit": "3.7.*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7 ? Seriously ? This is unmaintained since 5 years at least.

Use ^4.8.35 || ^5.7 instead (and then work on switching to the namespaced test case and add || ^6 in the condition)

processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php.dist"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why .dist ?

$baseDir = dirname(__DIR__);

$loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('Gaufrette', array($baseDir.'/vendor/knplabs/gaufrette/tests/'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use autoload-dev instead of altering the configuration of the generated loader. this will make this whole file useless


$loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('Gaufrette', array($baseDir.'/vendor/knplabs/gaufrette/tests/'));
$loader->register();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless as it is already registered in autoload.php

@@ -2,11 +2,16 @@

namespace Gaufrette\Adapter;

@trigger_error('The '.__NAMESPACE__.'\PhpseclibSftp is deprecated since version 0.4. Use Gaufrette\Adapters\Phpseclib\Sftp instead.', E_USER_DEPRECATED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong namespace. Adapter is not a plural

@akerouanton akerouanton force-pushed the split/phpseclib-adapter branch from dc1ba4d to 753c1a5 Compare March 13, 2017 00:01
@akerouanton akerouanton force-pushed the split/phpseclib-adapter branch 4 times, most recently from e6d8a48 to 382ebc7 Compare March 13, 2017 23:13
@akerouanton akerouanton force-pushed the split/phpseclib-adapter branch from 382ebc7 to 3eda698 Compare March 14, 2017 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants