Slide 1

Slide 1 text

Contributing to Open Source PHP Projects By Jeremy Lindblom (@jeremeamia)

Slide 2

Slide 2 text

Open Source Software

Slide 3

Slide 3 text

Open Source Software

Slide 4

Slide 4 text

Open Source Software

Slide 5

Slide 5 text

Open Source Software i.e., source code is available

Slide 6

Slide 6 text

Open Source Software i.e., source code is available associated with a license often developed in public and/or collaboratively

Slide 7

Slide 7 text

Open Source Licenses MIT BSD Apache 2 GPL PHP Mozilla Eclipse LGPL

Slide 8

Slide 8 text

Open Source Licenses MIT BSD Apache 2 GPL PHP Mozilla Eclipse LGPL

Slide 9

Slide 9 text

http://opensource.org

Slide 10

Slide 10 text

Contributing to OSS Find a project. (Ideally, something that you already use) — OR — Start a project. (Ideally, something that you already need)

Slide 11

Slide 11 text

Contributing to OSS Write Code: Bug Fixes, Features, Plugins, Tests, Improvements, etc. Write/Improve Docs Community Participation Run Tests Report Bugs Improve Automation Donate Money/In-Kind Use/Share the Software Say Thanks

Slide 12

Slide 12 text

How to NOT Contribute •  Be overly critical of projects/people •  Be rude or disrespectful •  Make unreasonable demands •  Never offer to help •  Be ungrateful for others' time/work •  Be offended if contributions rejected

Slide 13

Slide 13 text

What's in it for me? •  Improve the code you use •  Build reputation, résumé, and portfolio •  Learn new skills (including soft skills) •  Give back •  Personal satisfaction

Slide 14

Slide 14 text

Some Tools Git GitHub Composer Travis CI PHPUnit Markdown phpDoc IRC Phing Make Sphinx Etc.

Slide 15

Slide 15 text

Anatomy of an OS PHP Project

Slide 16

Slide 16 text

Anatomy of an OS PHP Project ?

Slide 17

Slide 17 text

Anatomy of an OS PHP Project +  lib/   +  tests/   +  LICENSE   +  README.md  

Slide 18

Slide 18 text

Anatomy of an OS PHP Project -­‐  lib/   +  src/      tests/      LICENSE      README.md  

Slide 19

Slide 19 text

Anatomy of an OS PHP Project +  build/   +  docs/      src/      tests/      LICENSE      README.md  

Slide 20

Slide 20 text

Anatomy of an OS PHP Project +  build/   +  docs/      src/      tests/      LICENSE      README.md  

Slide 21

Slide 21 text

Anatomy of an OS PHP Project    build/      docs/      src/      tests/   +  .gitignore  (and  other  dotfiles)            LICENSE      README.md  (and  other  documentation)   +  composer.json  (and  other  config)  

Slide 22

Slide 22 text

Anatomy of an OS PHP Project .coveralls.yml   .gitattributes   .gitignore   .gitattributes   .scrutinizer.yml   .travis.yml   CONTRIBUTING.md   LICENSE   Makefile   README.md   build.xml   composer.json   composer.lock   phpunit.xml.dist  

Slide 23

Slide 23 text

Anatomy of an OS PHP Project Some examples: •  https://github.com/symfony/symfony •  https://github.com/laravel/framework •  https://github.com/zendframework/zf2 •  https://github.com/guzzle/guzzle •  https://github.com/doctrine/doctrine2

Slide 24

Slide 24 text

Contribution Process 1.  Find out where people gather. (GitHub, IRC, Mailing List, etc.) 2.  Find or create an issue. 3.  Ask if you can work on it. 4.  Do the work. Include tests, if possible. 5.  Submit a pull request (PR).

Slide 25

Slide 25 text

GitHub Process 1.  Fork repository to your GitHub account. 2.  git  clone to your local machine. 3.  composer  install dependencies. 4.  Write code and tests. 5.  git  commit  and push to your fork. 6.  Create a PR to the original repo. 7.  Wait for someone to review and accept.

Slide 26

Slide 26 text

Let's give it a shot! https://github.com/seaphp/simple-project