Hi all,
I’ve got a couple of projects that’s built on Sage 9. So far I was able to use the solution in this article but it recently stopped working and Wordpress returns a Fatal error.
The error message:
( ! ) Fatal error: Uncaught ReflectionException: Class "App\Controllers\App" does not exist in /www/kinsta/public/wordpress-test/wp-content/themes/sage_9.1/vendor/soberwp/controller/src/Loader.php on line *75*
( ! ) ReflectionException: Class "App\Controllers\App" does not exist in /www/kinsta/public/wordpress-test/wp-content/themes/sage_9.1/vendor/soberwp/controller/src/Loader.php on line *75*
This is my composer.json file
{
"name": "roots/sage",
"type": "wordpress-theme",
"license": "MIT",
"description": "WordPress starter theme with a modern development workflow",
"homepage": "https://roots.io/sage/",
"authors": [
{
"name": "Ben Word",
"email": "ben@benword.com",
"homepage": "https://github.com/retlehs"
},
{
"name": "Scott Walkinshaw",
"email": "scott.walkinshaw@gmail.com",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "QWp6t",
"email": "hi@qwp6t.me",
"homepage": "https://github.com/qwp6t"
}
],
"keywords": ["wordpress"],
"support": {
"issues": "https://github.com/roots/sage/issues",
"forum": "https://discourse.roots.io/"
},
"autoload": {
"psr-4": {
"App\\": "app/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/jeh5256/sage-installer"
},
{
"type": "vcs",
"url": "https://github.com/jeh5256/sage-lib"
}
],
"require": {
"php": "^8.1",
"composer/installers": "^2.0",
"soberwp/controller": "~2.1.0",
"roots/sage-installer": "^2.0",
"roots/sage-lib": "dev-master"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.8.0"
},
"scripts": {
"test": [
"phpcs src --extensions=php --standard=PSR2"
],
"post-create-project-cmd": [
"Roots\\Sage\\Installer\\ComposerScript::postCreateProject"
]
},
"config": {
"allow-plugins": {
"kylekatarnls/update-helper": true,
"composer/installers": false
}
}
}
This only stopped working a couple of days ago. If I downgrade the PHP to 8.0 then there are no issues.
Thanks in advance.