Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The PHP Package Checklist (Lone Star PHP 2016)

The PHP Package Checklist (Lone Star PHP 2016)

Composer has changed the landscape of PHP. Gone are the days of massive kitchen-sink frameworks. We're now in the era of packages. And we can all contribute! This talk will walk you through each step of the PHP Package Checklist (phppackagechecklist.com). You'll learn how to properly package your PHP projects, ensuring they are taken seriously by the rest of the PHP community!

Jonathan Reinink

April 08, 2016
Tweet

More Decks by Jonathan Reinink

Other Decks in Technology

Transcript

  1. Jonathan Reinink Software developer from Canada. Been writing PHP for

    over 16 years. Marketing agency for over a decade. Started contract development this year. I <3 open source.
  2. Contributing to an open source package will push you as

    a developer. GIT GitHub Issues Pull Requests Rebasing Testing TDD Semantic Versioning Code Coverage Composer Packagist Coding Standards PHP-FIG PSR DocBlocks Travis Scrutinizer CI Changelogs Licensing Code Sniffer Jekyll Shields.io Code Quality Milestones Releases Dependency Injection Coupling Cohesion
  3. “Calling a spec for JSON API’s “JSONAPI” is just the

    worst. Searchability: zero.” — Frank de Jonge
  4. // Good: namespace Glide; namespace League\Glide; // Bad: namespace Images;

    namespace ImageManipulations; namespace PHPGlide; namespace YoloImages;
  5. { "name": "league/glide", "require": { "intervention/image": "^2.1", "league/flysystem": "^1.0", "php":

    "^5.4 | ^7.0", "psr/http-message": "^1.0" }, "autoload": { "psr-4": { "League\\Glide\\": "src/" } } }
  6. /** * Set source file system. * @param Filesystem $source

    Source file system. */ public function setSource(Filesystem $source) { $this->source = $source; }
  7. {% for release in site.github.releases %} ## [{{ release.name }}]({{

    release.html_url }}) - {{ release.published_at | date: "%Y-%m-%d" }} {{ release.body | markdownify }} {% endfor %}
  8. “Tests are hard so we practice to get better. Docs

    are hard… so we don’t write any and complain.” — Steve Klabnik, Senior Technical Writer (maintainer of the official Rust documentation)
  9. The MIT License Copyright (c) <year> <copyright holders> Permission is

    hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.