Adamw has submitted this change and it was merged.
Change subject: SmashPig now uses Symfony/HttpFramework (and Composer!)
......................................................................
SmashPig now uses Symfony/HttpFramework (and Composer!)
We can now have composer handle our dependencies and although
we dont make great use of it right now, the far more fully
feature Symfony HttpFramework.
Change-Id: I94b8eb1a7e9b62b0d5bdf212cc9d78c3829220ff
---
M SmashPig/.gitignore
M SmashPig/Core/AutoLoader.php
M SmashPig/Core/Http/IHttpActionHandler.php
M SmashPig/Core/Http/Request.php
M SmashPig/Core/Http/RequestHandler.php
M SmashPig/Core/Http/Response.php
M SmashPig/Core/Listeners/ListenerBase.php
M SmashPig/Core/Listeners/RestListener.php
M SmashPig/Core/Listeners/SoapListener.php
M SmashPig/Maintenance/MaintenanceBase.php
D SmashPig/Maintenance/OrphanCollider.php
M SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M SmashPig/PublicHttp/smashpig_http_handler.php
M SmashPig/README
A SmashPig/composer.json
A SmashPig/composer.lock
M SmashPig/config_defaults.php
17 files changed, 285 insertions(+), 162 deletions(-)
Approvals:
Adamw: Verified; Looks good to me, approved
diff --git a/SmashPig/.gitignore b/SmashPig/.gitignore
index 295b47b..57b26d4 100644
--- a/SmashPig/.gitignore
+++ b/SmashPig/.gitignore
@@ -1,2 +1,8 @@
+# Composer
+vendor
+
+# Configuration
config.php
+
+# IDE Tools
.idea
diff --git a/SmashPig/Core/AutoLoader.php b/SmashPig/Core/AutoLoader.php
index 59bdb2b..dc0df44 100644
--- a/SmashPig/Core/AutoLoader.php
+++ b/SmashPig/Core/AutoLoader.php
@@ -14,6 +14,7 @@
/**
* Installs the SmashPig AutoLoader into the class loader chain.
+ * Will also load the composer autoloader.
*
* @param string $defaultPath The path to the SmashPig library.
*
@@ -27,6 +28,7 @@
$defaultPath = AutoLoader::getInstallPath();
}
static::$instance = new AutoLoader( $defaultPath );
+
return true;
}
}
@@ -84,11 +86,30 @@
}
/**
+ * Include
+ */
+ public function addConfiguredIncludes() {
+ $defaultPath = AutoLoader::getInstallPath();
+ $config = Configuration::getDefaultConfig();
+
+ foreach ( $config->val( 'include-files' ) as $file ) {
+ if ( substr( $file, 0, 1 ) !== DIRECTORY_SEPARATOR ) {
+ // Path relative so modify it
+ $file = AutoLoader::makePath( $defaultPath,
$file );
+ }
+ Logger::debug( "AutoLoader including file '$file'" );
+ require_once( $file );
+ }
+ }
+
+ /**
* Add a new location path for a namespace. Will throw an error if the
namespace
* already has a location.
*
* @param string $namespace Fully qualified namespace name
* @param string $path Location on disk
+ *
+ * @throws SmashPigException if the namespace already exists
*/
public function addNamespacePath( $namespace, $path ) {
$namespace = trim( $namespace, '\\' );
diff --git a/SmashPig/Core/Http/IHttpActionHandler.php
b/SmashPig/Core/Http/IHttpActionHandler.php
index 1a6eec3..9db7de8 100644
--- a/SmashPig/Core/Http/IHttpActionHandler.php
+++ b/SmashPig/Core/Http/IHttpActionHandler.php
@@ -1,5 +1,7 @@
<?php namespace SmashPig\Core\Http;
+use Symfony\Component\HttpFoundation\Request;
+
/**
* Declaration that a class is able to process an HTTP request.
*/
@@ -9,9 +11,9 @@
* specification of what the user requested action is may be found in
the $pathParts
* parameter.
*
- * @param Request $request HTTP request context object
+ * @param Request $request HTTP request context object
* @param Response $response HTTP response data object
- * @param array $pathParts Any additional action parameters that
were part of the URI
+ * @param array $pathParts Any additional action parameters that
were part of the URI
*
* @return Null
*/
diff --git a/SmashPig/Core/Http/Request.php b/SmashPig/Core/Http/Request.php
index 2e78b38..a8c021a 100644
--- a/SmashPig/Core/Http/Request.php
+++ b/SmashPig/Core/Http/Request.php
@@ -1,25 +1,9 @@
<?php namespace SmashPig\Core\Http;
-class Request {
- public function __construct() {
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
- }
-
- /**
- * Get post data without interpretation
- *
- * @return string
- */
- public function getRawPostData() {
+class Request extends SymfonyRequest {
+ public function getRawRequest() {
return file_get_contents( 'php://input' );
}
-
- /**
- * Return all GET/POST/COOKIE data as an associative array
- *
- * @return array
- */
- public function getValues() {
- return $_REQUEST;
- }
-}
+}
\ No newline at end of file
diff --git a/SmashPig/Core/Http/RequestHandler.php
b/SmashPig/Core/Http/RequestHandler.php
index ee2fa7a..7bc3c96 100644
--- a/SmashPig/Core/Http/RequestHandler.php
+++ b/SmashPig/Core/Http/RequestHandler.php
@@ -5,6 +5,8 @@
use SmashPig\Core\Logging\Logger;
use SmashPig\Core\AutoLoader;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
+
/**
* Entry point for the base initialized SmashPig application. Expects the
requested
* URL in the format p=<original path>&<original parameters>. The path is
required to
@@ -20,24 +22,27 @@
* Each subarray is required to have a 'namespace' key and a 'disk-path' key.
*/
class RequestHandler {
- /** @var Request Wrapper for the current HTTP request */
- protected static $request;
-
- /** @var Response Wrapper for the current HTTP response */
- protected static $response;
-
+ /**
+ * @param null $configPath
+ *
+ * @return Response
+ */
public static function process( $configPath = null ) {
// --- Get the request and response objects
- RequestHandler::$request = new Request();
- RequestHandler::$response = new Response();
+ $symfonyRequest = SymfonyRequest::createFromGlobals();
+ $symfonyResponse = new Response();
+ $symfonyResponse->setPrivate();
// --- Break the request into parts ---
- $uri = ( array_key_exists( 'p', $_GET ) ) ? $_GET[ 'p' ] : '';
+ $uri = $symfonyRequest->query->get( 'p', '' );
$parts = explode( '/', $uri );
if ( count( $parts ) < 2 ) {
- static::$response->killResponse( 403, 'Bad URI format.'
);
- return;
+ $symfonyResponse->setStatusCode(
+ 403,
+ 'Cannot process this request: bad URI format. A
configuration node and an action is required'
+ );
+ return $symfonyResponse;
}
$view = array_shift( $parts );
@@ -63,40 +68,41 @@
// Check to make sure there's even a point to continuing
if ( !$config->nodeExists( "endpoints/$action" ) ) {
Logger::debug( '403 will be given for unknown action on
inbound URL.', $uri );
- static::$response->killResponse( 403, "Action '$action'
not configured. Cannot continue." );
- return;
+ $symfonyResponse->setStatusCode( 403, "Action '$action'
not configured. Cannot continue." );
+ return $symfonyResponse;
}
// Register fun additional things
AutoLoader::getInstance()->addConfiguredIncludePaths();
AutoLoader::getInstance()->addConfiguredNamespaces();
+ AutoLoader::getInstance()->addConfiguredIncludes();
// --- Actually get the endpoint object and start the request
---
$endpointObj = $config->obj( "endpoints/$action" );
if ( $endpointObj instanceof IHttpActionHandler ) {
- $endpointObj->execute( RequestHandler::$request,
RequestHandler::$response, $parts );
+ $endpointObj->execute( $symfonyRequest,
$symfonyResponse, $parts );
} else {
- Logger::debug( "Requested action '$action' does not
implement a known handler. Cannot continue." );
- static::$response->killResponse( 500 );
- return;
+ $str = "Requested action '$action' does not implement a
known handler. Cannot continue.";
+ Logger::debug( $str );
+ $symfonyResponse->setStatusCode( 500, $str );
}
- static::$response->writeResponse();
- }
-
- public static function startRequest() {
- \HttpResponse::capture();
- }
-
- public static function end() {
- \HttpResponse::send();
+ $code = $symfonyResponse->getStatusCode();
+ if ( ( $code !== 200 ) && ( $code !== 302 ) ) {
+ $symfonyResponse->setContent( '' );
+ }
+ return $symfonyResponse;
}
public static function lastChanceErrorHandler( $errno, $errstr,
$errfile = 'Unknown File',
$errline = 'Unknown Line', $errcontext = null
) {
- static::$response->killResponse( 500 );
Logger::alert( "Last chance error handler fired. ($errno)
$errstr @ $errfile:$errline", $errcontext );
+
+ $response = new Response();
+ $response->setPrivate();
+ $response->setStatusCode( 500, "Unhandled internal server
error." );
+ $response->send();
return false;
}
@@ -108,7 +114,11 @@
* @param \Exception $ex The uncaught exception
*/
public static function lastChanceExceptionHandler( $ex ) {
- static::$response->killResponse( 500 );
Logger::alert( "Last chance exception handler fired.", null,
$ex );
+
+ $response = new Response();
+ $response->setPrivate();
+ $response->setStatusCode( 500, "Unhandled internal server
exception." );
+ $response->send();
}
}
diff --git a/SmashPig/Core/Http/Response.php b/SmashPig/Core/Http/Response.php
index 12abd7e..06b3f7b 100644
--- a/SmashPig/Core/Http/Response.php
+++ b/SmashPig/Core/Http/Response.php
@@ -1,74 +1,23 @@
<?php namespace SmashPig\Core\Http;
-use SmashPig\Core\Logging\Logger;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
-class Response {
+class Response extends SymfonyResponse {
+ protected $outputDisabled = false;
- protected $killed = false;
-
- protected $headers = array();
- protected $body = '';
-
- public function setHeader( $name, $value ) {
- $headers[ $name ] = $value;
- }
-
- public function setBody( $content ) {
- if ( $this->killed ) {
- Logger::warning( 'Could not set new body content.
Output has already been killed.', $content );
- return;
- }
-
- $this->body = $content;
- }
-
- public function appendBody( $content ) {
- if ( $this->killed ) {
- Logger::warning( 'Could not set append body content.
Output has already been killed.', $content );
- return;
- }
-
- $this->body .= $content;
- }
-
- public function killResponse( $code, $reason = null ) {
- if ( $reason === null ) {
- $reason = "HTTP $code: No reason publicly given.";
- }
-
- header( ':', true, $code );
- $this->setBody( $reason );
-
- $this->writeResponse();
- }
-
- public function redirect( $url ) {
- $this->headers[ 'Location' ] = $url;
- }
-
- public function writeResponse() {
- if ( $this->killed ) {
- Logger::notice( 'Body content already sent. Will not
send again.' );
- return;
- }
-
- $this->killed = true;
- $this->sendHeaders();
- print( $this->body );
- }
-
- public function sendHeaders() {
- if ( $this->killed ) {
- Logger::notice( 'Body content already sent. Cannot send
headers.' );
- return;
- }
-
- foreach ( $this->headers as $header => $value ) {
- header( $header . ':' . $value, true );
+ public function send() {
+ if ( !$this->outputDisabled ) {
+ return parent::send();
+ } else {
+ return $this;
}
}
- public function disableOutput() {
- $this->killed = true;
+ public function setOutputDisabled( $disabled = true ) {
+ $this->outputDisabled = $disabled;
}
-}
+
+ public function getOutputDisabled() {
+ return $this->outputDisabled;
+ }
+}
\ No newline at end of file
diff --git a/SmashPig/Core/Listeners/ListenerBase.php
b/SmashPig/Core/Listeners/ListenerBase.php
index dca1c76..b8503c0 100644
--- a/SmashPig/Core/Listeners/ListenerBase.php
+++ b/SmashPig/Core/Listeners/ListenerBase.php
@@ -2,14 +2,21 @@
use SmashPig\Core;
use SmashPig\Core\Http\IHttpActionHandler;
-use SmashPig\Core\Http\Request;
use SmashPig\Core\Http\Response;
+use SmashPig\Core\Http\Request;
use SmashPig\Core\Logging\Logger;
use SmashPig\Core\Configuration;
use SmashPig\Core\DataStores\KeyedOpaqueDataStore;
use SmashPig\Core\Messages\ListenerMessage;
abstract class ListenerBase implements IHttpActionHandler {
+
+ /** @var Request */
+ protected $request;
+
+ /** @var Response */
+ protected $response;
+
/** @var Configuration object - stores all listener configuration */
protected $c;
@@ -21,7 +28,10 @@
$this->inflightStore = $this->c->obj( 'data-store/inflight' );
}
- public abstract function execute( Request $request, Response $response,
$pathParts );
+ public function execute( Request $request, Response $response,
$pathParts ) {
+ $this->request = $request;
+ $this->response = $response;
+ }
/**
* Perform security checks that do not rely on the contents of the
envelope or the message.
@@ -46,23 +56,22 @@
// Obtain whitelist
$whitelist = $this->c->val( 'security/ip-whitelist', true );
- if ( empty( $whitelist ) ) {
- Logger::info( 'No IP whitelist specified. Continuing
and not validating remote IP.' );
- return;
+ // Obtain remote party IP
+ $trustedHeader = $this->c->val( 'security/ip-header-name' );
+ if ( $trustedHeader ) {
+ $this->request->setTrustedHeaderName(
Request::HEADER_CLIENT_IP, $trustedHeader );
+ }
+ $trustedProxies = $this->c->val( 'security/ip-trusted-proxies'
);
+ if ( $trustedProxies ) {
+ $this->request->setTrustedProxies( $trustedProxies );
}
- // Obtain remote party IP
- $ipHeaderName = $this->c->val( 'security/ip-header-name' );
- if ( $ipHeaderName !== '' ) {
- $headers = getallheaders();
- if ( !$headers || !array_key_exists( $ipHeaderName,
$headers ) ) {
- throw new ListenerConfigException(
- "Unexpected platform issue when trying
to get remote box's IP from '{$ipHeaderName}'"
- );
- }
- $remote_ip = $headers[ $ipHeaderName ];
- } else {
- $remote_ip = $_SERVER[ 'REMOTE_ADDR' ];
+ $remote_ip = $this->request->getClientIp();
+
+ // Do we continue?
+ if ( empty( $whitelist ) ) {
+ Logger::info( "No IP whitelist specified. Continuing
and not validating remote IP '{$remote_ip}'." );
+ return;
}
// Validate remote party IP (right now we can only handle IPv4)
@@ -99,8 +108,9 @@
}
// we have fallen through everything in the whitelist, throw
+ $agent = $this->request->server->get( 'User-Agent', '' );
throw new ListenerSecurityException(
- "Received a connection from a bogus IP: {$remote_ip},
agent: {$_SERVER[ 'HTTP_USER_AGENT' ]}"
+ "Received a connection from a bogus IP: {$remote_ip},
agent: {$agent}"
);
}
diff --git a/SmashPig/Core/Listeners/RestListener.php
b/SmashPig/Core/Listeners/RestListener.php
index 2b05f11..f3cc3a3 100644
--- a/SmashPig/Core/Listeners/RestListener.php
+++ b/SmashPig/Core/Listeners/RestListener.php
@@ -2,11 +2,13 @@
use SmashPig\Core;
use SmashPig\Core\Logging\Logger;
-use SmashPig\Core\Http\Request;
use SmashPig\Core\Http\Response;
+use Symfony\Component\HttpFoundation\Request;
abstract class RestListener extends ListenerBase {
public function execute( Request $request, Response $response,
$pathParts ) {
+ parent::execute( $request, $response, $pathParts );
+
Logger::info( "Starting processing of listener request from
{$_SERVER[ 'REMOTE_ADDR' ]}" );
try {
@@ -27,19 +29,19 @@
$this->ackEnvelope();
} catch ( ListenerSecurityException $ex ) {
Logger::notice( 'Message denied by security policy,
death is me.', null, $ex );
- $response->killResponse( 403 );
+ $response->setStatusCode( 403, "Not authorized." );
}
catch ( ListenerDataException $ex ) {
Logger::error( 'Listener received request it could not
process, death is me.', null, $ex );
- $response->killResponse( 500, 'Received data could not
be processed.' );
+ $response->setStatusCode( 500, 'Received data could not
be processed.' );
}
catch ( Core\ConfigurationException $ex ) {
Logger::alert( 'Some sad panda gave me a bad
configuration.', null, $ex );
- $response->killResponse( 500 );
+ $response->setStatusCode( 500, "Configuration error." );
}
catch ( \Exception $ex ) {
Logger::error( 'Listener threw an unknown exception,
death is me.', null, $ex );
- $response->killResponse( 500 );
+ $response->setStatusCode( 500, "Unknown listener
exception" );
}
Logger::info( 'Finished processing listener request' );
diff --git a/SmashPig/Core/Listeners/SoapListener.php
b/SmashPig/Core/Listeners/SoapListener.php
index 363e9ab..cf9017c 100644
--- a/SmashPig/Core/Listeners/SoapListener.php
+++ b/SmashPig/Core/Listeners/SoapListener.php
@@ -2,8 +2,8 @@
use SmashPig\Core;
use SmashPig\Core\Logging\Logger;
-use SmashPig\Core\Http\Request;
use SmashPig\Core\Http\Response;
+use SmashPig\Core\Http\Request;
abstract class SoapListener extends ListenerBase {
@@ -28,12 +28,14 @@
}
public function execute( Request $request, Response $response,
$pathParts ) {
+ parent::execute( $request, $response, $pathParts );
+
Logger::info( "Starting processing of listener request from
{$_SERVER[ 'REMOTE_ADDR' ]}" );
try {
$this->doIngressSecurity();
- $soapData = $request->getRawPostData();
+ $soapData = $request->getRawRequest();
$tl = Logger::getTaggedLogger( 'RawData' );
$tl->info( $soapData );
@@ -52,14 +54,14 @@
/* We disable output late in the game in case there was
a last minute exception that could
be handled by the SOAP listener object inside
the handle() context. */
- $response->disableOutput();
+ $response->setOutputDisabled();
} catch ( ListenerSecurityException $ex ) {
Logger::notice( 'Message denied by security policy,
death is me.', null, $ex );
- $response->killResponse( 403 );
+ $response->setStatusCode( 403, "Not authorized." );
}
catch ( \Exception $ex ) {
Logger::error( 'Listener threw an unknown exception,
death is me.', null, $ex );
- $response->killResponse( 500 );
+ $response->setStatusCode( 500, "Unknown listener
exception." );
}
Logger::info( 'Finished processing listener request' );
diff --git a/SmashPig/Maintenance/MaintenanceBase.php
b/SmashPig/Maintenance/MaintenanceBase.php
index 7906857..bd3a528 100644
--- a/SmashPig/Maintenance/MaintenanceBase.php
+++ b/SmashPig/Maintenance/MaintenanceBase.php
@@ -147,6 +147,7 @@
// --- Load additional namespaces into the autoloader ---
AutoLoader::getInstance()->addConfiguredIncludePaths();
AutoLoader::getInstance()->addConfiguredNamespaces();
+ AutoLoader::getInstance()->addConfiguredIncludes();
}
/**
diff --git a/SmashPig/Maintenance/OrphanCollider.php
b/SmashPig/Maintenance/OrphanCollider.php
deleted file mode 100644
index 3dd9691..0000000
--- a/SmashPig/Maintenance/OrphanCollider.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Created by JetBrains PhpStorm.
- * User: mwalker
- * Date: 6/27/13
- * Time: 6:18 PM
- * To change this template use File | Settings | File Templates.
- */
-
-namespace SmashPig\Maintenance;
-
-
-class OrphanCollider {
-
-}
\ No newline at end of file
diff --git a/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
b/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
index 99610ce..1dac4aa 100644
--- a/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
+++ b/SmashPig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
@@ -36,7 +36,7 @@
}
public function execute() {
- Logger::enterContext( "corr_id-$this->correlationId" );
+ Logger::enterContext( "corr_id-{$this->correlationId}" );
Logger::info(
"Attempting to capture payment on account
'{$this->account}' with reference '{$this->pspReference}' " .
"and correlation id '{$this->correlationId}'."
diff --git a/SmashPig/PublicHttp/smashpig_http_handler.php
b/SmashPig/PublicHttp/smashpig_http_handler.php
index b7eb459..b9480f5 100644
--- a/SmashPig/PublicHttp/smashpig_http_handler.php
+++ b/SmashPig/PublicHttp/smashpig_http_handler.php
@@ -12,7 +12,7 @@
require_once( $smashPigBaseDir . "Core/AutoLoader.php" );
AutoLoader::installSmashPigAutoLoader();
- RequestHandler::process();
+ RequestHandler::process()->send();
} else {
$str = <<<EOT
SmashPig has detected that multiple execution entry points have been used in a
diff --git a/SmashPig/README b/SmashPig/README
index 5576f0d..9dff96b 100644
--- a/SmashPig/README
+++ b/SmashPig/README
@@ -1,6 +1,9 @@
+This project uses Composer [https://getcomposer.org] to manage dependencies.
Upon first
+install, and any upgrade please run the composer installer.
+
It is recommended that a config.php file is created at the root.
-- 3rd Party Licences --
The favicon is licenced under CC Attribution.
http://creativecommons.org/licenses/by/3.0/legalcode
It was obtained from http://www.iconspedia.com/icon/piggy-bank-icon-37074.html
and then modified to fit the favicon
-format. The original author was DesignContest, http://www.designcontest.com/.
\ No newline at end of file
+format. The original author was DesignContest, http://www.designcontest.com/.
diff --git a/SmashPig/composer.json b/SmashPig/composer.json
new file mode 100644
index 0000000..dc6f8a4
--- /dev/null
+++ b/SmashPig/composer.json
@@ -0,0 +1,26 @@
+{
+ "name": "smashpig/smashpig",
+ "description": "The open source PHP flexible payments library and
frontend/backend mediator.",
+ "keywords": ["payments, donations"],
+ "homepage": "http://smashpig.org",
+ "license": "GPLv2",
+ "authors": [
+ {
+ "name": "Katie Horn",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Matthew Walker",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Adam Roses Wight",
+ "email": "[email protected]"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/event-dispatcher": ">=2.1,<2.4-dev",
+ "symfony/http-foundation": ">=2.1,<2.4-dev"
+ }
+}
diff --git a/SmashPig/composer.lock b/SmashPig/composer.lock
new file mode 100644
index 0000000..18d5507
--- /dev/null
+++ b/SmashPig/composer.lock
@@ -0,0 +1,117 @@
+{
+ "hash": "2722429202dacbcee8938f78ca7ef74b",
+ "packages": [
+ {
+ "name": "symfony/event-dispatcher",
+ "version": "v2.3.1",
+ "target-dir": "Symfony/Component/EventDispatcher",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/EventDispatcher.git",
+ "reference": "v2.3.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.1",
+ "reference": "v2.3.1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/dependency-injection": ">=2.0,<3.0"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "time": "2013-05-13 14:36:40",
+ "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": "Fabien Potencier",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony EventDispatcher Component",
+ "homepage": "http://symfony.com"
+ },
+ {
+ "name": "symfony/http-foundation",
+ "version": "v2.3.1",
+ "target-dir": "Symfony/Component/HttpFoundation",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/HttpFoundation.git",
+ "reference": "v2.3.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url":
"https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.1",
+ "reference": "v2.3.1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "time": "2013-05-10 06:00:03",
+ "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": "Fabien Potencier",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony HttpFoundation Component",
+ "homepage": "http://symfony.com"
+ }
+ ],
+ "packages-dev": null,
+ "aliases": [
+
+ ],
+ "minimum-stability": "stable",
+ "stability-flags": [
+
+ ]
+}
diff --git a/SmashPig/config_defaults.php b/SmashPig/config_defaults.php
index 2ff526a..24b2973 100644
--- a/SmashPig/config_defaults.php
+++ b/SmashPig/config_defaults.php
@@ -63,6 +63,7 @@
'security' => array(
'ip-header-name' => '',
+ 'ip-trusted-proxies' => array(),
'ip-whitelist' => array(),
),
@@ -70,6 +71,10 @@
'namespaces' => array(),
+ 'include-files' => array(
+ 'vendor/autoload.php',
+ ),
+
'include-paths' => array(),
'payment-provider' => array(),
--
To view, visit https://gerrit.wikimedia.org/r/69839
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I94b8eb1a7e9b62b0d5bdf212cc9d78c3829220ff
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
Gerrit-Reviewer: Adamw <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits