@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 or correct various "phabricator/" references to "libphutil"

Summary:
Ref T13395. "libphutil/" was stripped for parts, but some documentation still references it. This is mostly minor corrections, but:

- Removes "Javelin at Facebook", long obsolete.
- Removes "php FPM warmup", which was always a prototype and is obsoleted by PHP preloading in recent PHP.

Test Plan: `grep` / reading

Maniphest Tasks: T13395

Differential Revision: https://secure.phabricator.com/D21624

+83 -261
-38
scripts/fpm/warmup.php
··· 1 - <?php 2 - 3 - /** 4 - * NOTE: This is an ADVANCED feature that improves performance but adds a lot 5 - * of complexity! This is only suitable for production servers because workers 6 - * won't pick up changes between when they spawn and when they handle a request. 7 - * 8 - * Phabricator spends a significant portion of its runtime loading classes 9 - * and functions, even with APC enabled. Since we have very rigidly-defined 10 - * rules about what can go in a module (specifically: no side effects), it 11 - * is safe to load all the libraries *before* we receive a request. 12 - * 13 - * Normally, SAPIs don't provide a way to do this, but with a patched PHP-FPM 14 - * SAPI you can provide a warmup file that it will execute before a request 15 - * is received. 16 - * 17 - * We're limited in what we can do here, since request information won't 18 - * exist yet, but we can load class and function definitions, which is what 19 - * we're really interested in. 20 - * 21 - * Once this file exists, the FCGI process will drop into its normal accept loop 22 - * and eventually process a request. 23 - */ 24 - function __warmup__() { 25 - $root = dirname(dirname(dirname(dirname(__FILE__)))); 26 - require_once $root.'/libphutil/src/__phutil_library_init__.php'; 27 - require_once $root.'/arcanist/src/__phutil_library_init__.php'; 28 - require_once $root.'/phabricator/src/__phutil_library_init__.php'; 29 - 30 - // Load every symbol. We could possibly refine this -- we don't need to load 31 - // every Controller, for instance. 32 - $loader = new PhutilSymbolLoader(); 33 - $loader->selectAndLoadSymbols(); 34 - 35 - define('__WARMUP__', true); 36 - } 37 - 38 - __warmup__();
+1 -4
scripts/install/update_phabricator.sh
··· 9 9 # to work without modifications. 10 10 11 11 # NOTE: This script assumes you are running it from a directory which contains 12 - # arcanist/, libphutil/, and phabricator/. 12 + # arcanist/ and phabricator/. 13 13 14 14 ROOT=`pwd` # You can hard-code the path here instead. 15 15 16 16 ### UPDATE WORKING COPIES ###################################################### 17 - 18 - cd $ROOT/libphutil 19 - git pull 20 17 21 18 cd $ROOT/arcanist 22 19 git pull
+1 -1
src/applications/conduit/controller/PhabricatorConduitController.php
··· 156 156 157 157 $parts = array(); 158 158 159 - $libphutil_path = 'path/to/libphutil/src/__phutil_library_init__.php'; 159 + $libphutil_path = 'path/to/arcanist/support/init/init-script.php'; 160 160 161 161 $parts[] = '<?php'; 162 162 $parts[] = "\n\n";
+1 -1
src/applications/repository/storage/PhabricatorRepository.php
··· 1151 1151 /** 1152 1152 * Get a parsed object representation of the repository's remote URI.. 1153 1153 * 1154 - * @return wild A @{class@libphutil:PhutilURI}. 1154 + * @return wild A @{class@arcanist:PhutilURI}. 1155 1155 * @task uri 1156 1156 */ 1157 1157 public function getRemoteURIObject() {
+9 -9
src/docs/contributor/adding_new_classes.diviner
··· 21 21 @{class@phabricator:PhabricatorApplication}. It 22 22 discovers available workflows in `arc` by looking at all of the subclasses of 23 23 @{class@arcanist:ArcanistWorkflow}. It discovers available locales 24 - by looking at all of the subclasses of @{class@libphutil:PhutilLocale}. 24 + by looking at all of the subclasses of @{class@arcanist:PhutilLocale}. 25 25 26 26 This pattern holds in many cases, so you can often add functionality by adding 27 27 new classes with no other work. Phabricator will automatically discover and ··· 49 49 features, or get started on a larger project. Extending Phabricator like this 50 50 imposes a small performance penalty compared to using a library. 51 51 52 - This directory exists in all libphutil libraries, so you can find similar 53 - directories in `arcanist/src/extensions/` and `libphutil/src/extensions/`. 52 + This directory exists in all libphutil libraries, so you can find a similar 53 + directory in `arcanist/src/extensions/`. 54 54 55 55 For example, to add a new application, create a file like this one and add it 56 56 to `phabricator/src/extensions/`. ··· 171 171 NOTE: If Phabricator isn't located next to your custom library, specify a 172 172 path which actually points to the `phabricator/` directory. 173 173 174 - You do not need to declare dependencies on `arcanist` or `libphutil`, 175 - since `arc liberate` automatically loads them. 174 + You do not need to declare dependencies on `arcanist`, since `arc liberate` 175 + automatically loads them. 176 176 177 177 Finally, edit your Phabricator config to tell it to load your library at 178 178 runtime, by adding it to `load-libraries`: ··· 206 206 What You Can Extend And Invoke 207 207 ============================== 208 208 209 - libphutil, Arcanist and Phabricator are strict about extensibility of classes 210 - and visibility of methods and properties. Most classes are marked `final`, and 209 + Arcanist and Phabricator are strict about extensibility of classes and 210 + visibility of methods and properties. Most classes are marked `final`, and 211 211 methods have the minimum required visibility (protected or private). The goal 212 212 of this strictness is to make it clear what you can safely extend, access, and 213 213 invoke, so your code will keep working as the upstream changes. ··· 215 215 IMPORTANT: We'll still break APIs frequently. The upstream does not support 216 216 extension development, and none of these APIs are stable. 217 217 218 - When developing libraries to work with libphutil, Arcanist and Phabricator, you 219 - should respect method and property visibility. 218 + When developing libraries to work with Arcanist and Phabricator, you should 219 + respect method and property visibility. 220 220 221 221 If you want to add features but can't figure out how to do it without changing 222 222 Phabricator code, here are some approaches you may be able to take:
+3 -4
src/docs/contributor/bug_reports.diviner
··· 47 47 issues to be fixed in less than 24 hours, so even if you've updated recently 48 48 you should update again. If you aren't sure how to update, see the next 49 49 section. 50 - - **Update Libraries**: Make sure `libphutil/`, `arcanist/` and 51 - `phabricator/` are all up to date. Users often update `phabricator/` but 52 - forget to update `arcanist/` or `libphutil/`. When you update, make sure you 53 - update all three libraries. 50 + - **Update Libraries**: Make sure `arcanist/` and `phabricator/` are all up 51 + to date. Users often update `phabricator/` but forget to update `arcanist/`. 52 + When you update, make sure you update all three libraries. 54 53 - **Restart Apache or PHP-FPM**: Phabricator uses caches which don't get 55 54 reset until you restart Apache or PHP-FPM. After updating, make sure you 56 55 restart.
+1 -1
src/docs/contributor/contrib_intro.diviner
··· 1 1 @title Contributor Introduction 2 2 @group contrib 3 3 4 - Introduction to contributing to Phabricator, Arcanist and libphutil. 4 + Introduction to contributing to Phabricator and Arcanist. 5 5 6 6 Overview 7 7 ========
+3 -3
src/docs/contributor/contributing_code.diviner
··· 212 212 Writing and Submitting Patches 213 213 ================== 214 214 215 - To actually submit a patch, run `arc diff` in `phabricator/`, `arcanist/`, or 216 - `libphutil/`. When executed in these directories, `arc` should automatically 217 - talk to the upstream install. You can add `epriestley` as a reviewer. 215 + To actually submit a patch, run `arc diff` in `phabricator/` or `arcanist/`. 216 + When executed in these directories, `arc` should automatically talk to the 217 + upstream install. You can add `epriestley` as a reviewer. 218 218 219 219 You should read the relevant coding convention documents before you submit a 220 220 change. If you're a new contributor, you don't need to worry about this too
+2 -2
src/docs/contributor/general_coding_standards.diviner
··· 2 2 @group standards 3 3 4 4 This document is a general coding standard for contributing to Phabricator, 5 - Arcanist, libphutil and Diviner. 5 + Arcanist, and Diviner. 6 6 7 7 = Overview = 8 8 ··· 136 136 Filesystem::writeFile('file.bak', $data); // Best 137 137 do_something_dangerous(); 138 138 139 - See @{article@libphutil:Command Execution} for details on the APIs used in this 139 + See @{article@arcanist:Command Execution} for details on the APIs used in this 140 140 example. 141 141 142 142 = Documentation, Comments and Formatting =
+5 -5
src/docs/contributor/internationalization.diviner
··· 44 44 Writing Translatable Code 45 45 ========================= 46 46 47 - Strings are marked for translation with @{function@libphutil:pht}. 47 + Strings are marked for translation with @{function@arcanist:pht}. 48 48 49 49 The `pht()` function takes a string (and possibly some parameters) and returns 50 50 the translated version of that string in the current viewer's locale, if a ··· 68 68 - Use parameters to create strings containing user names, object names, etc. 69 69 - Translate full sentences, not sentence fragments. 70 70 - Let the translation framework handle plural rules. 71 - - Use @{class@libphutil:PhutilNumber} for numbers. 71 + - Use @{class@arcanist:PhutilNumber} for numbers. 72 72 - Let the translation framework handle subject gender rules. 73 73 - Translate all human-readable text, even exceptions and error messages. 74 74 ··· 323 323 languages, and languages like Czech also require verb agreement. 324 324 325 325 When a parameter refers to a gendered person, pass an object which implements 326 - @{interface@libphutil:PhutilPerson} to `pht()` so translators can provide 326 + @{interface@arcanist:PhutilPerson} to `pht()` so translators can provide 327 327 gendered translation variants. 328 328 329 329 ```lang=php ··· 361 361 In cases where similar error or exception text is often repeated, it is 362 362 probably appropriate to define an exception for that category of error rather 363 363 than write the text out repeatedly, anyway. Two examples are 364 - @{class@libphutil:PhutilInvalidStateException} and 365 - @{class@libphutil:PhutilMethodNotImplementedException}, which mostly exist to 364 + @{class@arcanist:PhutilInvalidStateException} and 365 + @{class@arcanist:PhutilMethodNotImplementedException}, which mostly exist to 366 366 produce a consistent message about a common error state in a convenient way. 367 367 368 368 There are a handful of error strings in the codebase which may be used before
+3 -3
src/docs/contributor/php_coding_standards.diviner
··· 2 2 @group standards 3 3 4 4 This document describes PHP coding standards for Phabricator and related 5 - projects (like Arcanist and libphutil). 5 + projects (like Arcanist). 6 6 7 7 = Overview = 8 8 9 9 This document outlines technical and style guidelines which are followed in 10 - libphutil. Contributors should also follow these guidelines. Many of these 11 - guidelines are automatically enforced by lint. 10 + Phabricator and Arcanist. Contributors should also follow these guidelines. 11 + Many of these guidelines are automatically enforced by lint. 12 12 13 13 These guidelines are essentially identical to the Facebook guidelines, since I 14 14 basically copy-pasted them. If you are already familiar with the Facebook
+25 -25
src/docs/contributor/rendering_html.diviner
··· 13 13 This document describes the right way to build HTML components so they are safe 14 14 from XSS and render correctly. Broadly: 15 15 16 - - Use @{function@libphutil:phutil_tag} (and @{function:javelin_tag}) to build 16 + - Use @{function@arcanist:phutil_tag} (and @{function:javelin_tag}) to build 17 17 tags. 18 - - Use @{function@libphutil:hsprintf} where @{function@libphutil:phutil_tag} 18 + - Use @{function@arcanist:hsprintf} where @{function@arcanist:phutil_tag} 19 19 is awkward. 20 20 - Combine elements with arrays, not string concatenation. 21 21 - @{class:AphrontView} subclasses should return a 22 - @{class@libphutil:PhutilSafeHTML} object from their `render()` method. 22 + @{class@arcanist:PhutilSafeHTML} object from their `render()` method. 23 23 - @{class:AphrontView} subclasses act like tags when rendering. 24 24 - @{function:pht} has some special rules. 25 25 - There are some other things that you should be aware of. ··· 28 28 29 29 = Building Tags: phutil_tag() = 30 30 31 - Build HTML tags with @{function@libphutil:phutil_tag}. For example: 31 + Build HTML tags with @{function@arcanist:phutil_tag}. For example: 32 32 33 33 phutil_tag( 34 34 'div', ··· 37 37 ), 38 38 $content); 39 39 40 - @{function@libphutil:phutil_tag} will properly escape the content and all the 41 - attributes, and return a @{class@libphutil:PhutilSafeHTML} object. The rendering 40 + @{function@arcanist:phutil_tag} will properly escape the content and all the 41 + attributes, and return a @{class@arcanist:PhutilSafeHTML} object. The rendering 42 42 pipeline knows that this object represents a properly escaped HTML tag. This 43 - allows @{function@libphutil:phutil_tag} to render tags with other tags as 43 + allows @{function@arcanist:phutil_tag} to render tags with other tags as 44 44 content correctly (without double-escaping): 45 45 46 46 phutil_tag( ··· 52 52 $content)); 53 53 54 54 In Phabricator, the @{function:javelin_tag} function is similar to 55 - @{function@libphutil:phutil_tag}, but provides special handling for the 55 + @{function@arcanist:phutil_tag}, but provides special handling for the 56 56 `sigil` and `meta` attributes. 57 57 58 58 = Building Blocks: hsprintf() = 59 59 60 - Sometimes, @{function@libphutil:phutil_tag} can be particularly awkward to 61 - use. You can use @{function@libphutil:hsprintf} to build larger and more 62 - complex blocks of HTML, when @{function@libphutil:phutil_tag} is a poor fit. 60 + Sometimes, @{function@arcanist:phutil_tag} can be particularly awkward to 61 + use. You can use @{function@arcanist:hsprintf} to build larger and more 62 + complex blocks of HTML, when @{function@arcanist:phutil_tag} is a poor fit. 63 63 @{function:hsprintf} has `sprintf()` semantics, but `%s` escapes HTML: 64 64 65 65 // Safely build fragments or unwieldy blocks. ··· 72 72 - You need to build a block with a lot of tags, like a table with rows and 73 73 cells. 74 74 - You need to build part of a tag (usually you should avoid this, but if you 75 - do need to, @{function@libphutil:phutil_tag} can not do it). 75 + do need to, @{function@arcanist:phutil_tag} can not do it). 76 76 77 77 Note that it is unsafe to provide any user-controlled data to the first 78 - parameter of @{function@libphutil:hsprintf} (the `sprintf()`-style pattern). 78 + parameter of @{function@arcanist:hsprintf} (the `sprintf()`-style pattern). 79 79 80 - Like @{function@libphutil:phutil_tag}, this function returns a 81 - @{class@libphutil:PhutilSafeHTML} object. 80 + Like @{function@arcanist:phutil_tag}, this function returns a 81 + @{class@arcanist:PhutilSafeHTML} object. 82 82 83 83 = Composing Tags = 84 84 ··· 99 99 // Render a tag containing other tags safely. 100 100 phutil_tag('div', array(), array($header, $body)); 101 101 102 - If you concatenate @{class@libphutil:PhutilSafeHTML} objects, they revert to 102 + If you concatenate @{class@arcanist:PhutilSafeHTML} objects, they revert to 103 103 normal strings and are no longer marked as properly escaped tags. 104 104 105 105 (In the future, these objects may stop converting to strings, but for now they ··· 118 118 = AphrontView Classes = 119 119 120 120 Subclasses of @{class:AphrontView} in Phabricator should return a 121 - @{class@libphutil:PhutilSafeHTML} object. The easiest way to do this is to 121 + @{class@arcanist:PhutilSafeHTML} object. The easiest way to do this is to 122 122 return `phutil_tag()` or `javelin_tag()`: 123 123 124 124 return phutil_tag('div', ...); ··· 130 130 = Internationalization: pht() = 131 131 132 132 The @{function:pht} function has some special rules. If any input to 133 - @{function:pht} is a @{class@libphutil:PhutilSafeHTML} object, @{function:pht} 134 - returns a @{class@libphutil:PhutilSafeHTML} object itself. Otherwise, it returns 133 + @{function:pht} is a @{class@arcanist:PhutilSafeHTML} object, @{function:pht} 134 + returns a @{class@arcanist:PhutilSafeHTML} object itself. Otherwise, it returns 135 135 normal text. 136 136 137 137 This is generally safe because translations are not permitted to have more tags ··· 146 146 NOTE: This section describes dangerous methods which can bypass XSS protections. 147 147 If possible, do not use them. 148 148 149 - You can build @{class@libphutil:PhutilSafeHTML} out of a string explicitly by 149 + You can build @{class@arcanist:PhutilSafeHTML} out of a string explicitly by 150 150 calling @{function:phutil_safe_html} on it. This is **dangerous**, because if 151 151 you are wrong and the string is not actually safe, you have introduced an XSS 152 152 vulnerability. Consequently, you should avoid calling this if possible. 153 153 154 - You can use @{function@libphutil:phutil_escape_html_newlines} to escape HTML 154 + You can use @{function@arcanist:phutil_escape_html_newlines} to escape HTML 155 155 while converting newlines to `<br />`. You should not need to explicitly use 156 - @{function@libphutil:phutil_escape_html} anywhere. 156 + @{function@arcanist:phutil_escape_html} anywhere. 157 157 158 158 If you need to apply a string function (such as `trim()`) to safe HTML, use 159 - @{method@libphutil:PhutilSafeHTML::applyFunction}. 159 + @{method@arcanist:PhutilSafeHTML::applyFunction}. 160 160 161 - If you need to extract the content of a @{class@libphutil:PhutilSafeHTML} 161 + If you need to extract the content of a @{class@arcanist:PhutilSafeHTML} 162 162 object, you should call `getHTMLContent()`, not cast it to a string. Eventually, 163 163 we would like to remove the string cast entirely. 164 164 165 - Functions @{function@libphutil:phutil_tag} and @{function@libphutil:hsprintf} 165 + Functions @{function@arcanist:phutil_tag} and @{function@arcanist:hsprintf} 166 166 are not safe if you pass the user input for the tag or attribute name. All the 167 167 following examples are dangerous: 168 168
+5 -5
src/docs/contributor/unit_tests.diviner
··· 1 1 @title Writing Unit Tests 2 2 @group developer 3 3 4 - Simple guide to libphutil, Arcanist and Phabricator unit tests. 4 + Simple guide to Arcanist and Phabricator unit tests. 5 5 6 6 = Overview = 7 7 8 - libphutil, Arcanist and Phabricator provide and use a simple unit test 9 - framework. This document is aimed at project contributors and describes how to 10 - use it to add and run tests in these projects or other libphutil libraries. 8 + Arcanist and Phabricator provide and use a simple unit test framework. This 9 + document is aimed at project contributors and describes how to use it to add 10 + and run tests in these projects or other libphutil libraries. 11 11 12 12 In the general case, you can integrate `arc` with a custom unit test engine 13 13 (like PHPUnit or any other unit testing library) to run tests in other projects. ··· 16 16 17 17 = Adding Tests = 18 18 19 - To add new tests to a libphutil, Arcanist or Phabricator module: 19 + To add new tests to a Arcanist or Phabricator module: 20 20 21 21 - Create a `__tests__/` directory in the module if it doesn't exist yet. 22 22 - Add classes to the `__tests__/` directory which extend from
+3 -3
src/docs/flavor/php_pitfalls.diviner
··· 18 18 intermediate arrays and copies every element it has previously seen each time 19 19 you iterate. 20 20 21 - In a libphutil environment, you can use @{function@libphutil:array_mergev} 21 + In a libphutil environment, you can use @{function@arcanist:array_mergev} 22 22 instead. 23 23 24 24 = `var_export()` Hates Baby Animals = ··· 147 147 instead, and use it to reorder the original array. 148 148 149 149 In a libphutil environment, you can often do this easily with 150 - @{function@libphutil:isort} or @{function@libphutil:msort}. 150 + @{function@arcanist:isort} or @{function@arcanist:msort}. 151 151 152 152 = `array_intersect()` and `array_diff()` are Also Slow = 153 153 ··· 270 270 271 271 ...you'll probably invent a very interesting, very novel solution that is very 272 272 wrong. In a libphutil environment, solve this problem with 273 - @{function@libphutil:newv}. Elsewhere, copy `newv()`'s implementation. 273 + @{function@arcanist:newv}. Elsewhere, copy `newv()`'s implementation. 274 274 275 275 = Equality is not Transitive = 276 276
+1 -1
src/docs/user/configuration/managing_daemons.diviner
··· 65 65 66 66 You can get a list of launchable daemons with **phd list**: 67 67 68 - - **libphutil test daemons** are not generally useful unless you are 68 + - **test daemons** are not generally useful unless you are 69 69 developing daemon infrastructure or debugging a daemon problem; 70 70 - **PhabricatorTaskmasterDaemon** performs work from a task queue; 71 71 - **PhabricatorRepositoryPullLocalDaemon** daemons track repositories, for
+1 -1
src/docs/user/configuration/troubleshooting_https.diviner
··· 32 32 You can self-sign a certificate by creating your own CA, but clients will not 33 33 trust it by default. They need to add the CA as a trusted authority. 34 34 35 - For instructions on adding CAs, see `libphutil/resources/ssl/README`. 35 + For instructions on adding CAs, see `arcanist/resources/ssl/README`. 36 36 37 37 If you'd prefer that `arc` not verify the identity of the server whatsoever, you 38 38 can use the `https.blindly-trust-domains` setting. This will make it
+1 -1
src/docs/user/field/darkconsole.diviner
··· 48 48 49 49 The "Error Log" plugin shows errors that occurred while generating the page, 50 50 similar to the httpd `error.log`. You can send information to the error log 51 - explicitly with the @{function@libphutil:phlog} function. 51 + explicitly with the @{function@arcanist:phlog} function. 52 52 53 53 If errors occurred, a red dot will appear on the plugin tab. 54 54
+2 -10
src/docs/user/userguide/arcanist.diviner
··· 90 90 91 91 To install Arcanist, pick an install directory and clone the code from GitHub: 92 92 93 - some_install_path/ $ git clone https://github.com/phacility/libphutil.git 94 93 some_install_path/ $ git clone https://github.com/phacility/arcanist.git 95 94 96 - This should leave you with a directory structure like this 97 - 98 - some_install_path/ # Wherever you chose to install it. 99 - arcanist/ # Arcanist-specific code and libraries. 100 - libphutil/ # A shared library Arcanist depends upon. 101 - 102 95 Now add `some_install_path/arcanist/bin/` to your PATH environment variable. 103 96 When you type "arc", you should see something like this: 104 97 ··· 110 103 - On Windows: @{article:Arcanist User Guide: Windows} 111 104 - On Mac OS X: @{article:Arcanist User Guide: Mac OS X} 112 105 113 - You can later upgrade Arcanist and libphutil to the latest versions with 114 - `arc upgrade`: 106 + You can later upgrade Arcanist to the latest version with `arc upgrade`: 115 107 116 108 $ arc upgrade 117 109 ··· 122 114 able to use: 123 115 124 116 - Facebook does most development on development servers, which have a standard 125 - environment and NFS mounts. Arcanist and libphutil themselves live on an 117 + environment and NFS mounts. Arcanist lives on an 126 118 NFS mount, and the default `.bashrc` adds them to the PATH. Updating the 127 119 mount source updates everyone's versions, and new employees have a working 128 120 `arc` when they first log in.
+2 -2
src/docs/user/userguide/arcanist_coverage.diviner
··· 27 27 If the test engine enables coverage by default, it will be uploaded to 28 28 Differential and displayed in the right gutter when viewing diffs. 29 29 30 - = Enabling Coverage for libphutil, Arcanist and Phabricator = 30 + = Enabling Coverage for Arcanist and Phabricator = 31 31 32 - If you're contributing, libphutil, Arcanist and Phabricator support coverage if 32 + If you're contributing, Arcanist and Phabricator support coverage if 33 33 you install Xdebug: 34 34 35 35 http://xdebug.org/
-3
src/docs/user/userguide/arcanist_quick_start.diviner
··· 20 20 21 21 Then install Arcanist itself: 22 22 23 - $ mkdir somewhere/ 24 - $ cd somewhere/ 25 - somewhere/ $ git clone https://github.com/phacility/libphutil.git 26 23 somewhere/ $ git clone https://github.com/phacility/arcanist.git 27 24 28 25 Add `arc` to your path:
+1 -2
src/docs/user/userguide/conduit.diviner
··· 19 19 the API and making calls. This is the best starting point for learning about 20 20 the API. See the next section for details. 21 21 22 - `ConduitClient`: This is the official client available in `libphutil`, and 23 - the one used by `arc`. 22 + `ConduitClient`: This is the official client available in `arcanist`. 24 23 25 24 `arc call-conduit`: You can use this `arc` command to execute low-level 26 25 Conduit calls by piping JSON in to stdin. This can provide a simple way
+3 -4
src/docs/user/userguide/diffusion_managing.diviner
··· 55 55 install but do not need to be globally unique, so you are free to use the 56 56 single-letter callsigns for brevity. For example, Facebook uses "E" for the 57 57 Engineering repository, "O" for the Ops repository, "Y" for a Yum package 58 - repository, and so on, while Phabricator uses "P", "ARC", "PHU" for libphutil, 59 - and "J" for Javelin. Keeping callsigns brief will make them easier to use, and 60 - the use of one-character callsigns is encouraged if they are reasonably 61 - evocative. 58 + repository, and so on, while Phabricator uses "P" and Arcanist uses "ARC". 59 + Keeping callsigns brief will make them easier to use, and the use of 60 + one-character callsigns is encouraged if they are reasonably evocative. 62 61 63 62 If you configure a callsign like `XYZ`, Phabricator will activate callsign URIs 64 63 and activate the callsign identifier (like `rXYZ`) for the repository. These
+2 -2
src/docs/user/userguide/diffusion_symbols.diviner
··· 83 83 You can leave this blank for "All languages". 84 84 - **Uses Symbols From**: If this project depends on other repositories, add 85 85 the other repositories which symbols should be looked for here. For example, 86 - Phabricator lists "Arcanist" and "libphutil" because it uses classes and 87 - functions from these repositories. 86 + Phabricator lists "Arcanist" because it uses classes and functions defined 87 + in `arcanist/`. 88 88 89 89 == External Symbols == 90 90
+1 -1
src/docs/user/userguide/drydock_hosts.diviner
··· 41 41 properly with any software you need, and have tools like `git`, `hg` or `svn` 42 42 that may be required to interact with working copies. 43 43 44 - You do **not** need to install PHP, arcanist, libphutil or Phabricator on the 44 + You do **not** need to install PHP, arcanist, or Phabricator on the 45 45 hosts unless you are specifically running `arc` commands. 46 46 47 47 **You must configure authentication.** Drydock also does not handle credentials
+2 -2
src/docs/user/userguide/events.diviner
··· 23 23 24 24 To install event listeners in Phabricator, follow these steps: 25 25 26 - - Write a listener class which extends @{class@libphutil:PhutilEventListener}. 26 + - Write a listener class which extends @{class@arcanist:PhutilEventListener}. 27 27 - Add it to a libphutil library, or create a new library (for instructions, 28 28 see @{article@phabcontrib:Adding New Classes}. 29 29 - Configure Phabricator to load the library by adding it to `load-libraries` ··· 40 40 41 41 To install event listeners in Arcanist, follow these steps: 42 42 43 - - Write a listener class which extends @{class@libphutil:PhutilEventListener}. 43 + - Write a listener class which extends @{class@arcanist:PhutilEventListener}. 44 44 - Add it to a libphutil library, or create a new library (for instructions, 45 45 see @{article@phabcontrib:Adding New Classes}. 46 46 - Configure Phabricator to load the library by adding it to `load`
-42
src/docs/user/userguide/utf8.diviner
··· 22 22 Encodings" below). This is not completely supported, and repositories with 23 23 files that have multiple encodings are not supported. 24 24 25 - = Detecting and Repairing Files = 26 - 27 - It is recommended that you write source files only in ASCII text, but 28 - Phabricator fully supports UTF-8 source files. 29 - 30 - If you have a project which isn't valid UTF-8 because a few files have random 31 - binary nonsense in them, there is a script in libphutil which can help you 32 - identify and fix them: 33 - 34 - project/ $ libphutil/scripts/utils/utf8.php 35 - 36 - Generally, run this script on all source files with "-t" to find files with bad 37 - byte ranges, and then run it without "-t" on each file to identify where there 38 - are problems. For example: 39 - 40 - project/ $ find . -type f -name '*.c' -print0 | xargs -0 -n256 ./utf8 -t 41 - ./hello_world.c 42 - 43 - If this script exits without output, you're in good shape and all the files that 44 - were identified are valid UTF-8. If it found some problems, you need to repair 45 - them. You can identify the specific problems by omitting the "-t" flag: 46 - 47 - project/ $ ./utf8.php hello_world.c 48 - FAIL hello_world.c 49 - 50 - 3 main() 51 - 4 { 52 - 5 printf ("Hello World<0xE9><0xD6>!\n"); 53 - 6 } 54 - 7 55 - 56 - This shows the offending bytes on line 5 (in the actual console display, they'll 57 - be highlighted). Often a codebase will mostly be valid UTF-8 but have a few 58 - scattered files that have other things in them, like curly quotes which someone 59 - copy-pasted from Word into a comment. In these cases, you can just manually 60 - identify and fix the problems pretty easily. 61 - 62 - If you have a prohibitively large number of UTF-8 issues in your source code, 63 - Phabricator doesn't include any default tools to help you process them in a 64 - systematic way. You could hack up `utf8.php` as a starting point, or use other 65 - tools to batch-process your source files. 66 - 67 25 = Support for Alternate Encodings = 68 26 69 27 Phabricator has some support for encodings other than UTF-8.
+2 -1
src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
··· 66 66 $class = $this->getTaskClass(); 67 67 68 68 try { 69 - // NOTE: If the class does not exist, libphutil will throw an exception. 69 + // NOTE: If the class does not exist, the autoloader will throw an 70 + // exception. 70 71 class_exists($class); 71 72 } catch (PhutilMissingSymbolException $ex) { 72 73 throw new PhabricatorWorkerPermanentFailureException(
+1 -1
src/infrastructure/storage/lisk/LiskDAO.php
··· 116 116 * $pugs = $dog->loadAllWhere('breed = %s', 'Pug'); 117 117 * $sawyer = $dog->loadOneWhere('name = %s', 'Sawyer'); 118 118 * 119 - * These methods work like @{function@libphutil:queryfx}, but only take half of 119 + * These methods work like @{function@arcanist:queryfx}, but only take half of 120 120 * a query (the part after the WHERE keyword). Lisk will handle the connection, 121 121 * columns, and object construction; you are responsible for the rest of it. 122 122 * @{method:loadAllWhere} returns a list of objects, while
+1 -1
support/startup/PhabricatorStartup.php
··· 67 67 */ 68 68 public static function getMicrosecondsSinceStart() { 69 69 // This is the same as "phutil_microseconds_since()", but we may not have 70 - // loaded libphutil yet. 70 + // loaded libraries yet. 71 71 return (int)(1000000 * (microtime(true) - self::getStartTime())); 72 72 } 73 73
+1 -1
webroot/rsrc/externals/javelin/docs/concepts/behaviors.diviner
··· 124 124 the full power of arbitrary JS execution. 125 125 - It's utterly hideous. 126 126 127 - In 2007/2008, we introduced @{function@libphutil:jsprintf} and a function called 127 + In 2007/2008, we introduced @{function@arcanist:jsprintf} and a function called 128 128 onloadRegister() to solve some of the obvious problems: 129 129 130 130 lang=php
-82
webroot/rsrc/externals/javelin/docs/facebook.diviner
··· 1 - @title Javelin at Facebook 2 - @group facebook 3 - 4 - Information specific to Javelin at Facebook. 5 - 6 - = Building Support Scripts = 7 - 8 - Javelin now ships with the source to build several libfbjs-based binaries, which 9 - serve to completely sever its dependencies on trunk: 10 - 11 - - `javelinsymbols`: used for lint 12 - - `jsast`: used for documentation generation 13 - - `jsxmin`: used to crush packages 14 - 15 - To build these, first build libfbjs: 16 - 17 - javelin/ $ cd externals/libfbjs 18 - javelin/externals/libfbjs/ $ CXX=/usr/bin/g++ make 19 - 20 - Note that **you must specify CXX explicitly because the default CXX is broken**. 21 - 22 - Now you should be able to build the individual binaries: 23 - 24 - javelin/ $ cd support/javelinsymbols 25 - javelin/support/javelinsymbols $ CXX=/usr/bin/g++ make 26 - 27 - javelin/ $ cd support/jsast 28 - javelin/support/jsast $ CXX=/usr/bin/g++ make 29 - 30 - javelin/ $ cd support/jsxmin 31 - javelin/support/jsxmin $ CXX=/usr/bin/g++ make 32 - 33 - = Synchronizing Javelin = 34 - 35 - To synchronize Javelin **from** Facebook trunk, run the synchronize script: 36 - 37 - javelin/ $ ./scripts/sync-from-facebook.php ~/www 38 - 39 - ...where `~/www` is the root you want to pull Javelin files from. The script 40 - will copy files out of `html/js/javelin` and build packages, and leave the 41 - results in your working copy. From there you can review changes and commit, and 42 - then push, diff, or send a pull request. 43 - 44 - To synchronize Javelin **to** Facebook trunk, run the, uh, reverse-synchronize 45 - script: 46 - 47 - javelin/ $ ./scripts/sync-to-facebook.php ~/www 48 - 49 - ...where `~/www` is the root you want to push Javelin files to. The script 50 - will copy files out of the working copy into your `www` and leave you with a 51 - dirty `www`. From there you can review changes. 52 - 53 - Once Facebook moves to pure git for `www` we can probably just submodule 54 - Javelin into it and get rid of all this nonsense, but the mixed SVN/git 55 - environment makes that difficult until then. 56 - 57 - = Building Documentation = 58 - 59 - Check out `diviner` and `libphutil` from Facebook github, and put them in a 60 - directory with `javelin`: 61 - 62 - somewhere/ $ ls 63 - diviner/ 64 - javelin/ 65 - libphutil/ 66 - somewhere/ $ 67 - 68 - Now run `diviner` on `javelin`: 69 - 70 - somewhere/ $ cd javelin 71 - somewhere/javelin/ $ ../diviner/bin/diviner . 72 - [DivinerArticleEngine] Generating documentation for 48 files... 73 - [JavelinDivinerEngine] Generating documentation for 74 files... 74 - somewhere/javelin/ $ 75 - 76 - Documentation is now available in `javelin/docs/`. 77 - 78 - = Editing javelinjs.com = 79 - 80 - The source for javelinjs.com lives in `javelin/support/webroot/`. The site 81 - itself is served off the phabricator.com host. You need access to that host to 82 - push it.