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

Fabien Potencier:
Symfony 4: Compose your Applications
Apr 03, 2017 @ 15:31:26

On his site Fabien Potencier has posted an article about the next major release of the Symfony framework - version 4 - and how it will allow for the "composition" of your applications rather than some of the current methods.

Symfony 3.0 was boring, a cleaned-up version of the Symfony 2.8 version. Symfony 4.0 will be different: Symfony 4.0 = Symfony 3.4 - deprecated features + a new way to develop applications

There is another way to think about a new major version though: Symfony 4.0 = Symfony 3.0 + all features added in 3.x - deprecated features + a new way to develop applications

He goes through some of his thinking process around some of these changes and the "day-to-day experience" of managing a Symfony application. Specifically he suggests that:

  • Installing a Bundle is too cumbersome
  • Removing a Bundle is even more cumbersome
  • The Symfony Standard Edition is not good enough
  • No Distribution Ecosystem

He ends the post with a look at what he sees as the ideal ecosystem for the framework and where Symfony Flex fits into the picture (example project here).

Symfony Flex is going to be the default way to manage Symfony 4 applications. But Symfony Flex will be available as an option to manage Symfony 3.3 and 3.4 applications as well! That said, we might need to break backward compatibility between now and the launch of Symfony 4. Consider Symfony Flex as alpha before Symfony 4.
tagged: symfony symfony4 compose application progress ecosystem

Link: http://fabien.potencier.org/symfony4-compose-applications.html

Colin O'Dell:
PHPUnicorn - Visualizing PHPUnit Tests
Mar 16, 2017 @ 14:32:57

Colin O'Dell, as mentioned on his blog, has put together the instructions for something he calls "PHPUnicorn" (not to be confused with the PHP Unicorn conference) - a real-time system for visualizing unit test results via a Raspberry Pi, some LEDs and a Unicorn pHAT board.

For Pi Day 2017 I created a really fun project - the PHPUnicorn!

A simple PHPUnit listener collects test results and sends them to a Raspberry Pi Zero Wireless device in real-time. As the device receives the stats it lights up LEDs green, red, or orange to visualize the progress and results of your unit tests.

The full instructions are over in this article on the Hackster.io site providing you with a list of the components needed, how you'll need to extend PHPUnit with a custom listener and a simple Python script to interface with the Pi and Unicorn board. The end result is a set of LEDs on the board showing the progress (and failures) of your unit tests being run.

tagged: visualize phpunit test progress raspberrypi unicorn

Link: https://www.hackster.io/colinodell/phpunicorn-visualizing-phpunit-tests-896208

Displaying stream progress in PHP
May 27, 2015 @ 13:39:26

Hannes Van De Vreken has posted a tutorial to his site showing users of the Symfony Console component how to show progress on a stream using the ProgressBar helper and a bit of code to inspect the stream itself.

With PHP you can, next to handling HTTP requests, invoke scripts from the command line. [...] The Symfony console component is a very useful tool to define and invoke these kind of CLI tasks. [...] What is actually printed on the console is very important for the issuer of the task. Think of it as the command’s usability. Too little runtime information, the less usable the task. [...] Enter the ProgressBar. The ProgressBar is an output helper that wraps the OutputInterface object.

He talks briefly about how the ProgressBar helper works in the console component's output and gives a simple example of the output. He then shows how to hook it into a bit of PHP using the stream_notification_callback optional parameter (defined in stream_context_create) to point to another class method that handles the progress bar updates. It performs a bit of introspection on the stream and updates the progress as its contents progress. He does point out a few caveats though, including that the transfer is not made asynchronous by this handling.

tagged: symfony console stream progress progressbar helper tutorial

Link: https://hannesvdvreken.com/2015/05/12/stream-progress/

Zend:
Apigility Progress report: zf-mvc-auth, packagist, and PHP's built-in web server
Nov 01, 2013 @ 20:52:11

In a new post to the Apigility forums today Matthew Weier O'Phinney has announced the release of an authentication/authorization component for the recently announced project from Zend. Apigility is a Zend Framework-based tool for easily constructing and managing an API.

We've been working hard on Apigility since ZendCon, and have released some more code into the wild. zf-mvc-auth exists to provide both authentication and authorization for your APIs; in fact, it's a bit of a general-purpose library for ZF2 MVC apps! Right now, we support HTTP basic and digest authentication out of the box, and will be working next on OAuth support. Authorization is done by default via ZendPermissionsAcl, as we discovered a problem with using RBAC: RBAC is deny-by-default, which does not work when you want an open-by-default schema. You may opt-in to deny-by-default, as well as mark individual services as requiring permission by default. Finally, you have the option of denying/allowing per HTTP method of a service as well.

You can find out more details about this functionality in this quick screencast. The zf-apgility module depends on this new zf-mvc-auth module, so it will be included and available by default in your APIs. In that same post Matthew also talks about the listing of the Apigility packages on Packagist service and a note for those wanting to use the built-in HTTP server to run the tool (a PHP version dependency).

tagged: apigility progress zendframework mvc authentication authorization packagist http server

Link: https://groups.google.com/a/zend.com/forum/#!topic/apigility-users/_mOPkxxmGYI

PHPMaster.com:
Tracking Upload Progress with PHP and JavaScript
Feb 06, 2012 @ 19:58:32

In a new tutorial today from PHPMaster.com, they show you how to combine Javascript and a PHP feature to track the progress of an upload to your web application.

