Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

php[architect]:
December 2018 Issue Release - "Better Practice"
Dec 18, 2018 @ 20:53:58

php[architect] magazine has posted an announcement about the release of their December 2018 issue - Better Practice - Improve Your Skills.

Practice and more practice are the keys to adopting modern software engineering practices. It doesn’t matter if you’re using WordPress or Drupal to manage website content, trying to learn unit testing, get hired, or looking for better ways to manage date and time data—there’s always an opportunity to learn how to do it better. This issue rounds up articles on each of these topics to help you deepen your problem-solving skills.

Articles in this issue include:

  • "Custom Post Types in WordPress" by Andrea Roenning
  • "The Flexibility of Drupal 8" by Michael Miles
  • "How to Learn PHP Unit Testing With Katas" by David Hayes
  • "It’s About Time" by Colin DeCarlo

All of the usual columns have returned as well with thoughts about creating a culture in your development organization, hashing, interview coding challenges and more. Check out the full list of articles and columns for this month's edition on the php[architect] site and pick up a copy of your own! If you want to "try before you buy" you can read this month's free article and get a feel for the content.

tagged: phparchitect magazine dec2018 issue release better practice skill improvement

Link: https://www.phparch.com/magazine/2018/12/better-practice/

php[architect]:
The Case for Generics in PHP
Dec 04, 2018 @ 20:30:55

The php[architect] site has posted an article pulled from their November 2018 issue providing a case for generics in PHP.

To elucidate their merit, we will look at how they might fit within the evolution of PHP’s type system to put us in a position to write more robust software:

“How can I signal that my method will return a Collection of User objects? And why would I want to do that?”

The article starts with a look at generics in other languages and how they're handled (such as Java and C#). From there they shift over to PHP, giving a code sample of a class that is typed to only accept one kind of value for its constructor. They provide an update for this that would work in PHP 7.4 (with typed properties) and how with the help of generics it would be simpler to define a more dynamic type requirement, allowing for more generalized class descriptions.

tagged: phparchitect article november2018 issue generics tutorial php74

Link: https://www.phparch.com/2018/11/the-case-for-generics-in-php/

Matthew Weier O'Phinney:
Building a usable ext-tidy for Alpine-based PHP Docker images
Nov 02, 2018 @ 15:22:29

On his site Matthew Weier O'Phinney has a new post sharing a method he's worked up for creating a Docker image for PHP from an Alpine image that included the "tidy" PHP extension.

I've been working on building PHP Docker images for the purposes of testing, as well as to potentially provide images containing the Swoole extension. [...] This week, I decided to see if I could build Alpine-based images, as they can greatly reduce the final image size. And I ran into a problem.

One of the test-beds I use builds RSS and Atom feeds using zend-feed. When I tried one of these images, I started getting failures. [...] During an initial search, this appeared to be a problem due to libxml2 versions. [...] I realized [after debugging] that the problem was the content — which was being massaged via the tidy extension before being passed to DOMDocument::loadXML(). For some reason, the content generated was not valid XML!

In order to solve this issue (after spending a good deal of time debugging it) he went on a hunt to figure out the previous version. Once he found that it was just a few simple lines in his Dockerfile to include the right version and install it using the apk package manager (example of this is included).

tagged: docker tidy xml issue debugging tutorial

Link: https://mwop.net/blog/2018-11-01-alpine-php-ext-tidy.html

php[architect]:
November 2018 Issue Release - Generics and Project Success
Nov 01, 2018 @ 14:25:56

php[architect] magazine has released their latest issue for November 2018: Generics and Project Success. In this issue they feature articles like:

  • "The Case for Generics in PHP" by Chris Holland
  • "Maintaining Laravel Applications" by Jason McCreary
  • "Getting Started With Php? Let’s Start the Right Way!" by Junior Grossi
  • "How to Knock Down Any Project in Ten Steps" by Pawe? Lewtak

The usual columns are all returning including Joe Ferguson continuing his series on creating packages, Eric Mann covering five security risks to look for in a code review, and James Titcumb with some resources you can use to continue "leveling up" in your development career.

If you want to "try before you buy", they're also offering a free article, "The Case for Generics in PHP" by Chris Holland. You can pick up a copy of your own directly from the php[architect] site or subscribe to their print or PDF versions!

tagged: phparchitect magazine nov2018 issue release generics project success

Link: https://www.phparch.com/2018/10/generics-project-success/

php[architect]:
September 2018 Issue Release - Magniphpicent 7.3
Sep 06, 2018 @ 17:19:14

On the php[architect] site today they've posted the announcement of the release of the magazine's latest issue: September 2018 - Magniphpicent 7.3

Articles in this edition include:

  • "PHP 7.3 is On Track!" by Damien Seguy
  • "Upgrading Old Legacy Apps to PHP 7 and Beyond" by Sammy Kaye Powers
  • "Using the Symfony Workflow Component as a State Machine for Ecommerce" by Michelle Sanver

All of the usual columns are back too with helpful hints and information about time estimates, thinking like an attacker, describing tests and many more. You can find out more about this issue and pick up a copy of your own on the php[architect] site.

