Skip to content

Commit 38527ef

Browse files
committed
First Commit
0 parents  commit 38527ef

File tree

107 files changed

+16551
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+16551
-0
lines changed

.env

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
###> General Config / Docker Compose Settings ###
2+
3+
# https://docs.docker.com/compose/reference/envvars/#compose_project_name
4+
COMPOSE_PROJECT_NAME=de_ixnode_php_api_version_bundle
5+
6+
# ARM64V8 name
7+
ARM64V8=arm64v8
8+
9+
# a) Either ARM64V8 image add (for non Mac arm processors)
10+
IMAGE_ADD=
11+
12+
# b) Or ARM64V8 image add (for Mac arm processors)
13+
#IMAGE_ADD="${ARM64V8}/"
14+
15+
# Namespace of this project
16+
NAMESPACE=de.ixnode.php.api.version.bundle
17+
18+
# Namespace of this project (development)
19+
NAMESPACE_DEVELOPMENT=${NAMESPACE}.development
20+
21+
# Namespace to use for host name variables (hostname safe)
22+
NAMESPACE_HOSTNAME=de-ixnode-php-api-version-bundle
23+
24+
# Namespace to use for host name variables (hostname safe) (development)
25+
NAMESPACE_HOSTNAME_DEVELOPMENT=${NAMESPACE_HOSTNAME}-development
26+
27+
# Namespace to use for host name variables (hostname safe)
28+
NAMESPACE_UNDERLINE=de_ixnode_php_api_version_bundle
29+
30+
# Namespace to use for host name variables (hostname safe) (development)
31+
NAMESPACE_HOSTNAME_UNDERLINE=${NAMESPACE_UNDERLINE}_development
32+
33+
# Namespace of app image
34+
IMAGE_APP=ixnode/php-api-version/${IMAGE_ADD}app
35+
36+
# Namespace of app image (development)
37+
IMAGE_PHP=ixnode/php-api-version/${IMAGE_ADD}php
38+
39+
# Namespace of nginx image
40+
IMAGE_NGINX=ixnode/php-api-version/${IMAGE_ADD}nginx
41+
42+
# Namespace of mysql image
43+
IMAGE_MYSQL=${IMAGE_ADD}mysql:8.0.31
44+
45+
IMAGE_ADMINER=${IMAGE_ADD}adminer:4.8.1
46+
47+
# The general URL of this project
48+
URL_PRODUCTION=php-api-version-bundle.ixnode.de
49+
50+
# The local URL of this project
51+
URL_LOCAL=api-version.localhost
52+
53+
# htpasswd -nbm ixno Omaderisave483 (do not use $$ on old composer version)
54+
GENERAL_BASICAUTH_PRODUCTION='ixno:$apr1$5JvcxkWC$iA7cBjSG3xTSO/Y/dsHZt/'
55+
56+
# Version of this app
57+
VERSION_APP=0.1.0
58+
59+
# Version of nginx image
60+
VERSION_NGINX=0.1.0
61+
62+
# Version of php image
63+
VERSION_PHP=0.1.0
64+
65+
# Version of this app
66+
VERSION_APP_LATEST=latest
67+
68+
# Set UID and GID
69+
UID=${UID}
70+
GID=${GID}
71+
72+
# Traefik network name (local)
73+
NETWORK_NAME_TRAEFIK_PUBLIC_LOCAL=traefik
74+
75+
# Traefik network name (public)
76+
NETWORK_NAME_TRAEFIK_PUBLIC_PRODUCTION=traefik-public
77+
78+
# https port
79+
PORT_HTTPS=443
80+
81+
# Internal docker adminer http port
82+
PORT_HTTP_ADMINER_INTERNAL=8080
83+
84+
# Internal docker mailhog http port
85+
PORT_HTTP_MAILHOG_INTERNAL=8025
86+
87+
# Internal docker mailhog smtp port
88+
PORT_SMTP_MAILHOG_INTERNAL=1025
89+
90+
# Expose api https port (To bypass the Traefik proxy or if it is not installed)
91+
PORT_HTTPS_API_EXPOSE=44443
92+
93+
# Expose adminer http port (To bypass the Traefik proxy or if it is not installed)
94+
PORT_HTTP_ADMINER_EXPOSE=8081
95+
96+
# Expose mailhog http port (To bypass the Traefik proxy or if it is not installed)
97+
PORT_HTTP_MAILHOG_EXPOSE=8082
98+
99+
# Expose mailhog smtp port (To bypass the Traefik proxy or if it is not installed)
100+
PORT_SMTP_MAILHOG_EXPOSE=1025
101+
102+
###< General Config / Docker Compose Settings ###
103+
104+
###> symfony/framework-bundle ###
105+
APP_ENV=dev
106+
APP_DEBUG=1
107+
APP_SECRET=3b337448a0100c94f60efc26437e0a57
108+
###< symfony/framework-bundle ###
109+
110+
###> PHP Configuration ###
111+
DOCKERFILE_PHP_FPM=php-fpm.dockerfile
112+
DOCKERFILE_NGINX=nginx.dockerfile
113+
PHP_VERSION=8.1.11
114+
PHP_VERSION_HOSTNAME=8-1-11
115+
###< PHP Configuration ###
116+
117+
###> Docker Configuration: MySQL secrets and configurations
118+
MYSQL_SERVER_ROOT_USER=root
119+
MYSQL_SERVER_ROOT_PASSWORD=secret-pass
120+
MYSQL_SERVER_DB=hdb
121+
MYSQL_SERVER_DB_TEST=hdb-test
122+
MYSQL_SERVER_PORT=3306
123+
MYSQL_SERVER_VERSION=8.0
124+
MYSQL_SERVER_DRIVER=pdo_mysql
125+
###< Docker Configuration: MySQL secrets and configurations
126+
127+
###> Docker Configuration: Mail secrets and configurations
128+
MAIL_SERVER_TRANSPORT=smtp
129+
MAIL_SERVER_HOST=localhost
130+
#MAIL_SERVER_HOST=${NAMESPACE_HOSTNAME_DEVELOPMENT}-mailhog
131+
MAIL_SERVER_PORT=1025
132+
###< Docker Configuration: Mail secrets and configurations
133+
134+
###> Docker Configuration: General configurations
135+
# Attention for EXPOSE_MYSQL_PORT: Please also make changes to the DOCTRINE_DB_PORT variable.
136+
EXPOSE_MYSQL_PORT=3336
137+
EXPOSE_MYSQL_PORT_TEST=3337
138+
###< Docker Configuration: General configurations
139+
140+
##> doctrine/doctrine-bundle (mysql) ###
141+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
142+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
143+
DOCTRINE_DB_DRIVER=${MYSQL_SERVER_DRIVER}
144+
DOCTRINE_DB_VERSION=${MYSQL_SERVER_VERSION}
145+
DOCTRINE_DB_PATH=
146+
DOCTRINE_DB_NAME=${MYSQL_SERVER_DB}
147+
DOCTRINE_DB_HOST=${ENV_DB_HOST:-127.0.0.1}
148+
# Workaround for default port for DOCTRINE_DB_PORT: Because ${ENV_DB_PORT:-${EXPOSE_MYSQL_PORT}} does not work
149+
DOCTRINE_DB_PORT=${ENV_DB_PORT:-3336}
150+
DOCTRINE_DB_USER=${MYSQL_SERVER_ROOT_USER}
151+
DOCTRINE_DB_PASS=${MYSQL_SERVER_ROOT_PASSWORD}
152+
DOCTRINE_DB_SSL_CA=
153+
DOCTRINE_DB_SSL_VERIFY_SERVER_CERT=false
154+
DOCTRINE_DB_INIT_COMMAND="SET NAMES utf8"
155+
###< doctrine/doctrine-bundle (mysql) ###
156+
157+
##> doctrine/doctrine-bundle (mysql) ###
158+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
159+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
160+
DOCTRINE_DB_DRIVER_SQLITE=${MYSQL_SERVER_DRIVER}
161+
DOCTRINE_DB_VERSION_SQLITE=${MYSQL_SERVER_VERSION}
162+
DOCTRINE_DB_PATH_SQLITE=
163+
DOCTRINE_DB_NAME_SQLITE=${MYSQL_SERVER_DB}
164+
DOCTRINE_DB_HOST_SQLITE=${ENV_DB_HOST:-127.0.0.1}
165+
# Workaround for default port for DOCTRINE_DB_PORT: Because ${ENV_DB_PORT:-${EXPOSE_MYSQL_PORT}} does not work
166+
DOCTRINE_DB_PORT_SQLITE=${ENV_DB_PORT:-3336}
167+
DOCTRINE_DB_USER_SQLITE=${MYSQL_SERVER_ROOT_USER}
168+
DOCTRINE_DB_PASS_SQLITE=${MYSQL_SERVER_ROOT_PASSWORD}
169+
DOCTRINE_DB_SSL_CA_SQLITE=
170+
DOCTRINE_DB_SSL_VERIFY_SERVER_CERT_SQLITE=false
171+
DOCTRINE_DB_INIT_COMMAND_SQLITE="SET NAMES utf8"
172+
###< doctrine/doctrine-bundle (mysql) ###
173+
174+
###> own variables ###
175+
PROJECT_NAME="PHP Api Version Bundle"
176+
PROJECT_DESCRIPTION="Provides the base API plattform functionality."
177+
API_BASE_URL=/api/v1
178+
API_COUNTRY_CODE=de_DE
179+
###< own variables ###
180+
181+
###> table-dumper (local docker settings) ###
182+
MYSQLDUMP_DATABASE_URL=mysql://root:secret-pass@127.0.0.1:3336/hdb?serverVersion=8.0
183+
MYSQLDUMP_IGNORED_TABLES=
184+
#MYSQLDUMP_FILTERED_TABLES=
185+
#MYSQLDUMP_TABLES_NO_DATA=
186+
#MYSQLDUMP_TABLES_ONLY_DATA=
187+
###< table-dumper (local docker settings) ###
188+
189+
###> nelmio/cors-bundle ###
190+
CORS_ALLOW_ORIGIN='^https?://(php-api-version-bundle.ixnode.de|api-version.localhost|localhost|127\.0\.0\.1)(:[0-9]+)?$'
191+
###< nelmio/cors-bundle ###
192+
193+
###> symfony/mailer ###
194+
MAILER_DSN=smtp://localhost:1025
195+
###< symfony/mailer ###

