Unable to inherit x-corporation theme, Grav stop with error

Hello,

  1. I inherited x-corporation with mytheme but I get the error:

“Class ‘Grav\Theme\Xcorporation’ not found”

  1. The problem Is in the php file, user/themes/mytheme/mytheme.php has:
<?php
namespace Grav\Theme;
 
class mytheme extends Xcorporation
{
   // Some new methods, properties etc. 
}
?>

  1. Grav works fine with the original X-Corporation theme, it creates a folder: user/themes/x-corporation with the following file: x-corporation.php
<?php
namespace Grav\Theme;

use Grav\Common\Theme;

class Xcorporation extends Theme
{
}
?>
  1. I found on the forum this same topic from 2017 with no solution:
    Theme Inheritance - Problem Extending Parent Theme

But I need to extend x-corporation theme and I do not find the way to solve this error, any help is appreciated.
Thanks and regards.
joejac

@joejac, I cannot reproduce the issue…

Using a fresh install of Grav + Admin:

  • I installed X-Corporation using $ bin/gpm install x-corporation
  • Created inheriting theme ‘mytheme’ using bin/plugin devtools new-theme
  • Updated /user/config/system.yaml to set theme to ‘mytheme’
  • Fired up the browser and all is well…

Hello and thanks @pamtbaau
I do not know what to say, perhaps is my Centos 7 VPS that has several php versions and I had to inherit manually, because bin/plugin devtools new-theme does not run on my VPS.
I am working without the class in the php file, I know it is not correct but It stopped the error.
Thanks for your time to test.
Regards
joejac