Posts tagged with open source

Some interesting numbers about the PHP GitHub repos in 2017

Marcel Pociot, author of BotMan, used GitHub and Google BigQuery to look up some interesting numbers about the PHP repos in 2017.

It's this time of the year again - the end of the year is coming up fast, so why not step back and take a look at what we, as a PHP community, have achieved this year?

For these statistics, I used the free GitHub Archive data in combination with Google BigQuery, which lets you process 1TB of data per month free of charge.

So let's take a look at some numbers.

http://marcelpociot.de/blog/2017-12-21-a-php-year-in-review

My team is mentioned in the article too. Pretty proud of this!

As you can see, Spatie - a company doing a ton of open source projects - is on this list 16 times. Well done ???? !

Read more

24 Days in December: thoughts of the PHPamily

24 days in december is a site where every day, from start of December until Christmas, a new post by someone in the wide PHP community is published. The blog authors are hand picked by Andreas Heigl who runs the site. Here's an excerpt of the post by Kalle Sommer Nielsen that was published to today.

PHP has a tremendous community behind it, that community consists of you and me, and millions of others that help promote PHP by continuing to develop awesome applications that power some of the biggest websites in the world, but within this community exists a relatively small community that actively develops PHP, such as making it run on your favorite platform or making your favorite extensions compile and work or even keeps the documentation up-to-date. Today I want to dwell into that community, and perhaps giving you flavor enough to contribute back to PHP with code

https://24daysindecember.net/2017/12/11/giving-back-to-php/

Be sure to check out the posts by Morten Bergset, James Titcumb, Juliette Reinders Folmer and all others too.

Read more

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.

A beautiful webapp to fetch dns records

by Freek Van der Herten – 3 minute read

Recently my company Spatie launched https://dnsrecords.io, a beautiful site to quickly lookup dns records. True to form, we also opensourced it, here is the sourcecode on GitHub. If you want to do some dns lookups in your own app, you'll be happy to know that we extracted the dns lookup…

Read more

BetterReflection v2 has been released

The awesome Roave team has recently released v2 of their BetterReflection package. It can do anything PHP's native reflection API can, but without actually autoloading the code.

The operational concept is quite simple, really:
  1. We scan your codebase for files matching the one containing your class. This is fully configurable, but by default we use some ugly autoloader hacks to find the file without wasting disk I/O.
  2. We feed your PHP file to PHP-Parser
  3. We analyse the produced AST and wrap it in a matching Roave\BetterReflection\Reflection* class instance, ready for you to consume it.

Read all about it on Marco Pivetta's blog: https://ocramius.github.io/blog/roave-better-reflection-v2.0/

Read more

What Laravel 5.5 means for our packages

by Freek Van der Herten – 5 minute read

At Spatie we've released a plethora of Laravel packages. Now that Laravel 5.5 has been released most of our packages will get a new (major) version. In this blogpost I'd like to explain how we handle new releases of the framework and what it means for our packages. Preparing for release Laravel has…

Read more

Open-sourcing our guidelines

by Freek Van der Herten – 7 minute read

At Spatie we recently launched a new site: guidelines.spatie.be. It contains articles on how we go about setting things up at Spatie and a collection of styleguides. The source code of the site is available on GitHub. In this blogpost I'd like to share why and how we created our guidelines site. Why…

Read more

A list of podcasts

by Freek Van der Herten – 2 minute read

On his blog Left On The Web, Stefan Koopmanschap lists the podcasts he's listening to. His selection contains both tech and non-tech podcasts.

Read more

Insights into Laravel package design

On the Bugsnag blog, Graham Campbell, wrote a guest post on the basics of creating a Laravel package. If you've ever wanted to create a package, this is a good starting point.

Laravel is a massively influential PHP framework, and its simple but powerful design means that it’s easy to utilize packages in your application. In this blog post we will look at the basics of creating and installing Laravel packages.

https://blog.bugsnag.com/designing-laravel-packages/

Read more

A straightforward Vue component to filter and sort tables

by Freek Van der Herten – 3 minute read

Today we released our newest Vue component called vue-table-component. It aims to be a very easy to use component to make tables filterable and sortable. In this post I'd like to tell you all about it. Why creating yet another table component? Let's first touch upon why we created it. To make lists…

Read more

A Vue component to display tabs

by Freek Van der Herten – 3 minute read

Last week my company released a vue-tabs-component, a quality Vue component to easily display tabs. You can view a demo of the component here. In this post I'd like to tell you all about it. Why we created it If you're just want to know what the component does, skip to the next section. Nearly all…

Read more

A tool for making JavaScript code run faster

Even though I'don't like Facebook as a user, their amazing contributions to open source are something to be very grateful for. Last week they presented their new work in progress: Prepack.

Prepack is a tool that optimizes JavaScript source code: Computations that can be done at compile-time instead of run-time get eliminated. Prepack replaces the global code of a JavaScript bundle with equivalent code that is a simple sequence of assignments. This gets rid of most intermediate computations and object allocations.

https://prepack.io/

It's still in development, so best not use it in production environments yet.

Read more

Building a desktop application with Electron

Electron is a library that enables you to create desktop apps with JavaScript, Html and css. If you're interesting in playing around with this cool technology check out this tutorial by Kristian Poslek.

In this article, I’ll try to guide you through the process of building a simple desktop application and touch on important concepts for building desktop application with JavaScript.

