Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Added default 'db' configuration #164

Conversation

weierophinney
Copy link
Member

Defines a default adapter using an in-memory SQLite database. This is done to prevent failurs when adding zend-db to an application that retrieves the adapter via the container:

$container->get(\Zend\Db\Adapter\AdapterInterface::class)

This was observed when adding ZendDeveloperTools to a ZF3 application while also installing zend-db, but without first configuring zend-db.

Reported at zendframework/tutorials#57

Defines a default adapter using an in-memory SQLite database. This is
done to prevent failurs when adding zend-db to an application that retrieves
the adapter via the container:

```php
$container->get(\Zend\Db\Adapter\AdapterInterface::class)
```

This was observed when adding ZendDeveloperTools to a ZF3 application
while also installing zend-db, but without first configuring zend-db.

Reported at: zendframework/tutorials#57
@DragonBe
Copy link
Contributor

DragonBe commented Sep 8, 2016

When applying this patch the issue is resolved, so good choice.

I need to see if it's not causing issues when you're running this on a PHP installation without the sqlite extension. I think a Required Prerequisites section in the documentation could include it.

Or we can make the documentation adjust to the fact that when you install the Zend Toolbar to include the configuration.

@samsonasik
Copy link
Contributor

there is a PR at zendframework/zend-developer-tools#218 to never call $sm->get('Zend\Db\Adapter\AdapterInterface') when 'db' index is undefined.

@ezimuel
Copy link
Contributor

ezimuel commented Mar 8, 2017

@weierophinney is this PR still relevant?

@DragonBe
Copy link
Contributor

DragonBe commented Mar 8, 2017

Not sure @ezimuel, the instances I've installed since the update after this bug was reported didn't have the issue. If necessary I can create a lab project to see if it's still relevant.

@ezimuel
Copy link
Contributor

ezimuel commented Mar 8, 2017

@DragonBe yes, please. Thanks!

@ezimuel
Copy link
Contributor

ezimuel commented Dec 4, 2017

@DragonBe, @weierophinney the PR zendframework/zend-developer-tools#218 fixed the issue. I'm closing this PR.

@ezimuel ezimuel closed this Dec 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants