Skip to content

Commit

Permalink
Merge pull request #109 from meyron/patch-1
Browse files Browse the repository at this point in the history
Missing config definition SFTP adapter
  • Loading branch information
tgalopin authored Sep 12, 2022
2 parents ab674be + ae25f49 commit e077fec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Adapter/Builder/SftpAdapterDefinitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ protected function configureOptions(OptionsResolver $resolver)
$resolver->setDefault('privateKey', null);
$resolver->setAllowedTypes('privateKey', ['string', 'null']);

$resolver->setDefault('passphrase', null);
$resolver->setAllowedTypes('passphrase', ['string', 'null']);

$resolver->setDefault('hostFingerprint', null);
$resolver->setAllowedTypes('hostFingerprint', ['string', 'null']);

$resolver->setDefault('timeout', 90);
$resolver->setAllowedTypes('timeout', 'scalar');

Expand Down
6 changes: 6 additions & 0 deletions tests/Adapter/Builder/SftpAdapterDefinitionBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function provideValidOptions()
'port' => 22,
'root' => '/path/to/root',
'privateKey' => '/path/to/or/contents/of/privatekey',
'passphrase' => null,
'hostFingerprint' => null,
'timeout' => 30,
]];
}
Expand All @@ -57,6 +59,8 @@ public function testOptionsBehavior()
'port' => 22,
'root' => '/path/to/root',
'privateKey' => '/path/to/or/contents/of/privatekey',
'passphrase' => null,
'hostFingerprint' => null,
'timeout' => 30,
'directoryPerm' => 0755,
'permPrivate' => 0700,
Expand All @@ -68,6 +72,8 @@ public function testOptionsBehavior()
'port' => 22,
'root' => '/path/to/root',
'privateKey' => '/path/to/or/contents/of/privatekey',
'passphrase' => null,
'hostFingerprint' => null,
'timeout' => 30,
'directoryPerm' => 0755,
'permPrivate' => 0700,
Expand Down

0 comments on commit e077fec

Please sign in to comment.