Created
January 28, 2019 16:55
-
-
Save burzum/62730db02a27198f851e044aab07a0e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GuzzleHttp\Client as GuzzleClient; | |
use Http\Adapter\Guzzle6\Client; | |
use Prooph\EventStore\ExpectedVersion; | |
use Prooph\EventStore\EventData; | |
use Prooph\EventStore\UserCredentials; | |
use Prooph\EventStoreHttpClient\ConnectionSettings; | |
use Prooph\EventStoreHttpClient\EventStoreConnectionFactory; | |
$userCredentials = new UserCredentials('admin', 'changeit'); | |
$connection = EventStoreConnectionFactory::create( | |
new ConnectionSettings(new \Prooph\EventStore\EndPoint('127.0.0.1', 2113)), | |
new Client(new GuzzleClient()) | |
); | |
$connection->appendToStream('test', ExpectedVersion::ANY, [ | |
new EventData(null, 'test', true, '{"foo": "bar"}') | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment