Giter Club home page Giter Club logo

Comments (4)

aibarra11 avatar aibarra11 commented on May 29, 2024 2

i ran into this problem as well. brand new project laravel 7 with php7.4 (in docker alpine with fpm)

if you're ok to, delete your composer.lock file. The entry for this won't be in composer.json but in composer.lock

php artisan composer update

php artisan config:clear

php artisan cache:clear

this worked for me in my new project

from laravel-event-sourcing.

ifaniqbal avatar ifaniqbal commented on May 29, 2024 2

Try to delete files in bootstrap/cache (except .gitignore). Worked in my case.

from laravel-event-sourcing.

denjaland avatar denjaland commented on May 29, 2024

Hmm. Not sure why, but even after deleting /vendor, clearing whatever cache we had, even rebooting the computer and then trying to install it, we keep on running into the exact same issue.

I guess this could be resolved by adding a default value for the config retrieved here: https://github.com/spatie/laravel-event-sourcing/blob/master/src/EventSourcingServiceProvider.php#L64, passing in \Spatie\EventSourcing\EloquentStoredEventRepository::classas the default value?

from laravel-event-sourcing.

Azeirah avatar Azeirah commented on May 29, 2024

I had the same issue when upgrading from laravel-event-sourcing v3 to v4.

In this case, it's related to the fourth step of the upgrading guide when upgrading from v3 to v4.

All classes that revolve around the concept of stored events have been moved to the Spatie\EventSourcing\StoredEvents namespace. If you are using any of those classes, take a look inside the source code of the package what the new namespace is.

See my changes in config/event-sourcing.php

diff --git a/server/config/event-sourcing.php b/server/config/event-sourcing.php
index 068d290..74afcc0 100644
--- a/server/config/event-sourcing.php
+++ b/server/config/event-sourcing.php
@@ -46,14 +46,14 @@ return [
      * To add extra behaviour you can change this to a class of your own. It should
      * extend the \Spatie\EventSourcing\Models\EloquentStoredEvent model.
      */
-    'stored_event_model' => \Spatie\EventSourcing\Models\EloquentStoredEvent::class,
+    'stored_event_model' => \Spatie\EventSourcing\StoredEvents\Models\EloquentStoredEvent::class,

     /*
      * This class is responsible for handle stored Events. To add extra behaviour you
      * can change this to a class of your own. The only restriction is that
      * it should implement \Spatie\EventSourcing\StoredEventRepository.
      */
-    'stored_event_repository' => \Spatie\EventSourcing\EloquentStoredEventRepository::class,
+    'stored_event_repository' => \Spatie\EventSourcing\StoredEvents\Repositories\EloquentStoredEventRepository::class,

     /*
      * This class is responsible for handling stored events. To add extra behaviour you

from laravel-event-sourcing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.