NetTuts.com: Programming With Yii2: Integrating User Registration

NetTuts.com has posted the next part in their “Programming with Yii2″ series today with this tutorial showing you how to integrate user registration into your sample application.

This is part four of a series on Yii2. In Programming With Yii2: Getting Started, we set up Yii2 locally, built a Hello World application, set up a remote server, and used Github to deploy our code. In part two, we learned about Yii’s implementation of its Model View Controller architecture and how to build web pages and forms that collect and validate data. In part three, we learned about working with databases and ActiveRecord. In this tutorial, we’ll walk you through integrating a popular user registration plugin.

They walk you through the use of the Yii2-User extension to provide the user handling functionality. The tutorial shows you how to get it installed (via Composer), run its database migrations to create the needed tables and where to update the configuration files to pull the plugin into the execution. They also help you set up SwiftMailer (what it uses to send its emails) and then gets into the integration of the registration with the application with a signup page.

Link: http://code.tutsplus.com/tutorials/programming-with-yii2-integrating-user-registration–cms-22974
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

PHP Roundtable: 015: SemVer, Licensing & OS Support Expectations

The PHP Roundtable podcast has posted their latest episode, part two in a series looking at semantic versioning, open source support expectations and licensing. This new episode features guests Colin O’Dell and Chris Tankersly.

Part 2 of an on-going series on open source. We discuss a number of open source topics including what the expectations are for support of an open source project. We also discuss how to use SemVer to successfully maintain an open source package and what we can do when SemVer is not an option. And finally we take a look at licensing and discuss why we need to be concerned with it.

You can listen to this latest episode by checking out the video of the live recording, coming in at about 1 hour. If you enjoy the show, be sure to subscribe to their feed to get the latest updates on when new episodes are available.

Link: https://www.phproundtable.com/episode/semver-licensing-os-support-expectations-open-source-series-part-2
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , | Hinterlasse einen Kommentar

stfalcon.com: Increasing project productivity in Symfony2 from Doctrine2 ORM

In this tutorial to the stfalcon.com site Sasha Lensky talks about some things you can do to help boost the performance of your Symfony2 application with a few tweaks in how Doctrine is used.

I have been trying to write this article for a long time, but just couldn’t get around. Finally, I pulled myself together and did it. So, what will we discus … I will share some techniques about working with Doctrine2 ORM, which will help to improve the site performance on Symfony2 (precisely any site that uses Doctrine2 ORM). I have created a project and put it on GitHub as a visual guide, so anyone can test my words in action now.

He shares five tips and includes code examples and results (based on the Profiler toolbar) for each:

  • Downloading all necessary connections
  • Updating multiple entities by request
  • Hydration waiver
  • Using Reference Proxies
  • Using Symfony Profiler Toolbar

That final tip about the Profiler toolbar is actually one used in the rest of the examples too, showing how to get that other information from the tool.

Link: http://stfalcon.com/en/blog/post/performance-symfony2-doctrine2-orm
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

SitePoint PHP Blog: Creating Custom Field Formatters in Drupal 8

The SitePoint PHP blog has a new tutorial posted today showing how to create custom field formatters in a Drupal 8 application. Custom formatters allow you to enhance the current functionality of objects in the application and extend them with additional functionality.

With the introduction of annotated plugins, a lot has changed in Drupal 8. We have a more streamlined approach to describing and discovering pieces of functionality that extend the core. Along with many other components, the former Field API (part of the larger and consolidated Entity API) is now based on plugins. In this tutorial we will go through defining a custom field formatter for an existing field (image). What we want to achieve is to make it possible to display an image with a small caption below it. This caption will be the title value assigned to the image if one exists.

They start with a new custom module, starting with just the YAML configuration. Then they help you create the field formatter as a plugin in the “Plugin/Field/FieldFormatter” namespace (code included). They explain how this code works and show how to add it as a hook to make it available to the template layer. Finally they show it in use and how it places the title value into the image caption in the result.

Link: Creating Custom Field Formatters in Drupal 8
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

Pádraic Brady: Securely Distributing PHARs: Pitfalls and Solutions

Pádraic Brady has a new article on his site talking about the secure distribution of phars (PHP archive files) including some of the common pitfalls and potential solutions.

