- php 8.0
- Docker
- MySql 8
- Run Docker.
- Run in shell:
bash docker-compose up -d workspace nginx mysql php-fpm
- create DB
- Run in texchange folder
git checkout master && cp .env.example .env
- Run in
laradock
folderdocker-compose exec -u laradock workspace bash
; - Edit .env to correct values
- Run in container shell
composer install --ignore-platform-req
- For CurrencyAdapters with nodeJS middleware you can see
/node_js_component
folder, so need prepare/node_js_component/config.json
and run docker container for/node_js_component/server.js
p.s. after
bash composer install --ignore-platform-req
running
art key:generate
art common:build-project
#####for import Mappings from DB:
php artisan doctrine:mapping:import --namespace=App\\Doctrine\\Entity\\ xml app/Doctrine/Mappings/
#####for generate Entities from Mapping:
php artisan doctrine:generate:entities --update-entities --generate-methods /app/Doctrine/Mappings/
#####for create Migrations by Mapping:
php artisan doctrine:migrations:diff
Version changes rules:
- patch add new Currency Adapter without any other changes
- minor add new Monitoring Feature or change Strategies without any changes of ApiEndpoints
- major changes of ApiEndpoints or base communications DTOs
Before merge any branch to master to change version in next files:
config/service_definition.php
return [
'service' => [
'name' => 'NotifierFor' . config('coin_notifier.currency.ticker') . 'On' . config('coin_notifier.currency.adapter') . 'Adapter',
'type' => \Common\ApplicationRegister::APPLICATION_NOTIFIER_TYPE,
// Increment this version accordingly to rules above
'version' => "1.0.0",
],
];
- after doing commits (before doing PR) run
art common:phpcbf
- look at all files that it changed, there are some issues with sniffer (1. if there is no comma at the end of the array it will add 2 of them, which will cause error. Also it will at typehint if there is no typehint on the method param but it is on phpDoc, for the example see and run EAtrade)
- run
art common:phpcs
to see things that it can't resolve automatically - run
git fetch && art common:phpcs --branch=origin/dev
to only show changes compared todev
, make sure it'sorigin/dev
not justdev
- resolve them
- to run only one sniff use this example
./vendor/bin/phpcbf --sniffs="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" --standard="SlevomatCodingStandard" app
- for Perfect Money, dont set passwords like wt>)1C0x9e).hXX?ZLJk because it hashes it differently then php with strtoupper(md5($passPhrase)) ( maybe because of escape chars, there is nothing about it docs)