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

CoderWall:
The Laravel Admin Panel That You Need
Aug 27, 2018 @ 09:21:04

On the CoderWall site they've posted a tutorial that's a sort of reaction to the recent Laravel Nova administration dashboard release. In it they point out another project, the Laravel Admin Panel (LAP) that handles a lot of the same kind of functionality.

I have been working on this product on opensource for about 8 months now, and the project has become quite successful. People are actually using it and we are making our goal to make it more developer friendly. [...] According to my experience with people who have used our admin panel and its feature to create a module instantly, they are aloof of the details beneath that architecture and are constantly in need of help if anything goes wrong.

If new developers are made to use some super smart software which just creates everything for them, they are just not very aware of the happenings and end up not knowing anything of how the project works.

The post introduces the project and what kind of functionality it provides including:

  • user/role/permissions management
  • "page" management
  • menu management

...and their "star of the show", the Module Boilerplate Generator that allows for the quick and easy generation of all code required to add a new module to the application (models, controllers, request handling, views, migrations, etc). You can find more information on the GitHub repository for the project.

tagged: laravel administration panel introduction lap project opensource

Link: https://www.codewall.co.uk/the-laravel-admin-panel-that-you-need/

Symfony Blog:
Creating and updating Symfony projects much faster
Jul 13, 2018 @ 09:58:58

On the Symfony blog there's a post covering some of the recent improvements in the framework that can help to make creating and updating Symfony projects faster via some recent changes speeding up the Composer installation.

A few years ago, we introduced the Symfony Installer as the fastest way to create new Symfony projects. While Composer took up to several minutes to create a new project, Symfony Installer did the same in less than ten seconds.

The trick was that the installer downloaded a ZIP archive with all the dependencies required by the specific Symfony version you were installing, so it was not necessary that Composer resolved the project dependencies.

However, with the release of Symfony 4 we deprecated the Symfony Installer in favor of Composer, because we wanted to use standard development tools as much as possible. Sadly this made creating new Symfony projects slower and, in some cases, it triggered "out of memory" exceptions while Composer was resolving the dependencies.

The post talks about the changes they made to the Composer installation process, mentioning the two major changes: including a composer.lock to prevent version resolution and removal of all legacy Composer tags. They also share some benchmarks for the installation both before and after the changes showing a jump of at least ten seconds post-changes.

tagged: symfony project speed install composer lock tags framework

Link: https://symfony.com/blog/creating-and-updating-symfony-projects-much-faster

Tomas Votruba:
6 Reasons Why Doctrine is Alive and Kicking
Jul 10, 2018 @ 09:43:51

Tomas Vortuba has a new post to his site sharing a few reasons why he thinks that Doctrine isn't dead and is still "alive and kicking" with things still changing in the project.

Almost 1,5 year ago I wrote Why is Doctrine Dying. I didn't use dead, because it's is just state of time being. Open-source projects - like people - tend to find themselves on the top, being stuck or struggling with the right path from time to time. It's a completely normal process of evolution.

I don't know if that post helped it, but since then many things changed for better in Doctrine project. Saying that this post deprecates my old view and celebrate changes.

May this be an inspiration for open-source projects that find themselves stuck and the maintainers that find themselves unhappy.

His list includes reasons like:

  • Bump PHP 7.1 Without Waiting for Major Release
  • Cut the Weight to Save Yourself
  • From Talks and Post Evangelization to Code Improvements
  • New Release as a Baseline

For each point, he provides a little clarification and background from commits to the code and statistics about the community around the project.

tagged: doctrine project orm community alive reasons list

Link: https://www.tomasvotruba.cz/blog/2018/07/09/6-reasons-why-doctrine-is-alive-and-kicking/

Joe Watkins:
Preface to idbg
Jun 13, 2018 @ 11:54:35

Joe Watkins has a post on his site sharing a project he has been working on to create a debugger for PHP applications that can be installed easily and understood by those already having knowledge of PHP.

We already have several options for debugging code within the PHP ecosystem. XDebug is extremely mature software, and phpdbg has been slowly gaining traction also, if for no other reason than it's very fast to collect code coverage compared to XDebug.

[...] Debugging is a necessary part of writing code; If you disagree with this statement, then I don't know what you are talking about. [...] Using a debugger is like having an army of nano bots at your disposal, each one trained exquisitely in a top nano-bot-training-camp, they live to kill cockroaches, some of them also have mean looking tattoos, chew tobacco, and spit on the ground at the start of every sentence ...

He goes on to talk about why he made the choice to write the debugger with a PHP interface. He then gets into some of the specifics of debugging needs and links to the krakjoe/inspector repository for the tool. The README has more information about the interface and functionality than the blog post does, so if you're interested to read more, head over there.

tagged: debugger idbg introduction opcode library project

Link: http://blog.krakjoe.ninja/2018/06/preface-to-idbg.html

Sebastian De Deyne:
A good issue
May 04, 2018 @ 10: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

Junior Grossi:
Open-source is about sharing and giving back. Think about that.
Mar 26, 2018 @ 09:25:48

In a new post to his site Junior Grossi shares some of his thoughts about Open Source and how it's less about "free software" and more about sharing and giving back.

Maintaining an open source project – even a small one – is not an easy task. The open source ecosystem is about sharing and contributing, about giving and receiving. You scratch my back and I will scratch yours.

