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

Matt Stauffer:
Sublime Text (3) for PHP Developers
June 29, 2015 @ 09:25:55

Matt Stauffer has posted a set of helpful hints for developers using Sublime Text (3) to help make them more efficient and writing code much easier.

A lot of folks in the PHP community have been checking out PHPStorm lately, including myself and most of the developers I work with. We love the code intelligence we get from PHPStorm, but still miss the speed, quick boot-up, and convenience of Sublime Text. Before I blindly assume PHPStorm is the only way to go, I wanted to see: Can I bring the things a PHP-focused IDE provides PHP developers back to Sublime Text and get the best of both worlds?

He starts with a list of "must haves" for him to be able to move from PHPStorm, features it provides that Sublime, an editor not IDE, might not come with out of the box. Most of his suggestions use the Package Control functionality in Sublime so you'll need that installed to try out his examples. He then shows several tools you can install including:

  • Sublime PHP Companion (package)
  • AllAutocomplete (package)
  • Cmd-click for function definition
  • Integrating Code sniffing and PHP_CodeSniffer
  • DocBlockr (package)
  • Git helpers

...and many more. If you're a Sublime Text user, definitely take a look at his list and see if you can find something to help make your development easier.

0 comments voice your opinion now!
sublimetext phpstorm editor ide features package tips integration

Link: https://mattstauffer.co/blog/sublime-text-3-for-php-developers

Frank de Jonge:
Packages vs. Components The Dependency Problem.
June 26, 2015 @ 11:12:18

In a new post to his site Frank de Jonge makes a distinction between packages versus components, pointing out that components are always packages but packages are not always components, and what it really boils down to is a problem of dependency.

The PHP landscape has fully transitioned into its Package Age™ [...] However, due to PHP's nature, there are some problems. While packages are great for re-use outside of frameworks, dependencies are still an issue. Namespaces resolve conflicts between classnames, but they do not offer a solution to package versioning. Especially in a framework-context, this can become very problematic. A real-world-example for this is Guzzle.

In his Guzzle example he describes the main problem - when packages restructure or make changes incompatible with prior versions and dependencies conflict and both must be installed. He also points out that, while this is bad for just packages, it can be made even worse working with components (his name for framework-based packages). Problems he mentions are the previously mentioned dependency conflicts but also some unexpected quirks with how Composer chooses to install packages. He gives an example of this second one with the installation of the Symfony EventDispatcher component and how, upon closer inspection, Composer seems to be installing two versions of the library at once.

0 comments voice your opinion now!
package component dependency problem conflict versions guzzle eventdispatcher

Link: http://blog.frankdejonge.nl/packages-vs-components/

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/

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/

Peter Petermann:
A few thoughts about composer and how people use it
May 18, 2015 @ 10:17:43

In the latest post to Peter Petermann's site he shares a few thoughts about Composer and how people use it in the more modern PHP ecosystem.

Composer has changed the PHP ecosystem like now other tool introduced - almost everyone is using it today. Now, I have written about Composer before, and have always been a big proponent of using it. However, as i have spend some time with looking more closely on a few things, there is a few problems (some with Composer, some with how people (ab)use Composer) that I would like to write about.

He's broken the list up into six different point, each with a bit of explanation:

  • Composer gets slow and resource hungry
  • People are using composer as an installer
  • People use their own paths
  • People don't adhere semver
  • People don't tag their releases / don't release
  • People release packages with dependencies to unstable versions

He ends the post by looking at each of these points and offering a brief one-liner way to help solve the issue (or at least minimize the problem).

0 comments voice your opinion now!
composer opinion problem usage ecosystem package

Link: https://devedge.wordpress.com/2015/05/16/a-few-thoughts-about-composer-and-how-people-use-it/

Scotch.io:
A Beginner's Guide To Composer
March 31, 2015 @ 13:48:55

