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

Installation fails: Argument 2 passed to TableGateway::__construct() #46

Closed
kander-zz opened this issue May 1, 2012 · 5 comments
Closed

Comments

@kander-zz
Copy link

After following the installation instructions, I get an exception:

Catchable fatal error: Argument 2 passed to Zend\Db\TableGateway\TableGateway::__construct() must be an instance of Zend\Db\Adapter\Adapter, instance of PDO given in 
<my document root>/zfskeleton/vendor/ZendFramework/library/Zend/Db/TableGateway/TableGateway.php on line 100

I probably don't understand correctly how this is supposed to work, but I'm wondering why the 'dbmaster' alias should point to the PDO class. I've tried making it point to the Zend\Db\Adapter\Adapter class instead, but that results in a circular reference.

How to reproduce:

 git clone --recursive git://github.com/zendframework/ZendSkeletonApplication.git zfskeleton
cd zfskeleton/vendor
git clone https://github.com/ZF-Commons/ZfcBase.git
git clone https://github.com/ZF-Commons/ZfcUser.git
Add "ZfcBase" and "ZfcUser" to the modules array in configs/application.config.php
cd ..
cp ./vendor/ZfcUser/config/module.zfcuser.config.php.dist ./config/autoload/module.zfcuser.config.php
Copy the database config block to ./config/autoload/database.config.php , replace the CHANGEME blocks with real settings.
Remove comment in front of line 15 of module.zfcuser.config.php, change alias to 'dbmaster'.
@mtudor
Copy link

mtudor commented May 2, 2012

Hi Kander,

See my comment on #42. I'm not sure if it's the correct solution, but it works ;) Incorrect installation instructions I think.

Mark.

@kander-zz
Copy link
Author

Mark - your solution does indeed work for me. Thanks!

@mtudor
Copy link

mtudor commented May 3, 2012

Hi Kander,

Can you let me know if you hit the issues in #43 and #44?

If you do, that's three people who've hit it now. I might have a poke and see what I can find about what's causing it if we've confirmed it that many times!

Mark.

@adamlundrigan
Copy link
Contributor

Duplicate of #42

@EvanDotPro
Copy link
Member

This should be resolved now. See the updated readme instructions.

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

4 participants