Subscribe: Planet PHP
Added By: Feedage Forager Feedage Grade B rated
Language: English
add  database  laravel  led  pins  project  red  rgb led  rgb  rituals  scrum  sensor  skeleton  sprint planning  twitter  voyager 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Planet PHP

Planet PHP

People blogging about PHP


PHP 5 End of Life for Active Support - 7 Minutes Lately in PHP podcast episode 79 - PHP Classes

Mon, 16 Jan 2017 10:35:00 +0000

By Manuel Lemos
December was the month for which the last version of PHP 5.6 series had support for regular bug fixes. From now on only security bugs will be fixed.

This was one of the main topics discussed by Manuel Lemos and Arturs Sosins on the episode 79 of the Lately in PHP podcast.

In this episode they also talk about an article that shows the whole evolution in terms of performance since PHP 5.0 through PHP 7.1 and PHP 8 or 7.2 version, as well the usual proposals for the next PHP version like magic casting, decorator classes, throwable error code types, C# property like accessors, etc..

This article also contains a podcast summary as a text transcript and a 7 minute video.

Listen to the podcast, or watch the hangout video, or read the transcript text to learn more about these interesting PHP topics.

Home-Made Twitter and Gmail Notifications with PHP and Arduino - SitePoint PHP

Fri, 13 Jan 2017 18:00:38 +0000

I am a little obsessed with Twitter. It's how I communicate with most of the developers I'm not fortunate to live in the same city as. I'm a little less obsessed with IoT projects, but then it's harder to find the time to work on them than it is to check Twitter. Unless I can do both at the same time. Ever since the IoT week, I've been meaning to work on a project that will let me know when someone wants to speak to me. Something that looks cool, and is at the same time non-invasive. This is what I've come up with... Most of this code can be found on Github. I've tested it using PHP 7.1. In this post I talk a lot about pins. I use this word to mean the pins coming out of components, as well as the Arduino sockets these pins go into. They're often called terminals or ports. When I talk about pins, I just mean a place you can connect components or wires to. I'm quite specific each time though, so you'll be fine! The Project The project we're going to work on is a simple notification system, connecting a single RGB LED, a proximity sensor, and a PHP script to gather notifications. As notifications are received, the RGB LED will cycle through them, fading the LED to the appropriate color for each notification type. Say someone has mentioned us on Twitter. The LED should periodically cycle to the Twitter blue. Then, if someone sends us an email, the LED should cycle between the Twitter blue and the GMail red. We could extend this to the Fitbit green, the Facebook blue and so on. If we've seen the Twitter notification, we should be able to wave our hand in front of the proximity sensor, and Twitter blue should be removed from the rotation, leaving GMail red etc. The Hardware We can use just about any RGB LED. As long as we can control the color it fades to, we can simulate the social network notifications we're after. Really, just about any common anode RGB LED. If you get one that doesn't include resistors, be sure to add those into your circuit. I'll touch on that later... The more IoT work you do, the more likely you are to run into the terms anode and cathode. A common anode RGB LED is one that connects one pin to the positive pin on your micro-controller or battery, and three pins to ground, depending on the combination of colors you're after. Connecting the red pin to ground will close the circuit so that current flows through the red portion of the LED. Connecting the red pin to a Pulse Width Modulation (or PWM) port on our Arduino, and grounding the port by half will reduce the amount of current flowing through the red portion of the LED. Grounding the various pins by varying amounts will lead to many different colors - as many as you can define as CSS colors. Next, we need some kind of proximity sensor. The easiest (in my opinion) is an infrared transceiver. You could also use an ultrasonic transceiver, but they're better at mid-range (as they have a minimum sensing distance, so you'll have to be further away from the sensor). Finally, we need an Arduino. You can use another micro controller, but this post will refer specifically to Arduino, because I have three within arms-reach, and nothing else to test on. Connecting Things Together This is a relatively simple circuit, as far as they go. I'm by no means an expert, but I did manage to find the data sheets for the infrared sensor and RGB LED I bought; so connecting them up wasn't too troubling. The important bits are that our LED pins are connected to PWN ports, so that we can gradually adjust the amounts of red, green, and blue, and that the sensor pin is connected to an analog port (in this case A0). You may be wondering why we don't connect the LEG pins to analog ports, or why we don't connect the sensor to a PWM port. PWM is designed to simulate degrees of on/off, but the way that is done is by turning something on for a fraction of a second. With the right frequency of on/off cycles, LEDs only appear to be partially bright. That's a side-effect of our eyesight, in much the same wTruncated by Planet PHP, read more at the original (an[...]

Scrum Rituals: Sprint Planning - SitePoint PHP

Thu, 12 Jan 2017 17:57:15 +0000

The following is an extract from our book, Scrum: Novice to Ninja, written by M. David Green. Copies are sold in stores worldwide, or you can buy it in ebook form here. The ritual that marks the beginning of each sprint is called sprint planning. Sprint planning is hosted by the scrum master, but the […]

Continue reading %Scrum Rituals: Sprint Planning%

Beta2 of pds/skeleton now available! - Paul M. Jones

