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

Community News:
PHPPackages.org
June 17, 2015 @ 11:48:32

A new community resource, built on top of the excellent Composer and Packagist technology that's popular in today's PHP development world, has been released and provides more context about libraries and provides a "rank" for each one - PHPPackages.org.

PHPPackages.org was built to solve the following problems: [it] defines popularity rank for php packages, provide a space for discussion and [helps to] discover which packages use a specific package.

The About page has more information about the site, how they calculate the "popularity" metric, what the various icons mean and what kinds of things you can do on the site. It's a great resource, especially for those wondering who is using their packages and to discover new packages that are more widely used. It has a lot of the same information that the Packagist site contains but that little extra bit of data is quite useful.

0 comments voice your opinion now!
phppackages composer packagist metadata library package popularity

Link: https://phppackages.org/

Community News:
Packagist.org Gets a Makeover
June 16, 2015 @ 11:55:42

If you're a Composer user by now you've noticed a major overhaul that's happened to the Packagist.org website in the last few days. They've made a major improvement to how the site looks and have added some fun new functionality to help make finding packages easier.

According to the Laravel News site, updates include a change in the recommended install method, the addition of more GitHub metadata and the inclusion of the project's README file. The site will also allow you to sort (ascending and descending) by the number of stars the repository has as well as the number of downloads.

The site still includes all of the information it dod before too including version listings, details about what the package requires, license information and links to more information and the actual repository. Check out the new look and see what you think. Packagist is also an Open Source project so if you find an issue, be sure to either report it to the project or get in, fix it yourself and make the pull request to submit it.

0 comments voice your opinion now!
packagist composer makeover functionality update website

Link: http://packagist.org

Pádraic Brady:
Self-Updating PHARs Stable phar-updater packages now available
June 03, 2015 @ 08:28:12

Pádraic Brady has a new post to his site today talking about creating self-updating phars in PHP using his package created based on previous recommendations.

In all seriousness, phar-updater is my implementation of recommendations I made in a previous blog post around self-updating PHAR files. Those recommendations were, predictably for me, largely concerned with self-updating from a security perspective. Implementing it brought ease of use and flexible integration to the fore also. It can be surprising what a little extra work, testing and packaging can accomplish for reuse compared to throwing code into one file and calling it a day. It's been integrated into Humbug with nary an issue.

The package makes it simple to integrate the self-update functionality into your existing phar package deployment including updating running versions, enforcement of TLS connections and allows for configuration of updates based on version numbers. You can see his own example in his Humbug package's "SelfUpdate" class.

0 comments voice your opinion now!
phar selfupdate package pharupdater packagist composer

Link: http://blog.astrumfutura.com/2015/06/self-updating-phars-stable-phar-updater-packages-now-available/

ServerGrove Blog:
Satis building your own Composer repository
April 30, 2015 @ 11:26:53

Composer has definitely made a huge impact on how PHP packages and libraries are integrated into other applications. Sometimes, though, it makes more sense for you to keep your code internal to the organization rather than have it public where Composer can install it. In this case, using some thing like Satis (a self-hosted Packagist-ish server) makes more sense.

We all love Composer. It changed dramatically the way we build PHP applications, based on small and reusable components, but this creates new challenges, especially when we have a single point of failure (SPO). With Satis, the deployment process can be made robust by adding redundancy in all potential SPOFs (Packagist and GitHub). Let's see how it works.

They start with a brief look at how Composer works for those not familiar, making the connection with Packagist and ultimately the public repository. In the context of the "single point of failure" they talk about Packagist being down and it preventing the install (or deployment!) of your application. Satis is prefect to help prevent this. The article then shows how to install Satis (via Composer, naturally) and how to set up the configuration file to define the repositories. The server is then built and can be run using the built-in PHP server on the port of your choice. They include a screenshot of the end result and a quick example of how to use it via your project's Composer configuration.

