Skip to content

Commit

Permalink
Improve composer compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mitelg committed Feb 8, 2018
1 parent c8b5066 commit 41b3a35
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Resources/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

<services>
<service id="swag_media_sftp.subscriber.adapter_collection_subscriber" class="SwagMediaSftp\Subscriber\AdapterCollectionSubscriber">
<tag name="shopware.event_subscriber" />
<tag name="shopware.event_subscriber"/>
</service>
</services>

</container>
12 changes: 9 additions & 3 deletions Subscriber/AdapterCollectionSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace SwagMediaSftp\Subscriber;

use Enlight\Event\SubscriberInterface;
Expand All @@ -7,10 +8,16 @@
use League\Flysystem\AdapterInterface;
use League\Flysystem\Sftp\SftpAdapter;

require __DIR__ . "/../vendor/autoload.php";
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}

class AdapterCollectionSubscriber implements SubscriberInterface {
class AdapterCollectionSubscriber implements SubscriberInterface
{

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return [
Expand Down Expand Up @@ -48,5 +55,4 @@ public function createSftpAdapter(Enlight_Event_EventArgs $args)
'timeout' => $config['timeout']
]);
}

}
4 changes: 3 additions & 1 deletion SwagMediaSftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@

use Shopware\Components\Plugin;

class SwagMediaSftp extends Plugin {}
class SwagMediaSftp extends Plugin
{
}
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/5.2/engine/Shopware/Components/Plugin/schema/plugin.xsd">

<version>1.0.0</version>
<version>1.0.1</version>
<author>shopware AG</author>
<license>MIT</license>

Expand All @@ -13,6 +13,6 @@
<description lang="de">SFTP-Erweiterung für die Media Adapter</description>
<description lang="en">SFTP-Extension for the Shopware media adapters</description>

<compatibility minVersion="5.2.0" />
<compatibility minVersion="5.2.0"/>

</plugin>

0 comments on commit 41b3a35

Please sign in to comment.