Theme Inheritance - Problem Extending Parent Theme

I’ve followed the instructions to create a child theme based on X-Corporation:

With my child theme installed, I see the error ““Class ‘Grav\Theme\Xcorporation’ not found””

In order to verify that I’d followed the instructions correctly, I created a second theme “MyTheme” which extends Antimatter. This works without issue.

I noted that the X-Corporation theme which has a class called Xcorporation, is in a folder called “x-corporation” with an “x-corporation.php” and an “x-corporation.yaml”. I’ve experimented with changing the folder and file names to ‘Xcorporation’ as to match the class name, to no avail.

What else should I try?
I’d really appreciate some help with this, otherwise I’m looking at hacking the parent theme directly or creating a new theme from scratch.


what does your theme PHP file look like?

Apologies for the delay.
This is the version of theme PHP file when it’s inheriting from Xcorporation.



<?php namespace Grav\Theme; class Mytheme extends Xcorporation { // Some new methods, properties etc. } ?>

I think here the problem is the file is called x-corporation.php ( and the autoloader does not find it, expecting xcorporation.php

Should be sorted with this commit: