Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB config file is missing #146

Closed
sebastianblum opened this issue Oct 27, 2017 · 2 comments
Closed

MariaDB config file is missing #146

sebastianblum opened this issue Oct 27, 2017 · 2 comments

Comments

@sebastianblum
Copy link
Contributor

sebastianblum commented Oct 27, 2017

hello,

At the moment, in config/autoload (https://github.com/prooph/proophessor-do/tree/master/config/autoload) exists only a

  • mysql_event_store.local.php.dist
  • postgres_event_store.local.php.dist

but the mariadb_event_store.local.php.dist is missing

I tried these configuration:
mariadb_event_store.local.php

<?php
/**
 * This file is part of prooph/proophessor-do.
 * (c) 2014-2017 prooph software GmbH <contact@prooph.de>
 * (c) 2015-2017 Sascha-Oliver Prolic <saschaprolic@googlemail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace Prooph\ProophessorDo;

use Prooph\EventStore;

/**
 * Local configuration overrides - make your adjustments here
 */
return [
    // dependencies settings
    'dependencies' => [
        'factories' => [
            EventStore\EventStore::class => [
                EventStore\Pdo\Container\MariaDbEventStoreFactory::class,
                'default',
            ],
            EventStore\Projection\ProjectionManager::class => [
                EventStore\Pdo\Container\MariaDbProjectionManagerFactory::class,
                'default',
            ],
        ],
    ],
    // prooph settings
    'prooph' => [
        'event_store' => [
            'default' => [
                'persistence_strategy' => EventStore\Pdo\PersistenceStrategy\MariaDbSingleStreamStrategy::class,
                'connection' => 'pdo.connection',
            ]
        ],
        'pdo_connection' => [
            'default' => [
                'schema' => 'mysql',
                'host' => '127.0.0.1',
                'port' => '3306',
                'user' => 'root',
                'password' => '',
                'dbname' => 'todo',
                'charset' => 'utf8',
            ],
        ],
        'projection_manager' => [
            'default' => [
                'connection' => 'pdo.connection',
            ],
        ],
    ],
];

but I get this error message:

$ php scripts/create_event_stream.php
PHP Fatal error: Uncaught Zend\ServiceManager\Exception\ServiceNotFoundException: Unable to resolve service "Prooph\EventStore\Pdo\PersistenceStrategy\MariaDbSingleStreamStrategy" to a factory; are you certain you provided it during configuration? in /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:681
Stack trace:
#0 /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(757): Zend\ServiceManager\ServiceManager->getFactory('Prooph\EventSto...')
#1 /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(200): Zend\ServiceManager\ServiceManager->doCreate('Prooph\EventSto...')
#2 /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/prooph/pdo-event-store/src/Container/AbstractEventStoreFactory.php(83): Zend\ServiceManager\ServiceManager->get('Prooph\EventSto...')
#3 /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/proop in /Users/sebastianblum/PhpstormProjects/proophessor-do/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 681

@sebastianblum sebastianblum changed the title MariaDB Konfiguration is missing MariaDB config file is missing Oct 27, 2017
@prolic
Copy link
Member

prolic commented Oct 27, 2017 via email

@sebastianblum
Copy link
Contributor Author

sebastianblum commented Oct 27, 2017

@prolic thank you for the quick reply. I found it and will create a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants