Nettrine Console missing “bin/console”
- jeremy
- Member | 54
Hi, I am new to ORM and Nettrine and I installed the Contributte Console
package. I noticed that the bin/console
file mentioned in the
documentation is missing. I tried to also install a completely fresh project to
then copy the file but it's still not there.
My composer.json:
{
"name": "nette/web-project",
"description": "Nette: Standard Web Project",
"keywords": ["nette"],
"type": "project",
"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
"require": {
"php": ">= 8.1",
"nette/application": "^3.1",
"nette/bootstrap": "^3.2",
"nette/caching": "^3.2",
"nette/database": "^3.1",
"nette/di": "^3.1",
"nette/forms": "^3.1",
"nette/http": "^3.2",
"nette/mail": "^4.0",
"nette/robot-loader": "^4.0",
"nette/security": "^3.1",
"nette/utils": "^4.0",
"latte/latte": "^3.0",
"tracy/tracy": "^2.9",
"nettrine/orm": "^0.8.4",
"contributte/console": "^0.10.1",
"nettrine/migrations": "^0.9.1"
},
"require-dev": {
"nette/tester": "^2.4",
"symfony/thanks": "^1"
},
"autoload": {
"psr-4": {
"App\\": "app"
}
},
"minimum-stability": "stable",
"config": {
"allow-plugins": {
"symfony/thanks": true
}
}
}
My config:
extensions:
console: Contributte\Console\DI\ConsoleExtension(%consoleMode%)
nettrine.cache: Nettrine\Cache\DI\CacheExtension
nettrine.migrations: Nettrine\Migrations\DI\MigrationsExtension
nettrine.dbal: Nettrine\DBAL\DI\DbalExtension
nettrine.dbal.console: Nettrine\DBAL\DI\DbalConsoleExtension(%consoleMode%)
nettrine.orm: Nettrine\ORM\DI\OrmExtension
nettrine.orm.cache: Nettrine\ORM\DI\OrmCacheExtension
nettrine.orm.console: Nettrine\ORM\DI\OrmConsoleExtension(%consoleMode%)
nettrine.orm.attributes: Nettrine\ORM\DI\OrmAttributesExtension
...
nettrine.dbal:
debug:
panel: %debugMode%
sourcePaths: [%appDir%]
connection:
driver: 'pdo_mysql'
host: '127.0.0.1'
dbname: 'dbname'
user: 'root'
password: '****'
nettrine.orm:
entityManagerDecoratorClass: App\Model\ORM\EntityManagerDecorator
nettrine.orm.attributes:
mapping:
App\Model\Database\Entity: %appDir%/Model/Database
nettrine.migrations:
directory: %tempDir%/Database/Migrations
I am pretty much using this project to learn Doctrine/Nettrine, so any help and tips are appreciated. Thanks!
Edit: I should add that other bin
files are present such as
bin/doctrine
, bin/doctrine-migrations
and others
Last edited by jeremy (2024-05-08 20:47)
- Rick Strafy
- Nette Blogger | 81
Hi, look at this tutorial https://blog.nette.org/…te-framework, there is covered console installation and doctrine installation.
All you need to do is to create a bin directory, create console file in it and add there this content https://contributte.org/…console.html#… and then add executable permissions.