# Project plan — premiership2020

Evidence date: 2026-10-06.

Source repository: `git@bitbucket.org:overdrive/premiership2020.git`.

Default branch `master` at `18849f7` (2020-08-05, commit message "no message"). Deploy branches `qa` (`1d2ddbc`, 2020-08-05, "Update favicon") and `prod` (`1dfc6d7`, 2020-08-05, "Merge branch 'qa' into prod") are described under Branch reality.

This plan describes what the repository contains. It does not decide what the product should become.

There is no README, project plan, or requirements document in the source repository, and there was no prior `silicon_ark/premiership2020/` set. Statements below are recovered from code, views, deployment files, and Git history. Provenance is labelled.

A sibling set already exists at `silicon_ark/psl2020/`. That set documents `overdrive/psl2020` (master `007bc5a`). This repository shares history through that commit and then continues. `psl2020` is not the source of truth for premiership2020.

## Product

**PSL Premiership (2020) — Accreditation Portal**, on `master`. The HTML title in `application/layouts/default.phtml` is "PSL Premiership (2020) - Accreditation Portal". The footer is "© PSL Premiership". The application is a public Zend Framework 1 site where a person applies for event accreditation, receives a reference number, and can later sign in with that reference and their email to view or edit the application.

Provenance: **Implemented** (layout title and footer, wizard in `application/modules/default/views/scripts/index/index.phtml`, login in `login.phtml`).

On `qa` and `prod` the same strings say "PSL Premiership League (2020)" and "© PSL Premiership League". Mail display name and subject, and the homepage terms paragraph, follow the same split. Which name is the intended public name is **Unknown / Requires Confirmation**.

The homepage and the sign-in page do not take an event code from the URL. Both hard-code accreditation code `5F28FEBB3BF0C` and load that row from the database view `Accreditations_view`. The event name, dates, banner, and terms popup shown on screen come from that row. Provenance: **Implemented** in `IndexController::indexAction` and `ApplicationController::loginAction`. Whether that code is the Premiership 2020 record is **Unknown / Requires Confirmation** — the title is hard-coded, the event content is not.

Mail on `master` is sent as `accreditation@magus.events` with the display name "Accreditation - PSL Premiership" and the subject "PSL Premiership Notification". CodeDeploy copies the tree to `/mnt/data/www/html/magus.events/premiership2020.magus.events/`. Provenance: **Implemented** in `ApplicationController::sendMail` and `appspec.yml`.

## Lineage

Git history includes `5a58f33` ("Merge branch 'master' of https://bitbucket.org/overdrive/sunmet2020"). The first commit is `176220e` (2019-12-12, author `root`, "initial commit of full repository"). Behaviour in this tree matches that accreditation portal, with later naming and code changes on top.

Provenance: **Documented** in commit messages. Silicon Ark has a separate set under `Sunmet2020/`. That set is not the source of truth for this repository.

Identity changes after the shared `007bc5a` tip:

| Commit | Date | What changed |
|---|---|---|
| `8e354fa` | 2020-08-04 | Deploy path from `psl2020.magus.events` to `premier2020.magus.events` |
| `611b0d3` | 2020-08-04 | "Update ID and Name". Title, footer, mail identity, and homepage terms from "PSL Operations" to "PSL Premiership". Hard-coded code from `5F27014B26D5F` to `5F28FEBB3BF0C` |
| `0ff663c` | 2020-08-05 | Deploy path from `premier2020.magus.events` to `premiership2020.magus.events` |

Earlier, `76d2dcc` (2020-08-04, "Added psl.magus.events. Changed ID and Names") had set the code to `5F27014B26D5F` and the name to PSL Operations. That commit's message names the host `psl.magus.events`. It is an ancestor, not the current identity of this repository.

## Branch reality

| Branch | Tip | Date | What differs from `master` |
|---|---|---|---|
| `master` (default, `origin/HEAD`) | `18849f7` | 2020-08-05 | Inspected tree. Title "PSL Premiership (2020)". Database host in `application.ini.bak` is `db.footprintapp.net`. Deploy path `premiership2020.magus.events` |
| `qa` | `1d2ddbc` | 2020-08-05 | "Update favicon". Title, footer, mail identity, and homepage terms say "PSL Premiership League". `application.ini.bak` host is `qadb.footprintapp.net`. Favicon binaries differ. Bitbucket Pipelines deploys this branch |
| `prod` | `1dfc6d7` | 2020-08-05 | "Merge branch 'qa' into prod". Naming and favicon match `qa`. Database host matches `master` (`db.footprintapp.net`). Bitbucket Pipelines deploys this branch |

`git diff origin/master origin/qa` changes six paths: `application.ini.bak` (host only), `default.phtml`, `ApplicationController.php` (mail display name and subject), `index/index.phtml` (terms paragraph), and the two favicon binaries. `origin/prod` matches that set except the database host. Product behaviour otherwise matches.

The pipeline in `bitbucket-pipelines.yml` runs only for branches `qa` and `prod`. It does not run for `master`.

**Discrepancy:** `master` is the default branch and still says "PSL Premiership". The branches the pipeline deploys say "PSL Premiership League". Which tree is on the live host is **Unknown / Requires Confirmation**.

