@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+8 -38
-4
conf/default.conf.php
··· 1018 1018 // "phd debug" are always launched in trace mdoe. See also 'phd.verbose'. 1019 1019 'phd.trace' => false, 1020 1020 1021 - // Path to custom celerity resource map relative to 'phabricator/src'. 1022 - // See also `scripts/celerity_mapper.php`. 1023 - 'celerity.resource-path' => '__celerity_resource_map__.php', 1024 - 1025 1021 // This value is an input to the hash function when building resource hashes. 1026 1022 // It has no security value, but if you accidentally poison user caches (by 1027 1023 // pushing a bad patch or having something go wrong with a CDN, e.g.) you can
+3 -19
scripts/celerity_mapper.php
··· 190 190 $args->parse( 191 191 array( 192 192 array( 193 - 'name' => 'output', 194 - 'param' => 'path', 195 - 'default' => '../src/__celerity_resource_map__.php', 196 - 'help' => "Set the path for resource map. It is usually useful for ". 197 - "'celerity.resource-path' configuration.", 198 - ), 199 - array( 200 - 'name' => 'with-custom', 201 - 'help' => 'Include resources in <webroot>/rsrc/custom/.', 202 - ), 203 - array( 204 193 'name' => 'webroot', 205 194 'wildcard' => true, 206 195 ), ··· 212 201 } 213 202 $root = Filesystem::resolvePath(reset($root)); 214 203 215 - $celerity_path = Filesystem::resolvePath($args->getArg('output'), $root); 216 - $with_custom = $args->getArg('with-custom'); 204 + $celerity_path = Filesystem::resolvePath( 205 + '../src/__celerity_resource_map__.php', 206 + $root); 217 207 218 208 $resource_hash = PhabricatorEnv::getEnvConfig('celerity.resource-hash'); 219 209 $runtime_map = array(); ··· 227 217 ->withSuffix('swf') 228 218 ->withFollowSymlinks(true) 229 219 ->setGenerateChecksums(true); 230 - if (!$with_custom) { 231 - $finder->excludePath('./rsrc/custom'); 232 - } 233 220 $raw_files = $finder->find(); 234 221 235 222 echo "Processing ".count($raw_files)." files"; ··· 261 248 ->withSuffix('css') 262 249 ->withFollowSymlinks(true) 263 250 ->setGenerateChecksums(true); 264 - if (!$with_custom) { 265 - $finder->excludePath('./rsrc/custom'); 266 - } 267 251 $files = $finder->find(); 268 252 269 253 echo "Processing ".count($files)." files";
+3
src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
··· 167 167 'differential.anonymous-access' => pht( 168 168 'Phabricator now has meaningful global access controls. See '. 169 169 '`policy.allow-public`.'), 170 + 'celerity.resource-path' => pht( 171 + 'An alternate resource map is no longer supported. Instead, use '. 172 + 'multiple maps. See T4222.'), 170 173 ); 171 174 172 175 return $ancient_config;
-12
src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php
··· 28 28 "occur. Specify a list of classes which extend ". 29 29 "PhabricatorEventListener here.")) 30 30 ->addExample('MyEventListener', pht('Valid Setting')), 31 - $this->newOption( 32 - 'celerity.resource-path', 33 - 'string', 34 - '__celerity_resource_map__.php') 35 - ->setLocked(true) 36 - ->setSummary( 37 - pht("Custom celerity resource map.")) 38 - ->setDescription( 39 - pht( 40 - "Path to custom celerity resource map relative to ". 41 - "'phabricator/src'. See also `scripts/celerity_mapper.php`.")) 42 - ->addExample('local/my_celerity_map.php', pht('Valid Setting')), 43 31 $this->newOption( 44 32 'aphront.default-application-configuration-class', 45 33 'class',
+2 -3
src/infrastructure/celerity/CelerityResourceMap.php
··· 20 20 self::$instance = new CelerityResourceMap(); 21 21 $root = phutil_get_library_root('phabricator'); 22 22 23 - $path = PhabricatorEnv::getEnvConfig('celerity.resource-path'); 23 + $path = '__celerity_resource_map__.php'; 24 24 $ok = include_once $root.'/'.$path; 25 25 if (!$ok) { 26 26 throw new Exception( 27 - "Failed to load Celerity resource map! Check the ". 28 - "'celerity.resource-path' setting in your configuration."); 27 + "Failed to load Celerity resource map!"); 29 28 } 30 29 } 31 30 return self::$instance;