The Scotch.io site has posted a guide that can help you if you're just getting started in the world of PHP packages via Composer. In this new tutorial Daniel Pataki introduces you to the tool and how to use it to install the dependencies you need.

I'm sure there are plenty of coders out there who are wondering about the benefits of using composer and many who are afraid to make the leap into a new system. In this article we'll take a look at what exactly Composer is, what it does and why it is a great tool for PHP projects.

He starts with the basics of dependency management, why it would be used in a project and how it automates the installation and integration of 3rd party libraries. From there he helps you get Composer installed and starts in on a sample "composer.json" configuration file. In his example he installs Monolog, the popular PHP logging class. He talks some about how to specify versions, locking down the dependency versions to install and installing "developer only" requirements.

0 comments voice your opinion now!
composer package dependencies library introduction beginner guide

Link: https://scotch.io/tutorials/a-beginners-guide-to-composer

Laravel News:
New community project Laravel Collective
February 09, 2015 @ 11:56:47

A new project has been launched in the Laravel community to try to maintain some of the core Laravel components that have been deprecated by the framework - the Laravel Collective.

The Laravel Collective is a new Laravel community organization headed by Adam Engebretson and Tom Shafer. It's primary goal is to help maintain the core Laravel components that have been deprecated by the framework. Currently the packages the Collective is taking over is HTML/Form and Annotations. They have a new site in the works which, when launched, will have complete documentation, team information, and more information on the packages. Until it's launched you can check out their GitHub repository.

The full project hasn't launched yet, but if you're interested in becoming a part of it, you can sign up for their newsletter and get updates as they're posted.

0 comments voice your opinion now!
laravel collective deprecated package maintain

Link: http://laravelcollective.com

SitePoint PHP Blog:
Basic TDD in Your New PHP Package
January 28, 2015 @ 12:27:17

The SitePoint PHP blog continues their "How to Build Your Own PHP Package" series with their latest post (part two of the series) covering the use of test-driven development while working on the package code.

In part 1, we set up our development environment, baked in some rules as inherited from The League, and created two sample but useless classes - Diffbot and DiffbotException. In this part, we'll get started with Test Driven Development.

He starts by briefly introducing PHPUnit, a PHP-based unit testing tool, and how to use it to generate the HTML version of the code coverage report. He helps you define a good phpunit.xml configuration file and how to execute a first sample test (code provided) from inside PHPStorm. From there he adds one some more complex testing of exception handling and checking the class types. With this foundation, he moves into the test-driven development (TDD) practices. TDD means writing the tests before writing the code to make those tests pass. He gives an example of this and shows how test abstract classes too. He then comes back around and writes the code to satisfy the test.

0 comments voice your opinion now!
tdd package bestpractice unittest testdriven development tutorial

Link: http://www.sitepoint.com/basic-tdd-new-php-package/

SitePoint PHP Blog:
Starting a New PHP Package The Right Way
January 27, 2015 @ 12:08:09

In part one of a new series on the SitePoint PHP blog Bruno Skvorc looks at the right way to start a PHP package using a set of guidelines that have evolved recently in well-structured, well-tested PHP packages.

In recent years, good standards for PHP package design have popped up, in no small part due to Composer, Packagist, The League and, most recently, The Checklist. Putting all these in a practical list we can follow here, but avoiding any tight coupling with The League (since our package won't be submitted there - it's specifically made for a third party API provider and as such very limited in context).

The list of rules includes topics like having a license selected, using PSR-4 autoloading and having in-depth code comments. Bruno uses these as a foundation and starts in on the creation of a package. He uses the PHP League skeleton structure to create the files and folders for a basic package. From there he updates the contents with details for his Diffbot example and installing other needed software libraries. The rest of the post is broken up into the two remaining steps and examples under each: sticking with the PSR-2 guidelines and planning for the structure of the package.

0 comments voice your opinion now!
package tutorial introduction rightway phpleague skeleton checklist

Link: http://www.sitepoint.com/starting-new-php-package-right-way/

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/


Community Events

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


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

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