Skip to content

Commit e077fec

Browse files
authored
Merge pull request thephpleague#109 from meyron/patch-1
Missing config definition SFTP adapter
2 parents ab674be + ae25f49 commit e077fec

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/Adapter/Builder/SftpAdapterDefinitionBuilder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ protected function configureOptions(OptionsResolver $resolver)
6868
$resolver->setDefault('privateKey', null);
6969
$resolver->setAllowedTypes('privateKey', ['string', 'null']);
7070

71+
$resolver->setDefault('passphrase', null);
72+
$resolver->setAllowedTypes('passphrase', ['string', 'null']);
73+
74+
$resolver->setDefault('hostFingerprint', null);
75+
$resolver->setAllowedTypes('hostFingerprint', ['string', 'null']);
76+
7177
$resolver->setDefault('timeout', 90);
7278
$resolver->setAllowedTypes('timeout', 'scalar');
7379

tests/Adapter/Builder/SftpAdapterDefinitionBuilderTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public function provideValidOptions()
3636
'port' => 22,
3737
'root' => '/path/to/root',
3838
'privateKey' => '/path/to/or/contents/of/privatekey',
39+
'passphrase' => null,
40+
'hostFingerprint' => null,
3941
'timeout' => 30,
4042
]];
4143
}
@@ -57,6 +59,8 @@ public function testOptionsBehavior()
5759
'port' => 22,
5860
'root' => '/path/to/root',
5961
'privateKey' => '/path/to/or/contents/of/privatekey',
62+
'passphrase' => null,
63+
'hostFingerprint' => null,
6064
'timeout' => 30,
6165
'directoryPerm' => 0755,
6266
'permPrivate' => 0700,
@@ -68,6 +72,8 @@ public function testOptionsBehavior()
6872
'port' => 22,
6973
'root' => '/path/to/root',
7074
'privateKey' => '/path/to/or/contents/of/privatekey',
75+
'passphrase' => null,
76+
'hostFingerprint' => null,
7177
'timeout' => 30,
7278
'directoryPerm' => 0755,
7379
'permPrivate' => 0700,

0 commit comments

Comments
 (0)