0 comments voice your opinion now!
satis tutorial packagist composer local server install configure repository

Link: http://blog.servergrove.com/2015/04/29/satis-building-composer-repository/

Rafael Dohms:
Why I support "The League"
March 11, 2015 @ 12:47:27

Rafael Dohms has posted some if his own thoughts to his site about The League of Extraordinary Packages and why he supports their efforts to bring a good solid base of curated packages to the PHP ecosystem.

"The League of Extraordinary Packages" is what I have dubbed a collective of composer packages. Its essentially a group of developers who have gathered under a single flag (or in this case a vendor name) and set standards for the packages that live there.

Why does this even matter? Well for one Packagist is an open repository, this means that it is wide open for anyone to join, from the best packages to the most ridiculous ones. Quality control is not one of its roles and quality checking is on average 2-3 clicks per package away.

He talks about the quality control measures The League has in place to only contain good, well-tested and solid PHP packages. He also lists a few of his main reasons for supporting the effort including the fact that it reduces author fragility and provides an extended reach for those packages to reach a wider audience.

I really enjoy the work being done by The League, or The PHPLeague, or Pleague as I prefer to call it. I think it has provided us with some very good packages and given us all something to strive for. Maybe more collectives is what we need.
0 comments voice your opinion now!
thephpleague support packages extraordinary packagist curated

Link: http://blog.doh.ms/2015/03/10/why-i-support-the-league/

ThePHP.cc:
PHPUnit Migration from PEAR to PHAR
January 14, 2015 @ 13:48:34

On The PHPcc's site today Sebastian Bergmann, the creator of the popular PHPUnit unit testing framework, shows you how to move to using the tool's phar file and away from the previously used PEAR install method.

In April 2014 I announced that I would shut down pear.phpunit.de on December 31, 2014. The motivation behind this move was to simplify the release process of PHPUnit by getting rid of an outdated distribution channel. I was afraid that I would leave users of my software behind by this move. [...] I am relieved that the shutdown of pear.phpunit.de went as smooth as it did. [...] In this article I show you how to make the transition from using PHPUnit from a PEAR package to using PHPUnit from a PHP Archive or using Composer as easy and convenient as possible.

There's three main steps to the migration from PEAR to the Composer-based phar installation:

  • Uninstalling PEAR Packages
  • Using PHPUnit from a PHP Archive (PHAR)
  • Installing PHPUnit with Composer

He includes the commands and configuration files/settings you'll need to make the transition happen. He also mentions that older versions are still available if there's a need but only on GitHub/Packagist as phar packages, not via PEAR.

0 comments voice your opinion now!
phpunit migration pear phar packagist composer tutorial

Link: http://thephp.cc/news/2015/01/phpunit-migration-from-pear-to-phar

Jordi Boggiano:
My view of PHP version adoption
November 18, 2014 @ 09:28:12

Jordi Boggiano has a new post today sharing some of his own insights about PHP version adoption but, unlike some of the raw numbers shared before, his perspective comes from aggregating data from Packagist.

Pascal's number are interesting but I believe they have a bias towards older PHP versions. I would argue that people configuring their servers properly are also those that tend to keep up to date with newer versions, and part of the best practices is to avoid publishing the software versions you are using (i.e. disable expose_php in php.ini). If I am correct here that means early adopters are mis-represented in those numbers. In any case, I do have another biased dataset to present so here it comes! I looked in the packagist.org logs of the last fifty days for GET /packages.json which represents a composer update done by someone.

He notes that the data is biased towards development machines (not always running the same version as their production counterparts) but that it shouldn't skew the numbers too much. He compares two different datasets, one from November 2013 and the other from November 2014, showing a major change in the overall numbers and moving the largest version used up from 5.3.10 to 5.5.9. He also shares some interesting statistics around the requirements developers are putting on Packagist packages...that have basically remained the same over the past year (sadly).

0 comments voice your opinion now!
jordiboggiano version adoption packagist statistics

