PHPDeveloper.org

Community News: Packagist Latest Releases for 12.20.2014

Sat, 12/20/2014 - 14:02
Recent releases from the Packagist:

Developer Drive: Simplify your documentation process with Couscous

Fri, 12/19/2014 - 18:14

On the Developer Drive site today there's a quick post introducing you to Couscous, a PHP-based documentation generation tool. Couscous translates your Markdown files into HTML output that's professional and clean looking.

If there's one thing I hate more than tracking down bugs, it's documenting code. It takes forever, it's almost a project in itself, and I never seem to factor it into my project lifecycle. Setting out to solve that problem for me, and anyone else whose life is too short, is Couscous. Couscous takes markdown files and converts them into professional standard HTML docs that colleagues, or fellow developers, can easily follow. You can preview the resulting site on your local machine, correct any issues, and then deploy straight to GitHub where it will be hosted for you.

They walk you through the (brief) process of getting the tool installed via Composer and using it to show you a preview of your documentation. The "deploy" command then allows you to easily deploy the results out to a GitHub Pages location on the gh-pages branch. You can find out more about Couscous on the project website.

Link: http://www.developerdrive.com/2014/12/simplify-your-documentation-process-with-couscous/

Efficient Chinese Search with Elasticsearch

Fri, 12/19/2014 - 17:56

On the SitePoint PHP blog a new tutorial has been posted showing you how to effectively search Chinese content with ElasticSearch. ElasticSearch is a "powerful open source search and analytics engine that makes data easy to explore" and plays nice with PHP via a JSON based query format.

If you have played with Elasticsearch, you already know that analyzing and tokenization are the most important steps while indexing content, and without them your pertinency is going to be bad, your users unhappy and your results poorly sorted. Even with English content you can lose pertinence with a bad stemming, miss some documents when not performing proper elision and so on. And that's worse if you are indexing another language; the default analyzers are not all-purpose. When dealing with Chinese documents, everything is even more complex, even by considering only Mandarin which is the official language in China and the most spoken worldwide.

He starts by explaining exactly what the problem is with searching Chinese content including the fact that some words can actually be a combination of two or more characters (words). He then lists out a few plugins and tools that can be integrated with ElasticSearch to help with analyzing the content. He goes through each of them and provides instructions on installation and usage. He ends the post with a sample of the results for a set of three search terms, comparing the matches each found.

Link: http://www.sitepoint.com/efficient-chinese-search-elasticsearch/

PHP.net: Release of PHP 5.4.36, 5.5.20 and 5.6.4 (Includes Security Fix)

Fri, 12/19/2014 - 16:39

The PHP.net has announced the releases of several new versions in all of the current major series, all correcting several bugs including a CVE-related (security) related to unserialization. This security issue was reported in CVE-2014-8142 and relates to this bug report. It is highly recommended that you upgrade your versions to correct this potential security vulnerability. The latest versions are:

As always, you can download these latest releases directly from the downloads page or http://windows.php.net/download for the Windows users. If you're interested in the other bugs fixed in these releases, check out the full Changelog.

Link: http://php.net/archive/2014.php#id2014-12-18-3

Sound of Symfony Podcast: Episode 6 - The SymfonyCon Special

Fri, 12/19/2014 - 15:02

The Sound of Symfony podcast has released their latest episode today: Episode #6, The SymfonyCon Special. This episode was recorded at SymfonyCon Madrid 2014 that happened in Spain at the end of November.

In this episode we're all about SymfonyCon. So much so that we in fact recorded this episode at the SymfonyCon Hack day. As usual, we go over the news and community update, but the rest of the episode is focused on discussing the conference with our guests.

Among the topics discussed are things like:

You can listen to this latest episode either through the in-page audio player or by downloading the mp3. If you enjoy it, you can subscribe to their feed too.

Link: http://www.soundofsymfony.com/episode/episode-6/

Community News: Packagist Latest Releases for 12.19.2014

Fri, 12/19/2014 - 14:09
Recent releases from the Packagist:

Lee Blue: How PHP Frameworks Affect Profitability

