Skip to content

Commit

Permalink
chore: merge pull request #247 from dvsa/internal-migration
Browse files Browse the repository at this point in the history
chore: migrate olcs-internal to vol-app monorepo
  • Loading branch information
jerotire authored Aug 16, 2024
2 parents eec81ab + 7fa9343 commit c286449
Show file tree
Hide file tree
Showing 2,039 changed files with 173,647 additions and 3 deletions.
17 changes: 17 additions & 0 deletions app/internal/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_size = 4
47 changes: 47 additions & 0 deletions app/internal/.github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
versioning-strategy: "increase-if-necessary"
schedule:
interval: "weekly"
groups:
composer-dependencies:
patterns:
- "*"

- package-ecosystem: "composer"
directory: "/vendor-bin/phpcs"
schedule:
interval: "weekly"
groups:
composer-dependencies:
patterns:
- "*"

- package-ecosystem: "composer"
directory: "/vendor-bin/phpstan"
schedule:
interval: "weekly"
groups:
composer-dependencies:
patterns:
- "*"

- package-ecosystem: "composer"
directory: "/vendor-bin/psalm"
schedule:
interval: "weekly"
groups:
composer-dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-action-dependencies:
patterns:
- "*"
24 changes: 24 additions & 0 deletions app/internal/.github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CD

on:
push:
branches:
- main

