1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/celerity
epriestley 5d93290e42 Update Celerity map parser for new docblock code
Summary:
After D16431, listing the same `@annotation` multiple times makes the docblock parser return a list.

We have some resources which list `@requires` or `@provides` several times, but don't handle the new parser properly. Make the code more flexible, since this is a reasonable way to specify the annotations.

See also D16432. This produces a failure in this form:

```
[2016-08-23 21:10:15] ERROR 2: trim() expects parameter 1 to be string, array given at [/core/data/drydock/workingcopy-74/repo/phabricator/src/applications/celerity/CelerityResourceMapGenerator.php:236]
2	arcanist(head=master, ref.master=89e8b4852384), phabricator(head=6c940fb71b0a8850c6a1b7f5fc642a8f8135a76a, ref.master=b521f2349e46), phutil(head=master, ref.master=237549280f08)
3	  #0 trim(array) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:236]
4	  #1 CelerityResourceMapGenerator::getProvidesAndRequires(string, string) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:193]
5	  #2 CelerityResourceMapGenerator::rebuildTextResources(CelerityPhabricatorResources, CelerityResourceTransformer) called at [<phabricator>/src/applications/celerity/CelerityResourceMapGenerator.php:54]
6	  #3 CelerityResourceMapGenerator::generate() called at [<phabricator>/src/__tests__/PhabricatorCelerityTestCase.php:16]
7	  #4 PhabricatorCelerityTestCase::testCelerityMaps()
8	  #5 call_user_func_array(array, array) called at [<arcanist>/src/unit/engine/phutil/PhutilTestCase.php:492]
9	  #6 PhutilTestCase::run() called at [<arcanist>/src/unit/engine/PhutilUnitTestEngine.php:69]
10	  #7 PhutilUnitTestEngine::run() called at [<arcanist>/src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php:147]
11	  #8 ArcanistConfigurationDrivenUnitTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:167]
12	  #9 ArcanistUnitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]
```

Test Plan: Ran `bin/celerity map`, no more warnings and no change to the actual map.

Reviewers: joshuaspence, chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16433
2016-08-23 14:49:15 -07:00
..
__tests__ Modularize Celerity postprocessors 2015-06-20 06:10:42 -07:00
application Push construction of routing maps into Sites 2015-08-31 04:01:01 -07:00
controller Improve cache behaviors for font files and other nonstandard resource types 2016-04-27 07:48:40 -07:00
management Generate syntax highlighting CSS from a reusable map 2016-05-05 02:50:48 -07:00
postprocessor Redesign Application Search 2016-08-01 12:23:36 -07:00
resources Add mask-icon for Safari pinned tab 2015-11-22 13:04:06 -08:00
api.php Make Celerity a real application 2014-10-13 11:17:23 -07:00
CelerityAPI.php Extend from Phobject 2015-06-15 18:02:27 +10:00
CelerityResourceGraph.php Various linter fixes 2015-05-20 07:27:41 +10:00
CelerityResourceMap.php Don't cache resources we can't generate properly 2016-04-21 11:56:54 -07:00
CelerityResourceMapGenerator.php Update Celerity map parser for new docblock code 2016-08-23 14:49:15 -07:00
CelerityResourceTransformer.php Swap charts from gRaphael to D3 2016-02-01 10:36:59 -08:00
CeleritySpriteGenerator.php Update Phabricator logo 2016-08-07 11:35:21 -07:00
CelerityStaticResourceResponse.php Render dropdown metadata earlier 2016-06-20 15:35:29 -07:00