Skip to content

Commit 42c0c0e

Browse files
author
epriestley
committedMar 16, 2021
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
1 parent 30d58de commit 42c0c0e

31 files changed

+83
-261
lines changed
 

‎scripts/fpm/warmup.php

-38
This file was deleted.

‎scripts/install/update_phabricator.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ set -x
99
# to work without modifications.
1010

1111
# NOTE: This script assumes you are running it from a directory which contains
12-
# arcanist/, libphutil/, and phabricator/.
12+
# arcanist/ and phabricator/.
1313

1414
ROOT=`pwd` # You can hard-code the path here instead.
1515

1616
### UPDATE WORKING COPIES ######################################################
1717

18-
cd $ROOT/libphutil
19-
git pull
20-
2118
cd $ROOT/arcanist
2219
git pull
2320

‎src/applications/conduit/controller/PhabricatorConduitController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function buildPHPExample(
156156

157157
$parts = array();
158158

159-
$libphutil_path = 'path/to/libphutil/src/__phutil_library_init__.php';
159+
$libphutil_path = 'path/to/arcanist/support/init/init-script.php';
160160

161161
$parts[] = '<?php';
162162
$parts[] = "\n\n";

‎src/applications/repository/storage/PhabricatorRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ public function getRemoteProtocol() {
11511151
/**
11521152
* Get a parsed object representation of the repository's remote URI..
11531153
*
1154-
* @return wild A @{class@libphutil:PhutilURI}.
1154+
* @return wild A @{class@arcanist:PhutilURI}.
11551155
* @task uri
11561156
*/
11571157
public function getRemoteURIObject() {

‎src/docs/contributor/adding_new_classes.diviner

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ available by looking at all of the subclasses of
2121
@{class@phabricator:PhabricatorApplication}. It
2222
discovers available workflows in `arc` by looking at all of the subclasses of
2323
@{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}.
2525

2626
This pattern holds in many cases, so you can often add functionality by adding
2727
new classes with no other work. Phabricator will automatically discover and
@@ -49,8 +49,8 @@ This is intended as a quick way to add small pieces of functionality, test new
4949
features, or get started on a larger project. Extending Phabricator like this
5050
imposes a small performance penalty compared to using a library.
5151

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/`.
5454

5555
For example, to add a new application, create a file like this one and add it
5656
to `phabricator/src/extensions/`.
@@ -171,8 +171,8 @@ performing static analysis.
171171
NOTE: If Phabricator isn't located next to your custom library, specify a
172172
path which actually points to the `phabricator/` directory.
173173

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.
176176

177177
Finally, edit your Phabricator config to tell it to load your library at
178178
runtime, by adding it to `load-libraries`:
@@ -206,17 +206,17 @@ This will automatically regenerate the static map of the library.
206206
What You Can Extend And Invoke
207207
==============================
208208

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
211211
methods have the minimum required visibility (protected or private). The goal
212212
of this strictness is to make it clear what you can safely extend, access, and
213213
invoke, so your code will keep working as the upstream changes.
214214

215215
IMPORTANT: We'll still break APIs frequently. The upstream does not support
216216
extension development, and none of these APIs are stable.
217217

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.
220220

221221
If you want to add features but can't figure out how to do it without changing
222222
Phabricator code, here are some approaches you may be able to take:

‎src/docs/contributor/bug_reports.diviner

+3-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ Before you file a report, here are some common solutions to problems:
4747
issues to be fixed in less than 24 hours, so even if you've updated recently
4848
you should update again. If you aren't sure how to update, see the next
4949
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.
5453
- **Restart Apache or PHP-FPM**: Phabricator uses caches which don't get
5554
reset until you restart Apache or PHP-FPM. After updating, make sure you
5655
restart.

‎src/docs/contributor/contrib_intro.diviner

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@title Contributor Introduction
22
@group contrib
33

4-
Introduction to contributing to Phabricator, Arcanist and libphutil.
4+
Introduction to contributing to Phabricator and Arcanist.
55

66
Overview
77
========

‎src/docs/contributor/contributing_code.diviner

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ outside of our comfort zone.
212212
Writing and Submitting Patches
213213
==================
214214

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.
218218

219219
You should read the relevant coding convention documents before you submit a
220220
change. If you're a new contributor, you don't need to worry about this too

‎src/docs/contributor/general_coding_standards.diviner

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@group standards
33

44
This document is a general coding standard for contributing to Phabricator,
5-
Arcanist, libphutil and Diviner.
5+
Arcanist, and Diviner.
66

77
= Overview =
88

@@ -136,7 +136,7 @@ handling and makes it easier to get right than wrong:
136136
Filesystem::writeFile('file.bak', $data); // Best
137137
do_something_dangerous();
138138

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
140140
example.
141141

142142
= Documentation, Comments and Formatting =

‎src/docs/contributor/internationalization.diviner

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ For instructions on adding new classes, see
4444
Writing Translatable Code
4545
=========================
4646

47-
Strings are marked for translation with @{function@libphutil:pht}.
47+
Strings are marked for translation with @{function@arcanist:pht}.
4848

4949
The `pht()` function takes a string (and possibly some parameters) and returns
5050
the translated version of that string in the current viewer's locale, if a
@@ -68,7 +68,7 @@ the major rules are:
6868
- Use parameters to create strings containing user names, object names, etc.
6969
- Translate full sentences, not sentence fragments.
7070
- Let the translation framework handle plural rules.
71-
- Use @{class@libphutil:PhutilNumber} for numbers.
71+
- Use @{class@arcanist:PhutilNumber} for numbers.
7272
- Let the translation framework handle subject gender rules.
7373
- Translate all human-readable text, even exceptions and error messages.
7474

@@ -323,7 +323,7 @@ pronouns (like "he" and "she") but there are more complex rules in other
323323
languages, and languages like Czech also require verb agreement.
324324

325325
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
327327
gendered translation variants.
328328

329329
```lang=php
@@ -361,8 +361,8 @@ all human-readable text. This rule is unambiguous and easy to follow.
361361
In cases where similar error or exception text is often repeated, it is
362362
probably appropriate to define an exception for that category of error rather
363363
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
366366
produce a consistent message about a common error state in a convenient way.
367367

368368
There are a handful of error strings in the codebase which may be used before

‎src/docs/contributor/php_coding_standards.diviner

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
@group standards
33

44
This document describes PHP coding standards for Phabricator and related
5-
projects (like Arcanist and libphutil).
5+
projects (like Arcanist).
66

77
= Overview =
88

99
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.
1212

1313
These guidelines are essentially identical to the Facebook guidelines, since I
1414
basically copy-pasted them. If you are already familiar with the Facebook

‎src/docs/contributor/rendering_html.diviner

+25-25
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ pipeline, and the browser will treat it as plain text, not HTML.
1313
This document describes the right way to build HTML components so they are safe
1414
from XSS and render correctly. Broadly:
1515

16-
- Use @{function@libphutil:phutil_tag} (and @{function:javelin_tag}) to build
16+
- Use @{function@arcanist:phutil_tag} (and @{function:javelin_tag}) to build
1717
tags.
18-
- Use @{function@libphutil:hsprintf} where @{function@libphutil:phutil_tag}
18+
- Use @{function@arcanist:hsprintf} where @{function@arcanist:phutil_tag}
1919
is awkward.
2020
- Combine elements with arrays, not string concatenation.
2121
- @{class:AphrontView} subclasses should return a
22-
@{class@libphutil:PhutilSafeHTML} object from their `render()` method.
22+
@{class@arcanist:PhutilSafeHTML} object from their `render()` method.
2323
- @{class:AphrontView} subclasses act like tags when rendering.
2424
- @{function:pht} has some special rules.
2525
- There are some other things that you should be aware of.
@@ -28,7 +28,7 @@ See below for discussion.
2828

2929
= Building Tags: phutil_tag() =
3030

31-
Build HTML tags with @{function@libphutil:phutil_tag}. For example:
31+
Build HTML tags with @{function@arcanist:phutil_tag}. For example:
3232

3333
phutil_tag(
3434
'div',
@@ -37,10 +37,10 @@ Build HTML tags with @{function@libphutil:phutil_tag}. For example:
3737
),
3838
$content);
3939

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
4242
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
4444
content correctly (without double-escaping):
4545

4646
phutil_tag(
@@ -52,14 +52,14 @@ content correctly (without double-escaping):
5252
$content));
5353

5454
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
5656
`sigil` and `meta` attributes.
5757

5858
= Building Blocks: hsprintf() =
5959

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.
6363
@{function:hsprintf} has `sprintf()` semantics, but `%s` escapes HTML:
6464

6565
// Safely build fragments or unwieldy blocks.
@@ -72,13 +72,13 @@ complex blocks of HTML, when @{function@libphutil:phutil_tag} is a poor fit.
7272
- You need to build a block with a lot of tags, like a table with rows and
7373
cells.
7474
- 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).
7676