He suggests that working in Open Source is less about the actual software that's being written as it is a lifestyle. For him, the goal is to make someone else's life better by working on something you're sharing (instead of working on something commercial). He includes a quote from Fabien Potencier (of Symfony) about Open Source developers being exploited for their free software and how, despite the gift of time and work spent on the code, some people don't appreciate the work and just complain.

Instead of complaining about features or bugfixes, do it yourself, and show your gratitude for people that spent their free time working on something to help your life. They could be with their family but no, they were doing open-source. And you should thank them for that.

He finishes with a few thoughts about giving back to the projects you use and enjoy. It doesn't always have to be about code too - you can submit bugs, contribute to documentation or even just write up a tutorial to share your own knowledge of using the package.

tagged: opensource sharing project free software code opinion

Link: https://blog.jgrossi.com/2018/open-source-is-about-sharing-and-giving-back-think-about-that/

Exakat Blog:
Largest PHP applications (2018)
Mar 19, 2018 @ 11:35:46

On the Exakat blog there's a new post that includes the details of the largest PHP applications currently available (and popular) based on their own scanning of Open Source Projects.

When testing the exakat static analysis engine, I need to run it on real code. Open Source projects are a real blessing there, since they come in different shapes and stripes. [...] Nowadays, code bases tends to be smaller, compared to more ancient applications. Components are the norm, and they impact both the development of the application, and its extension.

[...] For this survey, we collected 1885 Open Source applications, and counted only their tokens. Tokens are PHP atomic elements, that are needed to understand and run code. Comments, white spaces and delimiters were not counted, leaving only the useful tokens. Then, the more the larger is the application.

The post lists out the top 100 largest PHP applications (by tokens, not by line) including:

  • Magento2 (#6)
  • Drupal (#12)
  • Yii (#21)
  • Joomla (#36)
  • Symfony (#52)
  • Apigility (#80)

The list comes with the count of tokens and is an update of their 2016 largest PHP applications post.

tagged: large application token size project opensource scanner

Link: https://www.exakat.io/largest-php-applications-2018/

Matthew Setter:
First Experiences with Symfony 4 & the Symfony Community
Mar 12, 2018 @ 12:45:14

Matthew Setter has a new post to his site sharing some of his experiences and interactions with Symfony 4 and it's community as someone new to the framework and community.

Recently, I decided to learn the basics of the Symfony (4) framework, so that I could better understand one of my client's applications, and provide better support to it. I never expected to use such a well-rounded framework. Nor did I expect to encounter such an engaged and supportive community. Here's the story.

He starts off describing some of his reasoning behind looking into Symfony, including the fact that a project at his work makes use of the framework. He then talks about getting started with v4 of the framework by reading the documentation, creating a core application and overcoming some of the common first-timer issues. He covers the use of templates, routing with annotations and using the bin/console to handle code generation. The post ends with some of his experiences with the community and their interaction with a tweet of his showing his appreciation for the framework.

tagged: symfony symfony4 experience community project introduction

Link: https://www.matthewsetter.com/first-experience-with-symfony/

Alejandro Celaya:
Mutation testing with infection in big PHP projects
Feb 19, 2018 @ 09:39:58

Alejandro Celaya has a post on his site that shows how to use a less well-known testing tool - mutation testing - to test for variations on the "good" and "bad" data paths. In this article he makes use of the infection library that replaced the previously active Humbug library.

There's no doubt that having tests in a project allows you to find potential bugs earlier and more easily.

Lots of OSS projects require a minimum code coverage in order to accept new pull requests from contributors, and proprietary projects also tend to have some sort of continuous integration workflow which requires certain metrics to be fulfilled in order to get builds passing. However, the code coverage can lead to a false sense of security, which makes you think that if a certain class has a 100% code coverage, it is also 100% bug-free.

This is not always true since you could be calling a method and yet not being properly testing its output or its real behavior. The code coverage will mark it as covered, but you might introduce a bug and still have a green test. This is where mutation testing comes in.

He starts by briefly introducing the concepts of mutation testing and showing how to get the infection library installed and configured. He then gives a guide on running the tool and some of the command line options that can be used to configure threading, having it only run on covered code and setting the log verbosity. He then offers some advice on troubleshooting the use of the tool and how phpdbg is used to generate reports.

tagged: unittest mutation testing infection tutorial project

Link: https://blog.alejandrocelaya.com/2018/02/17/mutation-testing-with-infection-in-big-php-projects/

Symfony Blog:
New in Symfony: Reproducible builds
Feb 14, 2018 @ 11:16:52

On the Symfony project blog there's an announcement posted about changes in the framework to allow for reproducible builds.

Reproducible builds are a set of software development practices that create "a verifiable path from human readable source code to the binary code used by computers". In other words, if you don't change the source code, the compilation result should always be exactly the same.

Explained more simply in the case of Symfony: if you build the container and warm up the cache of the same unchanged application multiple times, the result should always be the same.

The post talks about the idea of "reproducible builds" and how they should be "completely deterministic" where the end result is always the same (no random data, no auto-generates date/times). A few changes were required to the framework to ensure these builds were possible. The post lists out these updates and links to the bug reports for each.

tagged: symfony project framework reproducible builds

Link: http://symfony.com/blog/new-in-symfony-reproducible-builds