Skip to content

Introduction

Why Castor Packages?

A few years ago, I had the privilege of writing loads of Golang for a fintech in London. Although I managed to become very proficient in it, I didn’t quite love the language as much as PHP, and I was never fully comfortable in it due to some of the design flaws. In spite building loads of things in Go, I kept coming back to PHP. Partly because I think PHP is better suited to write domain-rich applications than Go is, and partly because I believe PHP’s feedback loop is unparalleled in modern web development. However, I loved the incredibly well-designed Standard Library that Go had, and it always frustrated me that PHP didn’t have the well crafted out-of-the-box and elegant APIs and packages that are so common in the Go Standard library.

The Castor packages were born out of those frustrations. I wanted to write beautiful PHP, on top of consistent, well-designed APIS and libraries. Much of these packages are direct ports of Go’s Standard Library packages, or are heavily inspired in them, while taking advantage of the nice qualities and expressiveness that a powerful object-oriented language can give you.

I hope you enjoy using these packages as much as I enjoyed designing and implementing them.

Installing

At the time of writing, all Castor Packages are private, hosted in a static composer repository. Although private, they are MIT licensed, which means they are fully Open Source packages.

To use the Castor packages, you must add the Castor PHP repository to your composer.json:

{
"repositories": [{
"type": "composer",
"url": "https://castor-labs.github.io/php-packages"
}]
}

When the packages are feature complete, we will tag v1 and move them to Packagist, so they can be distributed more easily.