Skip to content

Instantly share code, notes, and snippets.

OSS Contributor

Alexander Miertsch codeliner

OSS Contributor
Block or report user

Report or block codeliner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
codeliner / bc_interaction_sample.php
Created Apr 15, 2014
Sample to show interaction between two bounded contexts
View bc_interaction_sample.php
* This file is an example gist to show the interaction between an ArticleContext and a LikeContext
* @example:
* We have to bounded contexts: ArticleContext and LikeContext and show the simplified process of following use case:
* In order to create a valid article Like, I should validate the article ID given to the LikeContext.
codeliner / ObjectSelect.php
Last active Aug 29, 2015
DoctrineModule\Form\ObjectSelect fix to define custom value property
View ObjectSelect.php
namespace Application\Form\Element;
use Application\Form\Element\ObjectSelect\Proxy;
use DoctrineModule\Form\Element\ObjectSelect as DoctrineObjectSelect;
* Class ObjectSelect
* Extends doctrines ObjectSelect to provide own Proxy implementation
codeliner / DDD_avoid_large_cluster_example.php
Created Jul 7, 2015
This example illustrates modelling small aggregates instead of a large cluster: See discussion:!topic/dddinphp/WBKuPAT0OS8
View DDD_avoid_large_cluster_example.php
* This example illustrates modelling the following use cases:
* - A user can write and publish an article, with the title, description.etc.
* - X users can then respond to said article by posting comments,
* - and responding to one another.
* - it is very common for an Article to be 'locked' when it becomes older.
* Note: The example is an incomplete draft.
codeliner / DoctrineSharedConnectionAdapter.php
Last active Feb 14, 2016
An example of a decorated Prooph\EventStore\Adapter\DoctrineEventStoreAdapter that uses a shared database connection between write and read model. This can be useful if you want to avoid eventual consistency issues (only possible if same database is used for write/read).
View DoctrineSharedConnectionAdapter.php
namespace App\Infrastructure\EventStore;
use DateTimeInterface;
use Iterator;
use Prooph\EventStore\Adapter\Adapter;
use Prooph\EventStore\Adapter\Doctrine\DoctrineEventStoreAdapter;
use Prooph\EventStore\Exception\StreamNotFoundException;
use Prooph\EventStore\Stream\Stream;
codeliner / MongoConnection.php
Last active Apr 6, 2017
prooph MongoEventStore v7
View MongoConnection.php
declare(strict_types = 1);
namespace Acme\Infrastructure\MongoDb;
use MongoDB\Client;
use MongoDB\Collection;
class MongoConnection
codeliner / Message.php
Last active Dec 10, 2016
Single prooph message class
View Message.php
declare(strict_types = 1);
namespace Acme\Model;
use Prooph\Common\Messaging\DomainMessage;
use Prooph\Common\Messaging\Message as ProophMessage;
class Message extends DomainMessage
codeliner / CargoRouteListner.php
Last active Apr 27, 2019 sample snippet
View CargoRouteListner.php
class CargoRouteListener extends ProcessManager
function listenOn(DestiniationWasChanged $event)
$rerouteCargo = RerouteCargo::to(
View EventMachine_Example.postman_collection.json
"variables": [],
"info": {
"name": "EventMachine Example",
"_postman_id": "89698ba0-98f0-cc94-2f71-9f19c183e3f3",
"description": "",
"schema": ""
"item": [
codeliner / ReactTest.tsx
Created Aug 9, 2017
React TS app to reproduce TS inspection errors in PhpStorm
View ReactTest.tsx
import React from 'react'
interface ReactTestProps {foo: string, bar: string}
class ReactTest extends React.Component<ReactTestProps, {}> {
constructor(props: ReactTestProps) {
You can’t perform that action at this time.