Skip to content

Commit

Permalink
Moving include to constructor and remove the not working autoload in …
Browse files Browse the repository at this point in the history
…composer.json.
  • Loading branch information
digitaldonkey committed Feb 19, 2018
1 parent e116ee3 commit 20d781e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
"autoload": {
"psr-4": {
"Ethereum\\": "src/"
},
"files": [
"src/helpers/ethereum-client-workaround-helpers.php"
]
}
},
"license": "MIT",
"authors": [
Expand Down
7 changes: 4 additions & 3 deletions src/Ethereum.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
use Ethereum\EthDataType;
use Exception;

require_once __DIR__ . '/helpers/ethereum-client-workaround-helpers.php';

/**
* @defgroup client Ethereum Client
*
Expand Down Expand Up @@ -66,8 +64,11 @@ class Ethereum extends EthereumStatic implements JsonRpcInterface
*/
public function __construct($url = 'http://localhost:8545')
{
// Require the workaround helpers, as autoload files in composer
// doesn't work as expected.
require_once __DIR__ . '/helpers/ethereum-client-workaround-helpers.php';

$this->client = RpcClient::factory($url, [
$this->client = RpcClient::factory($url, [
// Debug JsonRPC requests.
'debug' => false,
]);
Expand Down

0 comments on commit 20d781e

Please sign in to comment.