.env.test

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
###> symfony/framework-bundle ###
2+
KERNEL_CLASS='Ixnode\PhpApiVersionBundle\Kernel'
3+
APP_SECRET='$ecretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999
5+
PANTHER_APP_ENV=panther
6+
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
7+
###< symfony/framework-bundle ###
8+
9+
###> doctrine/doctrine-bundle (sqlite) ###
10+
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
11+
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
12+
DOCTRINE_DB_DRIVER=pdo_sqlite
13+
DOCTRINE_DB_VERSION=${MYSQL_SERVER_VERSION}
14+
DOCTRINE_DB_PATH="%kernel.project_dir%/var/app.db"
15+
DOCTRINE_DB_NAME=${MYSQL_SERVER_DB}
16+
DOCTRINE_DB_HOST=${ENV_DB_HOST:-127.0.0.1}
17+
# Workaround for default port for DOCTRINE_DB_PORT: Because ${ENV_DB_PORT:-${EXPOSE_MYSQL_PORT}} does not work
18+
DOCTRINE_DB_PORT=${ENV_DB_PORT:-3336}
19+
DOCTRINE_DB_USER=${MYSQL_SERVER_ROOT_USER}
20+
DOCTRINE_DB_PASS=${MYSQL_SERVER_ROOT_PASSWORD}
21+
DOCTRINE_DB_SSL_CA=
22+
DOCTRINE_DB_SSL_VERIFY_SERVER_CERT=false
23+
DOCTRINE_DB_INIT_COMMAND=
24+
###< doctrine/doctrine-bundle (sqlite) ###

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
###> IDEs ###
2+
.idea
3+
###< IDEs ###
4+
5+
###> symfony/framework-bundle ###
6+
/.env.local
7+
/.env.local.php
8+
/.env.*.local
9+
/config/secrets/prod/prod.decrypt.private.php
10+
/public/bundles/
11+
/var/
12+
/vendor/
13+
###< symfony/framework-bundle ###
14+
15+
###> friendsofphp/php-cs-fixer ###
16+
/.php-cs-fixer.php
17+
/.php-cs-fixer.cache
18+
###< friendsofphp/php-cs-fixer ###
19+
20+
###> phpunit/phpunit ###
21+
/.phpunit.result.cache
22+
###< phpunit/phpunit ###
23+
24+
###> symfony/phpunit-bridge ###
25+
/.phpunit/.phpunit.result.cache
26+
###< symfony/phpunit-bridge ###

