fix issue with murph version constant and autoloader
This commit is contained in:
parent
6401b46de8
commit
aaacc4a23d
|
@ -64,9 +64,6 @@
|
|||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\Core\\": "src/core/"
|
||||
},
|
||||
"files": [
|
||||
"src/core/autoload.php"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Core\Controller\Admin;
|
||||
|
||||
use App\Core\Murph;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
@ -29,7 +30,7 @@ abstract class AdminController extends AbstractController
|
|||
'section' => $this->getSection(),
|
||||
'site_name' => $params['name'],
|
||||
'site_logo' => $params['logo'],
|
||||
'murph_version' => MURPH_VERSION,
|
||||
'murph_version' => Murph::version(),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
20
src/core/Murph.php
Normal file
20
src/core/Murph.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Core;
|
||||
|
||||
if (!defined('MURPH_VERSION')) {
|
||||
define('MURPH_VERSION', 'v1.9.1');
|
||||
}
|
||||
|
||||
/**
|
||||
* class Murph.
|
||||
*
|
||||
* @author Simon Vieille <simon@deblan.fr>
|
||||
*/
|
||||
class Murph
|
||||
{
|
||||
public static function version(): string
|
||||
{
|
||||
return MURPH_VERSION;
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Core;
|
||||
|
||||
define('MURPH_VERSION', 'v1.9.1');
|
Loading…
Reference in a new issue