'path' =>
$plugin->
getPath(),
'autoload' =>
json_encode($plugin->
getAutoload(), \JSON_THROW_ON_ERROR
),
'created_at' =>
$createdAt->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
'installed_at' =>
$installedAt ?
$installedAt->
format(Defaults::STORAGE_DATE_TIME_FORMAT
) : null,
];
$this->connection->
insert('plugin',
$data);
} protected function getNotInstalledPlugin(): PluginEntity
{ $plugin =
new PluginEntity();
$plugin->
assign([ 'id' => Uuid::
randomHex(),
'name' => 'SwagTest',
'baseClass' => SwagTest::
class,
'version' => '1.0.1',
'active' => false,
'path' => __DIR__ . '/_fixture/plugins/SwagTest',
'autoload' =>
['psr-4' =>
['SwagTest\\' => 'src/'
]],
'createdAt' =>
new \
DateTimeImmutable('2019-01-01'
),
'managedByComposer' => false,
]);