event-store-symfony-bundle | Event Store Symfony Bundle | Microservice library
kandi X-RAY | event-store-symfony-bundle Summary
kandi X-RAY | event-store-symfony-bundle Summary
Event Store Symfony Bundle
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Adds the projection manager configuration section .
- Load the projection managers .
- Creates a new projection manager for the given event store .
- Registers metadata enforcer .
- Creates an event store .
- Delete the given projection .
- Asserts that a definition is valid .
- Asserts that the Descriptor implements a ReadModel .
- Define the compiler .
- Creates an ActionEventEmitter instance .
event-store-symfony-bundle Key Features
event-store-symfony-bundle Examples and Code Snippets
Community Discussions
Trending Discussions on event-store-symfony-bundle
QUESTION
Concept of Event Sourcing in my mind is that Event Sourcing is related to Domain layer which can't be coupled with Infrastructure layer. so I will not use prooph/event-sourcing component and this is why Prooph's team will not maintain event-sourcing component. (this article metioned)
Question is coming, Aggregate, DomainEvent and so on is belong to Domain layer, they are put in event-sourcing component. Event store is belong to Infrastructure layer, so i can use prooph/event-store component directly. However, I found class Prooph\EventSourcing\Aggregate\AggregateRepository
is used in prooph/event-store-symfony-bundle
, why does AggregateRepository is put in event sourcing? I consider Repository to Infrastructure conecrning, event store symfony bundle shouldn't use event sourcing component any more and Repository also shouldn't be put in event sourcing.
That's confusing me. so I can't use prooph/event-store now.
How do you think?
...ANSWER
Answered 2018-Nov-28 at 08:58A repository is the link between the domain model and infrastructure. It's put into the event sourcing component because the event store does not care about aggregates and how they are organized at all. The event store manages streams of events. Only the repository puts that into shape. It uses the event stream capabilities of the even store to manage event history of aggregates. Hence, the repository is also your responsibility. You're right that a new version of the symfony bundle should no longer include a repository implementation but only provide prooph/event-store. That's not done yet. In fact, prooph/event-sourcing is maintained until end of 2019 so we are not in a hurry.
Anyway, I highly recommend to take a look at Event Machine. At the moment it is based on prooph/event-sourcing, service-bus and event-store, but already provides an abstraction layer and a way to fully decouple the domain model and other parts of your system from prooph and Event Machine itself. Just do the tutorial to learn more about it (takes 4-6 hours).
QUESTION
Within my php application, I have several dependencies which are installed via composer. When I build this application natively on my mac machine all the php dependencies are installed correctly. When the application is run the: namespaces, files and classes can all be found by composer's autoloader.
However, I wish to run this application inside a docker container, so that I can push the container up to ECS. When I run the same application (which works natively on my mac) inside a container. Composer's autoloader fails to find some class, and instead throws exceptions like this: PHP Fatal error: Uncaught Error: Class ... not found in ...
.
The really weird part is that the correct namespaces show up in vendor/composer/autoload_psr4.php
(none missing) and the class files do exist inside the vendor directory, in the docker container.
The only solution I could find (to get composer to find the classes) is to delete the vendor's directory and re-run composer install
all inside the docker container. But I don't want to have todo this. I should just be able to publish and deploy the container to ECS without having to install my composer dependencies again, after building. I have also tried running composer dump-autoloader
in the entry point, but this did not resolve my issue.
Has anyone else come across an issue like this before with: php, composer and docker?
Here are some useful files:
Dockerfile
...ANSWER
Answered 2018-Mar-03 at 12:20Try use following Dockerfile (fragment after php and composer installed):
WORKDIR $WORKDIR
COPY composer.* ./
RUN composer install --no-autoloader
COPY . ./
RUN composer dump-autoload
And add vendor/ to .dockerignore file.
I think this is preferable way to build docker images with dependencies controlled by composer, npm, yarn and similar package managers.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install event-store-symfony-bundle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page