7777
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).
7979

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.
8282

8383
= Composing Tags =
8484

@@ -99,7 +99,7 @@ Instead, use an array:
9999
// Render a tag containing other tags safely.
100100
phutil_tag('div', array(), array($header, $body));
101101

102-
If you concatenate @{class@libphutil:PhutilSafeHTML} objects, they revert to
102+
If you concatenate @{class@arcanist:PhutilSafeHTML} objects, they revert to
103103
normal strings and are no longer marked as properly escaped tags.
104104

105105
(In the future, these objects may stop converting to strings, but for now they
@@ -118,7 +118,7 @@ If you need to build a list of items with some element in between each of them
118118
= AphrontView Classes =
119119

120120
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
122122
return `phutil_tag()` or `javelin_tag()`:
123123

124124
return phutil_tag('div', ...);
@@ -130,8 +130,8 @@ You can use an @{class:AphrontView} subclass like you would a tag:
130130
= Internationalization: pht() =
131131

132132
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
135135
normal text.
136136

137137
This is generally safe because translations are not permitted to have more tags
@@ -146,23 +146,23 @@ like you would expect, but it is worth being aware of.
146146
NOTE: This section describes dangerous methods which can bypass XSS protections.
147147
If possible, do not use them.
148148

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
150150
calling @{function:phutil_safe_html} on it. This is **dangerous**, because if
151151
you are wrong and the string is not actually safe, you have introduced an XSS
152152
vulnerability. Consequently, you should avoid calling this if possible.
153153

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
155155
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.
157157

158158
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}.
160160

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}
162162
object, you should call `getHTMLContent()`, not cast it to a string. Eventually,
163163
we would like to remove the string cast entirely.
164164

165-
Functions @{function@libphutil:phutil_tag} and @{function@libphutil:hsprintf}
165+
Functions @{function@arcanist:phutil_tag} and @{function@arcanist:hsprintf}
166166
are not safe if you pass the user input for the tag or attribute name. All the
167167
following examples are dangerous:
168168

‎src/docs/contributor/unit_tests.diviner

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
@title Writing Unit Tests
22
@group developer
33

4-
Simple guide to libphutil, Arcanist and Phabricator unit tests.
4+
Simple guide to Arcanist and Phabricator unit tests.
55

66
= Overview =
77

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.
1111

1212
In the general case, you can integrate `arc` with a custom unit test engine
1313
(like PHPUnit or any other unit testing library) to run tests in other projects.
@@ -16,7 +16,7 @@ for information on customizing engines.
1616

1717
= Adding Tests =
1818

19-
To add new tests to a libphutil, Arcanist or Phabricator module:
19+
To add new tests to a Arcanist or Phabricator module:
2020

2121
- Create a `__tests__/` directory in the module if it doesn't exist yet.
2222
- Add classes to the `__tests__/` directory which extend from

0 commit comments

Comments
 (0)
Failed to load comments.