{"id":2101,"date":"2018-01-20T21:37:30","date_gmt":"2018-01-20T20:37:30","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=2101"},"modified":"2019-01-17T10:20:45","modified_gmt":"2019-01-17T09:20:45","slug":"php-project-template","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/","title":{"rendered":"PHP project template"},"content":{"rendered":"<p>Want to start a new PHP project? Perhaps yet another library you are creating? Tired of doing the same lame groundwork for the 5th time this month? Want to start a code kata and not lose time on generic setup work? I got just the project for you!<\/p>\n<p>Edit: there now is a dedicated <a href=\"https:\/\/github.com\/JeroenDeDauw\/new-php-library\">PHP library template<\/a> better suited for library creation!<\/p>\n<p>I&#8217;ve created a <strong><a href=\"https:\/\/github.com\/JeroenDeDauw\/new-php-project\">PHP project template<\/a><\/strong> that you can fork or copy to get started quickly. It contains setup for testing, lining and CI and no actual PHP code. A detailed list of the project templates contents:<\/p>\n<ul>\n<li>Ready-to-go PHPUnit (configuration and working bootstrap)<\/li>\n<li>Ready-to-go PHPCS<\/li>\n<li>Docker environment with PHP 7.2 and Composer (so you do not need to have PHP or Composer installed!)<\/li>\n<li>Tests and style checks runnable in the Docker environment with simple <code>make<\/code> commands<\/li>\n<li>TravisCI ready<\/li>\n<li>Code coverage creation on TravisCI and uploading to ScrutinizerCI (optional)<\/li>\n<li>Coverage tag validation<\/li>\n<li>Stub production and test classes for ultra-quick start (ideal when doing a kata)<\/li>\n<li>COPYING and `.gitignore` files<img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2169\" data-permalink=\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/php\/\" data-orig-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\" data-orig-size=\"1184,742\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"php\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\" data-large-file=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\" class=\"wp-image-2169 alignright\" src=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\" alt=\"\" width=\"224\" height=\"140\" \/><\/li>\n<li>README with instructions of how to run the tests<\/li>\n<\/ul>\n<h3>Getting started<\/h3>\n<ul>\n<li>Copy the code or fork the repository<\/li>\n<li>If you do not want to use the MediaWiki coding style, remove <code>mediawiki\/mediawiki-codesniffer<\/code> from <code>composer.json<\/code><\/li>\n<li>If you want to support older PHP versions, update <code>composer.json<\/code> and remove new PHP features from the stub PHP files<\/li>\n<li>If the code is not a kata or quick experiment, update the PHP namespaces and the README<\/li>\n<li>Start writing code!<\/li>\n<li>If you want TravisCI and\/or ScrutinizerCI integration you will need to log in to their respective websites<\/li>\n<li>Optionally update the README<\/li>\n<\/ul>\n<p>You can find the <a href=\"https:\/\/github.com\/JeroenDeDauw\/new-php-project\">project template on GitHub<\/a>.<\/p>\n<p>Special thanks to <a href=\"https:\/\/github.com\/wiese\">weise<\/a>, <a href=\"https:\/\/github.com\/gbirke\">gbirke<\/a> and <a href=\"https:\/\/github.com\/KaiNissen\">KaiNissen<\/a> for their contributions to the projects this template was extracted from.<\/p>\n<p><script src=\"https:\/\/asciinema.org\/a\/XSltW8wY5yuxlev7D3gCe7zkU.js\" id=\"asciicast-XSltW8wY5yuxlev7D3gCe7zkU\" async><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to start a new PHP project? Perhaps yet another library you are creating? Tired of doing the same lame&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[378,181,195,441,197],"class_list":["post-2101","post","type-post","status-publish","format-standard","hentry","category-programming","tag-katas","tag-open-source","tag-php","tag-php7","tag-planet-wikimedia"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP project template - Blog of Jeroen De Dauw<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP project template - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"Want to start a new PHP project? Perhaps yet another library you are creating? Tired of doing the same lame&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-20T20:37:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-17T09:20:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"PHP project template\",\"datePublished\":\"2018-01-20T20:37:30+00:00\",\"dateModified\":\"2019-01-17T09:20:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\"},\"wordCount\":290,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"image\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\",\"keywords\":[\"Katas\",\"Open Source\",\"PHP\",\"PHP7\",\"Planet Wikimedia\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\",\"url\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\",\"name\":\"PHP project template - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\",\"datePublished\":\"2018-01-20T20:37:30+00:00\",\"dateModified\":\"2019-01-17T09:20:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage\",\"url\":\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\",\"contentUrl\":\"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png\",\"width\":1184,\"height\":742},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.entropywins.wtf\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP project template\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#website\",\"url\":\"https:\/\/www.entropywins.wtf\/blog\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/jeroendedauw\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP project template - Blog of Jeroen De Dauw","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/","og_locale":"en_US","og_type":"article","og_title":"PHP project template - Blog of Jeroen De Dauw","og_description":"Want to start a new PHP project? Perhaps yet another library you are creating? Tired of doing the same lame&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2018-01-20T20:37:30+00:00","article_modified_time":"2019-01-17T09:20:45+00:00","og_image":[{"url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png","type":"","width":"","height":""}],"author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"PHP project template","datePublished":"2018-01-20T20:37:30+00:00","dateModified":"2019-01-17T09:20:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/"},"wordCount":290,"commentCount":1,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png","keywords":["Katas","Open Source","PHP","PHP7","Planet Wikimedia"],"articleSection":["Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/","url":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/","name":"PHP project template - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage"},"image":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png","datePublished":"2018-01-20T20:37:30+00:00","dateModified":"2019-01-17T09:20:45+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#primaryimage","url":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png","contentUrl":"https:\/\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2018\/01\/php.png","width":1184,"height":742},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2018\/01\/20\/php-project-template\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP project template"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-xT","jetpack-related-posts":[{"id":2027,"url":"https:\/\/www.entropywins.wtf\/blog\/2017\/04\/25\/php-development-with-docker\/","url_meta":{"origin":2101,"position":0},"title":"PHP development with Docker","author":"Jeroen","date":"2017-04-25","format":false,"excerpt":"I'm the kind of dev that dreads configuring webservers and that rather does not have to put up with random ops stuff before being able to get work done. Docker is one of those things I've never looked into, cause clearly it's evil annoying boring evil confusing evil ops stuff.\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1147,"url":"https:\/\/www.entropywins.wtf\/blog\/2013\/11\/17\/ask-1-0-released\/","url_meta":{"origin":2101,"position":1},"title":"Ask 1.0 released!","author":"Jeroen","date":"2013-11-17","format":false,"excerpt":"I\u2019m very happy to announce the first release of the Ask library. The Ask library is a fresh PHP implementation of the Ask query language. This is the query language used by Semantic MediaWiki. At the Wikidata project we aim to provide similar query functionality in our Wikibase software, and\u2026","rel":"","context":"With 3 comments","block_context":{"text":"With 3 comments","link":"https:\/\/www.entropywins.wtf\/blog\/2013\/11\/17\/ask-1-0-released\/#comments"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1160,"url":"https:\/\/www.entropywins.wtf\/blog\/2013\/11\/28\/my-adventures-with-autoloading-in-php\/","url_meta":{"origin":2101,"position":2},"title":"My adventures with autoloading in PHP","author":"Jeroen","date":"2013-11-28","format":false,"excerpt":"This post has as audience developers and will provide readers with insights on how to cleanly autoload classes in PHP. For a long long time, I\u2019ve been one of those MediaWiki developers that just added classes and file names to $wgAutoloadClasses, without really knowing how this made class loading work\u2026","rel":"","context":"In \"Autoloading\"","block_context":{"text":"Autoloading","link":"https:\/\/www.entropywins.wtf\/blog\/tag\/autoloading\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1421,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/02\/20\/phpcs-and-phpmd-my-experiences\/","url_meta":{"origin":2101,"position":3},"title":"PHPCS and PHPMD: my experiences","author":"Jeroen","date":"2015-02-20","format":false,"excerpt":"PHPCS (PHP Code Sniffer) detects violations against a specified coding standard. PHPMD (PHP Mess Detector) is a similar tool, though with more of a focus on metrics. In this post I'll go over how I started using them, and what I learned in the process. They are both very useful\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1303,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/10\/diff-1-0-released\/","url_meta":{"origin":2101,"position":4},"title":"Diff 1.0 released!","author":"Jeroen","date":"2014-04-10","format":false,"excerpt":"I'm very happy to announce the 1.0 release of the PHP Diff library. Diff is a small PHP library for representing differences between data structures, computing such differences, and applying them as a patch. For more details see the usage instructions. I created this library as part of the Wikibase\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/www.entropywins.wtf\/blog\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1479,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/08\/rewindable-php-generators\/","url_meta":{"origin":2101,"position":5},"title":"Rewindable PHP Generators","author":"Jeroen","date":"2015-11-08","format":false,"excerpt":"Today I was refactoring some code in one of my libraries, and ended up replacing a named Iterator class with a Generator. To my surprise this changed behaviour, which I noticed due to a broken test. A test verifying that I could iterate multiple times through the iterator - good\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/2101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=2101"}],"version-history":[{"count":8,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/2101\/revisions"}],"predecessor-version":[{"id":2466,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/2101\/revisions\/2466"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=2101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=2101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=2101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}