|Hi there PHP fans.
Are you are looking to recruit new staff?
Looking for a high standard of applicant?
Would you like to reach out to the PHP Community to fill your position?
Where better to advertise your job openings then on phpweekly.com?
Do you want to entice new talent, or new business, to your business?
How about sponsoring an edition of phpweekly.com? A stand out advert at the top of our page will catch the eyes of our subscribers.
With our subscriber list nudging 22,000, you could just find exactly who, or what, you are looking for right here.
For more information drop me a line at [email protected].
Have a great weekend,
Katie and Ade
Please help us by clicking to our sponsor:
Protect your PHP Code
Why not try SourceGuardian 11. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.
Layers, Ports & Adapters - Part 3, Ports & Adapters
In the previous article we discussed a sensible layer system, consisting of three layers: domain, application, infrastructure. A port is an abstract thing, it will not have any representation in the code base. For each of these abstract ports we need some code to make the connection really work. We need code for dealing with HTTP messages to allow users to talk to our application through the web.
Microservices for Lunch
You are a software developer, and your are on lunch break. Today, you decide not to go for lunch with the team, because you have some shopping to do. You have been invited by a special person for the next day, and you want to bring along a nice gift. You enter your favourite shop, and manage to find a nice little something that will be the perfect gift for your host. You line up at the cashier. Luckily, you are at the front of the line very soon.
Duolingo for PHP – How Much PHP Can Apps like Mimo Teach
Mimo is an app which claims to teach coding “on the go”. As a long time Duolingo user, I could relate to this approach – particularly as I was becoming increasingly interested in achieving some degree of basic Swift literacy in the coming weeks. In an attempt to objectively assess the app’s ability to teach people new things, I decided to look at what it’s offering and see if it’s something I can recommend to people just starting out with a new language.
SEO Guide for Blogs, Business and eCommerce Websites in 2017
Whether you’re running a blog, a business website or an online shop, in 2017 you can’t do without a solid SEO strategy. How do you bring more traffic to your website? 80% of web traffic is generated via search engines, so it’s about time you thought of investing into a solid SEO campaign.
The “Micro” Framework As “User Interface” Framework
“Micro” frameworks are better described as “user interface” frameworks; perhaps there should be corollary “infrastructure” frameworks; consider using two frameworks and/or two containers, one for the user interface and a separate one for the core application.
Tutorials and Talks
Pagination in CodeIgniter: The Complete Guide
The benefit of using any full-stack web application framework is that you don't have to worry about the common tasks, like input handling, form validation and the like, as the framework already provides wrappers for those features. Thus, it allows you to concentrate on the business logic of the application rather than reinventing the wheel over and over again. Today, we're going to explore an important library in the CodeIgniter framework - the pagination library.
Guru: The PHP Path To Victory, Part 2
Part 1 of this article discussed the path a PHP request takes on its way to your backend RPG program through the magic of an external SQL stored procedure. Part 2 will give you the confidence to troubleshoot those times when something unexpected occurs in this PHP environment.
Custom Disks For Your Laravel Users
In one of my side projects, a tool that I’m developing for myself, I let users retrieve files from a custom file-system. Laravel provides a nice integration of the Flysystem library from The PHP League. With Laravel, you need to configure your file-system from config/filesystems.php. Sure enough, this works if you want to configure the disks for your application. What if you want to provide the user the ability to access his files? It’s a matter of League\Flysystem\Filesystem and of an adapter.
Application Logic Done Right
How to organise a clean, testable and reusable application logic.
Precision Through Imprecision: Improving Time Objects
When creating value objects representing time, I recommend choosing how finegrained the time should be with your domain experts and round it off to that precision in the value object.
Single Sign On—You’re Probably Doing It Wrong
Requiring users to log in individually to all the websites they need for their work is more than merely annoying: It wastes a lot of time and turns maintaining log-in credentials and permissions into a nightmare for the administrative staff. Let’s see if we can fix that with a single sign-on service.
Closures, Anonymous Classes and an Alternative Approach to Test Mocking (Part 2)
The last time I posted here, I was writing about Anonymous Functions and how they can be bound to any object (or class) to execute as though they are a method within the scope of that class (Closure Binding as an alternative to “use” variables); and in the first article in this series, I looked at using a Closure to access private and protected properties of an object.
Behind-the-Scenes: How We’re Automating Acceptance Testing
Have you ever had the joy of carrying out acceptance tests? For our team at Delicious Brains, testing our releases, in the past, has been one of the most dreaded tasks on the to-do list. We hold our plugins to a high quality standard so it’s a must, but manual tests are brain-numbingly tedious and can take hours of expensive developer time. Recently, we decided it was high-time to fix that.
Magento 2 Performance on Docker (a preliminary test)
Magento 2 on Docker on Mac is a horrible experience and it is specifically because of file system performance. But on Linux I’ve had good experiences. However, those experiences were with Magento 1 and not Magento 2. Magento 2 relies on the file system more than Magento 1 so it is quite plausible that Magento 2 is slow as molasses on Docker. So I decided to do a quick load test on a Linux system I have here (have I mentioned that I offer a load testing service for Magento?) and see if the results are worth pursuing further.
Writing Clean Code
Three simple practices to help write clean code and improve the readability of a codebase.
New Date/Time Support in MongoDB
In the past few months I have been working on adding time zone support to MongoDBs Aggregation Framework. This support brings in the timelib library that is also used in PHP and HHVM to do time zone calculations.
PHPBot – Can a PHP Bot Help You Look up Documentation Faster?
I came across PHPBot the other day (not to be confused with Botman or Fondbot) – a “chatbot” which helps you look up PHP manual entries and generates example code for them. If you follow me on Twitter, you know I don’t believe in chatbots being chatbots – as someone who’s built some for both commercial purposes and personal ones, and as someone who was around in the age of IRC auto-responding scripts, I see chatbots as a little more than a marketing fad designed to impress todays Snapchat generation. However, every now and then one will appear that’s actually useful. Could this be the one? Let’s take a look.
Optimise Eloquent Queries with Eager Loading
Object Relational mapping (ORM) makes working with databases amazingly simple. While defining database relationships in an object-oriented way makes it easy to query related model data, developers might not pay attention to the underlying database calls. A standard database optimisation for an ORM is eager-loading related data. We will set up some example relationships and then walk through how queries change with and without eager loading.
How to Implement a Year 2038 Problem Fix in PHP Applications that Are Using Unix Timestamps
Many PHP applications use Unix timestamps to make calculations with the dates and times of events. However, using Unix timestamps for these purposes will lead to a very big problem well known as the bug of year 2038. Read this article to know more about the bug of year 2038 and how fix the issue with an alternative way to manipulate times and dates.
How to Pass Data From Controller to View in CodeIgniter
A view is webpage that displays all the elements of the UI. In many cases, view is often a fragment of page (such as header, footer, widget areas and sidebars). In many cases, views can be embedded in other views. One important aspect of views is that views could not be called directly. You need to load the views through a controller. In this tutorial, I will highlight the simple, and yet very important process of how to pass data in CodeIgniter.
Up and Running with Symfony 3
User handling is a fundamental part of a ton of web projects. This post will walk through how to get setup using the Symfony 3 framework and the Friends of Symfony bundle so that your project can allow users to register, login and out, and view and edit their User profile. The steps here will serve as a great starting point for your next web project.
|News and Announcements
PHP OCI8 2.1.7 for Oracle Database is now on PECL
This version of OCI8 will also be bundled in PHP 7.0.23 and PHP 7.1.9 (and is already in PHP 7.2.0beta2). Older PHP 7 installations can be brought up to date using the PECL bundle.
PHP Developer Day - September 22nd 2017 Dresden Germany
We - the PHP USERGROUP DRESDEN e.V. - are proud to present the PHP Developer Day for the 3rd time in a row. Just like the past two events in 2015 and 2016, top talks, free exchange of knowledge, community and fun stand in the foreground of the event again. Tickets are on sale now.
PHPCE - November 3rd-5th 2017 Rawa Mazowiecka, Poland
phpCE is the first edition of a community conference for PHP programmers and enthusiasts. The meeting was established by merging two nation-wide events: PHPCon Poland and Brno PHP Conference. Tickets are on sale now.
PHP Benelux - 26-27th January 2018, Antwerp
We are excited to announce the date for PHPBenelux 2018. Like every year we will have a theme, for this year all activities will be sports themed; Relax while watching some games, join the fun or just be a good sport. The conference is spread over 2 days: Friday afternoon (after the tutorials) and Saturday. Tutorials as well as the conference itself are spread over several parallel tracks. On Friday and Saturday evening, we’re having the conference social. This will include drinks and all the cool side activities. The Call for Papers is now open.
Sunshine PHP Conference - 8-10th February 2018, Miami
The SunshinePHP Developer Conference is hosted by the South Florida PHP community (SoFloPHP) in Miami, Florida from February 8th - 10th, 2018, and you're invited! We'll host some of the best speakers, awesome talk topics, latest technologies, and up to date news in PHP. And don't forget our Hack-a-thon and Uncon'ference, as well as a great hallway track! The conference has something for every level of PHP developer. We start on February 8th with a full day of 8 PHP related tutorials and workshops that are each 3 hours of in-depth information. Next we follow that with 2 days on February 9th and 10th containing 5 keynotes and 40 PHP talks over 4 tracks. The Call for Papers is now open.
Midwest PHP Conference - 9-10th March 2018, Minnesota
Midwest PHP is the FUN conference. This is our fifth annual conference, and each year it gets better and better. Our goal is to share best practices, ideas, and techniques about building state-of-the-art software applications. The Call for Papers is now open.
Changelog Podcast #260: You Are Not Google/Amazon/LinkedIn
If you find yourself chasing shiny objects and squirrels all the time, you should 💯 listen to this episode featuring Ozan Onay (President of Bradfield School of Computer Science) where we discuss his recent blog post entitled You Are Not Google, which was the #1 link in Changelog Weekly - Issue #159. This show is full of wisdom and advice for every developer out there.
Laravel News Podcast LN43: Laracon US 2017 Wrap, Laravel Horizon, and New Versions Galore
Jake and Michael return after a few weeks hiatus to recap Laracon US 2017, the big reveal of Laravel Horizon, and catch up on the latest framework news.
Zend Framework Quick Bites Episode 35 - Zend Expressive Essentials Update
In this episode, I share a progress update on the Zend Expressive Essentials book and course (which is soooo close to completion) and say a little mea culpa (I’m sorry) for not being consistent with the podcast.
PHP Ugly Podcast #68: Trunk Based Outrage
Topics include Open Source Monitisation and how to get connected with the PHP community.
Full Stack Radio Podcast Episode 70: Jeffrey Way - Vue.js Tactics for Server-Side Web Apps
In this episode, Adam is joined by Jeffrey Way of Laracasts to share some tips and tricks for using Vue.js elegantly with traditional server-side web apps.
A Practical Introduction to Snapshot Testing
The basic idea of snapshot testing is that you compare the output of your code against a file that’s written on disk. That file is called a snapshot. If the output of your test matches up with the contents of that snapshot, it succeeds, otherwise, it fails. It’s as simple as that. In this talk we’ll demo how you can add snapshot testing methods to PHPUnit and review a practical example on how to use them.
Finding Untested Code
This is the 5th post in the "Writing tests for PHP source" series by Sammy Kaye Powers. Now that we know how to create tests and debug them when they fail, let's make a useful test that actually covers some untested code.
Microservices For Everyone, by Matthias Noback
Matthias Noback's latest ebook is available now, using the Leanpub self-publishing platform.
Learn How To Set Up Xdebug for PhpStorm and Laravel Valet
I’ve been developing web applications for about 15 years, but somehow Xdebug is still challenging to set up. Follow along and learn how to find Xdebug settings and configure it for local development with PhpStorm.
PHP Serbia Conference 2017
Talks, setup and other media from "PHP Serbia Conference 2017".
Mid-Level & Senior PHP Developers, DealerScience (Boston, MA)
Established Boston, MA startup seeking mid/senior LAMP developers excited to apply modern programming to our SaaS solution! Local preferred but remote considered. Email: [email protected].
Do you have a position that you would like to fill? PHP Weekly is ideal for targeting developers and the cost is only $50/week for an advert. Please let me know if you are interested by emailing me at [email protected]
Interesting Projects, Tools and Libraries
Alice allows you to create a ton of fixtures/fake data for use while developing or testing your project.
CodeLite is an open source, free, cross platform IDE for the C/C++ programming languages which runs on all major platforms.
LdapTools is a feature-rich LDAP library for PHP 5.6+.
A full-featured email creation and transfer class for PHP
Access mailbox using PHP IMAP.
An open-source Object-Relational Mapping (ORM) for PHP 5.5 and up.
The purpose of this library is to explore Functors, Applicative Functors and Monads in OOP PHP, and provide examples of real world use case.
An application development framework for PHP focusing on allowing developers to build enterprise ready applications that are fast, scale well, allow for architectural rethinks late in the project and that maximise the potential for code reuse.
A system for organising, loading and introspecting PHP classes and functions.
Pux is a fast PHP Router, and includes out-of-box controller tools.
Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework.
Bedrock is a modern WordPress stack that helps you get started with the best development tools and project structure.
Please help us by clicking to our sponsor:
How And Why We Simplified The SparkPost PHP Client Library
Introducing the SparkPost PHP 2.0 Library. Check out the changes we’ve made to keep up with the complex areas of our API additions for our PHP client library users.
So, how did you like this issue?