adressermittlung.de - NE Consulting Code Repo
  • Twig 51.9%
  • PHP 37.8%
  • CSS 8.6%
  • JavaScript 0.8%
  • Shell 0.5%
  • Other 0.4%
Find a file
mrouissi c449c5adbe
All checks were successful
ci / validate (push) Successful in 8s
deploy-dev / deploy (push) Successful in 11s
fix(riser): Harden response node getters against null returns
The RISER error path carried the same null-vs-strict-return-type landmine
that crashed hasError(): Error::getText()/getNumber() and the Receipt getters
returned possibly-null properties, and getError()/getReceipt() could be null
while callers dereference them directly. A bare or malformed RISER error
(error="true" without an <Error> node, or missing attributes) would 500 the
inquiry / payment-confirm path. Cast every node getter to non-null and make
getError()/getReceipt() always return an (empty) node. Adds regression tests
for the bare/malformed error and receipt-less success cases.
2026-06-01 12:31:23 +02:00
.forgejo ci: Add gated production deploy workflow (manual approval, SSH to prod) 2026-05-31 20:45:29 +02:00
bin feat: Upgrade to PHP 8.4 and Symfony 6.4 2026-05-29 15:52:55 +02:00
config fix: Handle RISER result-mail failures and missing WEBSITE_HOST; remove dead route 2026-05-30 10:27:00 +02:00
public feat: Upgrade to PHP 8.4 and Symfony 6.4 2026-05-29 15:52:55 +02:00
src fix(riser): Harden response node getters against null returns 2026-06-01 12:31:23 +02:00
templates feat: Upgrade to PHP 8.4 and Symfony 6.4 2026-05-29 15:52:55 +02:00
tests fix(riser): Harden response node getters against null returns 2026-06-01 12:31:23 +02:00
translations chore: Move application to repository root 2026-05-29 14:16:25 +02:00
.env-old chore: Move application to repository root 2026-05-29 14:16:25 +02:00
.env.dist chore: Replace Swiftmailer MAILER_URL with MAILER_DSN in .env.dist 2026-05-29 17:14:42 +02:00
.env.test test: Add PHPUnit harness and run it in CI 2026-05-31 17:38:25 +02:00
.gitignore chore: Move application to repository root 2026-05-29 14:16:25 +02:00
composer.json test: Add PHPUnit harness and run it in CI 2026-05-31 17:38:25 +02:00
composer.lock test: Add PHPUnit harness and run it in CI 2026-05-31 17:38:25 +02:00
phpunit.xml.dist test: Add PHPUnit harness and run it in CI 2026-05-31 17:38:25 +02:00
README.md chore: Move application to repository root 2026-05-29 14:16:25 +02:00
symfony.lock chore: Move application to repository root 2026-05-29 14:16:25 +02:00
test_email.php chore: Move application to repository root 2026-05-29 14:16:25 +02:00

Adressermittlung.de

Installation

Systemvoraussetzungen

  • PHP >= 7.0
  • ext-soap
  • ext-json
  • eine existierende (leere) Datenbank.
Ordnerstruktur
├── bin/
└── www/

Die Ordner sind im Prinzip beliebig benennbar. Im Verzeichnis www wird das Projekt ausgechecked und in bin liegen benötigte binaries. Es muss deshalb darauf geachtet werden, dass bin im pfad liegt:

echo "export PATH=\$PATH:~/bin" >> ~/.bashrc
composer