https://medium.com/developers-writing/building-a-desktop-application-with-electron-204203eeb658

Together with Marcel Pociot and the help of Alex Vanderbist I'm currently building my first Electron app. It's a bit too early to share any details about it except that we'll open source it (and it'll be free).

Read more

How I Got From 0 to 1 000 Stars on GitHub in Three Months With My Open Source Side Project

Ondřej Mirtes, author of PHPStan lists some great tips to make a side project succesful.

Most developers have side projects. That's how we try out new things or make something that we miss on the market or in our dev stack. But most side projects end up unfinished and never actually see the light of day. And even if a developer builds up the courage to show his work to the public, he quickly finds out that just publishing a repository doesn't actually bring the masses to his doorstep. ... In this article, I'd like to share with you what I did to make sure that the project doesn't end up in the dustbin of history. I will concentrate on open source software, but the following advice may as well apply to any creative endeavour.

https://medium.com/@ondrejmirtes/how-i-got-from-0-to-1-000-stars-on-github-in-three-months-with-my-open-source-side-project-8ffe4725146#.211n6vihd

Read more

Why I'm frequently absent from open source

James Long gives some solid advice: always keep in mind that there are a lot of things that are more important than coding.

The goal of free open source development is empowerment: everyone can not only use code for free but also contribute to and influence it. This model allows people to teach and learn from each other, improves businesses by sharing work on similar ideas, and has given some people the chance to break out and become well-known leaders.

Unfortunately, in reality open source development is rife with problems and is ultimately unsustainable. Somebody has to pay the cost of maintaining a project.

http://jlongster.com/Why-Frequently-Absent-Open-Source

Read more

Our postcard collection

by Freek Van der Herten – 1 minute read

All our packages are MIT-licensed. But if you use our stuff and want to make us happy, we highly appreciate a postcard from your hometown. This suggestion is mentioned in all readme's of our packages We've been asking for postcards for quite some time now and have built up a nice collection. Today,…

Read more

Why I close PRs

Jeff Geerling, currently working as a technical architect at Aquina, wrote a good post on when and why he closes PRs to the packages he's maintaining. This paragraph resonated with me.

I don't cater to everyone. I usually cater to myself. And for 98% of my OSS projects, I'm actually using them, live, in production (often for dozens or hundreds of projects). So I'm generally happy with them as they are. I will not add something that increases my maintenance burden unless it's very compelling functionality or an obvious bugfix. I can't maintain a system I don't fully understand, so I like keeping things lighter and cutting off edge cases rather than adding technical debt I don't have time to pay off.

http://www.jeffgeerling.com/blog/2016/why-i-close-prs-oss-project-maintainer-notes

Read more

How to contribute to an open-source GitHub project using your own fork

Serial blogger Matt Stauffer wrote a good tutorial on how use forked repos.

I just recently joined a new open source project, and there were a few folks on the team who weren't familiar with how to contribute to an open source project by forking your own copy, so I wrote this up for the docs of that project. I figured I'd also share it here.

If you join a new open source project, it's very likely that you won't get direct access to push commits or branches up to the repository itself. So, instead, you'll fork the repo, make the changes on your version of the repo, and then "pull request" your changes back to the original.

Here are the steps to take.

https://mattstauffer.co/blog/how-to-contribute-to-an-open-source-github-project-using-your-own-fork

Read more

A developer friendly wrapper around Fractal

Fractal is an amazing package to transform data before using it in an API. Unfortunately working with Fractal can be a bit verbose. That's why we created a wrapper called Fractalistic around it, that makes working with Fractal a bit more developer friendly. It's framework agnostic so you can use it in any PHP project.

Using the vanilla Fractal package data can be transformed like this:

use League\Fractal\Manager;
use League\Fractal\Resource\Collection;

$books = [
   ['id'=>1, 'title'=>'Hogfather', 'characters' => [...]], 
   ['id'=>2, 'title'=>'Game Of Kill Everyone', 'characters' => [...]]
];

$manager = new Manager();

$resource = new Collection($books, new BookTransformer());

$manager->parseIncludes('characters');

$manager->createData($resource)->toArray();

Our Fractalistic wrapper package makes that process a tad easier:

Fractal::create()
   ->collection($books)
   ->transformWith(new BookTransformer())
   ->includeCharacters()
   ->toArray();

There's also a very short syntax available to quickly transform data:

Fractal::create($books, new BookTransformer())->toArray();

If you want to use this package inside Laravel, it's recommend to use laravel-fractal instead. That package contains a few more bells and whistles specifically targetted at Laravel users.

To learn all the options Fractalistic has to offer, head over to the readme on GitHub. If you like it, take a look at our previous open source work as well. There's a list of framework agnostic packages we made on our company site.

Read more

A package to fluently generate schema.org markup

by Freek Van der Herten – 2 minute read

Schema.org is a vocabulary of microdata markup that aims to make it easer for search crawlers to understand what's on a webpage. The vocabulary is very extensive: here's the official list of things that can be described with Schema.org. This article on Tutsplus explains schema.org and structured…

Read more

Improving the performance of our PHP based crawler

by Freek Van der Herten – 2 minute read

Today a new major version of our homegrown crawler was released. The crawler is used to power our http-status-check, laravel-sitemap and laravel-link-checker packages. A new major feature is the greatly improved crawling speed. This was accomplished by leveraging multiple concurrent requests. Let's…

Read more