12
12
use Magento \Framework \Config \Composer \Package ;
13
13
use Magento \Framework \Config \Composer \PackageFactory ;
14
14
use Magento \Framework \Filesystem ;
15
- use Magento \Framework \Filesystem \Directory \ReadInterfaceFactory ;
15
+ use Magento \Framework \Filesystem \Directory \ReadFactory ;
16
16
17
17
/**
18
18
* Sample Data dependency
@@ -40,7 +40,7 @@ class Dependency
40
40
private $ componentRegistrar ;
41
41
42
42
/**
43
- * @var ReadInterfaceFactory
43
+ * @var ReadFactory
44
44
*/
45
45
private $ directoryReadFactory ;
46
46
@@ -51,21 +51,21 @@ class Dependency
51
51
* @param Filesystem $filesystem @deprecated 2.3.0 $directoryReadFactory is used instead
52
52
* @param PackageFactory $packageFactory
53
53
* @param ComponentRegistrarInterface $componentRegistrar
54
- * @param Filesystem\Directory\ReadInterfaceFactory |null $directoryReadFactory
54
+ * @param Filesystem\Directory\ReadFactory |null $directoryReadFactory
55
55
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
56
56
*/
57
57
public function __construct (
58
58
ComposerInformation $ composerInformation ,
59
59
Filesystem $ filesystem ,
60
60
PackageFactory $ packageFactory ,
61
61
ComponentRegistrarInterface $ componentRegistrar ,
62
- \Magento \Framework \Filesystem \Directory \ReadInterfaceFactory $ directoryReadFactory = null
62
+ \Magento \Framework \Filesystem \Directory \ReadFactory $ directoryReadFactory = null
63
63
) {
64
64
$ this ->composerInformation = $ composerInformation ;
65
65
$ this ->packageFactory = $ packageFactory ;
66
66
$ this ->componentRegistrar = $ componentRegistrar ;
67
67
$ this ->directoryReadFactory = $ directoryReadFactory ?:
68
- ObjectManager::getInstance ()->get (ReadInterfaceFactory ::class);
68
+ ObjectManager::getInstance ()->get (ReadFactory ::class);
69
69
}
70
70
71
71
/**
@@ -123,7 +123,7 @@ private function getModuleComposerPackage($moduleDir)
123
123
*/
124
124
foreach ([$ moduleDir , $ moduleDir . DIRECTORY_SEPARATOR . '.. ' ] as $ dir ) {
125
125
/** @var Filesystem\Directory\ReadInterface $directory */
126
- $ directory = $ this ->directoryReadFactory ->create ([ ' path ' => $ dir] );
126
+ $ directory = $ this ->directoryReadFactory ->create ($ dir );
127
127
if ($ directory ->isExist ('composer.json ' ) && $ directory ->isReadable ('composer.json ' )) {
128
128
/** @var Package $package */
129
129
return $ this ->packageFactory ->create (['json ' => json_decode ($ directory ->readFile ('composer.json ' ))]);
0 commit comments