Skip to content

Commit 5878be5

Browse files
Merge pull request #18740 from MauricioFauth/cache-dir
Move ./libraries/cache directory to ./cache
2 parents 116d562 + 8359676 commit 5878be5

9 files changed

Lines changed: 33 additions & 6 deletions

File tree

libraries/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
cache/
12
language_stats.inc.php

libraries/vendor_config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
/**
6969
* Define the cache directory for routing cache and other cache files
7070
*/
71-
'cacheDir' => ROOT_PATH . 'libraries' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR,
71+
'cacheDir' => ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR,
7272

7373
/**
7474
* Suffix to add to the phpMyAdmin version

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<file>./config.sample.inc.php</file>
1717

1818
<exclude-pattern>*/build/*</exclude-pattern>
19+
<exclude-pattern>*/cache/*</exclude-pattern>
1920
<exclude-pattern>*/config.inc.php</exclude-pattern>
20-
<exclude-pattern>*/libraries/cache/*</exclude-pattern>
2121
<exclude-pattern>*/libraries/language_stats.inc.php</exclude-pattern>
2222
<exclude-pattern>*/node_modules/*</exclude-pattern>
2323
<exclude-pattern>*/test/doctum-config.php</exclude-pattern>

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ parameters:
1515
stubFiles:
1616
- test/stubs/uploadprogress.stub
1717
excludePaths:
18-
- libraries/cache/*
18+
- cache/*
1919
- test/doctum-config.php
2020
dynamicConstantNames:
2121
- ROOT_PATH

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<directory suffix=".php">.</directory>
2323
</include>
2424
<exclude>
25+
<directory>cache</directory>
2526
<directory>examples</directory>
26-
<directory>libraries/cache</directory>
2727
<directory>node_modules</directory>
2828
<directory>test</directory>
2929
<directory>tmp</directory>

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<directory name="test/selenium"/>
2222
<file name="public/index.php"/>
2323
<ignoreFiles>
24+
<directory name="cache"/>
2425
<directory name="vendor"/>
25-
<directory name="libraries/cache"/>
2626
</ignoreFiles>
2727
<ignoreFiles allowMissingFiles="true">
2828
<file name="config.inc.php"/>

test/classes/ConfigTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,4 +905,30 @@ public static function connectionParamsWhenConnectionIsUserOrAuxiliaryProvider()
905905
'12345',
906906
];
907907
}
908+
909+
public function testVendorConfigFile(): void
910+
{
911+
$vendorConfig = include ROOT_PATH . 'libraries/vendor_config.php';
912+
$expected = [
913+
'autoloadFile' => ROOT_PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php',
914+
'tempDir' => ROOT_PATH . 'tmp' . DIRECTORY_SEPARATOR,
915+
'changeLogFile' => ROOT_PATH . 'ChangeLog',
916+
'licenseFile' => ROOT_PATH . 'LICENSE',
917+
'sqlDir' => ROOT_PATH . 'sql' . DIRECTORY_SEPARATOR,
918+
'configFile' => ROOT_PATH . 'config.inc.php',
919+
'customHeaderFile' => ROOT_PATH . 'config.header.inc.php',
920+
'customFooterFile' => ROOT_PATH . 'config.footer.inc.php',
921+
'versionCheckDefault' => true,
922+
'localePath' => ROOT_PATH . 'locale' . DIRECTORY_SEPARATOR,
923+
'cacheDir' => ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR,
924+
'versionSuffix' => '',
925+
];
926+
self::assertSame($expected, $vendorConfig);
927+
self::assertFileExists($vendorConfig['autoloadFile']);
928+
self::assertFileExists($vendorConfig['changeLogFile']);
929+
self::assertFileExists($vendorConfig['licenseFile']);
930+
self::assertDirectoryExists($vendorConfig['sqlDir']);
931+
self::assertDirectoryExists($vendorConfig['localePath']);
932+
self::assertDirectoryExists($vendorConfig['cacheDir']);
933+
}
908934
}

test/phpstan-constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
declare(strict_types=1);
44

55
define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
6-
define('CACHE_DIR', ROOT_PATH . 'libraries' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR);
6+
define('CACHE_DIR', ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR);
77
define('VERSION_SUFFIX', '');

0 commit comments

Comments
 (0)