Thu, 12 Jan 2017 16:08:34 +0000

I am excited to announce that pds/skeleton 1.0.0beta2 has been released. (The pds/skeleton publication describes a standard PHP package skeleton, as backed by research into the PHP package ecosystem.)

Among other things, this release incorporates some command-line tooling to validate, and generate, your PHP package skeleton.

Barring unforeseen events, I expect the next release to be stable.

Thanks to everyone who made this release possible, both direct contributors, issue reporters, and everyone who commented on the research!

Trust - Anthony Ferrara

Thu, 12 Jan 2017 15:00:00 +0000

Stop and take a moment to think about how much trust is required to live your everyday life. Every single aspect of your life is built up on layer after layer of trust, it's nothing short of staggering. Different aspects of life will contain different levels of trust, with some being very guarded and some being very lax. We don't often talk about this trust and we often make the blind assumption that trust is inherently a bad thing. That's most definitely not the case. Let's explore why.

Read more »

Voice First - Nomad PHP

Thu, 12 Jan 2017 10:00:29 +0000

We’ve all heard of “Mobile First”. Most of us are savvy enough to know that that really means “API First” and then “Mobile is the first client.” Have you heard though, about “Voice First?” Starting with Siri, but greatly accelerated by the Amazon Echo and now the Echo Dot, we are seeing the birth of a …

The post Voice First appeared first on Nomad PHP.

PHP Site Gamification Using a Secret Path - PHP Classes

Wed, 11 Jan 2017 16:51:51 +0000

By Dave Smith
The main purpose of gamification is to keep our users entertained in game like activities, so that they stay around longer and come back more often, for instance to your site or your app.

We can accomplish this by setting up a sequence of page visits and rewarding our users if they complete the sequence correctly using the Secret Path class.

Read this article to learn how you can use the PHP Secret Path class to implement a neat game like experience for your users.

Voyager – Can an Admin UI Make Laravel Even More Approachable? - SitePoint PHP

Tue, 10 Jan 2017 15:00:21 +0000

Today, we are talking about Voyager! Voyager is a Laravel package that provides a full administration system for the framework in its "skeleton app" form. Voyager has 4 main features: Media Manager - Built on top of Intervention Image, it provides a fully functional media manager that allow us to view, edit, and delete images from storage. This way, we can have all of our media in a single place, making it easy to access and manipulate. Menu Builder - The Menu Builder allows us to add, edit, and delete menu items. It also gives us the ability to create new menus and manage them. Database Manager - Allows us to access and manipulate our database directly from the admin panel. Instead of having to use Laravel's Schema, Voyager provides us with a mechanism to add, delete, and edit entries in the database. It will also (upon specification) create our models when adding tables to the database. Bread/CRUD builder - BREAD is simply CRUD for the database. Voyager provides a mechanism to Browse, Read, Edit, Add, and Delete entries and views of any table in our database. Let's take a closer look at it. Installing Voyager First, let's start with a fresh Laravel installation. Of course, we can start with an existing project, but for the purpose of this article we will start with a fresh one. While it's outside the scope of this article, the recommended way to start a new Laravel project is by using Composer: composer create-project laravel/laravel voyager This will create a new Laravel project called voyager inside the /voyager folder. To serve this new Laravel project, using PHP's built in server: php artisan serve On Homestead Improved, the serving is taken care of for you with Nginx. With a fresh Laravel installation up and running, we can now focus on installing the Voyager Admin package. composer require tcg/voyager As we can see during the installation process, Voyager is pulling components from some very well known PHP packages like Doctrine ORM for the database manager, or Guzzle and Intervention Image for PHP image handling and manipulation. This shows us that Voyager is built on top of reliable and proven components. Next, let's fire up our favorite code editor. We will need to edit some files in order to have Voyager up and running. First, we open the .env file and add our database credentials so that Voyager can connect to it. DB_HOST=localhost DB_DATABASE=database DB_USERNAME=username DB_PASSWORD=password After that, let's add the Voyager and Image Intervention service providers to our providers array. This array can be found in the config/app.php file, and all we need to do is append the following elements to it: TCG\Voyager\VoyagerServiceProvider::class, Intervention\Image\ImageServiceProvider::class, To finish the installation: php artisan voyager:install We should now see the "Successfully installed Voyager! Enjoy :)" message. Continue reading %Voyager – Can an Admin UI Make Laravel Even More Approachable?% [...]

Getting Rid of static - Qafoo - PHP

Tue, 10 Jan 2017 08:34:30 +0000

When people start (unit-)testing their code one of the worst problems to tackle are static calls. How can we refactor static calls out of an existing application without breaking the code and while producing new features? How can we get rid of this big test impediment?

What Are Scrum Rituals? - SitePoint PHP

Mon, 09 Jan 2017 11:50:29 +0000

The following is an extract from our book, Scrum: Novice to Ninja, written by M. David Green. Copies are sold in stores worldwide, or you can buy it in ebook form here. The practice of working on a scrum team is organized into a series of rituals. The rituals mark key events in the process […]

Continue reading %What Are Scrum Rituals?%