Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
Introducing Browsershot v3: the best way to convert html to PDFs and images
Oct 23, 2017 @ 09:13:57

In a new post to his site Freek Van der Herten has an announcement about the release of the latest stable version of the "Browsershot" package, version 3.

To convert html to a pdf or an image using wkhtmltopdf and wkhtmltoimage tends to be the popular option. Unfortunately those tools contain an outdated browser engine to do their thing, so you can’t use any newish css syntax. A while ago Google added a headless mode to Chrome. They’ve also released a javascript library called Puppeteer that gives you programmatic and fine grained control over Chrome.

Wouldn’t it be great if we could just use Chrome and Puppeteer to convert html to PDFs and images? Browsershot is package that does exactly that. In this post I’d like to introduce v3 of Browsershot, which was recently released.

He starts with some basic usage of the package, taking screenshots of example URLs and saving them locally as PDFs. Version 3 now has integration with Puppeteer to perform more complex logic on what parts of the page should be captured and how it should be saved. There's examples of this and a look behind the scenes at what the package is doing with the page grabs are called.

tagged: browsershot package screenshot puppeteer version3 release

Link: https://murze.be/2017/10/introducing-browsershot-v3-best-way-convert-html-pdfs-images/

Sanisoft Blog:
Themes in CakePHP 3, A step by step HowTo
Aug 21, 2014 @ 11:45:38

On the Sanisoft blog there's a recent post that gives you a step-by-step guide to working with themes in the upcoming version 3 release of the CakePHP framework.

Almost every application I code has themes which either the end user can change or the admin can set or can be changed on the fly. Doing all these things was easy in CakePHP 2.x. With the first alpha release of CakePHP 3.x I was naturally keen to try out how theming worked with V3.

He shows how to convert an existing theme into one that will be compatible with the 3.x version of the framework. He breaks it down into seven steps (well, technically eight) to make it easier to follow along:

  • Step 0: Make the "posts" table
  • Step 1: Bake the model, controller and views for the Posts
  • Step 2: Bake in the "Twit" plugin
  • Step 3: Download and install the Twitter Bootstrap
  • Step 4: Create the "default.ctp" file with the content given
  • Step 5: Make the "index.ctp" template with the given content
  • Step 6: Add the line to the AppController to use the new theme
  • Step 7: Reload and verify the results
tagged: theme cakephp framework version3 update template

Link: http://www.sanisoft.com/blog/2014/07/21/themes-in-cakephp-3-howto/

Sebastian Bergmann's Blog:
Even More Work on Reporting in PHPUnit 3
Jun 14, 2006 @ 19:34:06

Sebastian Bergmann has a new post on his blog today with even more details on the reporting that's to come with the next version of PHPUnit, version 3.

When I moved to Norway just over a month ago, the Code Coverage Reporting of PHPUnit 3 needed almost six hours to run the test suite and generate a Code Coverage report for the eZ components.

Then Derick Rethans committed a patch to [...] reduce the time spent on running the tests dramatically. It now took only two hours to run the test suite and generate the report.

Over the past couple of days, Michael Lively Jr., Jan Kneschke, and myself optimized some hot spots in PHPUnit3 moving the initial six hours have been reduced to eight minutes.

Many congrats to Sebastian and the crew that helped make such a dramatic change in the code coverage report creation! He also notes there's a logger to come to manage the information gathered via the tests (into a SQLite database).

tagged: phpunit version3 coverage reporting optimize phpunit version3 coverage reporting optimize

Link:

Sebastian Bergmann's Blog:
Even More Work on Reporting in PHPUnit 3
Jun 14, 2006 @ 19:34:06

Sebastian Bergmann has a new post on his blog today with even more details on the reporting that's to come with the next version of PHPUnit, version 3.

When I moved to Norway just over a month ago, the Code Coverage Reporting of PHPUnit 3 needed almost six hours to run the test suite and generate a Code Coverage report for the eZ components.

Then Derick Rethans committed a patch to [...] reduce the time spent on running the tests dramatically. It now took only two hours to run the test suite and generate the report.

Over the past couple of days, Michael Lively Jr., Jan Kneschke, and myself optimized some hot spots in PHPUnit3 moving the initial six hours have been reduced to eight minutes.

Many congrats to Sebastian and the crew that helped make such a dramatic change in the code coverage report creation! He also notes there's a logger to come to manage the information gathered via the tests (into a SQLite database).

tagged: phpunit version3 coverage reporting optimize phpunit version3 coverage reporting optimize

Link:

Sebastian Bergmann's Blog:
More Work on Reporting in PHPUnit 3
May 11, 2006 @ 05:53:17

Sebastian Bergmann has posted several new screenshots of the new reporting feature of the upcoming PHPUnit 3 release, completed via a patch from Michael Lively Jr.

Michael Lively Jr. sent me a patch last night that implements most of the bits and pieces that were still missing from the new reporting functionality in PHPUnit 3.

When you compare the current version of the reporting to the original version you will notice that I changed the color scheme. It now uses colors from the Tango Palette.

The screenshots include views of the summary page, a detail view of the same (and more) information, example test results output, and the code coverage for an internal class.

tagged: phpunit version3 reporting functionality HTML output graphical phpunit version3 reporting functionality HTML output graphical

Link:

Sebastian Bergmann's Blog:
More Work on Reporting in PHPUnit 3
May 11, 2006 @ 05:53:17

Sebastian Bergmann has posted several new screenshots of the new reporting feature of the upcoming PHPUnit 3 release, completed via a patch from Michael Lively Jr.

Michael Lively Jr. sent me a patch last night that implements most of the bits and pieces that were still missing from the new reporting functionality in PHPUnit 3.

When you compare the current version of the reporting to the original version you will notice that I changed the color scheme. It now uses colors from the Tango Palette.

The screenshots include views of the summary page, a detail view of the same (and more) information, example test results output, and the code coverage for an internal class.

tagged: phpunit version3 reporting functionality HTML output graphical phpunit version3 reporting functionality HTML output graphical

Link: