mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 10:52:11 +00:00
4-move-modules-folder-up (#4)
Files were moved to /modules/ and tests config were changed too.
This commit is contained in:
parent
9afa848864
commit
e945325c63
4
.gitignore
vendored
4
.gitignore
vendored
@ -18,10 +18,10 @@ cache/
|
|||||||
!/logs/.gitkeep
|
!/logs/.gitkeep
|
||||||
|
|
||||||
# excludes modules
|
# excludes modules
|
||||||
/src/Modules/*
|
modules/*
|
||||||
|
|
||||||
# but allow example module
|
# but allow example module
|
||||||
!/src/Modules/ModuleName/
|
!modules/ModuleName/
|
||||||
|
|
||||||
|
|
||||||
# OS Related Exclusions (used: https://gitignore.io/)
|
# OS Related Exclusions (used: https://gitignore.io/)
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"DeltaCMS\\": "src/DeltaCMS",
|
"DeltaCMS\\": "src/DeltaCMS",
|
||||||
"": "src/Modules"
|
"": "modules"
|
||||||
},
|
},
|
||||||
"exclude-from-classmap": [
|
"exclude-from-classmap": [
|
||||||
"src/Modules"
|
"modules"
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"src/DeltaCMS/Functions.php"
|
"src/DeltaCMS/Functions.php"
|
||||||
@ -44,10 +44,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"phpunit": "phpunit --coverage-text --colors=never",
|
"phpunit": "phpunit --coverage-text --colors=never",
|
||||||
"codacy": "codacycoverage clover tmp/code-coverage.xml",
|
"codacy": "codacycoverage clover tmp/code-coverage.xml",
|
||||||
"phpstan": "phpstan analyse src/DeltaCMS public tests --level=max",
|
"phpstan": "phpstan analyse src modules/ModuleName public tests --level=max",
|
||||||
|
|
||||||
"phpcs": "phpcs",
|
"phpcs": "phpcs",
|
||||||
"phpmd": "vendor/bin/phpmd . text phpmd --exclude vendor/,cache/",
|
"phpmd": "vendor/bin/phpmd src,modules/ModuleName,public text phpmd",
|
||||||
|
|
||||||
"test": "composer run phpunit && composer run phpstan",
|
"test": "composer run phpunit && composer run phpstan",
|
||||||
"quality": "composer run phpmd && composer run phpcs",
|
"quality": "composer run phpmd && composer run phpcs",
|
||||||
|
@ -2,4 +2,7 @@
|
|||||||
<description>The PSR-12 coding standard.</description>
|
<description>The PSR-12 coding standard.</description>
|
||||||
<rule ref="PSR12"/>
|
<rule ref="PSR12"/>
|
||||||
<file>src</file>
|
<file>src</file>
|
||||||
|
<file>public</file>
|
||||||
|
<file>modules</file>
|
||||||
|
<file>tests</file>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
cacheResult="false"
|
cacheResult="false"
|
||||||
cacheTokens="false"
|
cacheTokens="false"
|
||||||
colors="true"
|
colors="false"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
@ -25,7 +25,8 @@
|
|||||||
verbose="false">
|
verbose="false">
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>src/DeltaCMS</directory>
|
<directory>src</directory>
|
||||||
|
<directory>public</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
@ -2,6 +2,7 @@ logs/
|
|||||||
src/
|
src/
|
||||||
vendor/
|
vendor/
|
||||||
public/
|
public/
|
||||||
|
modules/
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
LICENSE
|
LICENSE
|
||||||
README.md
|
README.md
|
||||||
|
@ -31,7 +31,7 @@ $caches = (array) $cache->getMultiple(array(
|
|||||||
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
||||||
if (!$ap->isCacheEnabled() || $cachesBool) {
|
if (!$ap->isCacheEnabled() || $cachesBool) {
|
||||||
$cache->clear();
|
$cache->clear();
|
||||||
$modulesDIR = dirname(__DIR__) . "/src/Modules";
|
$modulesDIR = dirname(__DIR__) . "/modules";
|
||||||
$dirs = scandir($modulesDIR);
|
$dirs = scandir($modulesDIR);
|
||||||
if ($dirs === false) {
|
if ($dirs === false) {
|
||||||
throw new Exception("Modules folder seems is not readable, Exiting", 1);
|
throw new Exception("Modules folder seems is not readable, Exiting", 1);
|
||||||
|
@ -95,7 +95,7 @@ class DeltaCMS
|
|||||||
{
|
{
|
||||||
if (!isset($this->em)) {
|
if (!isset($this->em)) {
|
||||||
$config = Setup::createAnnotationMetadataConfiguration(array(
|
$config = Setup::createAnnotationMetadataConfiguration(array(
|
||||||
$this->root . "/Modules/Aptatio/DB"
|
dirname($this->root) . "/modules/Aptatio/DB"
|
||||||
), true);
|
), true);
|
||||||
|
|
||||||
$db = $this->settings->database;
|
$db = $this->settings->database;
|
||||||
|
@ -41,7 +41,15 @@ final class LoggerTest extends TestCase
|
|||||||
));
|
));
|
||||||
$this->assertStringEqualsFile(
|
$this->assertStringEqualsFile(
|
||||||
$this->file,
|
$this->file,
|
||||||
"[Alert]: " . (new \DateTime())->format("Y-m-d H:i:s") . " test\n[Alert]: " . (new \DateTime())->format("Y-m-d H:i:s") . " 0 " . $exception->getFile() . "[Exception] 0 " . $exception->getMessage() . "\n"
|
"[Alert]: " .
|
||||||
|
(new \DateTime())->format("Y-m-d H:i:s") .
|
||||||
|
" test\n[Alert]: " .
|
||||||
|
(new \DateTime())->format("Y-m-d H:i:s") .
|
||||||
|
" 0 " .
|
||||||
|
$exception->getFile() .
|
||||||
|
"[Exception] 0 " .
|
||||||
|
$exception->getMessage() .
|
||||||
|
"\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user