Skip to content

Week 3 – Composing the Merge

Demonstrated Skills:
– Composer
– Documentation Writing (Trail and Error…)
– GitHub

I Think that Monday morning will become the regular slot for the weekly blog post. Once again, Friday afternoon consisted of testing, not blogging.

So week 3 was another week of choices, and I hope the last for a while. Same procedure as before, look at the Kanban board, pick a task and try to fix/implement it. There was a major change which I assisted with; cake 2.4, which we were using before, was ancient. Oli Bills, a fellow temporary colleague, installed composer on choices. Composer is a dependency manager for PHP. It makes keeping a system up to date easier and should mitigate the issues PHPUnit had with incompatibility. At least that is idea. Oli did most of the legwork behind composer, I acted as his test subject; let me elaborate. He needed to write some instructions so the rest of the team could install composer on their machines. He told me to install it on my machine using his initial instructions, he amended them every time something blew up in my face. After a long afternoon we got composer to work on my machine and Oli’s instructions were much more concise. This week, as in the week starting today not the week I am currently writing about, is Oli’s last week in the office. So the instructions are quite important.

I spent most of Tuesday making sure that the rest of the source files were in the right directories. As well as installing composer Oli reorganised the project files so that the cake framework was in a ‘src’ directory. On the surface, the reorganisation appeared to work, but when I started a new task this was not the case. I noticed that none of the plugins worked anymore. There was a single line in the cake bootstrap which still referred to the old plugins directory. This was fun to find. I added the ‘_APPDIR_’ constant so that any future directory changes should just work.

After fixing plugins, I modified the choice priority plugin. When a user deletes an existing choice, the priorities remained in a separate table. This broke random allocation for the user’s choices. I updated the priorities controller to include a function which deleted the choice priority. It also had to reorganise the priorities so they were sequential again. I ensured that the choice controller invoked the new function when a user deleted a choice. This function appeared to work, but appearing to work is not enough. Thus I spent most of Thursday writing PHPUnit tests. I’m becoming quite acquainted to PHPUnit.

Friday was merge day. There were about five branches which needed merging into the composer branch. But by then end of the day all branches converged into the up-to-date master branch, how satisfying.

I am scheduled to be spending week four doing something called “DocPot Migration”. I’m not too sure what a “DocPot” is and why it would need to fly south for winter. Perhaps I should investigate.

Posted in Apache, Best Practice, Database, Javascript, PHP, Programming.

Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.