Skip to content

Commit fb30166

Browse files
committed
Project structure
0 parents  commit fb30166

20 files changed

Lines changed: 547 additions & 0 deletions

.devcontainer/devcontainer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "Stadly FileWaiter",
3+
"context": "php",
4+
"dockerFile": "php/Dockerfile",
5+
6+
// Extensions to install in the container.
7+
"extensions": [
8+
"bmewburn.vscode-intelephense-client",
9+
"eamodio.gitlens",
10+
"editorconfig.editorconfig",
11+
"felixfbecker.php-debug",
12+
"jaakkosadeharju.permute-selections",
13+
"ms-azuretools.vscode-docker",
14+
"ms-vscode-remote.remote-containers",
15+
"recca0120.vscode-phpunit",
16+
"xyz.local-history"
17+
],
18+
19+
// Run the installation script after creating the container.
20+
"postCreateCommand": "sh .devcontainer/install.sh",
21+
}

.devcontainer/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Install php dependencies
4+
composer install

.devcontainer/php/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM php:7.4-fpm-alpine
2+
3+
# Update all packages
4+
RUN apk update && apk upgrade
5+
6+
# Install composer
7+
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
8+
9+
# Install xdebug
10+
RUN apk add $PHPIZE_DEPS
11+
RUN pecl install xdebug
12+
RUN docker-php-ext-enable xdebug
13+
14+
# Install git
15+
RUN apk add git
16+
17+
# Copy php.ini
18+
COPY php.ini /usr/local/etc/php/conf.d/

.devcontainer/php/php.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error_reporting = E_ALL
2+
3+
xdebug.mode = debug
4+
xdebug.start_with_request = yes

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.yml]
15+
indent_size = 2
16+
17+
[*.{neon,neon.dist}]
18+
indent_size = 2

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Ignore all test and documentation with "export-ignore".
2+
/.devcontainer/ export-ignore
3+
/.vscode/ export-ignore
4+
/tests/ export-ignore
5+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.scrutinizer.yml export-ignore
9+
/.travis.yml export-ignore
10+
/phpstan.neon.dist export-ignore
11+
/phpstan.tests.neon.dist export-ignore
12+
/phpunit.xml.dist export-ignore
13+
14+
# Set line endings.
15+
* text=auto
16+
*.php text eol=lf

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.vscode/.history/
2+
/build/
3+
/vendor/
4+
/.phpunit.result.cache
5+
/composer.lock
6+
/phpunit.xml

.scrutinizer.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
filter:
2+
excluded_paths:
3+
- tests/
4+
dependency_paths:
5+
- vendor/
6+
7+
build:
8+
nodes:
9+
analysis:
10+
environment:
11+
php: 7.4
12+
tests:
13+
override:
14+
- php-scrutinizer-run
15+
coverage:
16+
environment:
17+
php: 7.4
18+
tests:
19+
override:
20+
- command: composer test
21+
coverage:
22+
file: build/clover.xml
23+
format: clover

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: php
2+
3+
php:
4+
- 7.4
5+
6+
env:
7+
matrix:
8+
- COMPOSER_FLAGS="--prefer-lowest --prefer-stable"
9+
- COMPOSER_FLAGS=""
10+
11+
before_script:
12+
- travis_retry composer update --no-interaction --prefer-dist $COMPOSER_FLAGS
13+
14+
script:
15+
- composer test

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Listen for Xdebug",
6+
"type": "php",
7+
"request": "launch",
8+
"port": 9003
9+
}
10+
]
11+
}

0 commit comments

Comments
 (0)