News Feed
Sections




News Archive
feed this:

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

Web Mozarts:
Resource Discovery with Puli
January 15, 2015 @ 11:14:53

Bernhard Schussek has written up a new post to the Web Mozarts blog talking about resource discovery with Puli. Puli is a management tool for the non-PHP files in your applications (CSS, Javascript, YAML, etc). In this post he talks about the use of the discovery component and its use of resource binding.

Many libraries support configuration code, translations, HTML themes or other content in files of a specific format. The Doctrine ORM, for example, is able to load entity mappings from special XML files. When setting up Doctrine, we need to pass the location of the *.dcm.xml file to Doctrine's XmlDriver. That's easy as long as we do it ourselves, but what if someone else uses our package? How will they find our file? What if multiple packages provide *.dcm.xml files? How do we find all these files? We need to remove the appropriate setup code after removing a package [and] we need to adapt the setup code after installing a new package. Multiply this effort for every other library that uses user-provided files and you end up with a lot of configuration effort. Let's see how Puli helps us to fix this.

He talks about the concept of package roles in the tool, breaking them down in resources and providers. He then shows how Puli makes it possible to discover resources by defining a type via Puli and the code for the discovery process. He then binds the XML configuration definition and executes a "find" to ensure it's configured correctly. Finally, he shows the process to use Puli in this Doctrine example allowing it to locate and use the XML mappings dynamically via a custom driver.

0 comments voice your opinion now!
puli resource discovery dynamic doctrine component

Link: http://webmozarts.com/2015/01/14/resource-discovery-with-puli/

AWS Development Blog:
Preview the AWS Resource APIs for PHP
January 06, 2015 @ 10:32:37

On the AWS development blog Jeremy Lindblom has a recent post with a preview of the AWS resource APIs for PHP and the AWS SDK for PHP.

This year is just about over, but we are too excited to wait until the new year to share with you a feature we are developing for the AWS SDK for PHP. We are calling it the AWS Resource APIs for PHP. This feature is maintained as a separate package, but it acts as an extension to Version 3 of the AWS SDK for PHP.

He talks about the new resource objects that contain information to identify what it represented (like a S3 bucket or SQS queue) and includes an example object structure. He shows how to perform actions on the objects and working with collections. He also includes a helpful hint about using the "respondsTo" method on the object to get the methods the object can use.

0 comments voice your opinion now!
aws resource api sdk update feature object actions collections

Link: http://blogs.aws.amazon.com/php/post/Tx3K1TS5GUKJR85/Preview-the-AWS-Resource-APIs-for-PHP

Laravel News:
75 Laravel Tutorials, Packages, and Resources from 2014
December 30, 2014 @ 10:32:57

The Laravel News site has posted their own kind of wrap-up of 2014 in this latest post sharing a monthly list of tutorials, packages and resources they've found useful for the Laravel community.

2014 is coming to a close and to celebrate I put together this post of all the greatest hits each month. This features cool packages, resources, and tutorials that came out over the year.

Among the items on their list are things like:

Check out the full post for the complete list.

0 comments voice your opinion now!
laravel news top75 list package resource tutorial 2014

Link: https://laravel-news.com/2014/12/75-laravel-tutorials-packages-resources-2014/

Bernhard Schussek:
Puli Powerful Resource Management for PHP
December 04, 2014 @ 11:53:22

Bernhard Schussek has announced a tool for handling resources in a more Composer-inspired way: Puli. Puli is described as a tool that "manages files, directories and other resources in a filesystem-like repository".

Unfortunately, sharing your work gets a lot harder when you leave PHP code and enter the land of configuration files, images, CSS files, translation catalogs - in short, any file that is not PHP. For brevity, I'll call these files resources here. Using resources located in Composer packages is quite tedious: You need to know exactly where the package is installed and where the resource is located in the package. That's a lot of juggling with absolute and relative file system paths and prone to error.

[...] One and a half years ago I talked about this problem with PHP-FIG. I wrote a blog post about The Power of Uniform Resource Location in PHP. Many people joined the discussion. The understanding of the problem and its solution got riper as we spoke. Today, I am glad to present to you the first (and probably last) alpha version of Puli, a framework-agnostic resource manager for PHP.

He walks through the basics of the tool - how it manages the various resources, what the configuration looks like and how it can directly be integrated with Composer. He also points to a Twig extension that allows for Puli integration via paths in your templates. There's also a Symfony bridge that lets you use it in your YAML configuration files.

0 comments voice your opinion now!
resource management puli tool composer twig symfony integration

Link: http://webmozarts.com/2014/12/03/puli-powerful-resource-management-for-php/

PHPMaster.com:
PHP News You May Have Missed
April 24, 2014 @ 10:30:22

PHPMaster.com has posted some news you might have missed that's happened in the development and open source communities recently. In the post Bruno Skvorc covers updates to projects, resources and various online tools/environments related to PHP.

The last month or two have been chock full of small news and releases not warranting a full story in their own right but still interesting, I've decided to make a small compilation and direct your attention to the interesting developments around us. Just because we don't cover something immediately, doesn't mean we don't notice or care.

Included in the post are updates about:

  • Ubuntu 14.04. LTS
  • Google App Engine 1.9.1 - 1.9.3
  • Hack
  • Phalcon 2 beta 1
  • the Zend Framework 2 Certified Architect certification
  • Zend Framework 3 Progress

...and several more. Check out the full post for more information on these and several other recent happenings around the web.

0 comments voice your opinion now!
news recent stories tools environment resource project