tagged: phparchitect magazine sept2018 issue release magniphpicent php73

Link: https://www.phparch.com/2018/09/masterful-code-management-2/

php[architect]:
June 2018 Issue Release - Command and Control
Jun 13, 2018 @ 18:08:27

php[architect] magazine has announced the release of their June 2018 issue - Command and Control. This issue includes articles like:

  • "Domain-Driven Architecture With Commands and Events" by Barney Hanlon
  • "Pro Parsing Techniques With PHP, Part One: Simplifying Your Parsing Strategy" by Michael Schrenk
  • "Design Is for Designers" by Steve Bennett
  • "Self-Host Your Team’s Git With Gitolite" by Gabriel Zerbib

The usual columns are also back sharing tips for development leads, security, going "beyond PHP" and building APIs. You can check out the articles in this month's issue and pick up a copy on the php[architect] site. If you're interested to "try before you buy", check out this month's free article about Git and Gitolite.

tagged: issue release phparchitect commandandcontrol june2018

Link: https://www.phparch.com/magazine/2018-2/june/

SitePoint PHP Blog:
How to Fix Magento Login Issues with Cookies and Sessions
May 21, 2018 @ 16:30:01

On the SitePoint PHP blog there's a new tutorial posted showing how to fix Magento login issue with cookies and sessions. This issue can cause a redirect loop but can be fixed.

In this article are looking at how Magento cookies can create issues with the login functionality of both the customer-facing front-end and admin back-end, the reason it occurs and how it should be resolved.

This is also known as the looping issue, as the screen redirects itself to the same screen, even though the username and password is correct.

The post starts with some basic definitions of "cookie" and "session" and gets into more detail on how Magento stores sessions and the places it can store them. The tutorial then covers each of the cookies used and three reasons the login issues might be happening:

  • Cookie domain does not match server domain
  • Multiple subdomains used and Magento’s cookie configuration is incorrect
  • Double front-end cookies causing intermittent login issues

For each several solutions are included with any code or SQL changes that need to happen to correct it.

tagged: magento tutorial fix login issue cookie session

Link: https://www.sitepoint.com/fix-magento-login-issues-cookies-sessions/

Sebastian De Deyne:
A good issue
May 04, 2018 @ 15:10:25

As a maintainer of an open source project there are things that can help to make your role easier. One of them is encouraging useful issues being filed on the project with good information about the problem or suggestion. In this post to his site Sebastian De Deyne shares a few helpful hints on what can make for a good issue.

Maintaining a number of open source projects comes with a number of issues. Reporting a good issue will result in a more engaged approach from project maintainers. Don't forget: there's a human behind every project.

His suggestions include:

  • as much detail as possible ("X is broken" isn't useful)
  • having a single point or suggestion per issue
  • being polite (remember, open source maintainers aren't often paid for this work)

His last point might be the most important: making a human connection. Sometimes it's easy to forget that there's a real person on the other end of the line. If you work with the person reporting the issue rather than just focusing on the technical parts it can make it an easier and more pleasurable process for all involved.

tagged: good issue opensource project report personal recommendation

Link: https://sebastiandedeyne.com/posts/2018/a-good-issue

php[architect]:
May 2018 Issue Release - Treasure, Old & New
May 02, 2018 @ 17:21:05

php[architect] magazine has posted the announcement of the release of their latest issue - the April 2018 edition: Treasures, Old & New. Articles in this issue include:

  • Up to My Eyeballs in Technical Debt! by Steve Grunwell
  • The Life-Changing Magic of Tidying Your Code by Bryce Embry
  • Moving a Monolith to AWS by Keanan Koppenhaver
  • Easier Mocking with Mockery, Part 2 by Robert Basic

In addition to these articles, the usual columns are returning covering Laravel artisan, healthy working environments, technical debt and building APIs. You can find out more about this issue on the php[architect] site and, if you'd like a sample of the content, check out this month's free article.

tagged: phparchitect may2018 issue release treasure

Link: https://www.phparch.com/magazine/2018-2/may/

Freek van Der Herten:
Automatically close stale issues and pull requests
May 02, 2018 @ 14:31:17

In a post to his site Freek van Der Herten shares some functionality that Spatie uses to help keep the stale pull requests under control across their 180+ repositories: a Botman-based bot that assesses the last updated date and closes after a given amount of time.

At Spatie we have over 180 public repositories. Some of our packages have become quite popular. We're very grateful that many of our users open up issues and PRs to ask questions, notify us of problems and try to solve those problems, ...

Most of these issues and PRs are handled by our team. But sometimes those issues and PRs become stale. [...] That's why we created a bot that can automatically close stale issues and PRs. Here's [an example] of the bot in action.

He then shares the code they currently use for the bot, making use of the BotMan package as a base and the knp-labs/github-api package for the GitHub interaction. The code includes the GitHub service provider, a client class, an Issue object and the command that's run to find and close out the stale pull requests and issues.

tagged: stale pullrequest issue github automatically close bot botman tutorial

Link: https://murze.be/automatically-close-stale-issues-and-pull-requests


Trending Topics: