Contributing to Pharen
There are a bunch of ways to help out for people of all experience levels. Also, since the the project is still very young, it will be easy to have a major influence.
You can always drop by in IRC at #pharen on irc.freenode.net if have an idea you want to discuss quickly.
The best way to help out is to simply create a Pharen project or two of your own, and tell others about the experience. Stretch the language to its limits to see what bugs show up. Create some run-of-the-mill applications and find out the best practices for Pharen development. Write a library for something that doesn’t exist, or for something that does exist but has an API geared to imperative programming in PHP.
Whatever you do, please share your experiences and if possible, the code, so that others can learn and give feedback in return.
Bugs and Feature Requests
If you find any bugs or have ideas for new features or better ways to implement something, please post about it in the issues tracker. Any discussion for those requests can then be centered there.
The Pharen project uses Git to manage all source code and GitHub to host it publicly. It is pretty straightforward to submit your own code. You can go about it in two ways:
Although this seems more complicated, it gives you the advantage of having your own copy of Pharen that you can freely experiment with. Additionally, other people can easily see the changes you made before they are integrated into the main repository.
Create a Github account if you don’t have one.
From the main project page click the
Forkbutton. This will place a fork of the code in your account. This fork is entirely yours’.
Go to your fork’s Github page and copy the cloning URL (it should be
Now, from the command-line, type
git clone, paste in the cloning URL, and hit enter, this will create a local copy of your fork.
Make some changes to the code.
From inside the fork’s directory and for each specific functional change, do the following:
git addthe files that were changed.
git commit -m "Enter a good commit message describing what was changed and why."
git push origin master. This will take the changes you made to your local copy and update your fork on Github.
Go back to the main project page and click
Pull Request. Summarize the changes you made to the code, submit, and I will take care of the rest.
The simpler alternative, although a big issue is that others will not be able to see what you did until after I accept your patch.
This method is best explained by the Git website. Look under “Cloning and Creating a Patch”. Once the patch is created, you can email it to me at firstname.lastname@example.org.
Right now, the Pharen test suite only covers the absolute basics. A very useful way to help is to add new tests that cover more edge cases and any new features that come about:
- Understand how to submit code.
- Tests are located in
examples/test/tests. You can either edit an existing test file or create a new one.
- Use the
checkfunction to test whatever value you got against the value you expected.
(check (. "foo" "bar") "foobar")will work, while
(check (. "foo "bar") "stuff")will cause the test to fail.
- If you created a new file, add it to the list called
That’s it! Running
phake test from the project’s root directory will now also run the newly added test code.