mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Remove celerity.resource-path
config
Summary: Ref T4222. This was used by Facebook while developing Releeph, but should no longer be necessary since Releeph is in the upstream. I can't get an answer out of Facebook about whether they still use it or not (see T4227), so nuke it. We're going to replace it with a more general mechanism (see T4222). Test Plan: Regenerated celerity map. Browsed some pages, still got resources. Reviewers: btrahan, hach-que Reviewed By: hach-que CC: aran Maniphest Tasks: T4222 Differential Revision: https://secure.phabricator.com/D7863
This commit is contained in:
parent
ba7ac39130
commit
95a806ada3
5 changed files with 8 additions and 38 deletions
|
@ -1018,10 +1018,6 @@ return array(
|
||||||
// "phd debug" are always launched in trace mdoe. See also 'phd.verbose'.
|
// "phd debug" are always launched in trace mdoe. See also 'phd.verbose'.
|
||||||
'phd.trace' => false,
|
'phd.trace' => false,
|
||||||
|
|
||||||
// Path to custom celerity resource map relative to 'phabricator/src'.
|
|
||||||
// See also `scripts/celerity_mapper.php`.
|
|
||||||
'celerity.resource-path' => '__celerity_resource_map__.php',
|
|
||||||
|
|
||||||
// This value is an input to the hash function when building resource hashes.
|
// This value is an input to the hash function when building resource hashes.
|
||||||
// It has no security value, but if you accidentally poison user caches (by
|
// It has no security value, but if you accidentally poison user caches (by
|
||||||
// pushing a bad patch or having something go wrong with a CDN, e.g.) you can
|
// pushing a bad patch or having something go wrong with a CDN, e.g.) you can
|
||||||
|
|
|
@ -189,17 +189,6 @@ $args->setSynopsis(
|
||||||
"**celerity_mapper.php** [--output __path__] [--with-custom] <webroot>");
|
"**celerity_mapper.php** [--output __path__] [--with-custom] <webroot>");
|
||||||
$args->parse(
|
$args->parse(
|
||||||
array(
|
array(
|
||||||
array(
|
|
||||||
'name' => 'output',
|
|
||||||
'param' => 'path',
|
|
||||||
'default' => '../src/__celerity_resource_map__.php',
|
|
||||||
'help' => "Set the path for resource map. It is usually useful for ".
|
|
||||||
"'celerity.resource-path' configuration.",
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'name' => 'with-custom',
|
|
||||||
'help' => 'Include resources in <webroot>/rsrc/custom/.',
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'name' => 'webroot',
|
'name' => 'webroot',
|
||||||
'wildcard' => true,
|
'wildcard' => true,
|
||||||
|
@ -212,8 +201,9 @@ if (count($root) != 1 || !is_dir(reset($root))) {
|
||||||
}
|
}
|
||||||
$root = Filesystem::resolvePath(reset($root));
|
$root = Filesystem::resolvePath(reset($root));
|
||||||
|
|
||||||
$celerity_path = Filesystem::resolvePath($args->getArg('output'), $root);
|
$celerity_path = Filesystem::resolvePath(
|
||||||
$with_custom = $args->getArg('with-custom');
|
'../src/__celerity_resource_map__.php',
|
||||||
|
$root);
|
||||||
|
|
||||||
$resource_hash = PhabricatorEnv::getEnvConfig('celerity.resource-hash');
|
$resource_hash = PhabricatorEnv::getEnvConfig('celerity.resource-hash');
|
||||||
$runtime_map = array();
|
$runtime_map = array();
|
||||||
|
@ -227,9 +217,6 @@ $finder = id(new FileFinder($root))
|
||||||
->withSuffix('swf')
|
->withSuffix('swf')
|
||||||
->withFollowSymlinks(true)
|
->withFollowSymlinks(true)
|
||||||
->setGenerateChecksums(true);
|
->setGenerateChecksums(true);
|
||||||
if (!$with_custom) {
|
|
||||||
$finder->excludePath('./rsrc/custom');
|
|
||||||
}
|
|
||||||
$raw_files = $finder->find();
|
$raw_files = $finder->find();
|
||||||
|
|
||||||
echo "Processing ".count($raw_files)." files";
|
echo "Processing ".count($raw_files)." files";
|
||||||
|
@ -261,9 +248,6 @@ $finder = id(new FileFinder($root))
|
||||||
->withSuffix('css')
|
->withSuffix('css')
|
||||||
->withFollowSymlinks(true)
|
->withFollowSymlinks(true)
|
||||||
->setGenerateChecksums(true);
|
->setGenerateChecksums(true);
|
||||||
if (!$with_custom) {
|
|
||||||
$finder->excludePath('./rsrc/custom');
|
|
||||||
}
|
|
||||||
$files = $finder->find();
|
$files = $finder->find();
|
||||||
|
|
||||||
echo "Processing ".count($files)." files";
|
echo "Processing ".count($files)." files";
|
||||||
|
|
|
@ -167,6 +167,9 @@ final class PhabricatorSetupCheckExtraConfig extends PhabricatorSetupCheck {
|
||||||
'differential.anonymous-access' => pht(
|
'differential.anonymous-access' => pht(
|
||||||
'Phabricator now has meaningful global access controls. See '.
|
'Phabricator now has meaningful global access controls. See '.
|
||||||
'`policy.allow-public`.'),
|
'`policy.allow-public`.'),
|
||||||
|
'celerity.resource-path' => pht(
|
||||||
|
'An alternate resource map is no longer supported. Instead, use '.
|
||||||
|
'multiple maps. See T4222.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $ancient_config;
|
return $ancient_config;
|
||||||
|
|
|
@ -28,18 +28,6 @@ final class PhabricatorExtendingPhabricatorConfigOptions
|
||||||
"occur. Specify a list of classes which extend ".
|
"occur. Specify a list of classes which extend ".
|
||||||
"PhabricatorEventListener here."))
|
"PhabricatorEventListener here."))
|
||||||
->addExample('MyEventListener', pht('Valid Setting')),
|
->addExample('MyEventListener', pht('Valid Setting')),
|
||||||
$this->newOption(
|
|
||||||
'celerity.resource-path',
|
|
||||||
'string',
|
|
||||||
'__celerity_resource_map__.php')
|
|
||||||
->setLocked(true)
|
|
||||||
->setSummary(
|
|
||||||
pht("Custom celerity resource map."))
|
|
||||||
->setDescription(
|
|
||||||
pht(
|
|
||||||
"Path to custom celerity resource map relative to ".
|
|
||||||
"'phabricator/src'. See also `scripts/celerity_mapper.php`."))
|
|
||||||
->addExample('local/my_celerity_map.php', pht('Valid Setting')),
|
|
||||||
$this->newOption(
|
$this->newOption(
|
||||||
'aphront.default-application-configuration-class',
|
'aphront.default-application-configuration-class',
|
||||||
'class',
|
'class',
|
||||||
|
|
|
@ -20,12 +20,11 @@ final class CelerityResourceMap {
|
||||||
self::$instance = new CelerityResourceMap();
|
self::$instance = new CelerityResourceMap();
|
||||||
$root = phutil_get_library_root('phabricator');
|
$root = phutil_get_library_root('phabricator');
|
||||||
|
|
||||||
$path = PhabricatorEnv::getEnvConfig('celerity.resource-path');
|
$path = '__celerity_resource_map__.php';
|
||||||
$ok = include_once $root.'/'.$path;
|
$ok = include_once $root.'/'.$path;
|
||||||
if (!$ok) {
|
if (!$ok) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
"Failed to load Celerity resource map! Check the ".
|
"Failed to load Celerity resource map!");
|
||||||
"'celerity.resource-path' setting in your configuration.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
|
|
Loading…
Reference in a new issue