Skip to content

Commit

Permalink
Next into test (#771)
Browse files Browse the repository at this point in the history
* zms-2871-2874-minus-deletion-by-location-delete-and-orthography-mail-and-notification-buttons

* fix(deps): update dependency phpoffice/phpspreadsheet to v1.29.6 (#738)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency squizlabs/php_codesniffer to v3.11.2 (#751)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency sass to v1.83.0 (#750)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update dependency phpoffice/phpspreadsheet to v1.29.7 (#752)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency phpspec/prophecy-phpunit to v2.3.0 (#647)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(ZMS-3500) Differentiate between editing and booking a new appointment when selecting the date (#757)

* chore(deps): update dependency seld/jsonlint to v1.11.0 (#754)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency sass to v1.83.1 (#760)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency core-js to v3.40.0 (#761)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(MPDZBS-877 ZMS-1232 ZMS-2509 ZMS-2510 ZMS-2511 ZMS-2512 ZMS-2513 ZMS-2514 ZMS-2515 ZMS-2516 ZMS-2517 ZMS-2518 ZMS-2519 ZMS-2520 ZMS-2521 ZMS-2523 ZMS-2993): Zmscitizenapi into next (#769)

* update readmes

* refactor some functions to base controller class

* add zmsapi methods to base controller

* add helper methods to base controller

* refactored into services and controllers

* remove duplicate function definitions

* move helpers from base controller to new utility helper

* add a method

* Feature mpdzbs 887 zmscitizenapi post reserve appointment and refactor (#574)

* endpoint working

* fix unit tests

* one working test for post-reserve

* some clean up

* feat(ZMS-2517): fix up response for the reserve post request

* feat(ZMS-2517): add more unit tests for validations

* feat(ZMS-2517): add more unit tests for validations

* feat(ZMS-2517): Zmscitizenapi Refactor Part 1 of 3 move controllers back to root

* feat(ZMS-2517): Zmscitizenapi Refactor Part 2 of 3 create ZmsApiFacadeService ZmsApiClientService ValidationService MapperService UtilityHelper and delete fragmented services

* feat(ZMS-2517): Zmscitizenapi Refactor Part 3 of 3 clean up validations and unit tests

---------

Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>

* feat(MPDZBS-877): Readd zmscitizenapi to github workflow

* feat(MPDZBS-877): Readd files lost in github history

* feat(MPDZBS-877): Readd files lost in github history

* feat(MPDZBS-877): Resolve merge conflict in zmsentities

* feat(MPDZBS-877): Readd zmscitizenapi schemas to zmsentities deleted by github commit history

* (feat MPDZBS-877): update local env cli

* Feature mpdzbs 887 zms 2518 zmscitizenapi post update appointment (#587)

* (feat MPDZBS-877) readd citizenapi to  htaccess

* feat(MPDZBS-877 ZMS-2517): Working Appointment update with too many emails exception

* feat(MPDZBS-877 ZMS-2517): Test rendering working for update appointment test

* feat(MPDZBS-877 ZMS-2517): Add 63 validation unit tests for appointment update

* feat(MPDZBS-877 ZMS-2517): Refactor exception appointmentNotFound

* feat(MPDZBS-877 ZMS-2517): Add two new edge case exception tests

* feat(MPDZBS-877 ZMS-2517): Remove error_logs

---------

Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>

* feat(MPDZBS-877): update .gitignore

* cleanup(MPDZBS-877): Improve security and cleanup code

* fix(MPDZBS-877): fix bin configure

* fix(MPDZBS-877): fix config.example.php

* cleanup(MPDZBS-877): merge next into feature branch

* docs(MPDZBS-877): update docs for zmscitizenapi

* clean(MPDZBS-877): change friendly captcha default endpoint to eu

* clean(MPDZBS-877): change maintenance and captcha enabled to boolean

* clean(MPDZBS-877): improve internal error handling enable middleware

* feat(MPDZBS-877): return 503 for maintenance

* feat(MPDZBS-877): add generic captcha interface

* clean(MPDZBS-877): improve validation for array ids

* feat(MPDZBS-877): improve zmscitizenapi typing

* clean(MPDZBS-877): typing overhaul using zmsentities

* clean(MPDZBS-877): typing overhaul using zmsentities

* clean(MPDZBS-877): improve telephone validation regex

* clean(MPDZBS-877): improve serviceId validation regex

* clean(MPDZBS-877): fix naming issue

* clean(MPDZBS-877): make hardcoded source name dynamic

* clean(MPDZBS-877): clean up more and change citizenapi to utf8

* clean(MPDZBS-877): improve error messaging codes and expand office api with geocoordinates and address

* clean(MPDZBS-877): cleanup syntax and error handling

* clean(MPDZBS-877): cleanup syntax and error handling

* fix(MPDZBS-877): offices and services mapper

* fix(MPDZBS-877): fix reserve appointment validation

* fix(MPDZBS-877): improve some validation for empty arrays

* feat(MPDZBS-877): Improve ThinnedProcess object and cleanup some stuff with naming (#739)

* feat(MPDZB-877): Work on thinnedprocess typing

* feat(MPDZB): Refactor part 1

* feat(MPDZB): Refactor part 1

* feat(MPDZB-877): revert to processId in parameter

* feat(MPDZBS-877): refactor thinned process to object

* feat(MPDZB-877): refactor thinned process and rename controllers

---------

Co-authored-by: Tom Fink <thomasafink@Toms-MacBook-Air.local>
Co-authored-by: DDEV User <nobody@example.com>
Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>

* feat(MPDZBS-877): zmscitizenapi cleanup (#740)

* feat(MPDZB-877): Work on thinnedprocess typing

* feat(MPDZB): Refactor part 1

* feat(MPDZB): Refactor part 1

* feat(MPDZB-877): revert to processId in parameter

* feat(MPDZBS-877): refactor thinned process to object

* feat(MPDZB-877): refactor thinned process and rename controllers

* feat(MPDZBs-877): clean up more junk

---------

Co-authored-by: Tom Fink <thomasafink@Toms-MacBook-Air.local>
Co-authored-by: DDEV User <nobody@example.com>
Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>

* feat(MPDZBs-877): clean up more stuff validation improvement

* Update zmscitizenapi/src/Zmscitizenapi/Captcha.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(MPDZBs-877): clean up captcha add more tests

* feat(MPDZBS-877): Refactor Controllers and improve move typing building models

* feat(MPDZBS-877): Refactor Utilities and Helpers

* Update zmscitizenapi/src/Zmscitizenapi/Services/MapperService.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(MPDZBS-877): Fix bug

* feat(MPDZBS-877): rename scope models in zmscitizenapi

* feat(MPDZBS-877): cleanup service model

* feat(MPDZBS-877): Improve ThinnedProcess and ThinnedScope models

* fix(MPDZBS-877): swagger docs

* fix(MPDZBS-877): swagger docs

* fix(MPDZBS-877): set up models for Office Service and Captcha

* fix(MPDZBS-877): Improve captcha typing

* Update zmscitizenapi/src/Zmscitizenapi/Models/Captcha/AltchaCaptcha.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(MPDZBS-877): Improve captcha typing cleanup

* fix(MPDZBS-877): Improve captcha typing cleanup

* fix(MPDZBS-877): remove status from visual response

* fix(MPDZBS-877): Improve typing for Office Service and ThinnedScope

* fix(MPDZBS-877): Improve typing for Office Service Relations

* fix(MPDZBS-877): Improve typing for ThinnedProvider

* fix(MPDZBS-877): Refactor model lists to collections

* fix(MPDZBS-877): Improve typing for Combinable

* fix(MPDZBS-877): Cleanup AltchaCaptcha class

* fix(MPDZBS-877): Improve parameters for getAvailableAppointments

* fix(MPDZBS-877): Improve typing for AvailableDays and AvailableAppointments

* fix(MPDZBS-877): Cleanup schemas

* fix(MPDZBS-877): Cleanup schema mismatch

* fix(MPDZBS-877): Optimize next loops and schema typing

* fix(MPDZBS-877): Improve schema

* fix(MPDZBS-877): Improve schema

* fix(MPDZBS-877): Improve schema and error catching

* fix(MPDZBS-877): Improve api fetching safety

* fix(MPDZBS-877): Introduce strict typing for files with logic

* fix(MPDZBS-877): Introduce schema validation into the models

* fix(MPDZBS-877): Centralize validation, set default language to german, improve exception handling

* fix(MPDZBS-877): authKeyMissMatch error exception

* fix(MPDZBS-877): cleanup some code

* fix(MPDZBS-877): cleanup collection models

* Delete zmscitizenapi/templates/.keep

* Revert "Delete zmscitizenapi/templates/.keep"

This reverts commit 7725d44.

* clean(MPDZBS-877): remove comments

* fix(MPDZBS-877): errorCode fix

* fix(MPDZBS-877): validation input date bug and add unittest plus authKeyMismatch typo and add unittest

* clean(MPDZBS-877): remove unused vars

* feat(MPDZBS-877): Improve zmsapi exception handling

* feat(MPDZBS-877): Improve contact mapping and provider mapping

* Improve exception handling

* feat(MPDZBS-877): Refactor office model

* feat(MPDZBS-877): fix ProcessFreeSlots typing

* clean(MPDZBS-877): refactor and improve contoller legibility

* fix(MPDZBS-877): improve post request validation dont get request body on null fix

* clean(MPDZBS-877): improve OfficesByServiceList controller

* clean(MPDZBS-877): correct not yet implemented controllers

* clean(MPDZBS-877): Add null checks for requests to zmsapi

* clean(MPDZBS-877): Improve and centralize regex patterns for ValidationService

* feat(MPDZBS-877 ZMS-2523): Improve controller typing and add caching for fetchSourceData

* fix(MPDZBS-877 ZMS-2523): fix php docker version to 8.0 from 8.0.2

* clean(MPDZBS-877 ZMS-2523): Cleanup Application

* clean(MPDZBS-877 ZMS-2523): Cleanup Application

* clean(MPDZBS-877 ZMS-2523): Improve cache logger and cache permissions

* fix(MPDZBS-877 ZMS-2520): Implement preconfirmed appointment working

* clean(MPDZBS-877 ZMS-2520): remove errorlogs

* feat(MPDZBS-877 ZMS-2519 ZMS-2521): Implement appointment confirm and cancel controllers and improve request method error handling

* feat(MPDZBS-877): remove unused import statements

* clean(MPDZBS-877): fix typing

* clean(MPDZBS-877): remove unused error message

* clean(MPDZBS-877): Refactor folder structure and move logic from controllers to services

* clean(MPDZBS-877): improve input validation

* fix(MPDZBS-877): Time check with timezone

* feat(MPDZBS-877): Implement LoggerService for logging requests and when caching is set

* clean(MPDZBS-877): Remove logger redundancy

* fix(MPDZBS-877): Add logger response max size 1MB

* clean(MPDZBS-877): improve exceptions and handling in logger middleware

* feat(MPDZBS-877): optimize logger service

* feat(MPDZBS-877): optimize logger service

* clean(MPDZBS-877): improve error body logging

* feat(MPDZBS-877): optimize logger service caching

* clean(MPDZBS-877): add unit test and clean up some stuff

* clean(MPDZBS-877): add missing import

* feat(MPDZBS-877 ZMS-1232): Implement security middleware Cors Csrf Security Headers Rate Limits Request Size Limits and Request Sanitation

* feat(MPDZBS-877 ZMS-1232): Refactor contoller tests and fix cors test

* feat(MPDZBS-877 ZMS-1232): improve middleware and fix race conditions in rate limiting

* clean(MPDZBS-877 ZMS-1232): small improvements to middelware and test assertions

* clean(MPDZBS-877 ZMS-1232): reduce excessive logging

* clean(MPDZBS-877 ZMS-1232): fix race Condition LoggerService

* docs(MPDZBS-877): Add README.md

* docs(MPDZBS-877): Add README.md

* docs(MPDZBS-877): Update README.md

* docs(MPDZBS-877): Update README.md

* docs(MPDZBS-877): Update README.md

* fix(MPDZBS-877): unit test

* docs(MPDZBS-877): Update README.md

* docs(MPDZBS-877): Update README.md

* Update README.md

* clean(MPDZBS-877): Centralize environment variables

* fix(MPDZBS-877): CORS unit tests

* clean(MPDZBS-877): centralize zmsapi exception handling and write more tests

* clean(MPDZBS-877): remove error log

* feat(MPDZBS-877): add unit test

* feat(MPDZBS-877): add MapperServiceTest

* feat(MPDZBS-877): add LoggerServiceTest ExceptionServiceTest ValidationServiceTest

* feat(MPDZBS-877): add ZmsApiFacadeServiceTest

* feat(MPDZBS-877): add ZmsApiClientServiceTest

* feat(MPDZBS-877): add AppointmentByIdServiceTest

* feat(MPDZBS-877): add AppointmentByIdServiceTest

* feat(MPDZBS-877): add AppointmentCancelServiceTest

* feat(MPDZBS-877): add AppointmentConfirmServiceTest

* feat(MPDZBS-877): add Appointment tests

* feat(MPDZBS-877): add AppointmentUpdateServiceTest

* feat(MPDZBS-877): add AvailableAppointmentsListServiceTest and AvailableDaysListServiceTest

* feat(MPDZBS-877): add Service tests

* feat(MPDZBS-877): add captcha service and application tests

* feat(MPDZBS-877): remove unneeded test

* feat(MPDZBS-877): Add LanguageMiddleware and i18n support

* feat(MPDZBS-877): Add LanguageMiddlewareTest

* feat(MPDZBS-877): clean up language error messages

* feat(MPDZBS-877): disable csrf for now

* fix(MPDZBS-877): fix ip client helper

* fix(MPDZBS-877): only log error messages in english

* feat(MPDZBS-877): disable csrf for now

* fix(MPDZBS-877): routing methods post

* fix(MPDZBS-877): routing methods get

* fix(MPDZBS-877): customTextfield save on appointment update

* fix(MPDZBS-877): customTextfield unit test

* feat(MPDZBS-877): Add showAlternativeLocations to offices endpoints

* Revert "feat(MPDZBS-877): Add showAlternativeLocations to offices endpoints"

This reverts commit 63fe1a0.

---------

Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>
Co-authored-by: Tom Fink <thomasafink@Toms-MacBook-Air.local>
Co-authored-by: Thomas Fink <thomasfink@Thomass-MacBook-Air.local>
Co-authored-by: DDEV User <nobody@example.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Thomas Fink <thomasafink@thomass-air.speedport.ip>

* docs(MPDZBS-877): Update README.md

* Update .env.template

---------

Co-authored-by: matthias1996 <matthias.lorenz@muenchen.de>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: MoDaae <90261750+MoDaae@users.noreply.github.com>
Co-authored-by: Thomas Fink <thomasafink@Thomass-MacBook-Air.local>
Co-authored-by: Tom Fink <thomasafink@Toms-MacBook-Air.local>
Co-authored-by: Thomas Fink <thomasfink@Thomass-MacBook-Air.local>
Co-authored-by: DDEV User <nobody@example.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Thomas Fink <thomasafink@thomass-air.speedport.ip>
  • Loading branch information
10 people authored Jan 16, 2025
1 parent 132608a commit 6f380f1
Show file tree
Hide file tree
Showing 213 changed files with 34,094 additions and 481 deletions.
58 changes: 55 additions & 3 deletions .ddev/.env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# zms
# ZMS Core
ZMS_API_URL=https://zms.ddev.site/terminvereinbarung/api/2
ZMS_CRONROOT=1
ZMS_ENV=dev
Expand All @@ -8,5 +8,57 @@ MYSQL_DATABASE=db
MYSQL_USER=db
MYSQL_PASSWORD=db

# xdebug
PHP_IDE_CONFIG="serverName=zms.ddev.site"
# Cache Configuration
CACHE_DIR=/var/www/html/zmscitizenapi/cache
SOURCE_CACHE_TTL=3600

# Maintenance Mode
MAINTENANCE_ENABLED=false

# Logger Configuration
LOGGER_MAX_REQUESTS=1000
LOGGER_RESPONSE_LENGTH=1048576 # 1MB
LOGGER_STACK_LINES=20
LOGGER_MESSAGE_SIZE=8192 # 8KB
LOGGER_CACHE_TTL=60
LOGGER_MAX_RETRIES=3
LOGGER_BACKOFF_MIN=100
LOGGER_BACKOFF_MAX=1000
LOGGER_LOCK_TIMEOUT=5

# Captcha Configuration
CAPTCHA_ENABLED=false
FRIENDLY_CAPTCHA_SECRET_KEY=
FRIENDLY_CAPTCHA_SITE_KEY=
FRIENDLY_CAPTCHA_ENDPOINT=https://eu-api.friendlycaptcha.eu/api/v1/siteverify
FRIENDLY_CAPTCHA_ENDPOINT_PUZZLE=https://eu-api.friendlycaptcha.eu/api/v1/puzzle
ALTCHA_CAPTCHA_SECRET_KEY=
ALTCHA_CAPTCHA_SITE_KEY=
ALTCHA_CAPTCHA_ENDPOINT=https://eu.altcha.org/form/
ALTCHA_CAPTCHA_ENDPOINT_PUZZLE=https://eu.altcha.org/

# Rate Limiting
RATE_LIMIT_MAX_REQUESTS=60
RATE_LIMIT_CACHE_TTL=60
RATE_LIMIT_MAX_RETRIES=3
RATE_LIMIT_BACKOFF_MIN=10
RATE_LIMIT_BACKOFF_MAX=50
RATE_LIMIT_LOCK_TIMEOUT=1

# Request Limits
MAX_REQUEST_SIZE=10485760 # 10MB
MAX_STRING_LENGTH=32768 # 32KB
MAX_RECURSION_DEPTH=10

# CSRF Configuration
CSRF_TOKEN_LENGTH=32
CSRF_SESSION_KEY=csrf_token

# CORS Configuration
CORS=http://localhost:8082,http://localhost:8080,http://localhost:8090,https://localhost:8091,http://localhost:3000,http://127.0.0.1:3000,https://zms.ddev.site,http://zms.ddev.site

# IP Filter Configuration
IP_BLACKLIST=

# Debug Configuration
PHP_IDE_CONFIG="serverName=localhost"
4 changes: 2 additions & 2 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ timezone: Europe/Berlin
# fail_on_hook_fail: False
# Decide whether 'ddev start' should be interrupted by a failing hook

# host_https_port: "59002"
host_https_port: "8091"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.

# host_webserver_port: "59001"
host_webserver_port: "8090"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
php_version: "8.0"
- module: zmscalldisplay
php_version: "8.0"
- module: zmscitizenapi
php_version: "8.0"
- module: zmsmessaging
php_version: "8.0"
- module: zmsstatistic
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
php_version: "8.0"
- module: zmscalldisplay
php_version: "8.0"
- module: zmscitizenapi
php_version: "8.0"
- module: zmsdldb
php_version: "8.0"
- module: zmsentities
Expand Down
8 changes: 8 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ RewriteRule ^terminvereinbarung/calldisplay(.*) /var/www/html/zmscalldisplay/pub
RewriteRule ^terminvereinbarung/calldisplay/+_(.*) /var/www/html/zmscalldisplay/public/_$1 [QSA]


# zmscitizenapi
SetEnvIf Request_URI ^/zmscitizenapi ZMS_MODULE_BASEPATH=/terminvereinbarung/api/citizen
RewriteCond %{REQUEST_URI} !^/terminvereinbarung/api/citizen/+(_|doc)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^terminvereinbarung/api/citizen(/.*)?$ /var/www/html/zmscitizenapi/public/index.php$1 [L]
RewriteRule ^terminvereinbarung/api/citizen/+(doc|_)(.*) /var/www/html/zmscitizenapi/public/$1$2 [QSA]


# zmsstatistic
SetEnvIf Request_URI ^/zmsstatistic ZMS_MODULE_BASEPATH=/terminvereinbarung/statistic
RewriteCond %{REQUEST_URI} !^/terminvereinbarung/[^/]+/+_
Expand Down
1 change: 1 addition & 0 deletions cli
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ modules = [
"zmsadmin",
"zmsapi",
"zmscalldisplay",
"zmscitizenapi",
"zmsclient",
"zmsdb",
"zmsdldb",
Expand Down
2 changes: 1 addition & 1 deletion mellon/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
convertWarningsToExceptions="true"
processIsolation="false"
forceCoversAnnotation="false"
stopOnFailure="true"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down
201 changes: 4 additions & 197 deletions zmsadmin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"$schema": "https://schema.berlin.de/queuemanagement/metaresult.json",
"error": false,
"generated": "2019-02-11T16:07:58+01:00",
"server": "Zmsapi-ENV (v2.19.02-38-g0ba2cba)"
"server": "Zmsapi"
},
"data": []
}
Loading

0 comments on commit 6f380f1

Please sign in to comment.