GithubHelp home page GithubHelp logo

10allday-services / phabricator-extensions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla-services/phabricator-extensions

0.0 1.0 0.0 1.29 MB

Extensions to Phabricator for the conduit project

License: Apache License 2.0

PHP 90.95% Python 1.38% Shell 3.78% CSS 0.16% JavaScript 0.16% Dockerfile 3.56%

phabricator-extensions's Introduction

Mozilla Phabricator

Prerequisites

  • docker
  • docker-compose
  • Firefox, or some other way to connect your browser to a SOCKS proxy.

Installation

  1. Pull the repository into a separate (e.g. phabricator) directory.
  2. For Phabricator only, from within the phabricator directory run docker-compose up --build.

Accessing the websites provided by the demo

Firefox configuration

You can either configure the existing Firefox to use our proxy, or run a preconfigured Firefox.

To configure your current browser:

  1. Open Preferences -> Net Proxy -> Settings
  2. Choose the Manual Proxy Configuration radio button
  3. Set the Proxy HTTP Server to localhost, and the Port to 1090.

To run Firefox with an empty profile:

  1. Please set the environment variable FIREFOX_CMD to /path/to/firefox if your system does not recognize the firefox command.
  2. In a new terminal, run firefox-proxy, or firefox-proxy $(docker-machine ip) if you are using docker-machine.
  3. A new browser with an empty profile will open.

Websites provided by the demo

Preconfigured users:

For performing administration tasks in Phabricator, first log out of Phabricator and then go to http://phabricator.test/?admin=1

user:admin, password:password123456789!

PHP Development:

Install Python dependencies:

$ pip install -r requirements.txt

After adding, renaming, or moving classes, run arc liberate to rebuild the class map:

$ invoke liberate

To test changes in code:

$ invoke test

Attaching your debugger

Our development container is outfitted with Xdebug, but you have to do some local setup to take advantage of it. Note that the following directions use PHPStorm as the example IDE, though any Xdebug-compatible app should work.

  1. Start the development environment from the suite repository.
  2. Configure your IDE/debugger's Xdebug settings:
    1. It should be listening for Xdebug on port 9000 (the default Xdebug port)
    2. It should accept at least 10 simultaneous connections
  3. Configure your source mappings from your host's directories to your server's (docker container's) directories
    1. It's recommended to have the libphutil and phabricator source code in your PHP's includes so that you can step into (debug) and Intellisense the vendor code
    2. Create a new "server" configuration with the host as phabricator.test and the path mappings as shown below:
  4. Test your mappings
    1. Set a breakpoint in LandoLinkEventListener
    2. Go to phabricator.test/D1
    3. Your IDE should have stopped the control flow on your breakpoint and be showing you debugger details
My pages are no longer loading after enabling debugging!?

Due to the phd daemon, there's four PHP processes that will attach to your debugger, but mostly sit in the background and be pretty quiet. If you don't bump your "Max. simultaneous connections" in your IDE, you'll find that the daemon processes hog these connections while Phabricator page loads will wait for one of these connections to become free (which won't, since the daemon processes won't stop unless Phabricator is turned off).

TL;DR: increase your "Max. simultaneous connections" to at least 10 (4 for the daemons, plus 6 as a buffer for all the concurrent http requests).

Useful debugging commands

docker-compose -f docker-compose.yml -f docker-compose.bmo.yml exec phabricator vi <filename>

docker-compose -f docker-compose.yml -f docker-compose.bmo.yml exec phabricator /app/phabricator/bin/differential extract <commit-sha>

docker-compose -f docker-compose.yml -f docker-compose.bmo.yml exec phabdb mysql --user=root --password=password

Support

To talk to the phabricator-extensions developers, you can join them on Matrix.

phabricator-extensions's People

Contributors

dklawren avatar darkwing avatar zalun avatar ckolos avatar smacleod avatar purelogiq avatar dylanwh avatar mozilla-github-standards avatar globau avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.