Grav: bin/grav cli unknown CacheCommand class error

Created on 12 Apr 2019  路  9Comments  路  Source: getgrav/grav

Hello,

Since the 1.6.2 upgrade, the bin/grav cli doesn't work with the following error :

PHP Fatal error:  Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in /var/www/html/bin/grav:43
Stack trace:
#0 {main}
  thrown in /var/www/html/bin/grav on line 43

I may be wrong but it seems to be related to commit 7762f0c85eaf4cfbb5b9a4d993b5cde1274cd17c

1.6 fixed in repo

Most helpful comment

dammit, missed that one...

on line 43 in bin\grav change it to:

new \Grav\Console\Cli\ClearCacheCommand(),

I thought I got all the references updated, but seems this one was missed for some reason. Annoying as I hate to release a new version for this one minor change, but there's really nothing else for it. I'll see if any other issue crops up today.

All 9 comments

It鈥檚 normal and a one time message. It does not effect the upgrade. So nothing to worry about.

I had changed this class name in 1.6 but it turns out it gave a much worse error for people not already on 1.6 when upgrading. I decided best to move it back to the old name as it would effect less people that way.

The functionality has not changed nor the actual command. You won鈥檛 see any message like this going forward.

mhh, I tried to use the bin/grav CLI tools but it fails.

`bin/grav
PHP Fatal error: Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in .../bin/grav:43
Stack trace:

0 {main}

thrown in.../bin/grav on line 43`

I upgraded from 1.6.0 rc4 to 1.6.2

am I missing something

If you scroll up I think you willl find the upgrade was successful, but cache clear was not.

SOLUTION: https://github.com/getgrav/grav/issues/2442#issuecomment-482573529

the upgrade to 1.6.2? that worked fine..

im trying to execute bin/grav by myself to clear the cache manually - that does not work anymore

I upgraded from 1.5.10 to 1.6.2 without any issue.
The problem is that I can't do a backup using CLI anymore (and probably any other actions using bin/grav).

For example, if I try to launch the following command (as per 1.6 documentation) : bin/grav backup 1 it fails immediatly and does nothing :

$ bin/grav backup 1
PHP Fatal error:  Uncaught Error: Class 'Grav\Console\Cli\CacheCommand' not found in /var/www/html/arcanexus.com/www/bin/grav:43
Stack trace:
#0 {main}
  thrown in /var/www/html/arcanexus.com/www/bin/grav on line 43

It happens everytime I try to launch the command, so no backups can be done.

Grr. Looking

dammit, missed that one...

on line 43 in bin\grav change it to:

new \Grav\Console\Cli\ClearCacheCommand(),

I thought I got all the references updated, but seems this one was missed for some reason. Annoying as I hate to release a new version for this one minor change, but there's really nothing else for it. I'll see if any other issue crops up today.

I suppose that it should be easily fixed by renaming that class in bin/grav code too (line 43), but I don't know if there will be impacts.

Fixed in 1.6.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

glasswork picture glasswork  路  28Comments

jens-t picture jens-t  路  18Comments

Sogl picture Sogl  路  24Comments

ursbraem picture ursbraem  路  29Comments

fabrizioT picture fabrizioT  路  26Comments