Thu, 12/18/2014 - 17:37

Lee Blue has posted his next article in a series covering some of the real costs and considerations around using PHP for your applications. In this latest post he talks about frameworks and what kind of effect they could have on the overall profitability of your business.

Last week we talked about application shelf life an aspect of PHP development that often goes overlooked. This week let's talk about how the web development framework you use contributes to the shelf life of your app and the profitability of your web application. [...] The main goal of all web frameworks is to improve the developer's ability to get ordinary things done so we can focus on the primary goals of what we're building.

He talks about how PHP was "made for the web" and why there are so many different kinds of frameworks out there (though most are generally MVC-ish). He talks about one of the standard arguments, learning curve vs efficiency, and how it compares to the "no framework framework" ideals. He then gets into some of the dark side of using frameworks, specifically how they can shorten the shelf life of an application and how difficult migration can sometimes be. He points out the irony of large frameworks: the bigger the app/framework, the harder it can be to migrate (and cost more). He encourages sticking with smaller, lighter frameworks instead and suggests coding standards, common packages and using custom libraries only where needed to create your application.

Link: http://leehblue.com/php-frameworks-affect-profitability/

Matthieu Napoli: Test against the lowest Composer dependencies on Travis

Thu, 12/18/2014 - 16:53

Recently the "prefer-lowest" option of Composer was mentioned in relation to testing for Symfony-based applications. In this new post to his site Matthieu Napoli shows how you can do it on any project that uses the Travis-CI continuous integration service.

Composer just got a new awesome addition thanks to Nicolas Grekas: prefer the lowest versions of your dependencies. [...] This amazing option will install the lowest versions possible for all your dependencies. What for? Tests of course!

He includes all the instructions you'll need to get your Travis build using this command line option, starting with testing it on your own system first. He shows a basic ".travis.yml" file with the configuration you'll need to provide it use the "prefer-lowest" (check out line 17). He does point out that you'll need to run a "composer self-update" first though, as Travis hasn't quite caught up with the latest Composer that includes this option.

Link: http://mnapoli.fr/test-lowest-dependencies/

SitePoint PHP Blog: Getting Started with Medoo - Examples of Use

Thu, 12/18/2014 - 15:45

On the SitePoint PHP blog, there's a new tutorial that introduces you to the Meedoo library, a tool to make working with databases even easier. In this tutorial Wern Ancheta walks you through some of the basics of the tool and shows you how to use it with a Pokemon-based example.

In this article I'm going to walk you through Medoo, a lightweight database abstraction library for PHP. Its main features include: support for multiple databases, being secure and easy to use. [...] While Medoo is nothing revolutionary, and the fact that it sports a very small filesize matters little to few, it's still an interesting project that went from being outright dismissed to vaguely accepted, as evident in these threads. It's on its way up, and that's our reason for taking a look at it.