jobs:
release-please:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
sha: ${{ steps.release.outputs.sha }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: php
package-name: olcs-internal
23 changes: 23 additions & 0 deletions app/internal/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
pull_request:
schedule:
- cron: '0 0 * * 1'

jobs:
security:
uses: dvsa/.github/.github/workflows/php-security.yml@main
secrets:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

static-analysis:
uses: ./.github/workflows/static-analysis.yaml
with:
php-version: '8.2'

tests:
uses: dvsa/.github/.github/workflows/php-tests.yml@main
with:
php-versions: "[\"8.2\"]"
fail-fast: false
83 changes: 83 additions & 0 deletions app/internal/.github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Static analysis

on:
workflow_call:
inputs:
php-version:
required: false
type: string
default: 'latest'
composer-version:
required: false
type: string
default: 'v2'

jobs:
phpstan:

name: PHPStan - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: phpstan, composer:${{ inputs.composer-version }}

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute PHPStan
run: phpstan analyze --no-progress

php-codesniffer:

name: PHP-CodeSniffer - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
tools: php-cs-fixer, phpcs, composer:${{ inputs.composer-version }}

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute PHP CodeSniffer
run: phpcs -q

psalm:

name: Psalm - ${{ inputs.php-version }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
coverage: none
extensions: mbstring, intl, redis-phpredis/[email protected]
tools: vimeo/psalm, composer:${{ inputs.composer-version }}
env:
REDIS_CONFIGURE_OPTS: --enable-redis-igbinary

- name: Install Composer dependancies
run: composer install --no-progress --no-interaction

- name: Execute Psalm
run: psalm --no-progress --output-format=github --root=${GITHUB_WORKSPACE}
32 changes: 29 additions & 3 deletions app/internal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
*
!.gitignore
# Trigger CD - 08-08-2024 13:55.
nbproject
._*
.buildpath
.DS_Store
.idea
.project
.settings
composer.phar
vendor/
test/coverage-report
config/autoload/local.php
.sublime-project
.sass-cache/
public/static
*.sw?
node_modules
/.vscode
test/coverage/
.scannerwork/
config/development.config.php
vendor-bin/**/composer.lock
.phpunit.result.cache

# Non-dist files for the static analysis.
# This allows developers to set a different (more strict) static analysis locally.
phpcs.xml
phpstan.neon
phpunit.xml
psalm.xml
26 changes: 26 additions & 0 deletions app/internal/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"maxerr": 100,
"strict": true,
"trailing": true,
"undef": true,
"unused": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"noempty": true,
"nonew": true,
"quotmark": true,
"browser": true,
"globals": {
"describe": true,
"before": true,
"beforeEach": true,
"afterEach": true,
"it": true,
"expect": true,
"$": true,
"OLCS": true,
"sinon": true
}
}
10 changes: 10 additions & 0 deletions app/internal/.phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace PHPSTORM_META {
override(
\Olcs\Controller\AbstractInternalController::getForm(0),
map([
'' => '\Common\Form\Form'
])
);
}
1 change: 1 addition & 0 deletions app/internal/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The MIT License (MIT)Copyright (c) 2016 HM Government (Driver and Vehicle Standards Agency)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Expand Down
98 changes: 98 additions & 0 deletions app/internal/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"name": "olcs/olcs-internal",
"description": "OLCS Internal Web Site",
"require": {
"php": "~8.2.0",
"ext-redis": "*",
"dvsa/laminas-config-cloud-parameters": "^0.2.0",
"laminas/laminas-authentication": "^2.5",
"laminas/laminas-cache": "^3.0",
"laminas/laminas-cache-storage-adapter-redis": "^2.0",
"laminas/laminas-code": "^4.0",
"laminas/laminas-escaper": "^2.5",
"laminas/laminas-eventmanager": "^3.0",
"laminas/laminas-filter": "^2.5",
"laminas/laminas-form": "^3.0",
"laminas/laminas-http": "^2.5",
"laminas/laminas-i18n": "^2.5",
"laminas/laminas-inputfilter": "^2.5",
"laminas/laminas-json": "^3.0",
"laminas/laminas-mvc": "^3.0",
"laminas/laminas-mvc-i18n": "^1",
"laminas/laminas-mvc-plugin-flashmessenger": "^1",
"laminas/laminas-mvc-plugin-prg": "^1",
"laminas/laminas-navigation": "^2.10",
"laminas/laminas-servicemanager": "^3.3",
"laminas/laminas-session": "^2.5",
"laminas/laminas-stdlib": "^3.0",
"laminas/laminas-validator": "^2.5",
"laminas/laminas-view": "^2.5",
"lm-commons/lmc-rbac-mvc": "^3.0",
"firebase/php-jwt": "^6.0",
"olcs/olcs-auth": "^8.0",
"olcs/olcs-common": "^7.6.0",
"olcs/olcs-logging": "^7.2",
"olcs/olcs-transfer": "^7.4.0",
"olcs/olcs-utils": "^6.0.0",
"saeven/zf3-purifier": "^1.1",
"doctrine/doctrine-module": "^5",
"laminas/laminas-serializer": "^2.5",
"psr/container": "^1.1|^2",
"aws/aws-sdk-php": "^3.300"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^4.0",
"laminas/laminas-developer-tools": "*",
"mockery/mockery": "^1.6",
"phpunit/phpunit": "^9.6",
"san/san-session-toolbar": "*",
"bamarni/composer-bin-plugin": "^1.8"
},
"autoload": {
"psr-4": {
"Olcs\\": "module/Olcs/src",
"Admin\\": "module/Admin/src"
}
},
"autoload-dev": {
"psr-4": {
"Dvsa\\OlcsTest\\": "./test",
"OlcsTest\\": "./test/Olcs/src",
"AdminTest\\": "./test/Admin/src",
"CommonTest\\": "vendor/olcs/olcs-common/test/Common/src/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"bin": "echo 'bin not installed'",
"post-install-cmd": [
"@composer bin all install"
],
"test": "phpunit",
"phpcs": "phpcs",
"psalm": "psalm",
"phpstan": "phpstan",
"all": [
"@test",
"@phpcs",
"@psalm",
"@phpstan"
]
},
"extra" : {
"bamarni-bin": {
"bin-links": true,
"forward-command": true
}
},
"config": {
"allow-plugins": {
"laminas/laminas-dependency-plugin": true,
"bamarni/composer-bin-plugin": true
},
"platform": {
"ext-redis": "4.3"
}
}
}
Loading

0 comments on commit c286449

Please sign in to comment.