diff --git a/.github/dev_bug_report.md b/.github/dev_bug_report.md new file mode 100755 index 0000000..ef93e56 --- /dev/null +++ b/.github/dev_bug_report.md @@ -0,0 +1,35 @@ +--- +name: Dev Bug Report +about: Create a report to help us improve +title: '' +labels: stat_backlog, type_bug +assignees: '' + +--- + +# Bug Description +A clear and concise description of what the bug is. + +# How to Reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +## Minimal Code Example + +``` +// your code ... +``` + +# Expected Behavior +A clear and concise description of what you expected to happen. + +# Screenshots +If applicable, add screenshots to help explain your problem. + +# Additional Information +Add any other context about the problem here. diff --git a/.github/dev_feature_request.md b/.github/dev_feature_request.md new file mode 100755 index 0000000..9573c35 --- /dev/null +++ b/.github/dev_feature_request.md @@ -0,0 +1,18 @@ +--- +name: Dev Feature Request +about: Suggest an idea for this project +title: '' +labels: stat_backlog, type_feature +assignees: '' + +--- + +# What is the feature you request +* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +* A clear and concise description of what you want to happen. + +# Alternatives +A clear and concise description of any alternative solutions or features you've considered. + +# Additional Information +Add any other context or screenshots about the feature request here. diff --git a/.github/user_bug_report.md b/.github/user_bug_report.md new file mode 100755 index 0000000..4b92a8e --- /dev/null +++ b/.github/user_bug_report.md @@ -0,0 +1,40 @@ +--- +name: User Bug Report +about: Create a report to help us improve +title: '' +labels: stat_backlog, type_bug +assignees: '' + +--- + +# Bug Description + +A clear and concise description of what the bug is. + +# How to Reproduce + +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +# Expected Behavior + +A clear and concise description of what you expected to happen. + +# Screenshots + +If applicable, add screenshots to help explain your problem. + +# System Information + +- System: [e.g. PC or iPhone11, ...] +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- KarakaVersion [e.g. 22] + +# Additional Information + +Add any other context about the problem here. diff --git a/.github/user_feature_request.md b/.github/user_feature_request.md new file mode 100755 index 0000000..c9595e8 --- /dev/null +++ b/.github/user_feature_request.md @@ -0,0 +1,21 @@ +--- +name: User Feature Request +about: Suggest an idea for this project +title: '' +labels: stat_backlog, type_feature +assignees: '' + +--- + +# What is the feature you request + +* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +* A clear and concise description of what you want to happen. + +# Alternatives + +A clear and concise description of any alternative solutions or features you've considered. + +# Additional Information + +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100755 index 0000000..adb8716 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,13 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: 'Thank you for createing this issue. We will check it as soon as possible.' + pr-message: 'Thank you for your pull request. We will check it as soon as possible.' diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml new file mode 100755 index 0000000..6f8f14a --- /dev/null +++ b/.github/workflows/image.yml @@ -0,0 +1,10 @@ +name: Image optimization + +on: [push, pull_request] + +jobs: + general_image_workflow: + uses: Karaka-Management/Karaka/.github/workflows/image.yml@develop + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100755 index 0000000..1dacd12 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +name: CI + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + schedule: + - cron: '0 0 1,15 * *' + +jobs: + general_module_workflow: + uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..bd6cef1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +Build +*.cache +.directory +Vagrantfile +vendor +bower_components +node_modules +*.log +.vagrant +.vscode +.sass-cache +cache +Cache +Libraries +.idea \ No newline at end of file diff --git a/Admin/Install/Media.install.json b/Admin/Install/Media.install.json new file mode 100755 index 0000000..dc66b0f --- /dev/null +++ b/Admin/Install/Media.install.json @@ -0,0 +1,30 @@ +[ + { + "type": "type", + "name": "equipment_profile_image", + "l11n": [ + { + "title": "Profile image", + "lang": "en" + }, + { + "title": "Profilbild", + "lang": "de" + } + ] + }, + { + "type": "collection", + "create_directory": true, + "name": "EquipmentManagement", + "virtualPath": "/Modules", + "user": 1 + }, + { + "type": "collection", + "create_directory": true, + "name": "Equipment", + "virtualPath": "/Modules/EquipmentManagement", + "user": 1 + } +] \ No newline at end of file diff --git a/Admin/Install/Media.php b/Admin/Install/Media.php new file mode 100755 index 0000000..628932e --- /dev/null +++ b/Admin/Install/Media.php @@ -0,0 +1,43 @@ + __DIR__ . '/Media.install.json']); + } +} diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json new file mode 100755 index 0000000..9987e05 --- /dev/null +++ b/Admin/Install/Navigation.install.json @@ -0,0 +1,156 @@ +[ + { + "id": 1008401001, + "pid": "/", + "type": 2, + "subtype": 0, + "name": "EquipmentManagement", + "uri": null, + "target": "self", + "icon": "fa fa-wrench", + "order": 80, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 0, + "children": [ + { + "id": 1008402001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "Equipments", + "uri": "{/base}/equipment/list", + "target": "self", + "icon": null, + "order": 1, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008401001, + "children": [ + { + "id": 1008402101, + "pid": "/equipment", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "{/base}/equipment/list", + "target": "self", + "icon": null, + "order": 1, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008402001, + "children": [] + }, + { + "id": 1008402201, + "pid": "/equipment", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "{/base}/equipment/create?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "EquipmentManagement", + "permission": { "permission": 4, "category": null, "element": null }, + "parent": 1008402001, + "children": [] + } + ] + }, + { + "id": 1008404001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "Inspections", + "uri": "{/base}/equipment/inspection/list", + "target": "self", + "icon": null, + "order": 1, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008401001, + "children": [ + { + "id": 1008404101, + "pid": "/equipment/inspection", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "{/base}/equipment/inspection/list", + "target": "self", + "icon": null, + "order": 1, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008404001, + "children": [] + }, + { + "id": 1008404201, + "pid": "/equipment/inspection", + "type": 3, + "subtype": 1, + "name": "EquipmentInspectionTypes", + "uri": "{/base}/equipment/inspection/type/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "EquipmentManagement", + "permission": { "permission": 4, "category": null, "element": null }, + "parent": 1008404001, + "children": [] + } + ] + }, + { + "id": 1008405001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "EquipmentAttributes", + "uri": "{/base}/equipment/attribute/type/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008401001, + "children": [ + { + "id": 1008405101, + "pid": "/equipment/attribute", + "type": 3, + "subtype": 1, + "name": "Types", + "uri": "{/base}/equipment/attribute/type/list?{?}", + "target": "self", + "icon": null, + "order": 15, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008405001, + "children": [] + }, + { + "id": 1008405201, + "pid": "/equipment/attribute", + "type": 3, + "subtype": 1, + "name": "Values", + "uri": "{/base}/equipment/attribute/value/list?{?}", + "target": "self", + "icon": null, + "order": 15, + "from": "EquipmentManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008405001, + "children": [] + } + ] + } + ] + } +] diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php new file mode 100755 index 0000000..d483fbb --- /dev/null +++ b/Admin/Install/Navigation.php @@ -0,0 +1,43 @@ + __DIR__ . '/Navigation.install.json']); + } +} diff --git a/Admin/Install/attributes.json b/Admin/Install/attributes.json new file mode 100755 index 0000000..1896daf --- /dev/null +++ b/Admin/Install/attributes.json @@ -0,0 +1,22 @@ +[ + { + "name": "is_gauge", + "l11n": { + "en": "Gauge", + "de": "Messgerät" + }, + "value_type": 1, + "is_custom_allowed": false, + "validation_pattern": "", + "is_required": false, + "default_value": "", + "values": [ + { + "value": 0 + }, + { + "value": 1 + } + ] + } +] \ No newline at end of file diff --git a/Admin/Install/db.json b/Admin/Install/db.json new file mode 100755 index 0000000..86e48a0 --- /dev/null +++ b/Admin/Install/db.json @@ -0,0 +1,526 @@ +{ + "equipmgmt_equipment_type": { + "name": "equipmgmt_equipment_type", + "fields": { + "equipmgmt_equipment_type_id": { + "name": "equipmgmt_equipment_type_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_type_name": { + "name": "equipmgmt_equipment_type_name", + "type": "VARCHAR(255)", + "null": false + } + } + }, + "equipmgmt_equipment_type_l11n": { + "name": "equipmgmt_equipment_type_l11n", + "fields": { + "equipmgmt_equipment_type_l11n_id": { + "name": "equipmgmt_equipment_type_l11n_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_type_l11n_title": { + "name": "equipmgmt_equipment_type_l11n_title", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_equipment_type_l11n_type": { + "name": "equipmgmt_equipment_type_l11n_type", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_equipment_type", + "foreignKey": "equipmgmt_equipment_type_id" + }, + "equipmgmt_equipment_type_l11n_lang": { + "name": "equipmgmt_equipment_type_l11n_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + } + } + }, + "equipmgmt_inspection_type": { + "name": "equipmgmt_inspection_type", + "fields": { + "equipmgmt_inspection_type_id": { + "name": "equipmgmt_inspection_type_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_inspection_type_name": { + "name": "equipmgmt_inspection_type_name", + "type": "VARCHAR(255)", + "null": false + } + } + }, + "equipmgmt_inspection_type_l11n": { + "name": "equipmgmt_inspection_type_l11n", + "fields": { + "equipmgmt_inspection_type_l11n_id": { + "name": "equipmgmt_inspection_type_l11n_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_inspection_type_l11n_title": { + "name": "equipmgmt_inspection_type_l11n_title", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_inspection_type_l11n_type": { + "name": "equipmgmt_inspection_type_l11n_type", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_inspection_type", + "foreignKey": "equipmgmt_inspection_type_id" + }, + "equipmgmt_inspection_type_l11n_lang": { + "name": "equipmgmt_inspection_type_l11n_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + } + } + }, + "equipmgmt_equipment": { + "name": "equipmgmt_equipment", + "fields": { + "equipmgmt_equipment_id": { + "name": "equipmgmt_equipment_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_name": { + "name": "equipmgmt_equipment_name", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_equipment_status": { + "name": "equipmgmt_equipment_status", + "type": "TINYINT", + "null": false + }, + "equipmgmt_equipment_type": { + "name": "equipmgmt_equipment_type", + "type": "INT", + "foreignTable": "equipmgmt_equipment_type", + "foreignKey": "equipmgmt_equipment_type_id" + }, + "equipmgmt_equipment_info": { + "name": "equipmgmt_equipment_info", + "type": "TEXT", + "null": false + }, + "equipmgmt_equipment_created_at": { + "name": "equipmgmt_equipment_created_at", + "type": "DATETIME", + "null": false + }, + "equipmgmt_equipment_responsible": { + "name": "equipmgmt_equipment_responsible", + "type": "INT", + "null": true, + "default": true, + "foreignTable": "account", + "foreignKey": "account_id" + }, + "equipmgmt_equipment_unit": { + "name": "equipmgmt_equipment_unit", + "type": "INT", + "default": null, + "null": true, + "foreignTable": "unit", + "foreignKey": "unit_id" + } + } + }, + "equipmgmt_equipment_inspection": { + "name": "equipmgmt_equipment_inspection", + "fields": { + "equipmgmt_equipment_inspection_id": { + "name": "equipmgmt_equipment_inspection_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_inspection_description": { + "name": "equipmgmt_equipment_inspection_description", + "type": "TEXT", + "null": false + }, + "equipmgmt_equipment_inspection_status": { + "name": "equipmgmt_equipment_inspection_status", + "type": "TINYINT(1)", + "null": false + }, + "equipmgmt_equipment_inspection_interval": { + "name": "equipmgmt_equipment_inspection_interval", + "type": "INT", + "null": false + }, + "equipmgmt_equipment_inspection_next": { + "name": "equipmgmt_equipment_inspection_next", + "type": "DATETIME", + "null": true, + "default": null + }, + "equipmgmt_equipment_inspection_date": { + "name": "equipmgmt_equipment_inspection_date", + "type": "DATETIME", + "null": true, + "default": null + }, + "equipmgmt_equipment_inspection_type": { + "name": "equipmgmt_equipment_inspection_type", + "type": "INT", + "null": false, + "foreignTable": "equipmgmt_inspection_type", + "foreignKey": "equipmgmt_inspection_type_id" + }, + "equipmgmt_equipment_inspection_equipment": { + "name": "equipmgmt_equipment_inspection_equipment", + "type": "INT", + "null": false, + "foreignTable": "equipmgmt_equipment", + "foreignKey": "equipmgmt_equipment_id" + } + } + }, + "equipmgmt_equipment_usage": { + "name": "equipmgmt_equipment_usage", + "fields": { + "equipmgmt_equipment_usage_id": { + "name": "equipmgmt_equipment_usage_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_usage_type": { + "name": "equipmgmt_equipment_usage_type", + "type": "INT", + "null": false + }, + "equipmgmt_equipment_usage_account": { + "name": "equipmgmt_equipment_usage_account", + "type": "INT", + "null": false, + "foreignTable": "account", + "foreignKey": "account_id" + }, + "equipmgmt_equipment_usage_start": { + "name": "equipmgmt_equipment_usage_start", + "type": "DATETIME", + "null": false + }, + "equipmgmt_equipment_usage_end": { + "name": "equipmgmt_equipment_usage_end", + "type": "DATETIME", + "null": true, + "default": null + }, + "equipmgmt_equipment_usage_distance": { + "name": "equipmgmt_equipment_usage_distance", + "type": "INT", + "null": false + } + } + }, + "equipmgmt_attr_type": { + "name": "equipmgmt_attr_type", + "fields": { + "equipmgmt_attr_type_id": { + "name": "equipmgmt_attr_type_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_attr_type_name": { + "name": "equipmgmt_attr_type_name", + "type": "VARCHAR(255)", + "null": false, + "unique": true + }, + "equipmgmt_attr_type_datatype": { + "name": "equipmgmt_attr_type_datatype", + "type": "INT(11)", + "null": false + }, + "equipmgmt_attr_type_fields": { + "name": "equipmgmt_attr_type_fields", + "type": "INT(11)", + "null": false + }, + "equipmgmt_attr_type_custom": { + "name": "equipmgmt_attr_type_custom", + "type": "TINYINT(1)", + "null": false + }, + "equipmgmt_attr_type_required": { + "description": "Every equipment must have this attribute type if set to true.", + "name": "equipmgmt_attr_type_required", + "type": "TINYINT(1)", + "null": false + }, + "equipmgmt_attr_type_pattern": { + "description": "This is a regex validation pattern.", + "name": "equipmgmt_attr_type_pattern", + "type": "VARCHAR(255)", + "null": false + } + } + }, + "equipmgmt_attr_type_l11n": { + "name": "equipmgmt_attr_type_l11n", + "fields": { + "equipmgmt_attr_type_l11n_id": { + "name": "equipmgmt_attr_type_l11n_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_attr_type_l11n_title": { + "name": "equipmgmt_attr_type_l11n_title", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_attr_type_l11n_type": { + "name": "equipmgmt_attr_type_l11n_type", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_attr_type", + "foreignKey": "equipmgmt_attr_type_id" + }, + "equipmgmt_attr_type_l11n_lang": { + "name": "equipmgmt_attr_type_l11n_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + } + } + }, + "equipmgmt_attr_value": { + "name": "equipmgmt_attr_value", + "fields": { + "equipmgmt_attr_value_id": { + "name": "equipmgmt_attr_value_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_attr_value_default": { + "name": "equipmgmt_attr_value_default", + "type": "TINYINT(1)", + "null": false + }, + "equipmgmt_attr_value_valueStr": { + "name": "equipmgmt_attr_value_valueStr", + "type": "VARCHAR(255)", + "null": true, + "default": null + }, + "equipmgmt_attr_value_valueInt": { + "name": "equipmgmt_attr_value_valueInt", + "type": "INT(11)", + "null": true, + "default": null + }, + "equipmgmt_attr_value_valueDec": { + "name": "equipmgmt_attr_value_valueDec", + "type": "DECIMAL(19,5)", + "null": true, + "default": null + }, + "equipmgmt_attr_value_valueDat": { + "name": "equipmgmt_attr_value_valueDat", + "type": "DATETIME", + "null": true, + "default": null + }, + "equipmgmt_attr_value_unit": { + "name": "equipmgmt_attr_value_unit", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_attr_value_deptype": { + "name": "equipmgmt_attr_value_deptype", + "type": "INT(11)", + "null": true, + "default": null, + "foreignTable": "equipmgmt_attr_type", + "foreignKey": "equipmgmt_attr_type_id" + }, + "equipmgmt_attr_value_depvalue": { + "name": "equipmgmt_attr_value_depvalue", + "type": "INT(11)", + "null": true, + "default": null, + "foreignTable": "equipmgmt_attr_value", + "foreignKey": "equipmgmt_attr_value_id" + } + } + }, + "equipmgmt_attr_value_l11n": { + "name": "equipmgmt_attr_value_l11n", + "fields": { + "equipmgmt_attr_value_l11n_id": { + "name": "equipmgmt_attr_value_l11n_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_attr_value_l11n_title": { + "name": "equipmgmt_attr_value_l11n_title", + "type": "VARCHAR(255)", + "null": false + }, + "equipmgmt_attr_value_l11n_value": { + "name": "equipmgmt_attr_value_l11n_value", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_attr_value", + "foreignKey": "equipmgmt_attr_value_id" + }, + "equipmgmt_attr_value_l11n_lang": { + "name": "equipmgmt_attr_value_l11n_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + } + } + }, + "equipmgmt_equipment_attr_default": { + "name": "equipmgmt_equipment_attr_default", + "fields": { + "equipmgmt_equipment_attr_default_id": { + "name": "equipmgmt_equipment_attr_default_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_attr_default_type": { + "name": "equipmgmt_equipment_attr_default_type", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_attr_type", + "foreignKey": "equipmgmt_attr_type_id" + }, + "equipmgmt_equipment_attr_default_value": { + "name": "equipmgmt_equipment_attr_default_value", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_attr_value", + "foreignKey": "equipmgmt_attr_value_id" + } + } + }, + "equipmgmt_equipment_attr": { + "name": "equipmgmt_equipment_attr", + "fields": { + "equipmgmt_equipment_attr_id": { + "name": "equipmgmt_equipment_attr_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_attr_equipment": { + "name": "equipmgmt_equipment_attr_equipment", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_equipment", + "foreignKey": "equipmgmt_equipment_id" + }, + "equipmgmt_equipment_attr_type": { + "name": "equipmgmt_equipment_attr_type", + "type": "INT(11)", + "null": false, + "foreignTable": "equipmgmt_attr_type", + "foreignKey": "equipmgmt_attr_type_id" + }, + "equipmgmt_equipment_attr_value": { + "name": "equipmgmt_equipment_attr_value", + "type": "INT(11)", + "null": true, + "default": null, + "foreignTable": "equipmgmt_attr_value", + "foreignKey": "equipmgmt_attr_value_id" + } + } + }, + "equipmgmt_equipment_media": { + "name": "equipmgmt_equipment_media", + "fields": { + "equipmgmt_equipment_media_id": { + "name": "equipmgmt_equipment_media_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_media_equipment": { + "name": "equipmgmt_equipment_media_equipment", + "type": "INT", + "null": false, + "foreignTable": "equipmgmt_equipment", + "foreignKey": "equipmgmt_equipment_id" + }, + "equipmgmt_equipment_media_media": { + "name": "equipmgmt_equipment_media_media", + "type": "INT", + "null": false, + "foreignTable": "media", + "foreignKey": "media_id" + } + } + }, + "equipmgmt_equipment_note": { + "name": "equipmgmt_equipment_note", + "fields": { + "equipmgmt_equipment_note_id": { + "name": "equipmgmt_equipment_note_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "equipmgmt_equipment_note_equipment": { + "name": "equipmgmt_equipment_note_equipment", + "type": "INT", + "null": false, + "foreignTable": "equipmgmt_equipment", + "foreignKey": "equipmgmt_equipment_id" + }, + "equipmgmt_equipment_note_doc": { + "name": "equipmgmt_equipment_note_doc", + "type": "INT", + "null": false, + "foreignTable": "editor_doc", + "foreignKey": "editor_doc_id" + } + } + } +} \ No newline at end of file diff --git a/Admin/Install/equipmenttype.json b/Admin/Install/equipmenttype.json new file mode 100755 index 0000000..55530b7 --- /dev/null +++ b/Admin/Install/equipmenttype.json @@ -0,0 +1,30 @@ +[ + { + "name": "scale", + "l11n": { + "en": "Scale", + "de": "Waage" + } + }, + { + "name": "ladder", + "l11n": { + "en": "Ladder", + "de": "Leiter" + } + }, + { + "name": "drill", + "l11n": { + "en": "Drill", + "de": "Bohrer" + } + }, + { + "name": "saw", + "l11n": { + "en": "Saw", + "de": "Säge" + } + } +] diff --git a/Admin/Install/inspectiontype.json b/Admin/Install/inspectiontype.json new file mode 100755 index 0000000..fe8f74d --- /dev/null +++ b/Admin/Install/inspectiontype.json @@ -0,0 +1,9 @@ +[ + { + "name": "tuv", + "l11n": { + "en": "TUV", + "de": "TUV" + } + } +] \ No newline at end of file diff --git a/Admin/Installer.php b/Admin/Installer.php new file mode 100755 index 0000000..8330d4a --- /dev/null +++ b/Admin/Installer.php @@ -0,0 +1,342 @@ + $equipmentTypes */ + $equipmentTypes = []; + + /** @var \Modules\EquipmentManagement\Controller\ApiEquipmentTypeController $module */ + $module = $app->moduleManager->getModuleInstance('EquipmentManagement', 'ApiEquipmentType'); + + /** @var array $type */ + foreach ($types as $type) { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('name', $type['name'] ?? ''); + $request->setData('title', \reset($type['l11n'])); + $request->setData('language', \array_keys($type['l11n'])[0] ?? 'en'); + + $module->apiEquipmentTypeCreate($request, $response); + + $responseData = $response->get(''); + if (!\is_array($responseData)) { + continue; + } + + $equipmentTypes[$type['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); + + $isFirst = true; + foreach ($type['l11n'] as $language => $l11n) { + if ($isFirst) { + $isFirst = false; + continue; + } + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', $l11n); + $request->setData('language', $language); + $request->setData('type', $equipmentTypes[$type['name']]['id']); + + $module->apiEquipmentTypeL11nCreate($request, $response); + } + } + + return $equipmentTypes; + } + + /** + * Install inspection type + * + * @param ApplicationAbstract $app Application + * @param array $types Attribute definition + * + * @return array + * + * @since 1.0.0 + */ + private static function createInspectionTypes(ApplicationAbstract $app, array $types) : array + { + /** @var array $inspectionTypes */ + $inspectionTypes = []; + + /** @var \Modules\EquipmentManagement\Controller\ApiInspectionTypeController $module */ + $module = $app->moduleManager->getModuleInstance('EquipmentManagement', 'ApiInspectionType'); + + /** @var array $type */ + foreach ($types as $type) { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('name', $type['name'] ?? ''); + $request->setData('title', \reset($type['l11n'])); + $request->setData('language', \array_keys($type['l11n'])[0] ?? 'en'); + + $module->apiInspectionTypeCreate($request, $response); + + $responseData = $response->get(''); + if (!\is_array($responseData)) { + continue; + } + + $inspectionTypes[$type['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); + + $isFirst = true; + foreach ($type['l11n'] as $language => $l11n) { + if ($isFirst) { + $isFirst = false; + continue; + } + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', $l11n); + $request->setData('language', $language); + $request->setData('type', $inspectionTypes[$type['name']]['id']); + + $module->apiInspectionTypeL11nCreate($request, $response); + } + } + + return $inspectionTypes; + } + + /** + * Install default attribute types + * + * @param ApplicationAbstract $app Application + * @param array $attributes Attribute definition + * + * @return array + * + * @since 1.0.0 + */ + private static function createAttributeTypes(ApplicationAbstract $app, array $attributes) : array + { + /** @var array $itemAttrType */ + $itemAttrType = []; + + /** @var \Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController $module */ + $module = $app->moduleManager->getModuleInstance('EquipmentManagement', 'ApiEquipmentAttribute'); + + /** @var array $attribute */ + foreach ($attributes as $attribute) { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('name', $attribute['name'] ?? ''); + $request->setData('title', \reset($attribute['l11n'])); + $request->setData('language', \array_keys($attribute['l11n'])[0] ?? 'en'); + $request->setData('is_required', $attribute['is_required'] ?? false); + $request->setData('custom', $attribute['is_custom_allowed'] ?? false); + $request->setData('validation_pattern', $attribute['validation_pattern'] ?? ''); + $request->setData('datatype', (int) $attribute['value_type']); + + $module->apiEquipmentAttributeTypeCreate($request, $response); + + $responseData = $response->get(''); + if (!\is_array($responseData)) { + continue; + } + + $itemAttrType[$attribute['name']] = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); + + $isFirst = true; + foreach ($attribute['l11n'] as $language => $l11n) { + if ($isFirst) { + $isFirst = false; + continue; + } + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', $l11n); + $request->setData('language', $language); + $request->setData('type', $itemAttrType[$attribute['name']]['id']); + + $module->apiEquipmentAttributeTypeL11nCreate($request, $response); + } + } + + return $itemAttrType; + } + + /** + * Create default attribute values for types + * + * @param ApplicationAbstract $app Application + * @param array $itemAttrType Attribute types + * @param array, is_required?:bool, is_custom_allowed?:bool, validation_pattern?:string, value_type?:string, values?:array}> $attributes Attribute definition + * + * @return array + * + * @since 1.0.0 + */ + private static function createAttributeValues(ApplicationAbstract $app, array $itemAttrType, array $attributes) : array + { + /** @var array $itemAttrValue */ + $itemAttrValue = []; + + /** @var \Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController $module */ + $module = $app->moduleManager->getModuleInstance('EquipmentManagement', 'ApiEquipmentAttribute'); + + foreach ($attributes as $attribute) { + $itemAttrValue[$attribute['name']] = []; + + /** @var array $value */ + foreach ($attribute['values'] as $value) { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('value', $value['value'] ?? ''); + $request->setData('unit', $value['unit'] ?? ''); + $request->setData('default', true); // always true since all defined values are possible default values + $request->setData('type', $itemAttrType[$attribute['name']]['id']); + + if (isset($value['l11n']) && !empty($value['l11n'])) { + $request->setData('title', \reset($value['l11n'])); + $request->setData('language', \array_keys($value['l11n'])[0] ?? 'en'); + } + + $module->apiEquipmentAttributeValueCreate($request, $response); + + $responseData = $response->get(''); + if (!\is_array($responseData)) { + continue; + } + + $attrValue = \is_array($responseData['response']) + ? $responseData['response'] + : $responseData['response']->toArray(); + + $itemAttrValue[$attribute['name']][] = $attrValue; + + $isFirst = true; + foreach (($value['l11n'] ?? []) as $language => $l11n) { + if ($isFirst) { + $isFirst = false; + continue; + } + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', $l11n); + $request->setData('language', $language); + $request->setData('value', $attrValue['id']); + + $module->apiEquipmentAttributeValueL11nCreate($request, $response); + } + } + } + + return $itemAttrValue; + } +} diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php new file mode 100755 index 0000000..f7c1737 --- /dev/null +++ b/Admin/Routes/Web/Api.php @@ -0,0 +1,74 @@ + [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\ApiEquipmentController:apiEquipmentFind', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => Controller::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + + '^.*/equipment/attribute.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController:apiEquipmentAttributeCreate', + 'verb' => RouteVerb::PUT, + 'permission' => [ + 'module' => Controller::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + [ + 'dest' => '\Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController:apiEquipmentAttributeUpdate', + 'verb' => RouteVerb::SET, + 'permission' => [ + 'module' => Controller::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + + '^.*/equipment/note.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\ApiEquipmentController:apiNoteCreate', + 'verb' => RouteVerb::PUT, + 'permission' => [ + 'module' => Controller::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + [ + 'dest' => '\Modules\EquipmentManagement\Controller\ApiEquipmentController:apiNoteUpdate', + 'verb' => RouteVerb::SET, + 'permission' => [ + 'module' => Controller::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], +]; diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php new file mode 100755 index 0000000..85776ec --- /dev/null +++ b/Admin/Routes/Web/Backend.php @@ -0,0 +1,111 @@ + [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementAttributeTypeList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + '^.*/equipment/attribute/type\?.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementAttributeType', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + + '^.*/equipment/list.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + '^.*/equipment/create.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentCreate', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + '^.*/equipment/profile.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentProfile', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + + '^.*/equipment/inspection/list.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + '^.*/equipment/inspection/create.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentCreate', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], + '^.*/equipment/inspection/profile.*$' => [ + [ + 'dest' => '\Modules\EquipmentManagement\Controller\BackendController:viewEquipmentManagementEquipmentProfile', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::EQUIPMENT, + ], + ], + ], +]; diff --git a/Admin/Status.php b/Admin/Status.php new file mode 100755 index 0000000..85a809c --- /dev/null +++ b/Admin/Status.php @@ -0,0 +1,36 @@ +validateAttributeCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $attribute = $this->createAttributeFromRequest($request); + $this->createModel($request->header->account, $attribute, EquipmentAttributeMapper::class, 'attribute', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $attribute); + } + + /** + * Api method to create equipment attribute l11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeL11nCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $attrL11n = $this->createAttributeTypeL11nFromRequest($request); + $this->createModel($request->header->account, $attrL11n, EquipmentAttributeTypeL11nMapper::class, 'attr_type_l11n', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $attrL11n); + } + + /** + * Api method to create equipment attribute type + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $attrType = $this->createAttributeTypeFromRequest($request); + $this->createModel($request->header->account, $attrType, EquipmentAttributeTypeMapper::class, 'attr_type', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $attrType); + } + + /** + * Api method to create equipment attribute value + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeValueCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + /** @var \Modules\Attribute\Models\AttributeType $type */ + $type = EquipmentAttributeTypeMapper::get() + ->where('id', $request->getDataInt('type') ?? 0) + ->execute(); + + $attrValue = $this->createAttributeValueFromRequest($request, $type); + $this->createModel($request->header->account, $attrValue, EquipmentAttributeValueMapper::class, 'attr_value', $request->getOrigin()); + + if ($attrValue->isDefault) { + $this->createModelRelation( + $request->header->account, + (int) $request->getData('type'), + $attrValue->id, + EquipmentAttributeTypeMapper::class, 'defaults', '', $request->getOrigin() + ); + } + + $this->createStandardCreateResponse($request, $response, $attrValue); + } + + /** + * Api method to create equipment attribute l11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeValueL11nCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $attrL11n = $this->createAttributeValueL11nFromRequest($request); + $this->createModel($request->header->account, $attrL11n, EquipmentAttributeValueL11nMapper::class, 'attr_value_l11n', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $attrL11n); + } + + /** + * Api method to update EquipmentAttribute + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var Attribute $old */ + $old = EquipmentAttributeMapper::get() + ->with('type') + ->with('type/defaults') + ->with('value') + ->where('id', (int) $request->getData('id')) + ->execute(); + + $new = $this->updateAttributeFromRequest($request, clone $old); + + if ($new->id === 0) { + // Set response header to invalid request because of invalid data + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $new); + + return; + } + + $this->updateModel($request->header->account, $old, $new, EquipmentAttributeMapper::class, 'equipment_attribute', $request->getOrigin()); + + if ($new->value->getValue() !== $old->value->getValue() + && $new->type->custom + ) { + $this->updateModel($request->header->account, $old->value, $new->value, EquipmentAttributeValueMapper::class, 'attribute_value', $request->getOrigin()); + } + + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Api method to delete EquipmentAttribute + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + $equipmentAttribute = EquipmentAttributeMapper::get() + ->with('type') + ->where('id', (int) $request->getData('id')) + ->execute(); + + if ($equipmentAttribute->type->isRequired) { + $this->createInvalidDeleteResponse($request, $response, []); + + return; + } + + $this->deleteModel($request->header->account, $equipmentAttribute, EquipmentAttributeMapper::class, 'equipment_attribute', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentAttribute); + } + + /** + * Api method to update EquipmentAttributeTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeL11nUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeL11nUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $old */ + $old = EquipmentAttributeTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $new = $this->updateAttributeTypeL11nFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentAttributeTypeL11nMapper::class, 'equipment_attribute_type_l11n', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Api method to delete EquipmentAttributeTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeL11nDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeL11nDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $equipmentAttributeTypeL11n */ + $equipmentAttributeTypeL11n = EquipmentAttributeTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentAttributeTypeL11n, EquipmentAttributeTypeL11nMapper::class, 'equipment_attribute_type_l11n', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentAttributeTypeL11n); + } + + /** + * Api method to update EquipmentAttributeType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var AttributeType $old */ + $old = EquipmentAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $new = $this->updateAttributeTypeFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentAttributeTypeMapper::class, 'equipment_attribute_type', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Api method to delete EquipmentAttributeType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @todo: implement + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeTypeDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeTypeDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var AttributeType $equipmentAttributeType */ + $equipmentAttributeType = EquipmentAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentAttributeType, EquipmentAttributeTypeMapper::class, 'equipment_attribute_type', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentAttributeType); + } + + /** + * Api method to update EquipmentAttributeValue + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeValueUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var AttributeValue $old */ + $old = EquipmentAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute(); + + /** @var \Modules\Attribute\Models\Attribute $attr */ + $attr = EquipmentAttributeMapper::get() + ->with('type') + ->where('id', $request->getDataInt('attribute') ?? 0) + ->execute(); + + $new = $this->updateAttributeValueFromRequest($request, clone $old, $attr); + + $this->updateModel($request->header->account, $old, $new, EquipmentAttributeValueMapper::class, 'equipment_attribute_value', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Api method to delete EquipmentAttributeValue + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + // @todo: I don't think values can be deleted? Only Attributes + // However, It should be possible to remove UNUSED default values + // either here or other function? + // if (!empty($val = $this->validateAttributeValueDelete($request))) { + // $response->header->status = RequestStatusCode::R_400; + // $this->createInvalidDeleteResponse($request, $response, $val); + + // return; + // } + + // /** @var \Modules\EquipmentManagement\Models\EquipmentAttributeValue $equipmentAttributeValue */ + // $equipmentAttributeValue = EquipmentAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute(); + // $this->deleteModel($request->header->account, $equipmentAttributeValue, EquipmentAttributeValueMapper::class, 'equipment_attribute_value', $request->getOrigin()); + // $this->createStandardDeleteResponse($request, $response, $equipmentAttributeValue); + } + + /** + * Api method to update EquipmentAttributeValueL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueL11nUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeValueL11nUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $old */ + $old = EquipmentAttributeValueL11nMapper::get()->where('id', (int) $request->getData('id')); + $new = $this->updateAttributeValueL11nFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentAttributeValueL11nMapper::class, 'equipment_attribute_value_l11n', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Api method to delete EquipmentAttributeValueL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentAttributeValueL11nDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateAttributeValueL11nDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $equipmentAttributeValueL11n */ + $equipmentAttributeValueL11n = EquipmentAttributeValueL11nMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentAttributeValueL11n, EquipmentAttributeValueL11nMapper::class, 'equipment_attribute_value_l11n', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentAttributeValueL11n); + } +} diff --git a/Controller/ApiEquipmentController.php b/Controller/ApiEquipmentController.php new file mode 100755 index 0000000..8b03ffd --- /dev/null +++ b/Controller/ApiEquipmentController.php @@ -0,0 +1,614 @@ +validateEquipmentCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + /** @var Equipment $equipment */ + $equipment = $this->createEquipmentFromRequest($request); + $this->createModel($request->header->account, $equipment, EquipmentMapper::class, 'equipment', $request->getOrigin()); + + if (!empty($request->files) + || !empty($request->getDataJson('media')) + ) { + $this->createEquipmentMedia($equipment, $request); + } + + $this->createStandardCreateResponse($request, $response, $equipment); + } + + /** + * Method to create equipment from request. + * + * @param RequestAbstract $request Request + * + * @return Equipment Returns the created equipment from the request + * + * @since 1.0.0 + */ + public function createEquipmentFromRequest(RequestAbstract $request) : Equipment + { + $equipment = new Equipment(); + $equipment->name = $request->getDataString('name') ?? ''; + $equipment->info = $request->getDataString('info') ?? ''; + $equipment->type = new NullBaseStringL11nType((int) ($request->getDataInt('type') ?? 0)); + $equipment->status = $request->getDataInt('status') ?? EquipmentStatus::INACTIVE; + $equipment->unit = $request->getDataInt('unit') ?? $this->app->unitId; + + return $equipment; + } + + /** + * Create media files for equipment + * + * @param Equipment $equipment Equipment + * @param RequestAbstract $request Request incl. media do upload + * + * @return void + * + * @since 1.0.0 + */ + private function createEquipmentMedia(Equipment $equipment, RequestAbstract $request) : void + { + $path = $this->createEquipmentDir($equipment); + + if (!empty($uploadedFiles = $request->files)) { + $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( + names: [], + fileNames: [], + files: $uploadedFiles, + account: $request->header->account, + basePath: __DIR__ . '/../../../Modules/Media/Files' . $path, + virtualPath: $path, + pathSettings: PathSettings::FILE_PATH + ); + + $collection = null; + foreach ($uploaded as $media) { + $this->createModelRelation( + $request->header->account, + $equipment->id, + $media->id, + EquipmentMapper::class, + 'files', + '', + $request->getOrigin() + ); + + if ($collection === null) { + /** @var \Modules\Media\Models\Collection $collection */ + $collection = MediaMapper::getParentCollection($path)->limit(1)->execute(); + + if ($collection->id === 0) { + $collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection( + $path, + $request->header->account, + __DIR__ . '/../../../Modules/Media/Files' . $path + ); + } + } + + $this->createModelRelation( + $request->header->account, + $collection->id, + $media->id, + CollectionMapper::class, + 'sources', + '', + $request->getOrigin() + ); + } + } + + if (!empty($mediaFiles = $request->getDataJson('media'))) { + $collection = null; + + foreach ($mediaFiles as $file) { + /** @var \Modules\Media\Models\Media $media */ + $media = MediaMapper::get()->where('id', (int) $file)->limit(1)->execute(); + + $this->createModelRelation( + $request->header->account, + $equipment->id, + $media->id, + EquipmentMapper::class, + 'files', + '', + $request->getOrigin() + ); + + $ref = new Reference(); + $ref->name = $media->name; + $ref->source = new NullMedia($media->id); + $ref->createdBy = new NullAccount($request->header->account); + $ref->setVirtualPath($path); + + $this->createModel($request->header->account, $ref, ReferenceMapper::class, 'media_reference', $request->getOrigin()); + + if ($collection === null) { + /** @var \Modules\Media\Models\Collection $collection */ + $collection = MediaMapper::getParentCollection($path)->limit(1)->execute(); + + if ($collection->id === 0) { + $collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection( + $path, + $request->header->account, + __DIR__ . '/../../../Modules/Media/Files' . $path + ); + } + } + + $this->createModelRelation( + $request->header->account, + $collection->id, + $ref->id, + CollectionMapper::class, + 'sources', + '', + $request->getOrigin() + ); + } + } + } + + /** + * Validate equipment create request + * + * @param RequestAbstract $request Request + * + * @return array Returns the validation array of the request + * + * @since 1.0.0 + */ + private function validateEquipmentCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['name'] = !$request->hasData('name')) + || ($val['type'] = !$request->hasData('type')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create a bill + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiMediaAddToEquipment(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateMediaAddToEquipment($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidAddResponse($request, $response, $val); + + return; + } + + /** @var \Modules\EquipmentManagement\Models\Equipment $equipment */ + $equipment = EquipmentMapper::get()->where('id', (int) $request->getData('equipment'))->execute(); + $path = $this->createEquipmentDir($equipment); + + $uploaded = []; + if (!empty($uploadedFiles = $request->files)) { + $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( + names: [], + fileNames: [], + files: $uploadedFiles, + account: $request->header->account, + basePath: __DIR__ . '/../../../Modules/Media/Files' . $path, + virtualPath: $path, + pathSettings: PathSettings::FILE_PATH, + hasAccountRelation: false, + readContent: $request->getDataBool('parse_content') ?? false + ); + + $collection = null; + foreach ($uploaded as $media) { + $this->createModelRelation( + $request->header->account, + $equipment->id, + $media->id, + EquipmentMapper::class, + 'files', + '', + $request->getOrigin() + ); + + if ($request->hasData('type')) { + $this->createModelRelation( + $request->header->account, + $media->id, + $request->getDataInt('type'), + MediaMapper::class, + 'types', + '', + $request->getOrigin() + ); + } + + if ($collection === null) { + /** @var \Modules\Media\Models\Collection $collection */ + $collection = MediaMapper::getParentCollection($path)->limit(1)->execute(); + + if ($collection->id === 0) { + $collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection( + $path, + $request->header->account, + __DIR__ . '/../../../Modules/Media/Files' . $path, + ); + } + } + + $this->createModelRelation( + $request->header->account, + $collection->id, + $media->id, + CollectionMapper::class, + 'sources', + '', + $request->getOrigin() + ); + } + } + + if (!empty($mediaFiles = $request->getDataJson('media'))) { + foreach ($mediaFiles as $media) { + $this->createModelRelation( + $request->header->account, + $equipment->id, + (int) $media, + EquipmentMapper::class, + 'files', + '', + $request->getOrigin() + ); + } + } + + $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Media', 'Media added to equipment.', [ + 'upload' => $uploaded, + 'media' => $mediaFiles, + ]); + } + + /** + * Create media directory path + * + * @param Equipment $equipment Equipment + * + * @return string + * + * @since 1.0.0 + */ + private function createEquipmentDir(Equipment $equipment) : string + { + return '/Modules/EquipmentManagement/Equipment/' + . $this->app->unitId . '/' + . $equipment->id; + } + + /** + * Method to validate bill creation from request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateMediaAddToEquipment(RequestAbstract $request) : array + { + $val = []; + if (($val['media'] = (!$request->hasData('media') && empty($request->files))) + || ($val['equipment'] = !$request->hasData('equipment')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create notes + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiNoteCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateNoteCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $request->setData('virtualpath', '/Modules/EquipmentManagement/Equipment/' . $request->getData('id'), true); + $this->app->moduleManager->get('Editor', 'Api')->apiEditorCreate($request, $response, $data); + + if ($response->header->status !== RequestStatusCode::R_200) { + return; + } + + $responseData = $response->get($request->uri->__toString()); + if (!\is_array($responseData)) { + return; + } + + $model = $responseData['response']; + $this->createModelRelation($request->header->account, (int) $request->getData('id'), $model->id, EquipmentMapper::class, 'notes', '', $request->getOrigin()); + } + + /** + * Validate item note create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateNoteCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to update Equipment + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentFind(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + } + + /** + * Api method to update Equipment + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var \Modules\EquipmentManagement\Models\Equipment $old */ + $old = EquipmentMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $new = $this->updateEquipmentFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentMapper::class, 'equipment', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Method to update Equipment from request. + * + * @param RequestAbstract $request Request + * @param Equipment $new Model to modify + * + * @return Equipment + * + * @todo: implement + * + * @since 1.0.0 + */ + public function updateEquipmentFromRequest(RequestAbstract $request, Equipment $new) : Equipment + { + $new->name = $request->getDataString('name') ?? $new->name; + $new->info = $request->getDataString('info') ?? $new->info; + $new->type = $request->hasData('type') ? new NullBaseStringL11nType((int) ($request->getDataInt('type') ?? 0)) : $new->type; + $new->status = $request->getDataInt('status') ?? $new->status; + $new->unit = $request->getDataInt('unit') ?? $this->app->unitId; + + return $new; + } + + /** + * Validate Equipment update request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @todo: implement + * + * @since 1.0.0 + */ + private function validateEquipmentUpdate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to delete Equipment + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var \Modules\EquipmentManagement\Models\Equipment $equipment */ + $equipment = EquipmentMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipment, EquipmentMapper::class, 'equipment', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipment); + } + + /** + * Validate Equipment delete request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @todo: implement + * + * @since 1.0.0 + */ + private function validateEquipmentDelete(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to update Note + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiNoteUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + // @todo: check permissions + $this->app->moduleManager->get('Editor', 'Api')->apiEditorDocUpdate($request, $response, $data); + } + + /** + * Api method to delete Note + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiNoteDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + // @todo: check permissions + $this->app->moduleManager->get('Editor', 'Api')->apiEditorDocDelete($request, $response, $data); + } +} diff --git a/Controller/ApiEquipmentTypeController.php b/Controller/ApiEquipmentTypeController.php new file mode 100755 index 0000000..aadafa4 --- /dev/null +++ b/Controller/ApiEquipmentTypeController.php @@ -0,0 +1,403 @@ +validateEquipmentTypeCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $equipmentType = $this->createEquipmentTypeFromRequest($request); + $this->createModel($request->header->account, $equipmentType, EquipmentTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $equipmentType); + } + + /** + * Method to create item attribute from request. + * + * @param RequestAbstract $request Request + * + * @return BaseStringL11nType + * + * @since 1.0.0 + */ + private function createEquipmentTypeFromRequest(RequestAbstract $request) : BaseStringL11nType + { + $equipmentType = new BaseStringL11nType(); + $equipmentType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN); + $equipmentType->title = $request->getDataString('name') ?? ''; + + return $equipmentType; + } + + /** + * Validate item attribute create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateEquipmentTypeCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['title'] = !$request->hasData('title')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create item attribute l11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentTypeL11nCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $equipmentTypeL11n = $this->createEquipmentTypeL11nFromRequest($request); + $this->createModel($request->header->account, $equipmentTypeL11n, EquipmentTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $equipmentTypeL11n); + } + + /** + * Method to create item attribute l11n from request. + * + * @param RequestAbstract $request Request + * + * @return BaseStringL11n + * + * @since 1.0.0 + */ + private function createEquipmentTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n + { + $equipmentTypeL11n = new BaseStringL11n(); + $equipmentTypeL11n->ref = $request->getDataInt('type') ?? 0; + $equipmentTypeL11n->setLanguage( + $request->getDataString('language') ?? $request->header->l11n->language + ); + $equipmentTypeL11n->content = $request->getDataString('title') ?? ''; + + return $equipmentTypeL11n; + } + + /** + * Validate item attribute l11n create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateEquipmentTypeL11nCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['title'] = !$request->hasData('title')) + || ($val['type'] = !$request->hasData('type')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to update EquipmentType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentTypeUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentTypeUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11nType $old */ + $old = EquipmentTypeMapper::get()->where('id', (int) $request->getData('id')); + $new = $this->updateEquipmentTypeFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Method to update EquipmentType from request. + * + * @param RequestAbstract $request Request + * @param BaseStringL11nType $new Model to modify + * + * @return BaseStringL11nType + * + * @todo: implement + * + * @since 1.0.0 + */ + public function updateEquipmentTypeFromRequest(RequestAbstract $request, BaseStringL11nType $new) : BaseStringL11nType + { + $new->title = $request->getDataString('name') ?? $new->title; + + return $new; + } + + /** + * Validate EquipmentType update request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @todo: implement + * + * @since 1.0.0 + */ + private function validateEquipmentTypeUpdate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to delete EquipmentType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentTypeDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentTypeDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11nType $equipmentType */ + $equipmentType = EquipmentTypeMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentType, EquipmentTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentType); + } + + /** + * Validate EquipmentType delete request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateEquipmentTypeDelete(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to update EquipmentTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentTypeL11nUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentTypeL11nUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $old */ + $old = EquipmentTypeL11nMapper::get()->where('id', (int) $request->getData('id')); + $new = $this->updateEquipmentTypeL11nFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, EquipmentTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Method to update EquipmentTypeL11n from request. + * + * @param RequestAbstract $request Request + * @param BaseStringL11n $new Model to modify + * + * @return BaseStringL11n + * + * @since 1.0.0 + */ + public function updateEquipmentTypeL11nFromRequest(RequestAbstract $request, BaseStringL11n $new) : BaseStringL11n + { + $new->setLanguage( + $request->getDataString('language') ?? $new->language + ); + $new->content = $request->getDataString('title') ?? $new->content; + + return $new; + } + + /** + * Validate EquipmentTypeL11n update request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateEquipmentTypeL11nUpdate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to delete EquipmentTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiEquipmentTypeL11nDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateEquipmentTypeL11nDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $equipmentTypeL11n */ + $equipmentTypeL11n = EquipmentTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentTypeL11n, EquipmentTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentTypeL11n); + } + + /** + * Validate EquipmentTypeL11n delete request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateEquipmentTypeL11nDelete(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } +} diff --git a/Controller/ApiInspectionTypeController.php b/Controller/ApiInspectionTypeController.php new file mode 100755 index 0000000..c9d99eb --- /dev/null +++ b/Controller/ApiInspectionTypeController.php @@ -0,0 +1,403 @@ +validateInspectionTypeCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $equipmentType = $this->createInspectionTypeFromRequest($request); + $this->createModel($request->header->account, $equipmentType, InspectionTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $equipmentType); + } + + /** + * Method to create item attribute from request. + * + * @param RequestAbstract $request Request + * + * @return BaseStringL11nType + * + * @since 1.0.0 + */ + private function createInspectionTypeFromRequest(RequestAbstract $request) : BaseStringL11nType + { + $equipmentType = new BaseStringL11nType(); + $equipmentType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN); + $equipmentType->title = $request->getDataString('name') ?? ''; + + return $equipmentType; + } + + /** + * Validate item attribute create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateInspectionTypeCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['title'] = !$request->hasData('title')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create item attribute l11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiInspectionTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateInspectionTypeL11nCreate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $val); + + return; + } + + $equipmentTypeL11n = $this->createInspectionTypeL11nFromRequest($request); + $this->createModel($request->header->account, $equipmentTypeL11n, InspectionTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardCreateResponse($request, $response, $equipmentTypeL11n); + } + + /** + * Method to create item attribute l11n from request. + * + * @param RequestAbstract $request Request + * + * @return BaseStringL11n + * + * @since 1.0.0 + */ + private function createInspectionTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n + { + $equipmentTypeL11n = new BaseStringL11n(); + $equipmentTypeL11n->ref = $request->getDataInt('type') ?? 0; + $equipmentTypeL11n->setLanguage( + $request->getDataString('language') ?? $request->header->l11n->language + ); + $equipmentTypeL11n->content = $request->getDataString('title') ?? ''; + + return $equipmentTypeL11n; + } + + /** + * Validate item attribute l11n create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateInspectionTypeL11nCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['title'] = !$request->hasData('title')) + || ($val['type'] = !$request->hasData('type')) + ) { + return $val; + } + + return []; + } + + /** + * Api method to update InspectionType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiInspectionTypeUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateInspectionTypeUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11nType $old */ + $old = InspectionTypeMapper::get()->where('id', (int) $request->getData('id')); + $new = $this->updateInspectionTypeFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, InspectionTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Method to update InspectionType from request. + * + * @param RequestAbstract $request Request + * @param BaseStringL11nType $new Model to modify + * + * @return BaseStringL11nType + * + * @todo: implement + * + * @since 1.0.0 + */ + public function updateInspectionTypeFromRequest(RequestAbstract $request, BaseStringL11nType $new) : BaseStringL11nType + { + $new->title = $request->getDataString('name') ?? $new->title; + + return $new; + } + + /** + * Validate InspectionType update request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @todo: implement + * + * @since 1.0.0 + */ + private function validateInspectionTypeUpdate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to delete InspectionType + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiInspectionTypeDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateInspectionTypeDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11nType $equipmentType */ + $equipmentType = InspectionTypeMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentType, InspectionTypeMapper::class, 'equipment_type', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentType); + } + + /** + * Validate InspectionType delete request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateInspectionTypeDelete(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to update InspectionTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiInspectionTypeL11nUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateInspectionTypeL11nUpdate($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidUpdateResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $old */ + $old = InspectionTypeL11nMapper::get()->where('id', (int) $request->getData('id')); + $new = $this->updateInspectionTypeL11nFromRequest($request, clone $old); + + $this->updateModel($request->header->account, $old, $new, InspectionTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardUpdateResponse($request, $response, $new); + } + + /** + * Method to update InspectionTypeL11n from request. + * + * @param RequestAbstract $request Request + * @param BaseStringL11n $new Model to modify + * + * @return BaseStringL11n + * + * @since 1.0.0 + */ + public function updateInspectionTypeL11nFromRequest(RequestAbstract $request, BaseStringL11n $new) : BaseStringL11n + { + $new->setLanguage( + $request->getDataString('language') ?? $new->language + ); + $new->content = $request->getDataString('title') ?? $new->content; + + return $new; + } + + /** + * Validate InspectionTypeL11n update request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateInspectionTypeL11nUpdate(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } + + /** + * Api method to delete InspectionTypeL11n + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiInspectionTypeL11nDelete(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void + { + if (!empty($val = $this->validateInspectionTypeL11nDelete($request))) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidDeleteResponse($request, $response, $val); + + return; + } + + /** @var BaseStringL11n $equipmentTypeL11n */ + $equipmentTypeL11n = InspectionTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $this->deleteModel($request->header->account, $equipmentTypeL11n, InspectionTypeL11nMapper::class, 'equipment_type_l11n', $request->getOrigin()); + $this->createStandardDeleteResponse($request, $response, $equipmentTypeL11n); + } + + /** + * Validate InspectionTypeL11n delete request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateInspectionTypeL11nDelete(RequestAbstract $request) : array + { + $val = []; + if (($val['id'] = !$request->hasData('id'))) { + return $val; + } + + return []; + } +} diff --git a/Controller/BackendController.php b/Controller/BackendController.php new file mode 100755 index 0000000..86d3756 --- /dev/null +++ b/Controller/BackendController.php @@ -0,0 +1,257 @@ +app->l11nManager, $request, $response); + $view->setTemplate('/Modules/EquipmentManagement/Theme/Backend/attribute-type-list'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003503001, $request, $response); + + /** @var \Modules\Attribute\Models\AttributeType[] $attributes */ + $attributes = EquipmentAttributeTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $response->header->l11n->language) + ->execute(); + + $view->data['attributes'] = $attributes; + + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewEquipmentManagementEquipmentList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/EquipmentManagement/Theme/Backend/equipment-list'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008402001, $request, $response); + + $list = EquipmentMapper::getAll() + ->with('type') + ->with('type/l11n') + ->where('type/l11n/language', $response->header->l11n->language) + ->sort('id', 'DESC') + ->execute(); + + $view->data['equipments'] = $list; + + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewEquipmentManagementAttributeType(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + $view->setTemplate('/Modules/EquipmentManagement/Theme/Backend/attribute-type'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004801001, $request, $response); + + /** @var \Modules\Attribute\Models\AttributeType $attribute */ + $attribute = EquipmentAttributeTypeMapper::get() + ->with('l11n') + ->where('id', (int) $request->getData('id')) + ->where('l11n/language', $response->header->l11n->language) + ->execute(); + + $l11ns = EquipmentAttributeTypeL11nMapper::getAll() + ->where('ref', $attribute->id) + ->execute(); + + $view->data['attribute'] = $attribute; + $view->data['l11ns'] = $l11ns; + + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewEquipmentManagementEquipmentCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/EquipmentManagement/Theme/Backend/equipment-profile'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008402001, $request, $response); + + /** @var \Model\Setting $settings */ + $settings = $this->app->appSettings->get(null, [ + SettingsEnum::DEFAULT_LOCALIZATION, + ]); + + $view->data['attributeView'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response); + $view->data['attributeView']->data['defaultlocalization'] = LocalizationMapper::get()->where('id', (int) $settings->id)->execute(); + + $view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response); + $view->data['equipment-notes'] = new \Modules\Editor\Theme\Backend\Components\Compound\BaseView($this->app->l11nManager, $request, $response); + + return $view; + } + + /** + * Routing end-point for application behaviour. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewEquipmentManagementEquipmentProfile(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/EquipmentManagement/Theme/Backend/equipment-profile'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008402001, $request, $response); + + // @todo: This langauge filtering doesn't work. But it was working with the old mappers. Maybe there is a bug in the where() definition. Need to inspect the actual query. + $equipment = EquipmentMapper::get() + ->with('attributes') + ->with('attributes/type') + ->with('attributes/value') + ->with('attributes/type/l11n') + ->with('files') + ->with('files/types') + ->with('type') + ->with('type/l11n') + ->with('fuelType') + ->with('fuelType/l11n') + ->where('id', (int) $request->getData('id')) + ->where('type/l11n/language', $response->header->l11n->language) + ->where('fuelType/l11n/language', $response->header->l11n->language) + ->where('attributes/type/l11n/language', $response->header->l11n->language) + ->execute(); + + $view->data['equipment'] = $equipment; + + $query = new Builder($this->app->dbPool->get()); + $results = $query->selectAs(EquipmentMapper::HAS_MANY['files']['external'], 'file') + ->from(EquipmentMapper::TABLE) + ->leftJoin(EquipmentMapper::HAS_MANY['files']['table']) + ->on(EquipmentMapper::HAS_MANY['files']['table'] . '.' . EquipmentMapper::HAS_MANY['files']['self'], '=', EquipmentMapper::TABLE . '.' . EquipmentMapper::PRIMARYFIELD) + ->leftJoin(MediaMapper::TABLE) + ->on(EquipmentMapper::HAS_MANY['files']['table'] . '.' . EquipmentMapper::HAS_MANY['files']['external'], '=', MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD) + ->leftJoin(MediaMapper::HAS_MANY['types']['table']) + ->on(MediaMapper::TABLE . '.' . MediaMapper::PRIMARYFIELD, '=', MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['self']) + ->leftJoin(MediaTypeMapper::TABLE) + ->on(MediaMapper::HAS_MANY['types']['table'] . '.' . MediaMapper::HAS_MANY['types']['external'], '=', MediaTypeMapper::TABLE . '.' . MediaTypeMapper::PRIMARYFIELD) + ->where(EquipmentMapper::HAS_MANY['files']['self'], '=', $equipment->id) + ->where(MediaTypeMapper::TABLE . '.' . MediaTypeMapper::getColumnByMember('name'), '=', 'equipment_profile_image'); + + $equipmentImage = MediaMapper::get() + ->with('types') + ->where('id', $results) + ->limit(1) + ->execute(); + + $view->data['equipmentImage'] = $equipmentImage; + + $equipmentTypes = EquipmentTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $response->header->l11n->language) + ->execute(); + + $view->data['types'] = $equipmentTypes; + + $units = UnitMapper::getAll() + ->execute(); + + $view->data['units'] = $units; + + /** @var \Model\Setting $settings */ + $settings = $this->app->appSettings->get(null, [ + SettingsEnum::DEFAULT_LOCALIZATION, + ]); + + $view->data['attributeView'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response); + $view->data['attributeView']->data['defaultlocalization'] = LocalizationMapper::get()->where('id', (int) $settings->id)->execute(); + + $view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response); + $view->data['equipment-notes'] = new \Modules\Editor\Theme\Backend\Components\Compound\BaseView($this->app->l11nManager, $request, $response); + + return $view; + } +} diff --git a/Controller/Controller.php b/Controller/Controller.php new file mode 100755 index 0000000..8c9625a --- /dev/null +++ b/Controller/Controller.php @@ -0,0 +1,76 @@ + + */ +final class EquipmentAttributeMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_equipment_attr_id' => ['name' => 'equipmgmt_equipment_attr_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_equipment_attr_equipment' => ['name' => 'equipmgmt_equipment_attr_equipment', 'type' => 'int', 'internal' => 'ref'], + 'equipmgmt_equipment_attr_type' => ['name' => 'equipmgmt_equipment_attr_type', 'type' => 'int', 'internal' => 'type'], + 'equipmgmt_equipment_attr_value' => ['name' => 'equipmgmt_equipment_attr_value', 'type' => 'int', 'internal' => 'value'], + ]; + + /** + * Has one relation. + * + * @var array + * @since 1.0.0 + */ + public const OWNS_ONE = [ + 'type' => [ + 'mapper' => EquipmentAttributeTypeMapper::class, + 'external' => 'equipmgmt_equipment_attr_type', + ], + 'value' => [ + 'mapper' => EquipmentAttributeValueMapper::class, + 'external' => 'equipmgmt_equipment_attr_value', + ], + ]; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = Attribute::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_equipment_attr'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_equipment_attr_id'; +} diff --git a/Models/Attribute/EquipmentAttributeTypeL11nMapper.php b/Models/Attribute/EquipmentAttributeTypeL11nMapper.php new file mode 100755 index 0000000..f554f3e --- /dev/null +++ b/Models/Attribute/EquipmentAttributeTypeL11nMapper.php @@ -0,0 +1,69 @@ + + */ +final class EquipmentAttributeTypeL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_attr_type_l11n_id' => ['name' => 'equipmgmt_attr_type_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_attr_type_l11n_title' => ['name' => 'equipmgmt_attr_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true], + 'equipmgmt_attr_type_l11n_type' => ['name' => 'equipmgmt_attr_type_l11n_type', 'type' => 'int', 'internal' => 'ref'], + 'equipmgmt_attr_type_l11n_lang' => ['name' => 'equipmgmt_attr_type_l11n_lang', 'type' => 'string', 'internal' => 'language'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_attr_type_l11n'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_attr_type_l11n_id'; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/Attribute/EquipmentAttributeTypeMapper.php b/Models/Attribute/EquipmentAttributeTypeMapper.php new file mode 100755 index 0000000..71c6063 --- /dev/null +++ b/Models/Attribute/EquipmentAttributeTypeMapper.php @@ -0,0 +1,94 @@ + + */ +final class EquipmentAttributeTypeMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_attr_type_id' => ['name' => 'equipmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_attr_type_name' => ['name' => 'equipmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], + 'equipmgmt_attr_type_datatype' => ['name' => 'equipmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'], + 'equipmgmt_attr_type_fields' => ['name' => 'equipmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], + 'equipmgmt_attr_type_custom' => ['name' => 'equipmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], + 'equipmgmt_attr_type_pattern' => ['name' => 'equipmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'], + 'equipmgmt_attr_type_required' => ['name' => 'equipmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'l11n' => [ + 'mapper' => EquipmentAttributeTypeL11nMapper::class, + 'table' => 'equipmgmt_attr_type_l11n', + 'self' => 'equipmgmt_attr_type_l11n_type', + 'column' => 'content', + 'external' => null, + ], + 'defaults' => [ + 'mapper' => EquipmentAttributeValueMapper::class, + 'table' => 'equipmgmt_equipment_attr_default', + 'self' => 'equipmgmt_equipment_attr_default_type', + 'external' => 'equipmgmt_equipment_attr_default_value', + ], + ]; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = AttributeType::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_attr_type'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_attr_type_id'; +} diff --git a/Models/Attribute/EquipmentAttributeValueL11nMapper.php b/Models/Attribute/EquipmentAttributeValueL11nMapper.php new file mode 100755 index 0000000..9432513 --- /dev/null +++ b/Models/Attribute/EquipmentAttributeValueL11nMapper.php @@ -0,0 +1,69 @@ + + */ +final class EquipmentAttributeValueL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_attr_value_l11n_id' => ['name' => 'equipmgmt_attr_value_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_attr_value_l11n_title' => ['name' => 'equipmgmt_attr_value_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true], + 'equipmgmt_attr_value_l11n_value' => ['name' => 'equipmgmt_attr_value_l11n_value', 'type' => 'int', 'internal' => 'ref'], + 'equipmgmt_attr_value_l11n_lang' => ['name' => 'equipmgmt_attr_value_l11n_lang', 'type' => 'string', 'internal' => 'language'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_attr_value_l11n'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_attr_value_l11n_id'; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/Attribute/EquipmentAttributeValueMapper.php b/Models/Attribute/EquipmentAttributeValueMapper.php new file mode 100755 index 0000000..e7e68f6 --- /dev/null +++ b/Models/Attribute/EquipmentAttributeValueMapper.php @@ -0,0 +1,89 @@ + + */ +final class EquipmentAttributeValueMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_attr_value_id' => ['name' => 'equipmgmt_attr_value_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_attr_value_default' => ['name' => 'equipmgmt_attr_value_default', 'type' => 'bool', 'internal' => 'isDefault'], + 'equipmgmt_attr_value_valueStr' => ['name' => 'equipmgmt_attr_value_valueStr', 'type' => 'string', 'internal' => 'valueStr'], + 'equipmgmt_attr_value_valueInt' => ['name' => 'equipmgmt_attr_value_valueInt', 'type' => 'int', 'internal' => 'valueInt'], + 'equipmgmt_attr_value_valueDec' => ['name' => 'equipmgmt_attr_value_valueDec', 'type' => 'float', 'internal' => 'valueDec'], + 'equipmgmt_attr_value_valueDat' => ['name' => 'equipmgmt_attr_value_valueDat', 'type' => 'DateTime', 'internal' => 'valueDat'], + 'equipmgmt_attr_value_unit' => ['name' => 'equipmgmt_attr_value_unit', 'type' => 'string', 'internal' => 'unit'], + 'equipmgmt_attr_value_deptype' => ['name' => 'equipmgmt_attr_value_deptype', 'type' => 'int', 'internal' => 'dependingAttributeType'], + 'equipmgmt_attr_value_depvalue' => ['name' => 'equipmgmt_attr_value_depvalue', 'type' => 'int', 'internal' => 'dependingAttributeValue'], + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'l11n' => [ + 'mapper' => EquipmentAttributeValueL11nMapper::class, + 'table' => 'equipmgmt_attr_value_l11n', + 'self' => 'equipmgmt_attr_value_l11n_value', + 'external' => null, + ], + ]; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = AttributeValue::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_attr_value'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_attr_value_id'; +} diff --git a/Models/Cost.php b/Models/Cost.php new file mode 100755 index 0000000..aeae23a --- /dev/null +++ b/Models/Cost.php @@ -0,0 +1,48 @@ + $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } +} diff --git a/Models/CostType.php b/Models/CostType.php new file mode 100755 index 0000000..95b0731 --- /dev/null +++ b/Models/CostType.php @@ -0,0 +1,48 @@ + $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } +} diff --git a/Models/Equipment.php b/Models/Equipment.php new file mode 100755 index 0000000..e3b8bd2 --- /dev/null +++ b/Models/Equipment.php @@ -0,0 +1,83 @@ +createdAt = new \DateTimeImmutable('now'); + $this->type = new BaseStringL11nType(); + } + + /** + * {@inheritdoc} + */ + public function toArray() : array + { + return [ + 'id' => $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } + + use \Modules\Media\Models\MediaListTrait; + use \Modules\Editor\Models\EditorDocListTrait; + use \Modules\Attribute\Models\AttributeHolderTrait; +} diff --git a/Models/EquipmentMapper.php b/Models/EquipmentMapper.php new file mode 100755 index 0000000..85e3ecd --- /dev/null +++ b/Models/EquipmentMapper.php @@ -0,0 +1,115 @@ + + */ +final class EquipmentMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_equipment_id' => ['name' => 'equipmgmt_equipment_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_equipment_name' => ['name' => 'equipmgmt_equipment_name', 'type' => 'string', 'internal' => 'name'], + 'equipmgmt_equipment_status' => ['name' => 'equipmgmt_equipment_status', 'type' => 'int', 'internal' => 'status'], + 'equipmgmt_equipment_info' => ['name' => 'equipmgmt_equipment_info', 'type' => 'string', 'internal' => 'info'], + 'equipmgmt_equipment_unit' => ['name' => 'equipmgmt_equipment_unit', 'type' => 'int', 'internal' => 'unit'], + 'equipmgmt_equipment_type' => ['name' => 'equipmgmt_equipment_type', 'type' => 'int', 'internal' => 'type'], + 'equipmgmt_equipment_responsible' => ['name' => 'equipmgmt_equipment_responsible', 'type' => 'int', 'internal' => 'responsible'], + 'equipmgmt_equipment_created_at' => ['name' => 'equipmgmt_equipment_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'files' => [ + 'mapper' => MediaMapper::class, + 'table' => 'equipmgmt_equipment_media', + 'external' => 'equipmgmt_equipment_media_media', + 'self' => 'equipmgmt_equipment_media_equipment', + ], + 'attributes' => [ + 'mapper' => EquipmentAttributeMapper::class, + 'table' => 'equipmgmt_equipment_attr', + 'self' => 'equipmgmt_equipment_attr_equipment', + 'external' => null, + ], + 'notes' => [ + 'mapper' => EditorDocMapper::class, /* mapper of the related object */ + 'table' => 'equipmgmt_equipment_note', /* table of the related object, null if no relation table is used (many->1) */ + 'external' => 'equipmgmt_equipment_note_doc', + 'self' => 'equipmgmt_equipment_note_equipment', + ], + ]; + + /** + * Has one relation. + * + * @var array + * @since 1.0.0 + */ + public const OWNS_ONE = [ + 'type' => [ + 'mapper' => EquipmentTypeMapper::class, + 'external' => 'equipmgmt_equipment_type', + ], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_equipment'; + + /** + * Created at. + * + * @var string + * @since 1.0.0 + */ + public const CREATED_AT = 'equipmgmt_equipment_created_at'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_equipment_id'; +} diff --git a/Models/EquipmentStatus.php b/Models/EquipmentStatus.php new file mode 100755 index 0000000..a5b6539 --- /dev/null +++ b/Models/EquipmentStatus.php @@ -0,0 +1,38 @@ + + */ +final class EquipmentTypeL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_equipment_type_l11n_id' => ['name' => 'equipmgmt_equipment_type_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_equipment_type_l11n_title' => ['name' => 'equipmgmt_equipment_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true], + 'equipmgmt_equipment_type_l11n_type' => ['name' => 'equipmgmt_equipment_type_l11n_type', 'type' => 'int', 'internal' => 'ref'], + 'equipmgmt_equipment_type_l11n_lang' => ['name' => 'equipmgmt_equipment_type_l11n_lang', 'type' => 'string', 'internal' => 'language'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_equipment_type_l11n'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_equipment_type_l11n_id'; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/EquipmentTypeMapper.php b/Models/EquipmentTypeMapper.php new file mode 100755 index 0000000..ac87266 --- /dev/null +++ b/Models/EquipmentTypeMapper.php @@ -0,0 +1,84 @@ + + */ +final class EquipmentTypeMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_equipment_type_id' => ['name' => 'equipmgmt_equipment_type_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_equipment_type_name' => ['name' => 'equipmgmt_equipment_type_name', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true], + + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'l11n' => [ + 'mapper' => EquipmentTypeL11nMapper::class, + 'table' => 'equipmgmt_equipment_type_l11n', + 'self' => 'equipmgmt_equipment_type_l11n_type', + 'column' => 'content', + 'external' => null, + ], + ]; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11nType::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_equipment_type'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_equipment_type_id'; +} diff --git a/Models/Inspection.php b/Models/Inspection.php new file mode 100755 index 0000000..e45a2ce --- /dev/null +++ b/Models/Inspection.php @@ -0,0 +1,90 @@ +type = new BaseStringL11nType(); + } + + /** + * {@inheritdoc} + */ + public function toArray() : array + { + return [ + 'id' => $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } + + use \Modules\Media\Models\MediaListTrait; +} diff --git a/Models/InspectionMapper.php b/Models/InspectionMapper.php new file mode 100755 index 0000000..786bc3e --- /dev/null +++ b/Models/InspectionMapper.php @@ -0,0 +1,85 @@ + + */ +final class InspectionMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_equipment_inspection_id' => ['name' => 'equipmgmt_equipment_inspection_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_equipment_inspection_equipment' => ['name' => 'equipmgmt_equipment_inspection_equipment', 'type' => 'int', 'internal' => 'reference'], + 'equipmgmt_equipment_inspection_description' => ['name' => 'equipmgmt_equipment_inspection_description', 'type' => 'string', 'internal' => 'description'], + 'equipmgmt_equipment_inspection_status' => ['name' => 'equipmgmt_equipment_inspection_status', 'type' => 'int', 'internal' => 'status'], + 'equipmgmt_equipment_inspection_interval' => ['name' => 'equipmgmt_equipment_inspection_interval', 'type' => 'int', 'internal' => 'interval'], + 'equipmgmt_equipment_inspection_next' => ['name' => 'equipmgmt_equipment_inspection_next', 'type' => 'DateTime', 'internal' => 'next'], + 'equipmgmt_equipment_inspection_date' => ['name' => 'equipmgmt_equipment_inspection_date', 'type' => 'DateTime', 'internal' => 'date'], + 'equipmgmt_equipment_inspection_type' => ['name' => 'equipmgmt_equipment_inspection_type', 'type' => 'int', 'internal' => 'type'], + ]; + + /** + * Has one relation. + * + * @var array + * @since 1.0.0 + */ + public const OWNS_ONE = [ + 'type' => [ + 'mapper' => InspectionTypeMapper::class, + 'external' => 'equipmgmt_equipment_type', + ], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_equipment_inspection'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_equipment_inspection_id'; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = Inspection::class; +} diff --git a/Models/InspectionStatus.php b/Models/InspectionStatus.php new file mode 100755 index 0000000..a7eef09 --- /dev/null +++ b/Models/InspectionStatus.php @@ -0,0 +1,36 @@ + + */ +final class InspectionTypeL11nMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_inspection_type_l11n_id' => ['name' => 'equipmgmt_inspection_type_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_inspection_type_l11n_title' => ['name' => 'equipmgmt_inspection_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true], + 'equipmgmt_inspection_type_l11n_type' => ['name' => 'equipmgmt_inspection_type_l11n_type', 'type' => 'int', 'internal' => 'ref'], + 'equipmgmt_inspection_type_l11n_lang' => ['name' => 'equipmgmt_inspection_type_l11n_lang', 'type' => 'string', 'internal' => 'language'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_inspection_type_l11n'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_inspection_type_l11n_id'; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11n::class; +} diff --git a/Models/InspectionTypeMapper.php b/Models/InspectionTypeMapper.php new file mode 100755 index 0000000..e299dbb --- /dev/null +++ b/Models/InspectionTypeMapper.php @@ -0,0 +1,83 @@ + + */ +final class InspectionTypeMapper extends DataMapperFactory +{ + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + public const COLUMNS = [ + 'equipmgmt_inspection_type_id' => ['name' => 'equipmgmt_inspection_type_id', 'type' => 'int', 'internal' => 'id'], + 'equipmgmt_inspection_type_name' => ['name' => 'equipmgmt_inspection_type_name', 'type' => 'string', 'internal' => 'title', 'autocomplete' => true], + ]; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'l11n' => [ + 'mapper' => InspectionTypeL11nMapper::class, + 'table' => 'equipmgmt_inspection_type_l11n', + 'self' => 'equipmgmt_inspection_type_l11n_type', + 'column' => 'content', + 'external' => null, + ], + ]; + + /** + * Model to use by the mapper. + * + * @var class-string + * @since 1.0.0 + */ + public const MODEL = BaseStringL11nType::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'equipmgmt_inspection_type'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'equipmgmt_inspection_type_id'; +} diff --git a/Models/NullEquipment.php b/Models/NullEquipment.php new file mode 100755 index 0000000..17a7184 --- /dev/null +++ b/Models/NullEquipment.php @@ -0,0 +1,47 @@ +id = $id; + parent::__construct(); + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} diff --git a/Models/NullInspection.php b/Models/NullInspection.php new file mode 100755 index 0000000..dfa93b4 --- /dev/null +++ b/Models/NullInspection.php @@ -0,0 +1,46 @@ +id = $id; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php new file mode 100755 index 0000000..cc7f905 --- /dev/null +++ b/Models/PermissionCategory.php @@ -0,0 +1,38 @@ + [ + 'EquipmentManagement' => 'Equipment Management', + 'Equipments' => 'Equipments', + 'Inspections' => 'Inspektionen', + 'EquipmentInspectionTypes' => 'Equipment Inspektionstypen', + 'EquipmentAttributes' => 'Equipment Attribute', +]]; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php new file mode 100644 index 0000000..43c4f68 --- /dev/null +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -0,0 +1,21 @@ + [ + 'EquipmentManagement' => 'Equipment Management', + 'Equipments' => 'Equipments', + 'Inspections' => 'Inspections', + 'EquipmentInspectionTypes' => 'Equipment Inspection Types', + 'EquipmentAttributes' => 'Equipment Attributes', +]]; diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php new file mode 100755 index 0000000..79c7a9a --- /dev/null +++ b/Theme/Backend/Lang/de.lang.php @@ -0,0 +1,42 @@ + [ + 'Equipment' => 'Equipment', + 'Equipments' => 'Equipment', + 'Status' => 'Status', + 'Name' => 'Name', + 'Type' => 'Typ', + 'Make' => 'Marke', + 'Model' => 'Modell', + 'Start' => 'Start', + 'End' => 'Ende', + 'Profile' => 'Profile', + 'Attributes' => 'Attribute', + 'Files' => 'Dateien', + 'Notes' => 'Notizen', + 'Costs' => 'Kosten', + 'Inspections' => 'Inspectionen', + 'Ein' => 'Ein', + 'History' => 'Historie', + 'Upcoming' => 'Upcoming', + 'Responsible' => 'Verantwortlich', + 'Date' => 'Datum', + 'PurchasePrice' => 'Kaufpreis', + 'LeasingFee' => 'Leasingkosten', + ':status1' => 'Aktiv', + ':status2' => 'Inaktiv', + ':status3' => 'Beschädigt', + ':status4' => 'Außer Betrieb', +]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php new file mode 100755 index 0000000..33e8539 --- /dev/null +++ b/Theme/Backend/Lang/en.lang.php @@ -0,0 +1,42 @@ + [ + 'Equipment' => 'Equipment', + 'Equipments' => 'Equipments', + 'Status' => 'Status', + 'Name' => 'Name', + 'Type' => 'Type', + 'Make' => 'Make', + 'Model' => 'Model', + 'Start' => 'Start', + 'End' => 'End', + 'Profile' => 'Profile', + 'Attributes' => 'Attributes', + 'Files' => 'Files', + 'Notes' => 'Notes', + 'Costs' => 'Costs', + 'Inspections' => 'Inspections', + 'Ein' => 'Ein', + 'History' => 'History', + 'Upcoming' => 'Upcoming', + 'Responsible' => 'Responsible', + 'Date' => 'Date', + 'PurchasePrice' => 'Purchase Price', + 'LeasingFee' => 'Leasing Fee', + ':status1' => 'Active', + ':status2' => 'Inactive', + ':status3' => 'Damaged', + ':status4' => 'Out of order', +]]; diff --git a/Theme/Backend/attribute-type-list.tpl.php b/Theme/Backend/attribute-type-list.tpl.php new file mode 100755 index 0000000..ef6e347 --- /dev/null +++ b/Theme/Backend/attribute-type-list.tpl.php @@ -0,0 +1,71 @@ +data['attributes']; + +echo $this->data['nav']->render(); ?> + +
+
+
+
getHtml('AttributeTypes', 'Attribute', 'Backend'); ?>
+
+ + + + + $value) : ++$count; + $url = UriFactory::build('{/base}/fleet/equipment/attribute/type?{?}&id=' . $value->id); + ?> + +
getHtml('ID', '0', '0'); ?> + + + + getHtml('Name'); ?> + + + +
id; ?> + printHtml($value->getL11n()); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+
diff --git a/Theme/Backend/attribute-type.tpl.php b/Theme/Backend/attribute-type.tpl.php new file mode 100755 index 0000000..391c75f --- /dev/null +++ b/Theme/Backend/attribute-type.tpl.php @@ -0,0 +1,98 @@ +data['attribute']; +$l11ns = $this->data['l11ns']; + +echo $this->data['nav']->render(); ?> + +
+
+
+
getHtml('Attribute', 'Attribute', 'Backend'); ?>
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
+
getHtml('Language', '0', '0'); ?>
+ + + + + $value) : ++$c; ?> + +
+ + getHtml('Language', '0', '0'); ?> + getHtml('Title', 'Attribute', 'Backend'); ?> +
+ + getLanguage())); ?> + content; ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
diff --git a/Theme/Backend/equipment-list.tpl.php b/Theme/Backend/equipment-list.tpl.php new file mode 100755 index 0000000..4bfbba5 --- /dev/null +++ b/Theme/Backend/equipment-list.tpl.php @@ -0,0 +1,100 @@ +data['equipments'] ?? []; + +echo $this->data['nav']->render(); ?> +
+
+
+
getHtml('Equipments'); ?>
+
+ + + + + $value) : + ++$count; + $url = UriFactory::build('{/base}/equipment/equipment/profile?{?}&id=' . $value->id); + ?> + +
+ getHtml('ID', '0', '0'); ?> + + + + getHtml('Status'); ?> + + + + getHtml('Name'); ?> + + + + getHtml('Type'); ?> + + + +
+ printHtml((string) $value->id); ?> + getHtml(':status' . $value->status); ?> + printHtml($value->name); ?> + printHtml($value->type->getL11n()); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+
diff --git a/Theme/Backend/equipment-profile.tpl.php b/Theme/Backend/equipment-profile.tpl.php new file mode 100755 index 0000000..6d500be --- /dev/null +++ b/Theme/Backend/equipment-profile.tpl.php @@ -0,0 +1,217 @@ +data['equipment'] ?? new NullEquipment(); +$files = $equipment->files; +$equipmentImage = $this->data['equipmentImage'] ?? new NullMedia(); +$equipmentTypes = $this->data['types'] ?? []; +$attributeView = $this->data['attributeView']; + +/** + * @var \phpOMS\Views\View $this + */ +echo $this->data['nav']->render(); +?> +
+
+ +
+
+ request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>> +
+
+
+
+
getHtml('Profile'); ?>
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ id === 0) : ?> + + + + +
+
+
+ +
+
+
+ +
+
+
+
+
+ + request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>> +
+
+ render( + $equipment->attributes, + $this->data['attributeTypes'] ?? [], + $this->data['units'] ?? [], + '{/api}fleet/equipment/attribute' + ); + ?> +
+
+ + request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>> +
+ data['media-upload']->render('equipment-file', 'files', '', $equipment->files); ?> +
+ + request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> +
+ data['equipment-notes']->render('equipment-notes', '', $equipment->notes); ?> +
+ + request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>> +
+ +
+
+
+
getHtml('Upcoming'); ?>
+ + + + + +
getHtml('Date'); ?> + getHtml('Type'); ?> + getHtml('Responsible'); ?> +
+ + +
+
+
+ +
+
+
getHtml('History'); ?>
+ + + + + +
getHtml('Date'); ?> + getHtml('Type'); ?> + getHtml('Responsible'); ?> +
+ + +
+
+
+
+
+ + request->uri->fragment === 'c-tab-8' ? ' checked' : ''; ?>> +
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..2e47a08 --- /dev/null +++ b/composer.json @@ -0,0 +1,23 @@ +{ + "name": "karaka/module", + "description": "Module for Jingga.", + "authors": [ + { + "name": "Dennis Eichhorn", + "email": "spl1nes.com@googlemail.com" + } + ], + "require-dev": { + "phpunit/phpunit": ">=9.4", + "friendsofphp/php-cs-fixer": ">=3.8", + "squizlabs/php_codesniffer": ">=3.6", + "phpmd/phpmd": ">=2.9", + "phpstan/phpstan": ">=1.8.6", + "phan/phan": ">=3.2.6", + "phploc/phploc": ">=7.0", + "phpmetrics/phpmetrics": ">=2.8", + "rector/rector": ">=0.18.0" + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/composer.lock b/composer.lock new file mode 100755 index 0000000..d019236 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4856 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "eb4ece0277f659c497f1d85019ebb6b0", + "packages": [], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + }, + "time": "2023-06-03T09:27:29+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.28.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "113e09fea3d2306319ffaa2423fe3de768b28cff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/113e09fea3d2306319ffaa2423fe3de768b28cff", + "reference": "113e09fea3d2306319ffaa2423fe3de768b28cff", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" + }, + "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.2.3", + "symfony/yaml": "^5.4 || ^6.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.28.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-09-22T20:43:40+00:00" + }, + { + "name": "microsoft/tolerant-php-parser", + "version": "v0.1.2", + "source": { + "type": "git", + "url": "https://github.com/microsoft/tolerant-php-parser.git", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/3eccfd273323aaf69513e2f1c888393f5947804b", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Microsoft\\PhpParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Lourens", + "email": "roblou@microsoft.com" + } + ], + "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", + "support": { + "issues": "https://github.com/microsoft/tolerant-php-parser/issues", + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.2" + }, + "time": "2022-10-05T17:30:19+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + }, + "time": "2023-04-09T17:37:40+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.17.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + }, + "time": "2023-08-13T19:53:39+00:00" + }, + { + "name": "pdepend/pdepend", + "version": "2.15.0", + "source": { + "type": "git", + "url": "https://github.com/pdepend/pdepend.git", + "reference": "0d4d8fb87aa74c358c1c4364514017f34b4a68b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/0d4d8fb87aa74c358c1c4364514017f34b4a68b9", + "reference": "0d4d8fb87aa74c358c1c4364514017f34b4a68b9", + "shasum": "" + }, + "require": { + "php": ">=5.3.7", + "symfony/config": "^2.3.0|^3|^4|^5|^6.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0|^1.2.3", + "gregwar/rst": "^1.0", + "phpunit/phpunit": "^4.8.36|^5.7.27", + "squizlabs/php_codesniffer": "^2.0.0" + }, + "bin": [ + "src/bin/pdepend" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "PDepend\\": "src/main/php/PDepend" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Official version of pdepend to be handled with Composer", + "keywords": [ + "PHP Depend", + "PHP_Depend", + "dev", + "pdepend" + ], + "support": { + "issues": "https://github.com/pdepend/pdepend/issues", + "source": "https://github.com/pdepend/pdepend/tree/2.15.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/pdepend/pdepend", + "type": "tidelift" + } + ], + "time": "2023-09-22T02:30:39+00:00" + }, + { + "name": "phan/phan", + "version": "5.4.2", + "source": { + "type": "git", + "url": "https://github.com/phan/phan.git", + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phan/phan/zipball/4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0|^3.0", + "ext-filter": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.4", + "microsoft/tolerant-php-parser": "0.1.2", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.1.3", + "symfony/console": "^3.2|^4.0|^5.0|^6.0", + "symfony/polyfill-mbstring": "^1.11.0", + "symfony/polyfill-php80": "^1.20.0", + "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.16+ is recommended.", + "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", + "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.", + "ext-var_representation": "Suggested for converting values to strings in issue messages" + }, + "bin": [ + "phan", + "phan_client", + "tocheckstyle" + ], + "type": "project", + "autoload": { + "psr-4": { + "Phan\\": "src/Phan" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + }, + { + "name": "Rasmus Lerdorf" + }, + { + "name": "Andrew S. Morrison" + } + ], + "description": "A static analyzer for PHP", + "keywords": [ + "analyzer", + "php", + "static" + ], + "support": { + "issues": "https://github.com/phan/phan/issues", + "source": "https://github.com/phan/phan/tree/5.4.2" + }, + "time": "2023-03-03T17:20:24+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.7.3", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + }, + "time": "2023-08-12T11:01:26+00:00" + }, + { + "name": "phploc/phploc", + "version": "7.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phploc.git", + "reference": "af0d5fc84f3f7725513ba59cdcbe670ac2a4532a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/af0d5fc84f3f7725513ba59cdcbe670ac2a4532a", + "reference": "af0d5fc84f3f7725513ba59cdcbe670ac2a4532a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0", + "sebastian/cli-parser": "^1.0", + "sebastian/version": "^3.0" + }, + "bin": [ + "phploc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "A tool for quickly measuring the size of a PHP project.", + "homepage": "https://github.com/sebastianbergmann/phploc", + "support": { + "issues": "https://github.com/sebastianbergmann/phploc/issues", + "source": "https://github.com/sebastianbergmann/phploc/tree/7.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-12-07T05:51:20+00:00" + }, + { + "name": "phpmd/phpmd", + "version": "2.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpmd/phpmd.git", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmd/phpmd/zipball/dad0228156856b3ad959992f9748514fa943f3e3", + "reference": "dad0228156856b3ad959992f9748514fa943f3e3", + "shasum": "" + }, + "require": { + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0", + "ext-xml": "*", + "pdepend/pdepend": "^2.12.1", + "php": ">=5.3.9" + }, + "require-dev": { + "easy-doc/easy-doc": "0.0.0 || ^1.3.2", + "ext-json": "*", + "ext-simplexml": "*", + "gregwar/rst": "^1.0", + "mikey179/vfsstream": "^1.6.8", + "phpunit/phpunit": "^4.8.36 || ^5.7.27", + "squizlabs/php_codesniffer": "^2.0" + }, + "bin": [ + "src/bin/phpmd" + ], + "type": "library", + "autoload": { + "psr-0": { + "PHPMD\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Manuel Pichler", + "email": "github@manuel-pichler.de", + "homepage": "https://github.com/manuelpichler", + "role": "Project Founder" + }, + { + "name": "Marc Würth", + "email": "ravage@bluewin.ch", + "homepage": "https://github.com/ravage84", + "role": "Project Maintainer" + }, + { + "name": "Other contributors", + "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", + "role": "Contributors" + } + ], + "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", + "homepage": "https://phpmd.org/", + "keywords": [ + "mess detection", + "mess detector", + "pdepend", + "phpmd", + "pmd" + ], + "support": { + "irc": "irc://irc.freenode.org/phpmd", + "issues": "https://github.com/phpmd/phpmd/issues", + "source": "https://github.com/phpmd/phpmd/tree/2.13.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/phpmd/phpmd", + "type": "tidelift" + } + ], + "time": "2022-09-10T08:44:15+00:00" + }, + { + "name": "phpmetrics/phpmetrics", + "version": "v2.8.2", + "source": { + "type": "git", + "url": "https://github.com/phpmetrics/PhpMetrics.git", + "reference": "4b77140a11452e63c7a9b98e0648320bf6710090" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/4b77140a11452e63c7a9b98e0648320bf6710090", + "reference": "4b77140a11452e63c7a9b98e0648320bf6710090", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "nikic/php-parser": "^3|^4", + "php": ">=5.5" + }, + "replace": { + "halleck45/php-metrics": "*", + "halleck45/phpmetrics": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/dom-crawler": "^3.0 || ^4.0 || ^5.0" + }, + "bin": [ + "bin/phpmetrics" + ], + "type": "library", + "autoload": { + "files": [ + "./src/functions.php" + ], + "psr-0": { + "Hal\\": "./src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Lépine", + "email": "lepinejeanfrancois@yahoo.fr", + "homepage": "http://www.lepine.pro", + "role": "Copyright Holder" + } + ], + "description": "Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !", + "homepage": "http://www.phpmetrics.org", + "keywords": [ + "analysis", + "qa", + "quality", + "testing" + ], + "support": { + "issues": "https://github.com/PhpMetrics/PhpMetrics/issues", + "source": "https://github.com/phpmetrics/PhpMetrics/tree/v2.8.2" + }, + "time": "2023-03-08T15:03:36+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.24.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1" + }, + "time": "2023-09-18T12:18:02+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.10.35", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e730e5facb75ffe09dfb229795e8c01a459f26c3", + "reference": "e730e5facb75ffe09dfb229795e8c01a459f26c3", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2023-09-19T15:27:56+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.29", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-19T04:57:46+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.13", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f3d767f7f9e191eab4189abe41ab37797e30b1be", + "reference": "f3d767f7f9e191eab4189abe41ab37797e30b1be", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.13" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-09-19T05:39:22+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "rector/rector", + "version": "0.18.3", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "ba7988e3e028e68e07191d75b0d5473ac320c5e7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/ba7988e3e028e68e07191d75b0d5473ac320c5e7", + "reference": "ba7988e3e028e68e07191d75b0d5473ac320c5e7", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.10.31" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.18.3" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2023-09-12T20:18:14+00:00" + }, + { + "name": "sabre/event", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/event.git", + "reference": "d7da22897125d34d7eddf7977758191c06a74497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497", + "reference": "d7da22897125d34d7eddf7977758191c06a74497", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" + }, + "type": "library", + "autoload": { + "files": [ + "lib/coroutine.php", + "lib/Loop/functions.php", + "lib/Promise/functions.php" + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "sabre/event is a library for lightweight event-based programming", + "homepage": "http://sabre.io/event/", + "keywords": [ + "EventEmitter", + "async", + "coroutine", + "eventloop", + "events", + "hooks", + "plugin", + "promise", + "reactor", + "signal" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2021-11-04T06:51:17+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bde739e7565280bda77be70044ac1047bc007e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:26:13+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2023-02-22T23:07:41+00:00" + }, + { + "name": "symfony/config", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", + "reference": "b47ca238b03e7b0d7880ffd1cf06e8d637ca1467", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-19T20:22:16+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", + "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-16T10:10:12+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "68a5a9570806a087982f383f6109c5e925892a49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/68a5a9570806a087982f383f6109c5e925892a49", + "reference": "68a5a9570806a087982f383f6109c5e925892a49", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.2.10" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<6.3", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-16T17:55:17+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-06T06:56:43+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-06-01T08:30:39+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-31T08:31:44+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-12T14:21:09+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "875e90aeea2777b6f135677f618529449334a612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-28T09:04:16+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/process", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-07T10:39:22+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-16T10:14:28+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "53d1a83225002635bca3482fcbf963001313fb68" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", + "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-05T08:41:27+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v6.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df1f8aac5751871b83d30bf3e2c355770f8f0691", + "reference": "df1f8aac5751871b83d30bf3e2c355770f8f0691", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v6.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-16T18:14:47+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" + }, + { + "name": "tysonandre/var_representation_polyfill", + "version": "0.1.3", + "source": { + "type": "git", + "url": "https://github.com/TysonAndre/var_representation_polyfill.git", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.2.0|^8.0.0" + }, + "provide": { + "ext-var_representation": "*" + }, + "require-dev": { + "phan/phan": "^5.4.1", + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-var_representation": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, + "autoload": { + "files": [ + "src/var_representation.php" + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + } + ], + "description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export", + "keywords": [ + "var_export", + "var_representation" + ], + "support": { + "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" + }, + "time": "2022-08-31T12:59:22+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.2.0" +} diff --git a/info.json b/info.json new file mode 100755 index 0000000..176a22b --- /dev/null +++ b/info.json @@ -0,0 +1,49 @@ +{ + "name": { + "id": 1008400000, + "internal": "EquipmentManagement", + "external": "Equipment Management" + }, + "category": "Equipment", + "version": "1.0.0", + "requirements": { + "phpOMS": "1.0.0", + "phpOMS-db": "1.0.0" + }, + "creator": { + "name": "Jingga", + "website": "jingga.app" + }, + "description": "The buisness module.", + "directory": "EquipmentManagement", + "dependencies": { + "Admin": "1.0.0", + "Profile": "1.0.0", + "Media": "1.0.0", + "Editor": "1.0.0" + }, + "providing": { + "Navigation": "*", + "Media": "*" + }, + "load": [ + { + "pid": [ + "/equipment" + ], + "type": 4, + "for": 0, + "from": "EquipmentManagement", + "file": "EquipmentManagement" + }, + { + "pid": [ + "/" + ], + "type": 5, + "from": "EquipmentManagement", + "for": "Navigation", + "file": "Navigation" + } + ] +} diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php new file mode 100755 index 0000000..2f78ee8 --- /dev/null +++ b/tests/Admin/AdminTest.php @@ -0,0 +1,27 @@ + [ + 'core' => [ + 'masters' => [ + 'admin' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'insert' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'select' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'update' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'delete' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'schema' => [ + 'db' => 'mysql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '3306', /* db host port */ + 'login' => 'root', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + ], + 'postgresql' => [ + 'admin' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'insert' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'select' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'update' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'delete' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'schema' => [ + 'db' => 'pgsql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '5432', /* db host port */ + 'login' => 'postgres', /* db login name */ + 'password' => 'root', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + ], + 'sqlite' => [ + 'admin' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'insert' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'select' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'update' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'delete' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'schema' => [ + 'db' => 'sqlite', /* db type */ + 'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + ], + 'mssql' => [ + 'admin' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'insert' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'select' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'update' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'delete' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + 'schema' => [ + 'db' => 'mssql', /* db type */ + 'host' => '127.0.0.1', /* db host address */ + 'port' => '1433', /* db host port */ + 'login' => 'sa', /* db login name */ + 'password' => 'c0MplicatedP@ssword', /* db login password */ + 'database' => 'oms', /* db name */ + 'weight' => 1000, /* db table prefix */ + 'datetimeformat' => 'Y-m-d H:i:s', + ], + ], + ], + ], + 'cache' => [ + 'redis' => [ + 'db' => 1, + 'host' => '127.0.0.1', + 'port' => 6379, + ], + 'memcached' => [ + 'host' => '127.0.0.1', + 'port' => 11211, + ], + ], + 'mail' => [ + 'imap' => [ + 'host' => '127.0.0.1', + 'port' => 143, + 'ssl' => false, + 'user' => 'test', + 'password' => '123456', + ], + 'pop3' => [ + 'host' => '127.0.0.1', + 'port' => 25, + 'ssl' => false, + 'user' => 'test', + 'password' => '123456', + ], + ], + 'log' => [ + 'file' => [ + 'path' => __DIR__ . '/Logs', + ], + ], + 'page' => [ + 'root' => '/', + 'https' => false, + ], + 'app' => [ + 'path' => __DIR__, + 'default' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + 'domains' => [ + '127.0.0.1' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + ], + ], + 'socket' => [ + 'master' => [ + 'host' => '127.0.0.1', + 'limit' => 300, + 'port' => 4310, + ], + ], + 'language' => [ + 'en', + ], + 'apis' => [ + ], +]; + +// Reset database +if (\defined('RESET') && RESET === '1') { + if (\extension_loaded('pdo_mysql')) { + try { + $db = new \PDO('mysql:host=' . + $CONFIG['db']['core']['masters']['admin']['host'], + $CONFIG['db']['core']['masters']['admin']['login'], + $CONFIG['db']['core']['masters']['admin']['password'] + ); + $db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['masters']['admin']['database']); + $db->exec('CREATE DATABASE IF NOT EXISTS ' . $CONFIG['db']['core']['masters']['admin']['database']); + $db = null; + } catch (\Throwable $_) { + echo "\nCouldn't connect to MYSQL DB\n"; + } + } + + if (\extension_loaded('pdo_pgsql')) { + try { + $db = new \PDO('pgsql:host=' . + $CONFIG['db']['core']['postgresql']['admin']['host'], + $CONFIG['db']['core']['postgresql']['admin']['login'], + $CONFIG['db']['core']['postgresql']['admin']['password'] + ); + $db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['postgresql']['admin']['database']); + $db->exec('CREATE DATABASE ' . $CONFIG['db']['core']['postgresql']['admin']['database']); + $db = null; + } catch (\Throwable $_) { + echo "\nCouldn't connect to POSTGRESQL DB\n"; + } + } + + if (\extension_loaded('pdo_sqlsrv')) { + try { + $db = new \PDO('sqlsrv:Server=' . + $CONFIG['db']['core']['mssql']['admin']['host'], + $CONFIG['db']['core']['mssql']['admin']['login'], + $CONFIG['db']['core']['mssql']['admin']['password'] + ); + $db->exec('DROP DATABASE IF EXISTS ' . $CONFIG['db']['core']['mssql']['admin']['database']); + $db->exec('CREATE DATABASE ' . $CONFIG['db']['core']['mssql']['admin']['database']); + $db = null; + } catch (\Throwable $_) { + echo "\nCouldn't connect to MSSQL DB\n"; + } + } +} + +$httpSession = new HttpSession(); +$GLOBALS['session'] = $httpSession; + +$GLOBALS['dbpool'] = new DatabasePool(); +$GLOBALS['dbpool']->create('admin', $CONFIG['db']['core']['masters']['admin']); +$GLOBALS['dbpool']->create('select', $CONFIG['db']['core']['masters']['select']); +$GLOBALS['dbpool']->create('insert', $CONFIG['db']['core']['masters']['insert']); +$GLOBALS['dbpool']->create('update', $CONFIG['db']['core']['masters']['update']); +$GLOBALS['dbpool']->create('delete', $CONFIG['db']['core']['masters']['delete']); +$GLOBALS['dbpool']->create('schema', $CONFIG['db']['core']['masters']['schema']); + +DataMapperFactory::db($GLOBALS['dbpool']->get()); + +$GLOBALS['frameworkpath'] = '/phpOMS/'; + +function phpServe() : void +{ + // OS detection + $isWindows = \stristr(\php_uname('s'), 'Windows') !== false; + + // Command that starts the built-in web server + if ($isWindows) { + $command = \sprintf( + 'wmic process call create "php -S %s:%d -t %s" | find "ProcessId"', + WEB_SERVER_HOST, + WEB_SERVER_PORT, + __DIR__ . '/../' . WEB_SERVER_DOCROOT + ); + + $killCommand = 'taskkill /f /pid '; + } else { + $command = \sprintf( + 'php -S %s:%d -t %s >/dev/null 2>&1 & echo $!', + WEB_SERVER_HOST, + WEB_SERVER_PORT, + WEB_SERVER_DOCROOT + ); + + $killCommand = 'kill '; + } + + // Execute the command and store the process ID + $output = []; + echo 'Starting server...' . \PHP_EOL; + echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL; + echo \sprintf(' %s', $command); + \exec($command, $output); + + // Get PID + if ($isWindows) { + $pid = \explode('=', $output[0]); + $pid = \str_replace(' ', '', $pid[1]); + $pid = \str_replace(';', '', $pid); + } else { + $pid = (int) $output[0]; + } + + // Log + echo \sprintf( + ' %s - Web server started on %s:%d with PID %d', + \date('r'), + WEB_SERVER_HOST, + WEB_SERVER_PORT, + $pid + ) . \PHP_EOL; + + // Kill the web server when the process ends + \register_shutdown_function(function() use ($killCommand, $pid) : void { + echo \PHP_EOL . 'Stopping server...' . \PHP_EOL; + echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL; + \exec($killCommand . $pid); + }); +} + +try { + \phpServe(); +} catch(\Throwable $t) { + echo $t->getMessage(); +} diff --git a/tests/Controller/Api/ApiControllerAttributeTrait.php b/tests/Controller/Api/ApiControllerAttributeTrait.php new file mode 100755 index 0000000..d0bd836 --- /dev/null +++ b/tests/Controller/Api/ApiControllerAttributeTrait.php @@ -0,0 +1,220 @@ +header->account = 1; + $request->setData('name', 'test_attribute'); + $request->setData('title', 'EN:1'); + $request->setData('language', ISO639x1Enum::_EN); + + $this->attrModule->apiEquipmentAttributeTypeCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeTypeL11nCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', 'DE:2'); + $request->setData('type', '1'); + $request->setData('language', ISO639x1Enum::_DE); + + $this->attrModule->apiEquipmentAttributeTypeL11nCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeValueIntCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('default', '1'); + $request->setData('type', '1'); + $request->setData('value', '1'); + $request->setData('language', ISO639x1Enum::_DE); + $request->setData('country', ISO3166TwoEnum::_DEU); + + $this->attrModule->apiEquipmentAttributeValueCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeValueStrCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('type', '1'); + $request->setData('value', '1'); + $request->setData('language', ISO639x1Enum::_DE); + $request->setData('country', ISO3166TwoEnum::_DEU); + + $this->attrModule->apiEquipmentAttributeValueCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeValueFloatCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('type', '1'); + $request->setData('value', '1.1'); + $request->setData('language', ISO639x1Enum::_DE); + $request->setData('country', ISO3166TwoEnum::_DEU); + + $this->attrModule->apiEquipmentAttributeValueCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeValueDatCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('type', '1'); + $request->setData('value', '2020-08-02'); + $request->setData('language', ISO639x1Enum::_DE); + $request->setData('country', ISO3166TwoEnum::_DEU); + + $this->attrModule->apiEquipmentAttributeValueCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeCreate() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('ref', '1'); + $request->setData('value', '1'); + $request->setData('type', '1'); + + $this->attrModule->apiEquipmentAttributeCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeValueCreateInvalidData() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('invalid', '1'); + + $this->attrModule->apiEquipmentAttributeValueCreate($request, $response); + self::assertEquals(RequestStatusCode::R_400, $response->header->status); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeTypeCreateInvalidData() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('invalid', '1'); + + $this->attrModule->apiEquipmentAttributeTypeCreate($request, $response); + self::assertEquals(RequestStatusCode::R_400, $response->header->status); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeTypeL11nCreateInvalidData() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('invalid', '1'); + + $this->attrModule->apiEquipmentAttributeTypeL11nCreate($request, $response); + self::assertEquals(RequestStatusCode::R_400, $response->header->status); + } + + /** + * @covers Modules\EquipmentManagement\Controller\ApiEquipmentAttributeController + * @group module + */ + public function testApiEquipmentAttributeCreateInvalidData() : void + { + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('invalid', '1'); + + $this->attrModule->apiEquipmentAttributeCreate($request, $response); + self::assertEquals(RequestStatusCode::R_400, $response->header->status); + } +} diff --git a/tests/Controller/Api/ApiControllerEquipmentTrait.php b/tests/Controller/Api/ApiControllerEquipmentTrait.php new file mode 100644 index 0000000..b16f77d --- /dev/null +++ b/tests/Controller/Api/ApiControllerEquipmentTrait.php @@ -0,0 +1,50 @@ +execute(); + $equipmentTypeCount = \count($equipmentType); + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $LOREM = \array_slice(Text::LOREM_IPSUM, 0, 25); + $LOREM_COUNT = \count($LOREM) - 1; + + $request->header->account = 1; + $request->setData('name', \ucfirst(Text::LOREM_IPSUM[\mt_rand(0, $LOREM_COUNT - 1)])); + $request->setData('type', \mt_rand(1, $equipmentTypeCount)); + $request->setData('status', 1); + + $this->module->apiEquipmentCreate($request, $response); + self::assertGreaterThan(0, $response->get('')['response']->id); + } +} diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php new file mode 100755 index 0000000..68a4363 --- /dev/null +++ b/tests/Controller/ApiControllerTest.php @@ -0,0 +1,99 @@ +app = new class() extends ApplicationAbstract + { + protected string $appName = 'Api'; + }; + + $this->app->dbPool = $GLOBALS['dbpool']; + $this->app->unitId = 1; + $this->app->accountManager = new AccountManager($GLOBALS['session']); + $this->app->appSettings = new CoreSettings(); + $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../../Modules/'); + $this->app->dispatcher = new Dispatcher($this->app); + $this->app->eventManager = new EventManager($this->app->dispatcher); + $this->app->eventManager->importFromFile(__DIR__ . '/../../../../Web/Api/Hooks.php'); + $this->app->sessionManager = new HttpSession(36000); + $this->app->l11nManager = new L11nManager(); + + $account = new Account(); + TestUtils::setMember($account, 'id', 1); + + $permission = new AccountPermission(); + $permission->unit = 1; + $permission->app = 2; + $permission->setPermission( + PermissionType::READ + | PermissionType::CREATE + | PermissionType::MODIFY + | PermissionType::DELETE + | PermissionType::PERMISSION + ); + + $account->addPermission($permission); + + $this->app->accountManager->add($account); + $this->app->router = new WebRouter(); + + $this->module = $this->app->moduleManager->get('EquipmentManagement', 'ApiEquipment'); + $this->attrModule = $this->app->moduleManager->get('EquipmentManagement', 'ApiEquipmentAttribute'); + + TestUtils::setMember($this->module, 'app', $this->app); + TestUtils::setMember($this->attrModule, 'app', $this->app); + } + + use ApiControllerEquipmentTrait; + use ApiControllerAttributeTrait; +} diff --git a/tests/Models/Vehicle.php b/tests/Models/Vehicle.php new file mode 100755 index 0000000..3eab9df --- /dev/null +++ b/tests/Models/Vehicle.php @@ -0,0 +1,20 @@ + + + + + ../ + + + ../vendor* + ../MainRepository* + ../Admin/Install/Application* + ../phpOMS* + ../tests* + ../*/tests* + ../**/tests* + */tests* + ../* + ../* + ../* + ../* + ../* + ../**/test* + ../**/Theme* + ../**/Admin/Routes* + ../**/Admin/Hooks* + ../**/Admin/Install* + ../Media/Files* + + + + + + + + + ../MainRepository/Install/tests* + + + ../tests* + + + + + volume + maybe + + + + + + + + + + + + + +