contributte / console

:boom: Best minimal console (symfony/console) to Nette Framework (@nette)

Home Page:https://contributte.org/packages/contributte/console.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic commands [idea]

f3l1x opened this issue · comments

I'm just thinking about some basic commands.

Assets

Cache

  • nette:cache:purge

Database

  • nette:database:dump

DI

  • nette:di:purge
  • nette:di:warmup

NEON

Solved via Neonizer - https://github.com/contributte/neonizer.

Latte

  • nette:latte:purge
  • nette:latte:warmup

Router

  • nette:router:dump
  • nette:router:match [url]
  • nette:router:link [args]

Security

  • nette:security:password [password]
  • nette:security:acl --all --roles --resources

Utils

  • nette:utils:random
  • nette:utils:json:lint

Validator (really?)

  • nette:validator:email
  • nette:validator:url

Good idea 👍 . I'd personally appreciate command alternative for what I already do manually:

  • nette:cache:purge
  • nette:security:password
  • nette:database:dump

Nice to have:

  • nette:routing:dump
  • nette:cache:warmup - might be quite difficult (see few failed attempts on forum, including my one) , but awesome

Looks good. It would be nice to have a command(s) to precompile dic, latte templates, etc. when deploying to production (and not wait for the first request). But I'm not sure how to compile the normal DIC in CLI mode.

nette:cache:purge - I would preffer an cache cleaner extension and command as bridge only. Cache in temp/ directory is not the only one so interface for cleaning from redis, memcache, database etc. would be nice.

interface Cleaner {
	public function clean();
}

nette:cache:warmup - Not sure about DI, but templates should not be difficult (if you are not using all templates, like I don't do, it becomes very inefficient).
Find all template files (eg. trhrough finder) and call $templateFactory->createTemplate()->getLatte()->warmupCache($fileName);

Something is growing:

selection_001

I'm closing it, we're done here. 🎉

Take a look at https://github.com/contributte/console-extra