Getting Started with Symfony (part 1)

I’m about to make a change in my career and go back into development. To help me do that I’ve started a course on Udemy for getting up and running with Symfony 4. I figured that if I was going to be working with frameworks, I might as well get used to them.

My choices came down to Symfony or Laravel to start with, simply because those are two of the biggest ones out there. I know Laravel borrows a lot from Symfony, so I resolved to work with Symfony to reduce the overheads on the requests.

Here’s what I found…

Not all namespaces in tutorials are relevant

The tutorial I was using wanted the code to use the BrowserKit Request class to allow use of the request variables ($_POST, $_GET, $_FILES etc.). The class existed within the vendor folder, and PhpStorm said everything was fine. Until it went to run.

Upon running, this would hit the autowire issue every time. Frustrating seeing as it was the first page being generated by Symfony as part of the tutorial. Not a great experience, but easily resolvable. This simply needed:

use Symfony\Component\BrowserKit\Request;

Replacing with:

use Symfony\Component\HttpFoundation\Request;

Actually, that’s not true. I also needed to go into Vagrant and run

composer update

If that wasn’t done, then every request would time out, and I’d be forever presented with

Regular exceptions if ‘composer update’ wasn’t run regularly

I’ve yet to find a way around that, but I’m looking into it alongside how to speed it up out of the box with the tutorial. I can see a lot of hacking being required to get through the tutorial though.

Jenkins disk space usage

I’m working on a project, part time, in my spare time.  As part of that project I have Jenkins for continual building when I publish anything into the master branch in git.  I’ve not done much for a month or so, but logged in to it today to be given a lovely warning that the disk space is nearly full.

Read more

My First Attempt at Open-Source Contribution

I’ve always wanted to contribute to an open source project, so I thought it was time to finally start.  I’ve been investigating different CSS frameworks, and came across Bulma.  I saw the contribute link and figured I’d see what issues there were in Github for it, and there was an issue about some typos.  I figured that was a good place to start; check if any more remained.  I forked and clones the repo to my machine and blasted it through “Inspect Code” option in PhpStorm, but found a different issue to look into, a one not raised currently as an issue, but still as part of the title.sass file.  It was to do with the following on line 14:

Read more

Automating the simple stuff

We all use computers for one thing or another, and in most cases we’ll do the same things on them over and over.  Part of being a developer is realising the things which need doing a lot, and automating them to increase productivity.  Doesn’t matter what it is, there’s generally a way to automate things.

Read more

Encrypting the site

I’ve just moved my site from HTTP over to HTTPS.  It’s not a huge deal for something like this, but it’s something which I’ve really needed to do for a while, and something which is becoming more and more popular.  For most people this won’t mean much, and for this site it doesn’t amke much difference, but given that encrypting web pages is a simple process, there’s no real reason not to be doing it.

Read more

Introducing Charon File Uploader

I’ve wanted to build a useful javascript library for a while, but never found any of the ones out there lacking.  I’ve been working on a new project recently and one of the things I needed to do for that was be able to upload an image via AJAX, along with the alt-text and other information for the image.  There’s libraries out there for uploading files and images, but I’ve not found one which lets you add other information to the post easily.  That’s when I figured I could build it myself.  Charon was born!

Read more

Database Connection Mis-information

Whilst on my usual rounds on StackOverflow to help spred useful knowledge of computing and web development I came across the following comments on a thread:

Um… mysql doesn’t connect over http… nor to a directory

Neither should it be an url. Usually it’s localhost or the IP address of the remote mysql server

Read more

Check, test and check again

I noticed today as I was about to start a different article that my website was looking a bit, well, funny.  The layout was wrong, some of the colours were off, the whole thing was a mess.  Don’t get me wrong, it’s not at the forefront of design, and won’t win any beauty awards, but it looked awful!

Read more

Joomla 3.5.1 released

Joomla has announced the release of their open source CMS system, version v3.5.1.  The latest version fixes the following issues which were found in v3.5:

Joomla 3.5 Released

A little over a week ago, the Joomla! Project anounced the release of Joomla 3.5.  The major advantage this has is that the widely used CMS has PHP7 support, allowing webmasters to upgrade their server installations and take advantage of the performance improvements that PHP7 brings.

The new version comes with an e-mail update plugin to allow site admins to know when there are patches and bug fixes; hopefully they will then patch their sites to the benefit of everyone.

A run down of the listed major changes are:

Read more