Posts tagged with legacy

Catching Up Laravel

tighten.com - submitted by Jamison Valenta

If you're running a Laravel application in the 5's, have a legacy application bootstrapped inside Laravel, don't have any tests, or are staring in silent terror at just how long ago your production server's PHP version hit its end-of-life, this post is for you!

Read more [tighten.com]

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

PHP in 2019

stitcher.io

In an awesome post, my colleague Brent explains that PHP is in a very good state nowadays. If you dismissed the language previously, now is a good time to take another look.

PHP managed to evolve quite a bit since the 5.* days. Today I'm addressing the people who are either not programming in PHP anymore, or are stuck in legacy projects.

Read more [stitcher.io]

Combing legacy code string by string

Mattias Noback gives some good tips for refactoring legacy code.

"Combing" legacy code by untangling the strings is a good way to improve it and take back control over it. In existing legacy code, you should stop (re)using existing methods, making them ever more generic. Instead, you create new methods, and copy code from existing ones, allowing you to simplify this copied code and end up with a manageable class.

https://matthiasnoback.nl/2018/04/combing-legacy-code-string-by-string/

Read more

Symfony components in a legacy PHP application

Joeri Verdeyen, a developer at Yappa, explains how you can use some Symfony components in a legacy application.

Symfony Components are a set of decoupled and reusable PHP libraries. They are becoming the standard foundation on which the best PHP applications are built. You can use any of these components in any of your applications independently from the Symfony Framework.

The purpose of this post is to roughly describe how to implement some of the Symfony Components.

http://tech.yappa.be/symfony-components-in-a-legacy-php-application

Alternatively if you want to use Laravel's Illuminate components, check out Matt Stauffer's Torch repository on GitHub.

Read more

How to rescue legacy code through refactoring

Jeroen Moens posted a, very well written, article on paying technical debt in a legacy codebase.

How can you get a legacy codebase under control and bring it to a new level of maturity? This post summarises my advice and lessons learned from years of working on a large legacy web application.
http://marketing.intracto.com/paying-technical-debt-how-to-rescue-legacy-code-through-refactoring

On a sidenote: as an Artisan I always like to sneak in a little Laravel in legacy projects. There are a lot of Illuminate components take can be used independently outside Laravel. If you want to do this too take a look at Matt Stauffer's Torch repo on GitHub.

Read more

Extract till your drop

Watch a very instructive live coding session with Matthias Verraes.

Under the pressure of deadlines and endless change requests, under the weight of years of legacy, code becomes unmaintainable. With the right tools, techniques, and mindset, any codebase can be brought under test, and be refactored towards a better architecture. Let's skip the theory and dive straight into the spaghetti code. In a live coding session, I will demonstrate how you can start refactoring your way out of a mess today.

Read more

Get data from Google Analytics on legacy sites

Nearly all greenfield projects at Spatie are built with Laravel. A few months ago I made laravel-analytics, a package to fetch data from Google Analytics.

Spatie exists for more than ten years so there are quite a few legacy projects as well. In those projects there is also a need to display some analytics data in the admin-section. Recently Google retired some of their older API's. Unfortunately our old solution to fetch GA data stopped working.

To resolve this problem my colleague Sebastian created a framework agnostic version of laravel-analytics that works with PHP 5.3. If you also have a legacy project that needs some data from Analytics, you can install the package via composer.

Read more