Once installed (he recommends using Composer) you can follow along with his examples showing how to connect to the database, make a simple select and define something a bit more complex (like multiple other requirements in the SQL statement's "where"). He shows how to execute manual queries and handling more complex operations like joins. He then gets into the other parts of the usual CRUD handling - inserting new data, updating data and deleting data.He finishes the post by mentioning aggregate functions and some of the debugging options the tool includes.

Link: http://www.sitepoint.com/getting-started-medoo-examples-use/

php[architect]: Announcing php[tek] 2015 & the Open Call for Papers

Wed, 12/17/2014 - 19:34

php[architect] has a quick post on their site today announcing their latest conference, php[tek] 2015 and the opening of its Call for Papers.

Today we've opened up the Call for Papers (as well as registration) for our upcoming conference php[tek] 2015. This conference will once again take place in Chicago, IL, from the dates of May 18th to May 22nd. The call for papers is only open until January 19th however. So don't delay in submitting those talk ideas to us!

The conference will be happening at its usual spot in Chicago, Illinois and there's "big plans this year to be the biggest best php[tek] ever." If you're interested in the event, check out the the main site or last year's site for more information.

Link: http://www.phparch.com/2014/12/announcing-phptek-2015-and-our-call-for-papers/

Symfony Blog: Testing minimal versions of Symfony requirements

Wed, 12/17/2014 - 18:02

On the Symfony blog today there's a quick tip from Nicolas Grekas about using Composer to install a Symfony2 project and the definition of minimum version requirements.

Setting up Composer package versions for complex projects is not an easy task. For starters, there are a lot of different ways to define package versions. Then, you must check that declared package versions really work when installing or updating the project, specially for the minimal versions configured. In order to improve testing the minimal versions of Symfony Components requirements, Composer now includes two new options: prefer-lowest and prefer-stable. [...] Thanks to these two new options, it's really easy to check whether your project really works for the minimal package versions declared by it.

He includes definitions of what impact each of the options has on the packages Composer installs and the work that's been done recently to define the correct package versions for the 2.3, 2.5 and 2.6 branches of Symfony. He also offers some steps to follow in your own projects to ensure that the "prefer-lowest" packages installed work correctly.

Link: http://symfony.com/blog/testing-minimal-versions-of-symfony-requirements

php[architect]: December 2014 Issue Released - Taming Content

Wed, 12/17/2014 - 17:55

php[architect] has posted the official release announcement for the latest edition of their magazine, the December 2014 edition: Taming Content.

The PHP habitat is well stocked with content management systems. Everything from mature projects like Drupal, WordPress, Joomla!, to in-house custom systems (come on, who hasn't taken a stab at this at least once?). Even if you primarily work with backend applications, it's good to know the options available for helping clients and coworkers manage and update site content on their own.

This issue includes articles like:

  • Advanced Sites Deserve Advanced Custom Fields (Steve Grunwell)
  • Drupalese 101 (Annika Garbers)
  • ProcessWire: Flexibility, Power, and a Generous Dose of Pure Fun (Teppo Koivula)
  • PHP Tips and Tricks (Julien Pauli)

All of your favorite columns are there too including Laravel tips, the Community Corner and the Education Station. You can check out more information about these and other articles in the page for the issue or just pick up a copy of your own (available in both print and digital formats).

Link: http://www.phparch.com/magazine/2014-2/december/

NetTuts.com: Integrate Bitcoin Payment Gateway Into OpenCart: Part 1

Wed, 12/17/2014 - 16:46

On the NetTuts.com site today they've posted the first part of a series showing the integration of the BitPay bitcoin payment service into an OpenCart instance. In this first part they focus on getting some of the initial setup and administration handling set up.

In this series, we are going to look at building a Bitcoin payment system into our installation of OpenCart. Before we get started, I recommend that you practice the basic OpenCart module development if you are not familiar with how to build your own modules. Once done, you should have enough knowledge to continue with developing more advanced modules. In this series, that's exactly what we aim to do.

They start by having you download the BitPay API library and dropping it into the root directory of your OpenCart installation. Next they show you how to create an "Admin" controller with the data you'll need to pass into the view including data pulled from a model. They also create the admin view showing the current orders using bitcoin as payment, their status and options to change the speed of the API requests, status and toggling test mode on and off. Finally they include the code to save the results of the admin form submission and a bit of validation around user permissions and API key validity.

Link: http://code.tutsplus.com/articles/integrate-bitcoin-payment-gateway-into-opencart-part-1--cms-22328

Sameer Borate: Integrating Googles new reCAPTCHA in PHP

Wed, 12/17/2014 - 15:23

Recently Google announced their reCAPTCHA without a CAPTCHA technology to help make preventing automated systems (usually spammers) from causing issues in your applications. In this new post from Sameer Borate, he shows you how to implement this new kind of CAPTCHA in your PHP-based application.

For the past several years Google's reCAPTCHA has helped verify that a user is not a bot by forcing you to decipher warped text. reCAPTCHA's method of protecting websites from spam has always been a kind of burden on the end user who has to solve the captcha to prove that he is human and not a bot. [...] Google recently released a new captcha API called "No CAPTCHA" reCAPTCHA, which utilizes an Advanced Risk Analysis engine that is capable of discerning between users and bots. So instead of solving a jumbled box of text all a user has to do is check a box.

He walks you through the full process of the integration:

  • Signing up for an account/API keys
  • Rendering the HTML for the actual widget (using Google Javascript)
  • Validating the user's response via an API call
  • The PHP you'll need to perform the validation

He also briefly mentions some of the customization available and provides the code as a download so you can see it all working together.

Link: http://www.codediesel.com/security/integrating-googles-new-nocaptcha-recaptcha-in-php/

Community News: Packagist Latest Releases for 12.17.2014

Wed, 12/17/2014 - 14:04
Recent releases from the Packagist:

Community News: Recent posts from PHP Quickfix

Wed, 12/17/2014 - 13:04
Recent posts from the PHP Quickfix site:

SitePoint PHP Blog: AngularJS in Drupal Apps

Tue, 12/16/2014 - 18:23

On the SitePoint PHP blog there's a new tutorial posted (by Daniel Sipos) about combining Drupal and AngularJS to make for more front-end focused, responsive applications.

Angular.js is the hot new thing right now for designing applications in the client. Well, it's not so new anymore but is sure as hell still hot, especially now that it's being used and backed by Google. It takes the idea of a JavaScript framework to a whole new level and provides a great basis for developing rich and dynamic apps that can run in the browser or as hybrid mobile apps. In this article I am going to show you a neat little way of using some of its magic within a Drupal 7 site. A simple piece of functionality but one that is enough to demonstrate how powerful Angular.js is and the potential use cases even within heavy server-side PHP frameworks such as Drupal.

He walks you through the creation of a simple addition of a block that lists out the titles of some other nodes. You'll need an existing Drupal installation to follow along (no setup instructions here) as well as an Angular structure for a small application. He starts with the module configuration and creates custom handling to return the JSON result back to the waiting JS connection. Then he creates the custom template and block that the AngularJS will output the results too. Finally, with that rendering, he glues them both together in an Angular controller that loads the results when an "Open" button is clicked.

Link: http://www.sitepoint.com/angularjs-drupal-apps/

Voices of the ElePHPant: Interview with Stefan Koopmanschap

Tue, 12/16/2014 - 17:15

The Voices of the ElePHPant podcast has released their latest episode in their series of interviews with members of the PHP community. In this latest episode host Cal Evans talks with Stefan Koopmanschap.

They talk some about Stefan's work in the Symfony community and a current project he's refactoring to use it. They also talk about an event he recently helped organize, Wecamp, a conference held on an island where the attendees worked on a full project in a week. They also talk some about the most recent user group Stefan has been bootstrapping, the Frysian PHP User Group.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3. If you enjoy the interview be sure to subscribe to their feed.

Link: http://voicesoftheelephpant.com/2014/12/16/interview-with-stefan-koopmanschap/

Erika Heidi: The Art of Programming

Tue, 12/16/2014 - 16:29

Erika Heidi has posted an interesting article on Mdeium.com today with a look at the art of programming, relating the work we as developers do back to the same kinds of skills artists use in their work.

One of the most consolidated misconceptions about programming, since the early days, is the idea that such activity is purely technical, completely exact in nature, like Math and Physics. Computation is exact, but programming is not. The first is a result of a machine operation, and the latter is still a human activity.

Programming requires a lot of creativity, on top of the abstract concepts, tools and techniques that we might learn in a classroom; all that theory represents only a tiny portion of what is necessary to build a great developer.

She talks about some of her own past experiences with programming and how, from even simple beginnings, she had a "mind blowing experience" making something from just a few lines of code. She talks about how she sees similarities between programming and art such as the two kinds of artists: the ones that copy other work, recreating things already made and the genuine artists making new and inventive things.

Respect the work of others, even if you think there is something with a similar purpose already out there. It's their expression. They are not trying to reinvent the wheel. They are trying to create a better wheel, or a wheel that works better for their purposes. Link: https://medium.com/@erikaheidi/the-creative-programmer-2dde54f83e3a