The task-creation scan listed `sonar-project.properties` and `sonarqube_scan.bat` at the repository root. Neither file is tracked on `master`, `qa`, or `prod`. Provenance: **Unknown** — they may have been untracked files on the scan host. `phpinfo.php` is tracked at the root and under `public/`.

## Objectives (inferred from the portal, not from a written plan)

No written objective exists in the repository. The following are **Inferred** from the screens and controllers:

- Let a person apply for accreditation under the Premiership 2020 portal, and optionally to linked events still open.
- Collect identity, organisation, role, a reason, a headshot, and acceptance of the homepage terms, which name PSL Premiership (or PSL Premiership League on `qa`/`prod`) and the Safety of Sports and Recreational Events Act of 2009.
- Email the applicant when the accreditation record has an `EmailNotes` template, and email again when they confirm or cancel attendance.
- Let the applicant return with email plus reference number, see status, and edit the application until it is confirmed, declined, or approved.
- Hand the headshot to the Footprint accreditation service, which also holds the shared MySQL data.

## Scope

### In this repository

- Public application wizard, closed-applications page, attendance confirmation, login, profile edit, and photo update.
- Zend Framework 1.11.10 under `library/Zend`, plus `library/PG` and `library/Other`.
- Zend table models for accreditation tables and views. Controllers in this repo use only a subset (see technical documentation).
- AWS CodeDeploy packaging (`appspec.yml`, `scripts/`, `codedeploy_deploy.py`) and a Bitbucket Pipelines file for `qa` and `prod`.
- Inspinia / Bootstrap / jQuery assets under `public/assets`.

### Not in this repository

- No admin, reviewer, or approver screens. Status values are displayed. Nothing in this repo sets Confirmed or Approved. The applicant's own non-attendance path sets `Status` to 2 (Declined).
- No schema migrations, seed data, or tests.
- No queue workers, cron jobs, or monitoring config.
- `application/configs/application.ini` is gitignored and is not in any branch. Zend loads that path from `public/index.php`. Only `application.ini.bak` is tracked. Whether the server has a real `application.ini` is **Unknown / Requires Confirmation**.

## Architecture (summary)

Browser → Apache (`public/.htaccess` rewrites to `public/index.php`) → Zend Framework 1 module `default` → MySQL database named `teamwizz_SARU` on a Footprint host → outbound HTTPS POST of the photo to `https://www.footprintapp.net/accreditations/application/updateimage`, and SMTP through `smtp.gmail.com`.

Full detail is in `technical-documentation.md`.

## Milestones visible in Git

| When | Commit | What it shows |
|---|---|---|
| 2019-12-12 | `176220e` | Full repository imported |
| 2020-01-13 | `cf9251d` | "Remove Openfield / Roth media from Sunmet media" |
| 2020-08-04 | `76d2dcc` | Ancestor rebrand to PSL Operations and code `5F27014B26D5F` |
| 2020-08-04 | `007bc5a` | Shared tip with `overdrive/psl2020` master |
| 2020-08-04 | `8e354fa` | Deploy path `premier2020.magus.events` |
| 2020-08-04 | `611b0d3` | Name "PSL Premiership" and code `5F28FEBB3BF0C` |
| 2020-08-05 | `0ff663c` | Deploy path `premiership2020.magus.events` |
| 2020-08-05 | `18849f7` | `master` tip |
| 2020-08-05 | `1d2ddbc`, `1dfc6d7` | Favicon and "PSL Premiership League" naming on `qa`, then merge into `prod` |

There is no later commit. Provenance: **Documented** in `git log`. Whether the site was retired after the 2020 season is **Unknown / Requires Confirmation**.

## Dependencies

- PHP with the `mcrypt`, `curl`, and `gd` extensions (`random_id` uses `mcrypt_create_iv`; photos use `curl` and GD). `mcrypt` was removed from PHP core after PHP 7.1. The PHP version on the server is **Unknown / Requires Confirmation**.
- Apache (`httpd`) installed by `scripts/install_dependencies` via `yum`.
- MySQL database `teamwizz_SARU` (see technical documentation). Password is present in `application.ini.bak` and is not copied into Silicon Ark.
- AWS CodeDeploy, S3, and Bitbucket pipeline variables (`QA_*` and `PROD_*`). The variable values are not in the repo.
- Footprint (`footprintapp.net`) for the shared database and the photo endpoint.
- Gmail SMTP for applicant mail. The SMTP password is in `sendMail` and is not copied here.

## Current project status

**Implemented** as a finished public portal. Last commit on `master` is 2020-08-05. Last commits on `qa` and `prod` are the same day. No in-progress feature branch exists. No planned work is written down in the repository.

## Known gaps (do not treat as a roadmap)

- Review and approval are not in this codebase.
- A checkout of any branch does not contain the `application.ini` file Zend requires.
- `apply.phtml` posts to `/accreditations/application/...` and uses an older SA Rugby terms paragraph. The homepage posts to `/application/...` and uses the PSL Premiership paragraph.
- `master` and the deploy branches disagree on the public name ("PSL Premiership" versus "PSL Premiership League").
- Credentials are stored in Git. Rotation status is **Unknown / Requires Confirmation**.
