Skip to content

Commit 1f22bd4

Browse files
authored
Merge pull request #15 from ttskch/v2
v2: from Silex to Symfony 6
2 parents ef0e271 + 44aca28 commit 1f22bd4

File tree

114 files changed

+2849
-2255
lines changed

Some content is hidden

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

114 files changed

+2849
-2255
lines changed

.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# In all environments, the following files are loaded if they exist,
2+
# the latter taking precedence over the former:
3+
#
4+
# * .env contains default values for the environment variables needed by the app
5+
# * .env.local uncommitted file with local overrides
6+
# * .env.$APP_ENV committed environment-specific defaults
7+
# * .env.$APP_ENV.local uncommitted environment-specific overrides
8+
#
9+
# Real environment variables win over .env files.
10+
#
11+
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
12+
#
13+
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
14+
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
15+
16+
###> symfony/framework-bundle ###
17+
APP_ENV=dev
18+
APP_SECRET=ae4e2a0ad0dbdb57cf3d12fbe9244312
19+
###< symfony/framework-bundle ###

.env.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# define your env variables for the test env here
2+
KERNEL_CLASS='App\Kernel'
3+
APP_SECRET='$ecretf0rt3st'
4+
SYMFONY_DEPRECATIONS_HELPER=999999
5+
PANTHER_APP_ENV=panther
6+
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

.github/workflows/test.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: test
2+
3+
on: push
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-versions: [8.0.2, 8.1]
11+
12+
steps:
13+
- uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: ${{ matrix.php-versions }}
16+
extensions: ctype, dom, iconv
17+
18+
- uses: actions/checkout@v2
19+
# @see https://github.com/scrutinizer-ci/ocular/commit/801d176fbcee081f1f4f8c879a07a0ca5ff86eca#commitcomment-47604854
20+
with:
21+
fetch-depth: 2
22+
23+
- name: Copy .env.test.local
24+
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');"
25+
26+
- name: Cache Composer packages
27+
id: composer-cache
28+
uses: actions/cache@v2
29+
with:
30+
path: vendor
31+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-php-
34+
35+
- name: Install Dependencies
36+
run: |
37+
composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
38+
npm install
39+
cp config/esa.yaml{.dist,}
40+
41+
- name: Execute tests
42+
run: ./vendor/bin/phpunit --coverage-clover=coverage.clover
43+
44+
- name: Send coverage file to Scrutinizer
45+
if: ${{ matrix.php-versions == '8.1' && matrix.composer-install-options == '' }}
46+
# @see https://github.com/scrutinizer-ci/ocular/issues/54#issuecomment-784993370
47+
# run: |
48+
# wget https://scrutinizer-ci.com/ocular.phar
49+
# php ocular.phar code-coverage:upload --format=php-clover coverage.clover
50+
run: |
51+
composer global require scrutinizer/ocular
52+
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
53+
54+
- name: PHP CS Fixer
55+
run: composer cs

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,38 @@ composer.lock
33
/components/
44
node_modules
55
package-lock.json
6+
yarn.lock
67
build
8+
config/esa.yaml
9+
10+
###> symfony/framework-bundle ###
11+
/.env.local
12+
/.env.local.php
13+
/.env.*.local
14+
/config/secrets/prod/prod.decrypt.private.php
15+
/public/bundles/
16+
/var/
17+
/vendor/
18+
###< symfony/framework-bundle ###
19+
20+
###> friendsofphp/php-cs-fixer ###
21+
/.php-cs-fixer.php
22+
/.php-cs-fixer.cache
23+
###< friendsofphp/php-cs-fixer ###
24+
25+
###> symfony/webpack-encore-bundle ###
26+
/node_modules/
27+
/public/build/
28+
npm-debug.log
29+
yarn-error.log
30+
###< symfony/webpack-encore-bundle ###
31+
32+
###> symfony/phpunit-bridge ###
33+
.phpunit.result.cache
34+
/phpunit.xml
35+
###< symfony/phpunit-bridge ###
36+
37+
###> phpunit/phpunit ###
38+
/phpunit.xml
39+
.phpunit.result.cache
40+
###< phpunit/phpunit ###

.php-cs-fixer.dist.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
'phpdoc_summary' => false,
12+
])
13+
->setFinder($finder)
14+
;

.scrutinizer.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
build:
2+
nodes:
3+
analysis:
4+
environment:
5+
php:
6+
version: 8.0.2
7+
node:
8+
version: 12.0.0
9+
tests:
10+
override:
11+
- php-scrutinizer-run
112
filter:
2-
paths: ["src/*"]
13+
paths:
14+
- src/*
315
tools:
416
external_code_coverage: true

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.ja.md

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)