Reputation: 4233
When I copy from documentation:
use Zend\Db\TableGateway\TableGateway;
php storm shows
undefined class TableGateway.
What can be wrong?
I tried to search in whole project "TableGateway" and I did not find that classname.
I tried run command again
composer install
in case something went wrong, but it shows everything is installed. The composer.json looks like this:
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for Zend Framework zend-mvc applications",
"type": "project",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"mvc",
"zf"
],
"homepage": "http://framework.zend.com/",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^5.6 || ^7.0",
"zendframework/zend-component-installer": "^1.0 || ^0.3 || ^1.0.0-dev@dev",
"zendframework/zend-mvc": "^3.0.1",
"zfcampus/zf-development-mode": "^3.0",
"webonyx/graphql-php": "^0.8"
},
"autoload": {
"psr-4": {
"Application\\": "module/Application/src/"
}
},
"autoload-dev": {
"psr-4": {
"ApplicationTest\\": "module/Application/test/"
}
},
"extra": [],
"scripts": {
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"development-disable": "zf-development-mode disable",
"development-enable": "zf-development-mode enable",
"development-status": "zf-development-mode status",
"post-create-project-cmd": [
"@development-enable"
],
"serve": "php -S 0.0.0.0:8080 -t public/ public/index.php",
"test": "phpunit"
}
}
What is wrong?
Upvotes: 0
Views: 447
Reputation: 33148
You need to install the DB component if you want to use classes from it:
composer require zendframework/zend-db
Upvotes: 1