.php-cs-fixer.dist.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in(__DIR__)
5+
->exclude('var')
6+
;
7+
8+
return (new PhpCsFixer\Config())
9+
->setRules([
10+
'@Symfony' => true,
11+
])
12+
->setFinder($finder)
13+
;

.phpmd/all.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (All)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Cleancode -->
10+
<rule ref="./.phpmd/cleancode.xml"/>
11+
12+
<!-- Codesize -->
13+
<rule ref="./.phpmd/codesize.xml"/>
14+
15+
<!-- Controversial -->
16+
<rule ref="./.phpmd/controversial.xml"/>
17+
18+
<!-- Design -->
19+
<rule ref="./.phpmd/design.xml"/>
20+
21+
<!-- Naming -->
22+
<rule ref="./.phpmd/naming.xml"/>
23+
24+
<!-- Unused Code -->
25+
<rule ref="./.phpmd/unusedcode.xml"/>
26+
27+
</ruleset>

.phpmd/cleancode.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (Cleancode)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Cleancode -->
10+
<rule ref="rulesets/cleancode.xml"/>
11+
12+
</ruleset>

.phpmd/codesize.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (Codesize)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Codesize -->
10+
<rule ref="rulesets/codesize.xml">
11+
<exclude name="TooManyPublicMethods"/>
12+
</rule>
13+
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">
14+
<properties>
15+
<property name="maxmethods" description="The method count reporting threshold" value="10" />
16+
<property name="ignorepattern" description="Ignore methods matching this regex" value="(^(set|get|add))i" />
17+
</properties>
18+
</rule>
19+
20+
</ruleset>

