{"id":2267,"date":"2012-05-02T22:31:13","date_gmt":"2012-05-02T21:31:13","guid":{"rendered":"http:\/\/www.haydnwilliams.com\/blog\/?p=2267"},"modified":"2022-04-11T21:33:29","modified_gmt":"2022-04-11T20:33:29","slug":"php-development-in-eclipse-on-mac-osx-lion","status":"publish","type":"post","link":"https:\/\/www.haydnwilliams.com\/blog\/php-development-in-eclipse-on-mac-osx-lion\/","title":{"rendered":"PHP Development in Eclipse"},"content":{"rendered":"<p>I used Eclipse on a Mac to work with Java during <a title=\"University of Nottingham eTheses - Computer Simulations of Protein Folding\" href=\"http:\/\/etheses.nottingham.ac.uk\/2180\/\" target=\"_blank\" rel=\"noopener\">my PhD<\/a>, so familiarity made it seem the logical choice for some recent PHP development I&#8217;ve been doing. This post runs through the various plugins I added to support the development process, including checking code quality, running unit tests, and creating documentation.<\/p>\n<p>The first step is obviously to install <a title=\"Eclipse - The Eclipse Foundation open source community website\" href=\"http:\/\/www.eclipse.org\" target=\"_blank\" rel=\"noopener\">Eclipse<\/a>. To ensure compatibility with all the plugins mentioned, I found it necessary to download the <a title=\"Download Eclipse Classic (Indigo)\" href=\"http:\/\/www.eclipse.org\/downloads\/packages\/eclipse-classic-372\/indigosr2\" target=\"_blank\" rel=\"noopener\">standard version<\/a> of Eclipse and then install the <a title=\"Eclipse - PHP Development Tools\" href=\"http:\/\/www.eclipse.org\/pdt\" target=\"_blank\" rel=\"noopener\">PDT tools<\/a> afterwards. The dedicated <a title=\"Eclipse PDT Download\" href=\"http:\/\/www.eclipse.org\/pdt\/downloads\/\" target=\"_blank\" rel=\"noopener\">all-in-one PDT version<\/a> of Eclipse didn&#8217;t play ball with everything I needed it to.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Version Control &#8211; Subclipse<\/strong><\/span><br \/>\nI use <a title=\"Subversion\" href=\"http:\/\/subversion.apache.org\/\" target=\"_blank\" rel=\"noopener\">Subversion<\/a>\u00a0(SVN) for version control, and\u00a0<a title=\"Subclipse\" href=\"http:\/\/subclipse.tigris.org\/\" target=\"_blank\" rel=\"noopener\">Subclipse<\/a> seems to to be the <em>de-facto<\/em>\u00a0client for Eclipse. However, there are some pitfalls to be aware of. If you install Subclipse and then try to add a respository in the SVN Perspective, you may get an error telling you that you need version 1.7 or higher of the JavaHL library. This is part of the Subversion binary, so your copy of SVN must be out of date. If you nip over to <a title=\"Collabnet - Subversion binaries\" href=\"http:\/\/www.open.collab.net\/downloads\/community\/\" target=\"_blank\" rel=\"noopener\">Collabnet<\/a>\u00a0for the latest version you&#8217;ll find that they only have 1.6, so instead you&#8217;ll need to <a title=\"WAN Disco - Subversion 1.7 Binary\" href=\"http:\/\/www.wandisco.com\/get\/?f=subversion-binaries\/1.7\/Subversion-1.7.2_10.7.x.pkg\" target=\"_blank\" rel=\"noopener\">visit WANDisco<\/a>. Once 1.7 is installed, you should then be able to connect with Subclipse using the JavaHL library. Thanks to <a title=\"Stackoverflow - Subclipse in Mac OS Lion shows unable to load default SVN client error\" href=\"http:\/\/stackoverflow.com\/questions\/6791989\/subclipse-in-mac-os-lion-shows-unable-to-load-default-svn-client-error\" target=\"_blank\" rel=\"noopener\">peeps on Stackoverflow<\/a> for pointing this out.<\/p>\n<p>Unfortunately JavaHL still failed for me, telling me that the network connection closed unexpectedly. I tried to use the SVNKit adapter instead of JavaHL, but it turns out that <a href=\"http:\/\/subclipse.tigris.org\/ds\/viewMessage.do?dsForumId=1047&amp;dsMessageId=2862527\" target=\"_blank\" rel=\"noopener\">SVNKit isn&#8217;t supported in version 1.8 of Subclipse<\/a>, (the most recent version). I therefore uninstalled Subclipse v1.8 and installed v1.6 instead. That still didn&#8217;t work because apparently SVNKit doesn&#8217;t currently support SVN 1.7 (see previous link). Anyway, this turned out to be all a bit misleading, because when I tried it everything just worked.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Debgugging &#8211; Xdebug<\/strong><\/span><br \/>\nIf you want to debug PHP, then you&#8217;ll need either Xdebug or Zend Debugger. I chose the former for reasons I can&#8217;t quite recall. But setting it up required the following steps in Eclipse:<\/p>\n<ol>\n<li>In <em>Preferences &gt; PHP &gt; PHP Executables<\/em>, set up your PHP executable. Mine, the default Lion version, was at <em>\/usr\/bin\/php<\/em>, and php.ini was at <em>\/etc\/php.ini<\/em><\/li>\n<li>In <em>Preferences &gt; PHP &gt; \u00a0PHP Servers<\/em>, set up your PHP server. I had to delete the &#8220;default&#8221; one first.<\/li>\n<li>In <em>Preferences &gt; PHP &gt; Debug<\/em>, set your debugger, server and executable.<\/li>\n<li>If you&#8217;ve changed the Xdebug port from the default of 9000 for any reason (I had problems with my initial Xdebug install, and that was one of the suggested fixes), don&#8217;t forget to correct it in <em>Preferences &gt; PHP &gt; Debug &gt; Installed Debuggers<\/em>.<br \/>\n<span style=\"text-decoration: underline;\"><strong><br \/>\n<\/strong><\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<div id=\"attachment_2326\" style=\"width: 760px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2326\" class=\"size-full wp-image-2326\" title=\"Debugging with Xdebug. The 'debug' panel shows the methods which are currently running, while the relevant code is shown below. Panel on the right shows variables and their current values.\" src=\"http:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502b.jpg\" alt=\"Debugging with Xdebug. The 'debug' panel shows the methods which are currently running, while the relevant code is shown below. Panel on the right shows variables and their current values.\" width=\"750\" height=\"218\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502b.jpg 750w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502b-300x87.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><p id=\"caption-attachment-2326\" class=\"wp-caption-text\">Debugging with Xdebug. The &#39;debug&#39; panel shows the methods which are currently running, while the relevant code is shown below. Panel on the right shows variables and their current values.<\/p><\/div>\n<p><span style=\"text-decoration: underline;\"><strong><br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Coding Standards &#8211; PHP Code Sniffer<\/strong><\/span><\/p>\n<p>To ensure that your code is up to standard(s), you can install PHP_CodeSniffer with PEAR:<\/p>\n<pre>pear install PHP_CodeSniffer<\/pre>\n<p>There&#8217;s more detail on their\u00a0<a title=\"PHP_CodeSniffer\" href=\"http:\/\/pear.php.net\/package\/PHP_CodeSniffer\" target=\"_blank\" rel=\"noopener\">homepage<\/a>, including information on the <em>&#8211;report<\/em> flag to get a summary of the errors in your entire project instead of all the detail for every file. I&#8217;d recommend <a title=\"PHP Code Sniffer - Annotated Ruleset\" href=\"http:\/\/pear.php.net\/manual\/en\/package.php.php-codesniffer.annotated-ruleset.php\" target=\"_blank\" rel=\"noopener\">creating your own customised standard<\/a> so you can exclude errors you&#8217;re not bother about (variables with single-letter names, for example). Once you&#8217;ve done that, you can also\u00a0<a title=\"How to ignore certain standards in PHP Codesniffer\" href=\"http:\/\/webmasters.stackexchange.com\/questions\/1095\/how-to-ignore-certain-coding-standard-errors-in-php-codesniffer\" target=\"_blank\" rel=\"noopener\">make your standard the default\u00a0<\/a>to be used each time you run PHPCS.<\/p>\n<div id=\"attachment_2327\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2327\" class=\"size-full wp-image-2327\" title=\"PHP Code Sniffer summary report.\" src=\"http:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502c.jpg\" alt=\"PHP Code Sniffer summary report.\" width=\"500\" height=\"189\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502c.jpg 500w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502c-300x113.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><p id=\"caption-attachment-2327\" class=\"wp-caption-text\">PHP Code Sniffer summary report.<\/p><\/div>\n<p><span style=\"text-decoration: underline;\"><strong><br \/>\n<\/strong><\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Coding Problems &#8211; PHP Mess Detector<\/strong><\/span><\/p>\n<p><a title=\"PHP Mess Detector\" href=\"http:\/\/phpmd.org\/\" target=\"_blank\" rel=\"noopener\"> PHP Mess Detector<\/a>\u00a0does a good job of finding nasty bits of code. This includes &#8216;dead&#8217; code that&#8217;s never run, complicated loops \/ nested ifs, \u00a0It&#8217;s worth reading the section on <a title=\"PHP Mess Detector - Creating a Ruleset\" href=\"http:\/\/phpmd.org\/documentation\/creating-a-ruleset.html\" target=\"_blank\" rel=\"noopener\">how to create a custom ruleset<\/a>, because the defaults may include tests that you want to exclude.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong><br \/>\nUnit Testing &#8211; PHPUnit<\/strong><\/span><\/p>\n<p>Unit testing is a great habit to get into, and test-driven development takes this to its logical conclusion. <a title=\"PHPUnit\" href=\"http:\/\/www.phpunit.de\/\" target=\"_blank\" rel=\"noopener\">PHPUnit<\/a> and <a title=\"SimpleTest - Unit Testing for PHP\" href=\"http:\/\/www.simpletest.org\/\" target=\"_blank\" rel=\"noopener\">SimpleTest<\/a> both provide unit testing in PHP; I chose PHPUnit because there seemed to be more material online about how to use it. To install\u00a0<em>PHPUnit<\/em>\u00a0<a title=\"PHP Unit - Installation\" href=\"https:\/\/github.com\/sebastianbergmann\/phpunit\/#readme\" target=\"_blank\" rel=\"noopener\">you can use\u00a0<em>PEAR<\/em><\/a>. Unfortunately\u00a0<em>PEAR<\/em>\u00a0wasn&#8217;t installed on my Lion system, but you can\u00a0<a title=\"PEAR - Installation \/ getting\" href=\"http:\/\/pear.php.net\/manual\/en\/installation.getting.php\" target=\"_blank\" rel=\"noopener\">install it using\u00a0<em>wget<\/em><\/a>. \u00a0Unfortunately\u00a0<em>wget<\/em>\u00a0wasn&#8217;t installed on my Lion system, but you can install it with\u00a0<a title=\"simplehelp.net - How to install wget in OS X Lion\" href=\"http:\/\/www.simplehelp.net\/2012\/02\/04\/how-to-install-wget-in-os-x-lion\/\" target=\"_blank\" rel=\"noopener\">a number of terminal commands<\/a>.<\/p>\n<p>Once wget is installed and then PEAR is installed and then PHPUnit is installed (!), you can\u00a0<a title=\"Running PHP Unit tests from Eclipse  Helio\" href=\"http:\/\/katsande.com\/running-phpunit-tests-from-eclipse-helio\" target=\"_blank\" rel=\"noopener\">set up Eclipse to run it as an external tool<\/a>. However, it&#8217;s much nicer to get it integrated into your Eclipse installation. To do this, I used MakeGood. The <a title=\"MakeGood User Manual\" href=\"http:\/\/piece-framework.com\/projects\/makegood\/wiki\/MakeGood_User_Guide_1_7_0#PHPUnit\" target=\"_blank\" rel=\"noopener\">instructions on their website <\/a>are pretty easy to follow and essentially boil down to:<\/p>\n<ol>\n<li>Install the MakeGood plugin from within Eclipse, using <em>http:\/\/eclipse.piece-framework.com<\/em> as the URL<\/li>\n<li><em>DON&#8217;T<\/em>\u00a0 ignore the lines about having to specify a PHP executable; I did (because I already had an executable defined), but for some reason the executable had disappeared from my Eclipse preferences and so I had to add it again after much head-scratching.<\/li>\n<li><em>DO<\/em>\u00a0display the MakeGood &#8216;view&#8217; in your Eclipse window as soon as possible &#8211; it has a nice little message which explains what might be stopping you running your tests.<\/li>\n<li>A message about Stagehand_Testrunner led me to install that separately, using PEAR (<a title=\"SourceForge - Stagehand_TestRunner\" href=\"http:\/\/sourceforge.net\/news\/?group_id=165718\" target=\"_blank\" rel=\"noopener\">instructions are on the Stagehand website<\/a>)<\/li>\n<li>Despite adding my PEAR folder as a library to the project build path, I was still getting a message saying that <em>PHPUnit_Framework_TestCase<\/em> could not be found when I ran a test. I resolved this by adding\u00a0<em>\/Users\/Haydn\/pear\/share\/pear\/PHPUnit<\/em> to the build path too, and using <em>require_once<\/em> in the test class: \u00a0<em>require_once &#8216;PHPUnit\/Autoload.php&#8217;;<\/em><\/li>\n<\/ol>\n<div>\n<div id=\"attachment_2325\" style=\"width: 760px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2325\" class=\"size-full wp-image-2325\" title=\"MakeGood showing a successful test in Eclipse.\" src=\"http:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502a.jpg\" alt=\"MakeGood showing a successful test in Eclipse.\" width=\"750\" height=\"126\" srcset=\"https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502a.jpg 750w, https:\/\/www.haydnwilliams.com\/blog\/wp-content\/uploads\/2012\/05\/20120502a-300x50.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><p id=\"caption-attachment-2325\" class=\"wp-caption-text\">MakeGood showing a successful test in Eclipse.<\/p><\/div>\n<p>Once PHPUnit is working correctly, if you want to test database operations too then you&#8217;ll need the DbUnit extension. There&#8217;s extensive help regarding this whole subject area in the <a title=\"Chapter 8. Database Testing.\" href=\"http:\/\/www.phpunit.de\/manual\/3.7\/en\/database.html\" target=\"_blank\" rel=\"noopener\">PHP Unit manual<\/a>. Note that SQL Server isn&#8217;t supported by default.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Documentation &#8211; PHPDoc<\/strong><\/span><br \/>\nIf you&#8217;re documenting your code then you&#8217;ll want phpdoc &#8211; <a title=\"phpDocumentor 2\" href=\"http:\/\/www.phpdoc.org\/\" target=\"_blank\" rel=\"noopener\">installation instructions<\/a> are on their website. Just use the two PEAR commands on their homepage, and ignore other websites (which generally omit the &#8216;-<em>alpha<\/em>&#8216; reference). If you try and generate some documentation but get an error about GraphViz not being installed (&#8220;<em>Unable to find the `dot` command of the GraphViz package. Is GraphViz correctly installed and present in your path?&#8221;)<\/em>, go to the <a title=\"GraphViz - Download\" href=\"http:\/\/www.graphviz.org\/Download_macos.php\" target=\"_blank\" rel=\"noopener\">GraphViz website <\/a>to download a <em>.pkg <\/em>file\u00a0for Lion and install it. If you get a message about timezones, ensure that the correct one is set in your <em>php.ini<\/em> file (e.g. <em>date.timezone = Europe\/London<\/em>).<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div><span style=\"text-decoration: underline;\"><strong>Automation &#8211; ANT<\/strong><\/span><br \/>\nOnce all the above are in place, it&#8217;s nice to be able to run them all together. You can use <a title=\"ANT\" href=\"http:\/\/ant.apache.org\/\" target=\"_blank\" rel=\"noopener\">ANT<\/a> to do this; here&#8217;s an example of my ANT build.xml file:<\/div>\n<div>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;\r\n&amp;lt;!DOCTYPE project&amp;gt;\r\n&amp;lt;project name=&amp;quot;MyProject&amp;quot; default=&amp;quot;test&amp;quot;&amp;gt;\r\n    &amp;lt;property name=&amp;quot;docs_dir&amp;quot; value=&amp;quot;docs&amp;quot; \/&amp;gt;\r\n    &amp;lt;property name=&amp;quot;log_file&amp;quot; value=&amp;quot;MyLogFile.log&amp;quot; \/&amp;gt;\r\n    &amp;lt;target name=&amp;quot;dtd&amp;quot; description=&amp;quot;Creates a DTD for this build.xml file.&amp;quot;&amp;gt;\r\n        &amp;lt;antstructure output=&amp;quot;project.dtd&amp;quot;\/&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;clean&amp;quot; description=&amp;quot;Deletes temporary and compiled files.&amp;quot;&amp;gt;\r\n        &amp;lt;delete dir=&amp;quot;${docs_dir}&amp;quot;\/&amp;gt;\r\n        &amp;lt;delete dir=&amp;quot;output&amp;quot;\/&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;messdetect&amp;quot; description=&amp;quot;Runs PHP Mess Detector on PHP files.&amp;quot;&amp;gt;\r\n        &amp;lt;exec executable=&amp;quot;\/Users\/Haydn\/pear\/bin\/phpmd&amp;quot; failonerror=&amp;quot;true&amp;quot;&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;.&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;text&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;anciliary\/PHPMD_custom_ruleset.xml&amp;quot; \/&amp;gt;\r\n        &amp;lt;\/exec&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;codesniff&amp;quot; description=&amp;quot;Runs PHP Code Sniffer on PHP files.&amp;quot;&amp;gt;\r\n        &amp;lt;exec executable=&amp;quot;\/Users\/Haydn\/pear\/bin\/phpcs&amp;quot; failonerror=&amp;quot;true&amp;quot;&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;.&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;--standard=MyStandard&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;--extensions=php&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;--report=summary&amp;quot; \/&amp;gt;\r\n        &amp;lt;\/exec&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;test&amp;quot; description=&amp;quot;Runs all PHPUnit tests.&amp;quot;&amp;gt;\r\n        &amp;lt;exec executable=&amp;quot;\/Users\/Haydn\/pear\/bin\/phpunit&amp;quot; failonerror=&amp;quot;true&amp;quot;&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;test&amp;quot; \/&amp;gt;\r\n        &amp;lt;\/exec&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;document&amp;quot;  depends=&amp;quot;clean&amp;quot; description=&amp;quot;Generates documentation for PHP files.&amp;quot;&amp;gt;\r\n        &amp;lt;exec executable=&amp;quot;\/Users\/Haydn\/pear\/bin\/phpdoc&amp;quot; failonerror=&amp;quot;true&amp;quot;&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;-d&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;.&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;-t&amp;quot; \/&amp;gt;\r\n            &amp;lt;arg value=&amp;quot;${docs_dir}&amp;quot; \/&amp;gt;\r\n        &amp;lt;\/exec&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n    &amp;lt;target name=&amp;quot;build&amp;quot; depends=&amp;quot;clean,messdetect,codesniff,test,document&amp;quot; description=&amp;quot;Run everything.&amp;quot;&amp;gt;\r\n    &amp;lt;\/target&amp;gt;\r\n&amp;lt;\/project&amp;gt;\r\n<\/pre>\n<\/div>\n<div><\/div>\n<div><span style=\"text-decoration: underline;\"><strong>Next?<\/strong><\/span><\/div>\n<div>The next step is to move to continuous integration, using packages like <a title=\"Cruise Control\" href=\"http:\/\/cruisecontrol.sourceforge.net\/\" target=\"_blank\" rel=\"noopener\">Cruise Control<\/a> or <a title=\"phpUnderControl\" href=\"http:\/\/phpundercontrol.org\/\" target=\"_blank\" rel=\"noopener\">phpUnderControl<\/a>, which will automatically test and build your code on a regular schedule. As a one-man project I always know the status of my work, so that&#8217;s not been necessary so far. Hopefully the above will be of help in getting you up-and-running with a decent PHP development workflow in Eclipse.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I used Eclipse on a Mac to work with Java&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[882,879,93,870,881,867,249,865,878,866,322,323,880,869,868],"class_list":["post-2267","post","type-post","status-publish","format-standard","hentry","category-it","tag-ant","tag-code-sniffer","tag-eclipse","tag-eclipse-pdt","tag-mess-detector","tag-pear","tag-php","tag-php-unit","tag-phpdoc","tag-phpunit","tag-subclipse","tag-subversion","tag-tdd","tag-unit-testing","tag-wget"],"_links":{"self":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/2267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/comments?post=2267"}],"version-history":[{"count":0,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/2267\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media?parent=2267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/categories?post=2267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/tags?post=2267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}