composer installieren via

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar ~/bin/composer
wkhtmltopdf
Installationsanleitung für Debian-System:
cd ~
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb
dpkg -x wkhtmltox_0.12.5-1.stretch_amd64.deb .
cp usr/local/bin/* bin/
rm -r usr
rm wkhtmltox_0.12.5-1.stretch_amd64.deb

Installation des Projekts

Ins Projektverzeichnis wechseln und Repository auschecken:

cd ~/www
git clone git@bitbucket.org:adressermittlung/adressermittlung.git .

Abhängigkeiten installieren:

composer install
composer update

Die Ordnerstruktur sollte nun wie folgt aussehen:

├── bin/
│   ├── composer
│   ├── wkhtmltoimage
│   └── wkhtmltopdf
└── www/
    ├── bin/
    ├── config/
    ├── public/
    ├── src/
    ├── templates/
    ├── vendor/
    ├── composer.json
    ├── composer.lock
    ├── .env.dist
    ├── .gitignore
    ├── README.md
    └── symfony.lock

Konfiguration

Alle wesentlichen Konfigurationsparameter stehen in .env.dist, jedoch sind diese leer, bzw. mit Beispieldaten belegt. Denn, Regel Nr. 1: Niemals nie keine Passwörter ins Repository!!!1elf

Es muss im nächsten Schritt eine neue Konfigurationsdatei aus der Vorlage erstellt werden:

cd ~/www
cp .env.dist .env

Die Konfiguration sollte vollständig und gewissenhaft befüllt werden, mit besonderem Augenmerk auf APP_ENV, welches dev oder prod sein kann und damit auf eine Entwicklungs- oder Liveumgebung hindeutet. Alle anderen Konfigurationsparameter sollten dann entsprechend Test- oder Livedaten sein.

Datenbank

Konfiguration der Datenbank und -verbindung:

# ~/www/.env
...
DATABASE_URL=mysql://db_user:db_password@db_host:db_port/db_name
...

Erstellung der Tabellen:

cd ~/www
bin/console doctrine:schema:update --force

E-Mail-Versand via smtp

Zugangsdaten im Projectfacts

# ~/www/.env
...
MAILER_URL=smtp://mail.webfox01.net:587?encryption=tls&auth_mode=login&username={username}&password={passwort}
...

Es muss darauf geachtet werden, dass username und passwort url-enkodiert sein müssen, falls sie Sonderzeichen enthalten.

PayPal

Stripe

  • Zugangsdaten im Projectfacts
  • Einloggen auf https://dashboard.stripe.com/login
  • API-Zugangsdaten unter https://dashboard.stripe.com/account/apikeys
  • Test-API-Zugangsdaten bekommt man auf der gleichen Seite wenn man unten links im Menü den Schalter View test data aktiviert
  • STRIPE_PUBLIC_KEY in unserer Config entspricht dem Publishable key
  • STRIPE_API_KEY in unserer Config entspricht dem Secret key
  • Webhook
    • wechsel zu https://dashboard.stripe.com/account/webhooks
    • Auch hier zwischen live und dev unterscheiden: unten links View test data an oder aus
    • Falls noch nicht geschehen, Webhook einrichten:
    • Klick auf (existenten oder neu erstellten) Webhook
    • Unten bei Signing secret auf Click to reveal klicken
    • Der Code wird in unserer Config bei STRIPE_WEBHOOK_SIGNATURE eingetragen

RISER ID

  • Zugansdaten im Projectfacts
  • RISER_EMPLOYEE muss mit Kennung befüllt werden
  • Für dev: RISER_CLIENT_NAME muss leer bleiben
  • Für live: RISER_CLIENT_NAME muss mit Name Auftraggeber (siehe projectfacts) befüllt werden

SMS-Versand (Massenversand.de)

Siehe Projectfacts Zugang Massenversand.de > API

Sonstiges

Die anderen Felder sollten selbsterklärend sein. INQUIRY_PRICE und TAX werden als float angegeben,TAX muss dabei das Format 0.19 haben, wenn die Steuer 19% beträgt.

WEBSITE_HOST und WEBSITE_SCHEME sind für die Cronjobs notwendig, da die nicht über den Webserver laufen und deswegen auch nicht die Seiten-URL kennen. Die wird aber für Rechnungserstellung und E-Mail-Versand benötigt. Beipsile für live:

WEBSITE_HOST=adressermittlung.de
WEBSITE_SCHEME=https