A problem that has plagued web developers for years is how to add real-time information to their applications, such as a progress bar for file uploads. [...] JavaScript can access a file’s name, type, and even the width and height of a local image, but it wasn’t until HTML5 that it could access a file’s size. [...] In this article I’ll show you how [the session.upload_progress] feature can be used to create a simple upload progress bar without any external libraries or browser dependencies.

The tutorial provides all the steps you'll need to get it working - defining the form with the extra required field, styling it and plugging the Javascript in to call a small script to get the progress of the upload. It returns the difference between the content-length of the file and the current size (as a percentage of 100).

tagged: track upload progress extension javascript tutorial progressbar

Link:

CodeIgniter.com:
Amazing Progress Report & Addition of IRC to CodeIgniter.com
Sep 02, 2011 @ 13:48:17

On CodeIgniter.com there's a new post updating the community on more of the current happenings surrounding the project including the status of their move to github and another source for developers to find the CI help they need.

In less than two weeks since the announcement was made at CICON that CodeIgniter was moving to GitHub, we’ve seen some incredible results from the change. Already CodeIgniter is the 10th most watched PHP project at GitHub (currently 758), with 42 open pull requests, 53 merged pull requests, 170 forks, and 41 individual contributors. Incredible!

[...] We also noticed what seemed to be a spike in activity on the #CodeIgniter Freenode IRC channel, so we’ve decided to make it more prominent to encourage its continued use. You’ll now notice an IRC tab in the main navigation, letting you access the #CodeIgniter IRC channel right here at CodeIgniter.com.

If you want more details on why they made the switch over to git, check out this blog entry from the EllisLab site for an explanation from Derek Jones

tagged: progress report codeigniter framework irc support github

Link:

DZone.com:
PHP 5.4 features poll: the results
Aug 03, 2011 @ 13:19:43

On DZone.com today Giorgio Sironi has posted the results of a poll taken a little while back concerning what people thought was the best feature of the upcoming PHP 5.4 release.

After two weeks, we have closed the poll among the PHP community of Web Builder Zone to establish which are the most wanted features, which will influence development of applications on PHP 5.4. Hopefully this poll would also shape our focus in tutorials in the future - I personally plan to dedicate more time to the winning features.

Runners up included the removal of magic quotes and strict mode with the top three being (in this order) the upload progress patch, traits and the array improvements leading the pack. You can see the results here.

tagged: poll results traits upload progress array improvement

Link:

Brian Swan's Blog:
SQL Server JumpIn! Camp Wrap Up
Jun 27, 2011 @ 17:28:18

Brian Swan (of Microsoft) has posted his wrapup of the recent Jump In! Camp they held around integration of SQL Server functionality into several popular PHP projects like the Zend Framework and PEAR.

During each day of the camp, PHP developers worked side-by-side with Microsoft developers to add SQL Server and SQL Azure support to their projects, but nearly everyone put in many extra hours late at night (and even early morning!) to add support for other Microsoft technologies (such as IIS, Web Platform Installer, and Windows Azure).

He includes some pictures taken of the progress board for the various projects and the wishlist that developers in attendance requested of the Microsoft team.

I can’t say thanks enough to all the participants for being 100% invested in the camp and for going the extra mile to investigate how their projects might be able to integrate Microsoft technologies beyond SQL Server and SQL Azure. I know that the entire SQL Server team echoes my thanks.
tagged: sqlserver jumpincamp wraup progress request project

Link:

Johannes Schluter's Blog:
Upload Progress in PHP trunk
Dec 06, 2010 @ 16:30:58

Johannes Schluter has a new post to his blog looking at the progress that the upload progress meter extension has been making and how a version of it, put together by Arnaud Le Blanc has been introduced to the trunk line of PHP's code.

For implementing this we have one architectural problem: PHP implements, for very good reasons, a shared nothing architecture. So one request from connection has no insight into another request/connection - but this is needed for the upload progress. [...] The obvious solution, of course, would be to use PHP's session handling system for this. [...] Now there were some technical issues why this wasn't done at first ... but then Arnaud Le Blanc sat down and created a proper implementation of an upload progress storage handler which has been commit to PHP trunk. Long story short: In the next version of PHP (5.4?) you will, most likely, have an Upload Progress mechanism built-in.

If you want all of the details on it, you can check out the RFC on it. Johannes shows a sample of the settings and code that, once the next release of PHP comes out, you can use to enable the extension and be able to poll the session for the progress details.

tagged: file upload extension trunk sessions progress

Link:

Christian Stocker's Blog:
Upload Progress Meter - Common issues and some answers
Mar 31, 2009 @ 14:31:49

On the Liip blog today Christian Stocker has posted about a few common issues developers seem to have with the upload progress meter extension and a few answers to help them out.

After I released uploadprogress 1.0.0 some days ago and finally declared it as stable, it's time to write that blogpost about some of the limitations and caveats one has to know.

The post links to a demo and answers a few different questions on issues such as:

  • Running it on other modules than mod_php on Apache ( like fastcgi)
  • Checking if files are too big
  • The position and content of UPLOAD_IDENTIFIER within the form is important
  • Why not use $_SESSION for the info?
  • It segfaults, when I don't include UPLOAD_IDENTIFIER

See the PECL page for the extension for more information.

tagged: upload progress meter pecl question answer common issue demo

Link:


Trending Topics: