Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isPluginComposerValid example
foreach
(
$filesystemPlugins
as
$filesystemPlugin
)
{
$pluginPath
=
$filesystemPlugin
->
getRealPath
(
)
;
try
{
$package
=
$this
->packageProvider->
getPluginComposerPackage
(
$pluginPath
,
$composerIO
)
;
}
catch
(
PluginComposerJsonInvalidException
$e
)
{
$errors
->
add
(
$e
)
;
continue
;
}
if
(
!
$this
->
isShopwarePluginType
(
$package
)
|| !
$this
->
isPluginComposerValid
(
$package
)
)
{
$this
->
addError
(
$pluginPath
,
$errors
)
;
continue
;
}
$pluginName
=
$this
->
getPluginNameFromPackage
(
$package
)
;
$plugins
[
$pluginName
]
=
(
new
PluginFromFileSystemStruct
(
)
)
->
assign
(
[
'baseClass' =>
$pluginName
,
'path' =>
$filesystemPlugin
->
getPathname
(
)
,
'managedByComposer' => false,