Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Jwineman/pi 1032 host login broken #135

Merged
merged 3 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
},
"require": {
"symfony/yaml": "~2.6",
"guzzle/guzzle": "~3.9",
"cloudflare/cloudflare-plugin-backend": "^1.0"
"guzzlehttp/guzzle": "~5.0",
"cloudflare/cloudflare-plugin-backend": "2.0.0"
},
"require-dev": {
"phpunit/phpunit": "4.8.*",
Expand Down
274 changes: 157 additions & 117 deletions composer.lock

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions proxy.live.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
use CF\API\Client;

require_once 'cloudflare/vendor/autoload.php';
require_once '/usr/local/cpanel/php/cpanel.php';
Expand All @@ -18,9 +19,12 @@
$cpanelIntegration = new CF\Integration\DefaultIntegration($config, $cpanelAPI, $dataStore, $logger);
$partialZoneSet = new \CF\Cpanel\Zone\Partial($cpanelAPI, $dataStore, $logger);
$requestRouter = new \CF\Router\RequestRouter($cpanelIntegration);
$requestRouter->addRouter('\CF\API\Client', \CF\Cpanel\ClientV4APIRoutes::$routes);
$requestRouter->addRouter('\CF\API\Plugin', \CF\Cpanel\PluginRoutes::getRoutes(\CF\API\PluginRoutes::$routes));
$requestRouter->addRouter('\CF\API\Host', \CF\Cpanel\HostRoutes::$routes);
$clientAPI = new \CF\API\Client($cpanelIntegration);
$requestRouter->addRouter($clientAPI, \CF\Cpanel\ClientV4APIRoutes::$routes);
$pluginAPI = new \CF\API\Plugin($cpanelIntegration);
$requestRouter->addRouter($pluginAPI, \CF\Cpanel\PluginRoutes::getRoutes(\CF\API\PluginRoutes::$routes));
$hostAPI = new \CF\API\Host($cpanelIntegration);
$requestRouter->addRouter($hostAPI, \CF\Cpanel\HostRoutes::$routes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get what this fixes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magento creates all the objects dynamically, I have to use a different HTTP client, and I have to pass it in through the constructor. The old implementation hardcoded the constructor args so it complained when Magneto tried to pass a second argument.


$method = $_SERVER['REQUEST_METHOD'];
$parameters = $_GET;
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit351ea891ccabaab01d88c0a188c847e9::getLoader();
return ComposerAutoloaderInit3d39e9b308eedc432af862a2dd3838a5::getLoader();
9 changes: 8 additions & 1 deletion vendor/cloudflare/cloudflare-plugin-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.0](#2.0.0) - 2017-03-08
### Changed
- Reverted `CF\API\AbstractAPIClient` to Guzzle 5 [#35](https://github.com/cloudflare/cloudflare-plugin-backend/pull/35)

### Fixed
- API Clients must be instantiated outside `RequestRouter` now to fix DI issue in Magento [#36](https://github.com/cloudflare/cloudflare-plugin-backend/pull/36)

## [1.1.13](#1.1.13) - 2017-02-28
### Added
### Added
- Travis CI [#34](https://github.com/cloudflare/cloudflare-plugin-backend/pull/34)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions vendor/cloudflare/cloudflare-plugin-backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare/cloudflare-plugin-backend",
"description": "A PHP backend for Cloudflare plugins.",
"license": "BSD-3-Clause",
"version": "1.1.13",
"version": "2.0.0",
"scripts": {
"test": "vendor/bin/phpunit",
"lint": "vendor/bin/phpcs -n --standard=PSR2 --extensions=php src/",
Expand All @@ -14,7 +14,7 @@
"require-dev": {
"phpunit/phpunit": "4.8.*",
"squizlabs/php_codesniffer": "2.*",
"guzzle/guzzle": "~3.9"
"guzzlehttp/guzzle": "~5.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading