| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
/** |
| 7 |
* Static lists of files required for a healthy runtime/plugin package. |
| 8 |
* |
| 9 |
* This is DATA, not logic: it is stored here (outside the entry point) so the |
| 10 |
* entry point stays small and so the SQL-integrity completeness test can read |
| 11 |
* the list directly rather than grepping the plugin's main file source. |
| 12 |
* |
| 13 |
* Paths are stored relative to the plugin's includes/ directory (and, for the |
| 14 |
* report schema, relative to the plugin root). abj404_get_required_runtime_files() |
| 15 |
* resolves them to absolute paths and merges in the dynamic classmap file list. |
| 16 |
* |
| 17 |
* Keys: |
| 18 |
* - 'boot' : boot-critical PHP and asset files, relative to includes/. |
| 19 |
* - 'sql' : SQL template files, relative to includes/ (i.e. "sql/foo.sql"). |
| 20 |
* A test (SqlFileIntegrityListCompletenessTest) verifies this list |
| 21 |
* stays in sync with the actual files in includes/sql/. |
| 22 |
* - 'root' : files relative to the plugin root (not includes/). |
| 23 |
* |
| 24 |
* @return array{boot: array<int, string>, sql: array<int, string>, root: array<int, string>} |
| 25 |
*/ |
| 26 |
// allow-no-test-found: static data file (returns boot/sql/root required-file lists, no logic); the lists are verified against the real on-disk files in SqlFileIntegrityListCompletenessTest and BootResilienceTest. |
| 27 |
return array( |
| 28 |
'boot' => array( |
| 29 |
'Loader.php', |
| 30 |
'bootstrap.php', |
| 31 |
'bootstrap/CoreServiceRegistration.php', |
| 32 |
'bootstrap/DataServiceRegistration.php', |
| 33 |
'bootstrap/DomainServiceRegistration.php', |
| 34 |
'bootstrap/MatchingEngineServiceRegistration.php', |
| 35 |
'bootstrap/RuntimeServiceRegistration.php', |
| 36 |
'bootstrap/LegacyInstanceResolver.php', |
| 37 |
'bootstrap/service-locator.php', |
| 38 |
'classmap.php', |
| 39 |
'ajax/SupportRequest.js', |
| 40 |
'js/support-request-button.js', |
| 41 |
'js/support-request-transport.js', |
| 42 |
'js/support-request-modal-view.js', |
| 43 |
), |
| 44 |
'sql' => array( |
| 45 |
'sql/correctLookupTableIssue.sql', |
| 46 |
'sql/createEngineProfilesTable.sql', |
| 47 |
'sql/createLogTable.sql', |
| 48 |
'sql/createLogsHitsPreAggTempTable.sql', |
| 49 |
'sql/createLogsHitsTempTable.sql', |
| 50 |
'sql/createLookupTable.sql', |
| 51 |
'sql/createNGramCacheTable.sql', |
| 52 |
'sql/createPermalinkCacheTable.sql', |
| 53 |
'sql/createRedirectConditionsTable.sql', |
| 54 |
'sql/createRedirectsTable.sql', |
| 55 |
'sql/createSpellingCacheTable.sql', |
| 56 |
'sql/createViewCacheTable.sql', |
| 57 |
'sql/deleteOldLogs.sql', |
| 58 |
'sql/getAdditionalPostData.sql', |
| 59 |
'sql/getIDsNeededForPermalinkCache.sql', |
| 60 |
'sql/getLogRecords.sql', |
| 61 |
'sql/getLogsCount.sql', |
| 62 |
'sql/getDistinctLoggedUrls.sql', |
| 63 |
'sql/getLogsIDandURL.sql', |
| 64 |
'sql/getLogsIDandURLForAjax.sql', |
| 65 |
'sql/getMostUnusedRedirects.sql', |
| 66 |
'sql/getOrphanedAutoRedirects.sql', |
| 67 |
'sql/getPermalinkFromURL.sql', |
| 68 |
'sql/getPostsNeedingContentKeywords.sql', |
| 69 |
'sql/getPublishedCategories.sql', |
| 70 |
'sql/getPublishedCategoryCount.sql', |
| 71 |
'sql/getPublishedImageIDs.sql', |
| 72 |
'sql/getPublishedPagesAndPostsIDs.sql', |
| 73 |
'sql/getPublishedTagCount.sql', |
| 74 |
'sql/getPublishedTags.sql', |
| 75 |
'sql/getPublishedTermsByIds.sql', |
| 76 |
'sql/getRedirectsExport.sql', |
| 77 |
'sql/getRedirectsForViewTempTable.sql', |
| 78 |
'sql/getRedirectsWithLogs.sql', |
| 79 |
'sql/importDataFromPluginRedirectioner.sql', |
| 80 |
'sql/insertPermalinkCache.sql', |
| 81 |
'sql/insertSpellingCache.sql', |
| 82 |
'sql/logsSetMinLogID.sql', |
| 83 |
'sql/migrateToNewLogsTable.sql', |
| 84 |
'sql/selectTableEngines.sql', |
| 85 |
'sql/updatePermalinkCache.sql', |
| 86 |
'sql/updatePermalinkCacheParentPages.sql', |
| 87 |
), |
| 88 |
'root' => array( |
| 89 |
'contracts/schemas/report.schema.json', |
| 90 |
), |
| 91 |
); |
| 92 |
|