Skip to content

Commit

Permalink
Merge pull request #8 from PascalThesing/issue-6/master/fix-autoloading
Browse files Browse the repository at this point in the history
ISSUE-6 - fixes #6 autoloading
  • Loading branch information
mitelg authored Feb 27, 2019
2 parents 6c6a734 + 9c65c3c commit cb7713e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Shopware 5 editor configuration normalization
# http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = lf
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.ini]
insert_final_newline = false
8 changes: 1 addition & 7 deletions Subscriber/AdapterCollectionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@

use Enlight\Event\SubscriberInterface;
use Enlight_Event_EventArgs;

use League\Flysystem\AdapterInterface;
use League\Flysystem\Sftp\SftpAdapter;

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

class AdapterCollectionSubscriber implements SubscriberInterface
{

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents()
{
return [
'Shopware_Collect_MediaAdapter_sftp' => 'createSftpAdapter'
'Shopware_Collect_MediaAdapter_sftp' => 'createSftpAdapter',
];
}

Expand Down
4 changes: 4 additions & 0 deletions SwagMediaSftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
class SwagMediaSftp extends Plugin
{
}

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

0 comments on commit cb7713e

Please sign in to comment.