Link: http://seld.be/notes/my-view-of-php-version-adoption

SitePoint PHP Blog:
Personal Packagist with Toran Proxy
September 09, 2014 @ 11:43:43

In a recent tutorial to on the SitePoint PHP blog, Alexander Cogneau shows you how to create a personal Packagist (the repository for Composer packages) using the Toran proxy.

Most of you reading this already know Composer. For those who don't, you can read a previous article of mine before continuing. We can all agree that Composer has brought many good things into the PHP world. If one dares however to look for drawbacks, or better put, not included features, he could state that it is not possible to work with private repositories. That argument won't hold anymore, since there is Toran Proxy.

He calls this the "end of the Satis era", replacing the Packagist clone that mirrors the packages locally rather than pulling them right from GitHub. Using the Toran proxy, he walks you through the setup of the proxy and using the wizard to complete the configuration. There's a personal use license for Toran that allows for one developer but after that you'd need to upgrade to the yearly/per developer pricing structure.

0 comments voice your opinion now!
toran proxy packagist tutorial setup configure

Link: http://www.sitepoint.com/personal-packagist-toran-proxy/

Matthias Noback:
There's no such thing as an optional dependency
April 11, 2014 @ 11:19:19

In his latest post Matthias Noback suggests the idea that there's no such thing as an optional dependency when it comes to working with packages and Composer.

On several occasions I have tried to explain my opinion about "optional dependencies" (also known as "suggested dependencies" or "dev requirements") and I'm doing it again: "There's no such thing as an optional dependency." I'm talking about PHP packages here and specifically those defined by a composer.json file.

So that everyone's on the same page, he starts with an example of a true dependency in a sample adapter class. He asks the usual question - "what's needed to run this code?" - and looking a bit deeper at the "suggested" packages. As it turns out, some of these dependencies turn into actual requirements when you need certain features of the tool. He points out that this is a problem with quite a few packages in the Composer ecosystem and proposes a solution - splitting packages based on requirements. He gives an example based on his adapter with a Mongo requirement split off into a "knplabs/gaufrette-mongo-gridfs" package that's more descriptive of the requirements.

0 comments voice your opinion now!
optional dependency composer packagist suggested package

Link: http://php-and-symfony.matthiasnoback.nl/2014/04/theres-no-such-thing-as-an-optional-dependency/

Gary Hockin:
Less is More
April 07, 2014 @ 09:56:36

Gary Hockin has a new post to his site talking about how he's found that less is more when it comes to what to include in your "composer.json". He works through some of his own opinions on the matter and suggests a bit more thought before just including another library.

I have absolutely no doubt this post will be largely disagreed upon by many in the PHP community, but I've had a terrible day and I'm hoping that the process of just getting this off my chest will be therapeutic in some way. [...] So, today I sat down and started writing the tests for our new lightweight SDK that offsets much of the work needed in the delivery of the adverts to workers via a Beanstalk queue. It should have been so easy. Things went well for the early part until I realised that I wanted to be able to extract and serialise our Device object to put it into the queue, and then hydrate it back into a Device object inside the worker

He assumed that since he'd used Zend Framework 2 a good bit and there were no (declared) dependencies, he could directly use an individual component. Unfortunately, there was a dependency (ZendFilterChain), requiring another package to be added via Composer and pulled down. He points out that Composer has made this almost too easy and developers maybe aren't as thoughtful about the libraries they pull in because of it.

He makes a call out to developers to remember the idea behind the MicroPHP Manifesto and really think about the code they're puling in, how large it is and if it's what they really need. He's not suggesting that Composer is the problem, rather the blind usage of it without thinking through the implications.

0 comments voice your opinion now!
less more library composer packagist include

Link: http://blog.hock.in/2014/04/05/less-is-more


Community Events

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


framework language php7 api community project symfony opinion list yii2 introduction example application series interview podcast part2 testing composer laravel

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