Ejegg has submitted this change and it was merged.

Change subject: include SmashPig through Composer
......................................................................


include SmashPig through Composer

Also coordinates vendor/ patch

Change-Id: I38d9c6cc0fc31e6e624aab6e0abcc6255da112d0
---
M composer.json
M composer.lock
M sites/all/modules/wmf_audit/worldpay/worldpay_audit.module
M vendor
4 files changed, 168 insertions(+), 23 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved



diff --git a/composer.json b/composer.json
index b76a461..2c0a2bf 100644
--- a/composer.json
+++ b/composer.json
@@ -15,6 +15,10 @@
         {
             "type": "vcs",
             "url": 
"https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DonationInterface.git";
+        },
+        {
+            "type": "vcs",
+            "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/SmashPig.git";
         }
     ],
     "support": {
@@ -23,6 +27,7 @@
     "require": {
         "cogpowered/finediff": "0.*",
         "wikimedia/DonationInterface": "dev-drupal",
+        "wikimedia/SmashPig": "dev-master",
         "fusesource/stomp-php": "2.*",
         "phpmailer/phpmailer": "5.2.6",
         "phpseclib/phpseclib": "0.3.7",
diff --git a/composer.lock b/composer.lock
index ede9cf1..8abfb36 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "hash": "293cae5eec4ee935625711e18c44ba34",
+    "hash": "118d4f47ff407c79a3a6d54fe95442cd",
     "packages": [
         {
             "name": "cogpowered/finediff",
@@ -260,17 +260,121 @@
             "time": "2014-07-05 16:36:21"
         },
         {
-            "name": "twig/twig",
-            "version": "v1.16.0",
+            "name": "symfony/event-dispatcher",
+            "version": "v2.3.23",
+            "target-dir": "Symfony/Component/EventDispatcher",
             "source": {
                 "type": "git",
-                "url": "https://github.com/fabpot/Twig.git";,
-                "reference": "8ce37115802e257a984a82d38254884085060024"
+                "url": "https://github.com/symfony/EventDispatcher.git";,
+                "reference": "36a40695d94e948d7a85347db0b12ba446c400fa"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/fabpot/Twig/zipball/8ce37115802e257a984a82d38254884085060024";,
-                "reference": "8ce37115802e257a984a82d38254884085060024",
+                "url": 
"https://api.github.com/repos/symfony/EventDispatcher/zipball/36a40695d94e948d7a85347db0b12ba446c400fa";,
+                "reference": "36a40695d94e948d7a85347db0b12ba446c400fa",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "symfony/dependency-injection": "~2.0"
+            },
+            "suggest": {
+                "symfony/dependency-injection": "",
+                "symfony/http-kernel": ""
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\EventDispatcher\\": ""
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/";,
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors";
+                },
+                {
+                    "name": "Fabien Potencier",
+                    "email": "[email protected]"
+                }
+            ],
+            "description": "Symfony EventDispatcher Component",
+            "homepage": "http://symfony.com";,
+            "time": "2014-11-30 13:33:44"
+        },
+        {
+            "name": "symfony/http-foundation",
+            "version": "v2.3.23",
+            "target-dir": "Symfony/Component/HttpFoundation",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/HttpFoundation.git";,
+                "reference": "94935ec4f9ad28d554e82c6e1fa11615a031108d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": 
"https://api.github.com/repos/symfony/HttpFoundation/zipball/94935ec4f9ad28d554e82c6e1fa11615a031108d";,
+                "reference": "94935ec4f9ad28d554e82c6e1fa11615a031108d",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.3-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Symfony\\Component\\HttpFoundation\\": ""
+                },
+                "classmap": [
+                    "Symfony/Component/HttpFoundation/Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/";,
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Symfony Community",
+                    "homepage": "http://symfony.com/contributors";
+                },
+                {
+                    "name": "Fabien Potencier",
+                    "email": "[email protected]"
+                }
+            ],
+            "description": "Symfony HttpFoundation Component",
+            "homepage": "http://symfony.com";,
+            "time": "2014-12-02 19:42:47"
+        },
+        {
+            "name": "twig/twig",
+            "version": "v1.16.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/twigphp/Twig.git";,
+                "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc"
+            },
+            "dist": {
+                "type": "zip",
+                "url": 
"https://api.github.com/repos/twigphp/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc";,
+                "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc",
                 "shasum": ""
             },
             "require": {
@@ -314,15 +418,15 @@
             "keywords": [
                 "templating"
             ],
-            "time": "2014-07-05 12:19:05"
+            "time": "2014-10-17 12:53:44"
         },
         {
             "name": "wikimedia/DonationInterface",
             "version": "dev-drupal",
             "source": {
                 "type": "git",
-                "url": "/home/adamw/git/DonationInterface.git",
-                "reference": "76b80e416e5b75e5d56a6b1a7f8529e2416266ed"
+                "url": 
"https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DonationInterface.git";,
+                "reference": "a1944f2c21dcc24d05b0846ff8e5c8176aeffda1"
             },
             "type": "library",
             "autoload": {
@@ -342,7 +446,50 @@
             "support": {
                 "irc": "irc://irc.freenode.net/wikimedia-fundraising"
             },
-            "time": "2014-10-06 22:49:15"
+            "time": "2014-10-27 19:20:24"
+        },
+        {
+            "name": "wikimedia/SmashPig",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/SmashPig.git";,
+                "reference": "f956a0a03c3121d075bd9f8414d5d46990d26d32"
+            },
+            "require": {
+                "php": ">=5.3.3",
+                "symfony/event-dispatcher": ">=2.1,<2.4-dev",
+                "symfony/http-foundation": ">=2.1,<2.4-dev"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "SmashPig\\": "./"
+                }
+            },
+            "license": [
+                "GPLv2"
+            ],
+            "authors": [
+                {
+                    "name": "Katie Horn",
+                    "email": "[email protected]"
+                },
+                {
+                    "name": "Matthew Walker",
+                    "email": "[email protected]"
+                },
+                {
+                    "name": "Adam Roses Wight",
+                    "email": "[email protected]"
+                }
+            ],
+            "description": "The open source PHP flexible payments library and 
frontend/backend mediator.",
+            "homepage": "http://smashpig.org";,
+            "keywords": [
+                "payments, donations"
+            ],
+            "time": "2014-12-09 01:34:40"
         }
     ],
     "packages-dev": [
@@ -353,7 +500,8 @@
     ],
     "minimum-stability": "stable",
     "stability-flags": {
-        "wikimedia/donationinterface": 20
+        "wikimedia/donationinterface": 20,
+        "wikimedia/smashpig": 20
     },
     "prefer-stable": false,
     "platform": [
diff --git a/sites/all/modules/wmf_audit/worldpay/worldpay_audit.module 
b/sites/all/modules/wmf_audit/worldpay/worldpay_audit.module
index 447b318..8679c1b 100644
--- a/sites/all/modules/wmf_audit/worldpay/worldpay_audit.module
+++ b/sites/all/modules/wmf_audit/worldpay/worldpay_audit.module
@@ -7,6 +7,8 @@
 define('WP_AUDIT_LOG_SEARCH_PAST_DAYS', 7);
 define( 'WP_AUDIT_TEST_MODE', true );
 
+use SmashPig\PaymentProviders\WorldPay\Audit\WorldPayAudit;
+
 /**
  * Implementation of hook_menu()
  */
@@ -214,18 +216,8 @@
  * @return mixed An array of recon data, or false
  */
 function worldpay_audit_parse_recon_file($file) {
-  static $parserClass = null;
-  if (is_null($parserClass)) {
-    $parser_directory = variable_get('worldpay_audit_recon_parser_dir', 
WP_AUDIT_RECON_PARSER_DIR);
-
-    //get the classes we need
-    require_once( $parser_directory . 'WorldPayAudit.php' );
-    require_once( $parser_directory . 'TransactionReconciliationFile.php' );
-    $parserClass = 'SmashPig\PaymentProviders\WorldPay\Audit\WorldPayAudit'; 
//yeesh.
-  }
-
   $recon_data = array();
-  $recon_parser = new $parserClass();
+  $recon_parser = new WorldPayAudit();
 
   $data = null;
   try {
diff --git a/vendor b/vendor
index 39254ae..81d07c8 160000
--- a/vendor
+++ b/vendor
-Subproject commit 39254aef5f6f4a5db0e70d0a90d83facb7ce1d65
+Subproject commit 81d07c8f30a35423a22317b37afb89948c9b1487

-- 
To view, visit https://gerrit.wikimedia.org/r/177704
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I38d9c6cc0fc31e6e624aab6e0abcc6255da112d0
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to