Skip to content

Commit

Permalink
Move ./libraries/cache directory to ./cache
Browse files Browse the repository at this point in the history
- Related to #18512

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Sep 30, 2023
1 parent 116d562 commit 8359676
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 6 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions libraries/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cache/
language_stats.inc.php
2 changes: 1 addition & 1 deletion libraries/vendor_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
/**
* Define the cache directory for routing cache and other cache files
*/
'cacheDir' => ROOT_PATH . 'libraries' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR,
'cacheDir' => ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR,

/**
* Suffix to add to the phpMyAdmin version
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<file>./config.sample.inc.php</file>

<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/cache/*</exclude-pattern>
<exclude-pattern>*/config.inc.php</exclude-pattern>
<exclude-pattern>*/libraries/cache/*</exclude-pattern>
<exclude-pattern>*/libraries/language_stats.inc.php</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/test/doctum-config.php</exclude-pattern>
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parameters:
stubFiles:
- test/stubs/uploadprogress.stub
excludePaths:
- libraries/cache/*
- cache/*
- test/doctum-config.php
dynamicConstantNames:
- ROOT_PATH
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<directory suffix=".php">.</directory>
</include>
<exclude>
<directory>cache</directory>
<directory>examples</directory>
<directory>libraries/cache</directory>
<directory>node_modules</directory>
<directory>test</directory>
<directory>tmp</directory>
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<directory name="test/selenium"/>
<file name="public/index.php"/>
<ignoreFiles>
<directory name="cache"/>
<directory name="vendor"/>
<directory name="libraries/cache"/>
</ignoreFiles>
<ignoreFiles allowMissingFiles="true">
<file name="config.inc.php"/>
Expand Down
26 changes: 26 additions & 0 deletions test/classes/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -905,4 +905,30 @@ public static function connectionParamsWhenConnectionIsUserOrAuxiliaryProvider()
'12345',
];
}

public function testVendorConfigFile(): void
{
$vendorConfig = include ROOT_PATH . 'libraries/vendor_config.php';
$expected = [
'autoloadFile' => ROOT_PATH . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php',
'tempDir' => ROOT_PATH . 'tmp' . DIRECTORY_SEPARATOR,
'changeLogFile' => ROOT_PATH . 'ChangeLog',
'licenseFile' => ROOT_PATH . 'LICENSE',
'sqlDir' => ROOT_PATH . 'sql' . DIRECTORY_SEPARATOR,
'configFile' => ROOT_PATH . 'config.inc.php',
'customHeaderFile' => ROOT_PATH . 'config.header.inc.php',
'customFooterFile' => ROOT_PATH . 'config.footer.inc.php',
'versionCheckDefault' => true,
'localePath' => ROOT_PATH . 'locale' . DIRECTORY_SEPARATOR,
'cacheDir' => ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR,
'versionSuffix' => '',
];
self::assertSame($expected, $vendorConfig);
self::assertFileExists($vendorConfig['autoloadFile']);
self::assertFileExists($vendorConfig['changeLogFile']);
self::assertFileExists($vendorConfig['licenseFile']);
self::assertDirectoryExists($vendorConfig['sqlDir']);
self::assertDirectoryExists($vendorConfig['localePath']);
self::assertDirectoryExists($vendorConfig['cacheDir']);
}
}
2 changes: 1 addition & 1 deletion test/phpstan-constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
declare(strict_types=1);

define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
define('CACHE_DIR', ROOT_PATH . 'libraries' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR);
define('CACHE_DIR', ROOT_PATH . 'cache' . DIRECTORY_SEPARATOR);
define('VERSION_SUFFIX', '');

0 comments on commit 8359676

Please sign in to comment.