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
|
||||
|
||||
# excludes modules
|
||||
/src/Modules/*
|
||||
modules/*
|
||||
|
||||
# but allow example module
|
||||
!/src/Modules/ModuleName/
|
||||
!modules/ModuleName/
|
||||
|
||||
|
||||
# OS Related Exclusions (used: https://gitignore.io/)
|
||||
|
@ -12,10 +12,10 @@
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"DeltaCMS\\": "src/DeltaCMS",
|
||||
"": "src/Modules"
|
||||
"": "modules"
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"src/Modules"
|
||||
"modules"
|
||||
],
|
||||
"files": [
|
||||
"src/DeltaCMS/Functions.php"
|
||||
@ -44,10 +44,10 @@
|
||||
"scripts": {
|
||||
"phpunit": "phpunit --coverage-text --colors=never",
|
||||
"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",
|
||||
"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",
|
||||
"quality": "composer run phpmd && composer run phpcs",
|
||||
|
@ -2,4 +2,7 @@
|
||||
<description>The PSR-12 coding standard.</description>
|
||||
<rule ref="PSR12"/>
|
||||
<file>src</file>
|
||||
<file>public</file>
|
||||
<file>modules</file>
|
||||
<file>tests</file>
|
||||
</ruleset>
|
||||
|
@ -6,7 +6,7 @@
|
||||
bootstrap="vendor/autoload.php"
|
||||
cacheResult="false"
|
||||
cacheTokens="false"
|
||||
colors="true"
|
||||
colors="false"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
@ -25,7 +25,8 @@
|
||||
verbose="false">
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>src/DeltaCMS</directory>
|
||||
<directory>src</directory>
|
||||
<directory>public</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<testsuites>
|
||||
|
@ -2,6 +2,7 @@ logs/
|
||||
src/
|
||||
vendor/
|
||||
public/
|
||||
modules/
|
||||
CHANGELOG.md
|
||||
LICENSE
|
||||
README.md
|
||||
|
@ -31,7 +31,7 @@ $caches = (array) $cache->getMultiple(array(
|
||||
$cachesBool = $caches["routes"] === null || $caches['templates'] === null || $caches['forms'] === null;
|
||||
if (!$ap->isCacheEnabled() || $cachesBool) {
|
||||
$cache->clear();
|
||||
$modulesDIR = dirname(__DIR__) . "/src/Modules";
|
||||
$modulesDIR = dirname(__DIR__) . "/modules";
|
||||
$dirs = scandir($modulesDIR);
|
||||
if ($dirs === false) {
|
||||
throw new Exception("Modules folder seems is not readable, Exiting", 1);
|
||||
|
@ -95,7 +95,7 @@ class DeltaCMS
|
||||
{
|
||||
if (!isset($this->em)) {
|
||||
$config = Setup::createAnnotationMetadataConfiguration(array(
|
||||
$this->root . "/Modules/Aptatio/DB"
|
||||
dirname($this->root) . "/modules/Aptatio/DB"
|
||||
), true);
|
||||
|
||||
$db = $this->settings->database;
|
||||
|
@ -41,7 +41,15 @@ final class LoggerTest extends TestCase
|
||||
));
|
||||
$this->assertStringEqualsFile(
|
||||
$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