Link: http://www.sitepoint.com/news-may-missed

Lorna Mitchell:
Zend Certified PHP Developer 5.5
January 08, 2014 @ 09:23:45

If you're thinking about taking the Zend Certified PHP Developer (5.5) test but aren't sure exactly where to start, Lorna Mitchell has provided a list of some good resources to help you out.

Yesterday I updated my previous ZCE certificate to the Zend Certified PHP Developer qualification (the new ZCE for PHP 5.5 also got a new name). Since the ZCE 5.3 exam is no longer available and I work with various clients to prepare their teams for these certifications, it was important to me that I keep my own certification up to date. Now I've done that, I'd like to share some resources for others doing the same thing.

She points to a few things that could help you make the grade:

0 comments voice your opinion now!
zend certified developer test certification resource list

Link: http://www.lornajane.net/posts/2014/zend-certified-php-developer-5-5

Lee Davis:
Is a HTTP DELETE request idempotent?
November 01, 2013 @ 09:15:18

Lee Davis has a new post to his site with some thoughts about RESTful APIS and the correct response to DELETE calls when a resource has already been removed. One camp says a 404 should be thrown as it's no longer there, the other says 204 a "No Content" should always be returned. Lee looks at both sides of the argument and shares some of his own thoughts too.

Recently I had a read of an interesting post by Lukas Smith (@lsmith) about the use of the DELETE method when building RESTful services. I wanted to get my thoughts down on this. Mostly to help myself, but if it helps you determine a better approach, then great. I'm nowhere near qualified enough to preach, so this is by no means a "you should do it this way / my way is correct post", just food for thought. Besides, there are probably more questions here than answers.

He talks about the idea of "idempotence" when it comes to REST APIs and how it relates back to the DELETE discussion. He points out that the term has more to do with the end result of the request and not so much about how it's handled (and any "side effects" that may come with it). Various checks on the resource in question - like "does it exist" - could be considered a side effect of its operation. In his opinion, though, the 200 series of responses are more appropriate when a resource is actually deleted.

0 comments voice your opinion now!
delete rest api idempotent opinion resource

Link: http://www.duckheads.co.uk/is-a-http-delete-requests-idempotent/491

Erika Heidi Reinaldo:
Advices and resources for PHP novices
September 11, 2013 @ 09:59:01

Erika Heidi Reinaldo has made a post over on her Coderwall page with a few helpful hints for the budding PHP developers out there about things to investigate and learn to help further their knowledge of the language.

This post is a collection of things that I consider important for people who are starting with PHP, based on my experiences with this language through the years. PHP has considerable evolved in the last years, thanks mainly to the community efforts. [...] As a downside for the language evolution, as things change, tutorials and practices might get deprecated. So we have a lack of good updated tutorials for beginners.

She includes some great things for new developers to look into including a recommendation to "learn the language, not a framework" and exploring git and Github as a collaborative workspace to both share your own work and explore the work of others for helpful hints. She also makes a recommendation that can help more than most developer think - get involved (contribute to projects or meet with other developers, online or at something like a user group).

0 comments voice your opinion now!
advice resource beginner developer language recommendation

Link: https://coderwall.com/p/0ictea

Gonzalo Ayuso:
Releasing unmanaged resources (a PHP port from C#'s "using" statement)
September 10, 2013 @ 10:55:44

In a new post to his site Gonzalo Ayuso has put together an example of releasing unmanaged resources similar to something C# does with its "using" functionality.

Sometimes we work with instances that needs to released even when exceptions happens. Something typical when we work with resources (Files, Database connections, ) [...] Sometimes I need collaborate with C# projects. C# is a great language. I really like it. It has a really cool feature to solve this problem: the "using" statement. Because of that we are going to build today one small library to implement something similar in PHP.

He provides a basic code example, showing how to use a "Disposable" interface with a "dispose" method that can be implemented based on the resource type you need to use. In his example, it's a "File" class that implements the interface and and global "using" function is defined to clean up the object after use. The code for the sample is also available on Github.

0 comments voice your opinion now!
release unmanaged resource csharp using tutorial

Link: http://gonzalo123.com/2013/09/09/releasing-unmanaged-resources-a-php-port-from-cs-using-statement/

Joshua Thijssen:
PHP's Resources and garbage collection
July 12, 2013 @ 10:54:34

Joshua Thijssen has put together a new post with details about garbage collection in PHP and a "nice bug/feature/whatsmathing" he found related to it and its performance.

I was playing around with writing a daemon and if you have any experience writing daemons (in any language), there are a few rules you have to live by. For instance, setting your effective uid and gid to a non-privileged user (in case you needed to do some privileged initialization, like opening a socket on a tcp port < 1024), setting the process as a group leader with posix_setsid(), and redirecting stdio file descriptions. And here something went wrong which took a while to find and fix..

He was creating a daemon and the script would just exit without a warning and not continue running. He narrowed down the issue to a few lines (with fopen and fclose) and went to debug it with strace to really see what was happening. He found some unexpected calls in the stack trace and, after some more digging, finally figured out it was a problem of both scope and cleanup that was resulting in the extra calls.

0 comments voice your opinion now!
garbage collection resource stdin stdout stderr bug

Link: http://www.adayinthelifeof.nl/2013/07/10/phps-resources-and-garbage-collection


Community Events





Don't see your event here?
Let us know!


unittest install language version interview symfony composer api series podcast laravel extension opinion configure voicesoftheelephpant conference community introduction release list

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework