Hello there!
I’ve been building a kirby site for a few weeks now and had installed and used the kirby cli a few days ago. Now suddenly when I run the cli, I get:
PHP Fatal error: Cannot declare class Site, because the name is already in use in /Users/mrunkel/Projects/kautionsfrei/kirby/kirby/branches/default.php on line 16
PHP Stack trace:
PHP 1. {main}() /Users/mrunkel/.composer/vendor/getkirby/cli/kirby:0
PHP 2. Symfony\Component\Console\Application->run() /Users/mrunkel/.composer/vendor/getkirby/cli/kirby:59
PHP 3. Symfony\Component\Console\Application->doRun() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:125
PHP 4. Symfony\Component\Console\Application->doRunCommand() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:224
PHP 5. Kirby\Cli\Command\Clear\Cache->run() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:888
PHP 6. Kirby\Cli\Command\Clear\Cache->execute() /Users/mrunkel/.composer/vendor/symfony/console/Command/Command.php:262
PHP 7. Kirby\Cli\Command\Clear\Cache->kirby() /Users/mrunkel/.composer/vendor/getkirby/cli/src/Command/Clear/Cache.php:27
PHP 8. Kirby->site() /Users/mrunkel/.composer/vendor/getkirby/cli/src/Command.php:161
PHP 9. include_once() /Users/mrunkel/Projects/kautionsfrei/kirby/kirby/kirby.php:548
Fatal error: Cannot declare class Site, because the name is already in use in /Users/mrunkel/Projects/kautionsfrei/kirby/kirby/branches/default.php on line 16
Call Stack:
0.0003 381640 1. {main}() /Users/mrunkel/.composer/vendor/getkirby/cli/kirby:0
0.0169 1890224 2. Symfony\Component\Console\Application->run() /Users/mrunkel/.composer/vendor/getkirby/cli/kirby:59
0.0256 2209616 3. Symfony\Component\Console\Application->doRun() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:125
0.0257 2209616 4. Symfony\Component\Console\Application->doRunCommand() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:224
0.0257 2209616 5. Kirby\Cli\Command\Clear\Cache->run() /Users/mrunkel/.composer/vendor/symfony/console/Application.php:888
0.0260 2214704 6. Kirby\Cli\Command\Clear\Cache->execute() /Users/mrunkel/.composer/vendor/symfony/console/Command/Command.php:262
0.0260 2214768 7. Kirby\Cli\Command\Clear\Cache->kirby() /Users/mrunkel/.composer/vendor/getkirby/cli/src/Command/Clear/Cache.php:27
0.0294 2848160 8. Kirby->site() /Users/mrunkel/.composer/vendor/getkirby/cli/src/Command.php:161
0.0308 3030960 9. include_once('/Users/mrunkel/Projects/kautionsfrei/kirby/kirby/branches/default.php') /Users/mrunkel/Projects/kautionsfrei/kirby/kirby/kirby.php:548
Now, I’ve only been working with templates and patterns and haven’t touched the core code at all, so I can’t imagine what is is that I’ve done to cause this. I’ve already searched through my code to see if I’m being dumb and define $site somewhere, but I can’t find it.
Any pointers?