Geeki.sh #!/usr/bin/env php echo 'Hello, World!';

Composer Path Repositories

A recent update of Composer brought us the new "path" repository type. I've been developing packages while I use them in other projects, and this is a much better solution than what I had been using: private Gitlab repositories. It was working well, except that every single change I made to a package had to be committed and pushed to Gitlab, and then I had to request a composer update in the project where I was using the package.

This is also very useful for testing local forks or clones of development branches. For example, I've been testing the 2.x version of league/route, which is under the develop branch. After cloning the repo and pulling/checking out the develop branch, I updated my project's composer.json:

{
    ...
    "repositories": [
        {
            "type": "path",
            "url": "../lib/route"
        }
    ],
    "require": {
        "league/route": "*@dev"
    },
    ...
}

So far this has worked perfectly. Composer symlinks the package into my vendor directory, and if I need to make a change in the package I don't have to worry about git commits or composer updates.


Hello, World!

Finally.

I've been intending to use this domain for a techie/geeky/whatever blog for a while. I bounced around from CMS to CMS before trying a few static site generators... Sculpin won me over. What's not to like about writing in Markdown and templating with Twig?

This year I've been working on improving my coding skills. I finally started using Composer. I learned how to use SASS. I even taught myself a little Python.

I'm just amazed at where I am today. I started developing websites as a preteen when I was into roleplaying and pixel art. I probably started learning PHP in around 2007. PHP has been around for 20 years and I've been using it for 8. Here's to many more.


Older Posts
Newer Posts

About the Geek

I am a 25 year old Apple slave, PHP geek, consumer of macaroni and cheese and wine, and collector of everything Stormtrooper and TARDIS. This is the place where I write about everything geekish.