.phpmd/controversial.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (Controversial)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Controversial -->
10+
<rule ref="rulesets/controversial.xml"/>
11+
12+
</ruleset>

.phpmd/design.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (Design)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Design -->
10+
<rule ref="rulesets/design.xml">
11+
<exclude name="CouplingBetweenObjects"/>
12+
<exclude name="NumberOfChildren"/>
13+
</rule>
14+
<rule ref="rulesets/design.xml/CouplingBetweenObjects">
15+
<properties>
16+
<property name="maximum" description="Maximum number of acceptable dependencies" value="40" />
17+
</properties>
18+
</rule>
19+
<rule ref="rulesets/design.xml/NumberOfChildren">
20+
<properties>
21+
<property name="minimum" description="Maximum number of acceptable child classes." value="25" />
22+
</properties>
23+
</rule>
24+
25+
</ruleset>

.phpmd/naming.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Design Rules (Naming)"
3+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7+
<description>Custom Ordering Process Api rule set.</description>
8+
9+
<!-- Naming -->
10+
<rule ref="rulesets/naming.xml">
11+
<exclude name="LongVariable"/>
12+
<exclude name="ShortVariable"/>
13+
</rule>
14+
<rule ref="rulesets/naming.xml/LongVariable">
15+
<properties>
16+
<property name="maximum" description="The variable length reporting threshold" value="30" />
17+
</properties>
18+
</rule>
19+
<rule ref="rulesets/naming.xml/ShortVariable">
20+
<properties>
21+
<property name="minimum" description="Minimum length for a variable, property or parameter name." value="2" />
22+
</properties>
23+
</rule>
24+
</ruleset>

0 commit comments

Comments
 (0)