The PHAR ecosystem has become a separate distribution mechanism for PHP code, distinct from what we usually consider PHP packages via PEAR and Composer. However, they still suffer from all of the same problems, namely the persisting whiff of security weaknesses in how their distribution is designed. […] [Several security-related issues introduce an element of risk that the code you receive is not actually the code the author intended to distribute, i.e. it may decide to go do some crazy things that spell bad news when executed.

He shares some of the steps he’s taken to secure his own phar for a CLI application with things like:

  • Distribute the PHAR over HTTPS
  • Enforce TLS verification
  • Sign your PHAR with a private key
  • Avoid PHAR Installer scripts
  • Manage Self-Updates securely

He finishes the post with one of the most important parts of the article – a reminder to do all of the things on the list above consistently.

This is not an outrageous outcome to introducing proper security on PHAR downloads. Go forth and do it for all PHARs. Help create an environment where distributing and installing code in secure ways is the normal expected thing to do.

Link: http://blog.astrumfutura.com/2015/03/securely-distributing-phars-pitfalls-and-solutions/
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

Community News: Packagist Latest Releases for 02.21.2015

Recent releases from the Packagist:

PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , | Hinterlasse einen Kommentar

The ChangeLog Podcast: #142: Laravel PHP Framework with Taylor Otwell

The ChangeLog podcast has posted their latest episode, #142, with guest Taylor Otwell, creator of the popular Laravel framework.

This week we’re joined by Taylor Otwell, he’s the creator and maker of the Laravel PHP framework. He joins us for a deep dive into Laravel, why he doesn’t release without good documentation, building apps to test your own framework, writing an API for Lavarel Forge, and more.

There’s a good range of topics discussed, both Laravel and non-Laravel with links included in the post. You can listen to this latest episode either through the in-page audio player or by downloading the mp3.

Link: http://thechangelog.com/142/
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , , | Hinterlasse einen Kommentar

Reddit.com: So, what is PHP’s nature? Anyone actually know exactly what it is?

In this recent post to the /r/php subreddit on Reddit.com, the question is asked “what is the nature of PHP?” and how it relates to what features make it into the language and which don’t.

I’ve heard many times that a proposed RFC/new feature got rejected by PHP internals in voting phase, since ‘it does not fit the nature of PHP’. But the question is, what is PHP’s nature? Does it even have a nature at all? If yes, is there a standard or guideline of what fits in PHP’s nature? I think its very confusing, isnt it? Anyone actually have some insights in this?

In the comments other users provide a wide range of opinions including:

  • “I would recommend taking those types of comments with a grain of salt. PHP’s nature is a very subjective topic, as you can tell by the other comments.”
  • “PHP was made to make dynamic web pages at a time when webpages contained minimal dynamic content. It was made at a time when web pages doesn’t required a programming language to generate.”
  • “Easy to pick up and make a website for weak devs/prototypes (easy to abuse). Much of the hate for PHP is because this abuse is possible and exploited often.”
  • “As someone mentioned, nobody who does any sort of web development today can ignore Javascript and they will typically be switching back and forth between Javascript and PHP every couple of minutes. This is our target user these days and as such this syntax is appropriate I think.”

Check out the full post for more opinions or to voice your own!

Link: http://www.reddit.com/r/PHP/comments/2vmh3o/so_what_is_phps_nature_anyone_actually_know/
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , , | Hinterlasse einen Kommentar

SitePoint PHP Blog: Grumpy Programmer’s Testing Bundle: Review

The SitePoint PHP blog has posted a book review of a book bundle from the “Grumpy Programmer” (aka Chris Hartjes) with content about testing – how to test, what to test and creating testable applications.

After having gotten some constructive feedback regarding my testing practices on the basic TDD in your new PHP package tutorial, I decided to read Chris Hartjes “Grumpy Testing Bundle“, a set of two books consisting of The Grumpy Programmer’s Guide To Building Testable PHP Applications and The Grumpy Programmer’s PHPUnit Cookbook. It was my hope that those books will prevent me from using the shoddy practices I displayed in that original post and which originally prompted Matthew Weier O’Phinney’s critique. In this post, I’d like to share with you what I’ve learned, and how much this helped me, if at all.

He breaks down the bundle and talks about each of the two books separately, pointing out places he thought were most useful and others where he felt it needed updates/more clarification. He includes examples of some of the code shared in the books as illustrations and what kind of overall rating he gives it (in elePHPants naturally).

Link: http://www.sitepoint.com/grumpy-programmers-testing-bundle-review/
PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , , | Hinterlasse einen Kommentar

Community News: Packagist Latest Releases for 11.22.2014

Recent releases from the Packagist:

PHPDeveloper.org

Veröffentlicht unter Allgemein | Verschlagwortet mit , , , , , | Hinterlasse einen Kommentar