-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c2941b
Showing
201 changed files
with
33,997 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/public/build/fonts/glyphicons-* | ||
/public/build/images/glyphicons-* | ||
|
||
*.Dockerfile | ||
|
||
###> symfony/framework-bundle ### | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/config/secrets/prod/prod.decrypt.private.php | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
###> symfony/webpack-encore-bundle ### | ||
/node_modules/ | ||
/public/build/ | ||
npm-debug.log | ||
yarn-error.log | ||
###< symfony/webpack-encore-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
; top-most EditorConfig file | ||
root = true | ||
|
||
; Unix-style newlines | ||
[*] | ||
end_of_line = LF | ||
|
||
[*.php] | ||
indent_style = space | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# In all environments, the following files are loaded if they exist, | ||
# the latter taking precedence over the former: | ||
# | ||
# * .env contains default values for the environment variables needed by the app | ||
# * .env.local uncommitted file with local overrides | ||
# * .env.$APP_ENV committed environment-specific defaults | ||
# * .env.$APP_ENV.local uncommitted environment-specific overrides | ||
# | ||
# Real environment variables win over .env files. | ||
# | ||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. | ||
# | ||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). | ||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=2ca64f8d83b9e89f5f19d672841d6bb8 | ||
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 | ||
#TRUSTED_HOSTS='^(localhost|example\.com)$' | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For a MySQL database, use: "mysql://db_user:db_password@127.0.0.1:3306/db_name" | ||
# For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8" | ||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database.sqlite | ||
###< doctrine/doctrine-bundle ### | ||
|
||
###> symfony/mailer ### | ||
# MAILER_DSN=smtp://localhost | ||
###< symfony/mailer ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# define your env variables for the test env here | ||
KERNEL_CLASS='App\Kernel' | ||
APP_SECRET='$ecretf0rt3st' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 | ||
PANTHER_APP_ENV=panther | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database_test.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
fail-fast: true | ||
PHPUNIT_FLAGS: "-v" | ||
SYMFONY_PHPUNIT_DIR: "$HOME/symfony-bridge/.phpunit" | ||
SYMFONY_REQUIRE: ">=4.4" | ||
# 40x: Since symfony/monolog-bridge 5.2: | ||
# Passing an actionLevel (int|string) as constructor's 3rd argument of | ||
# "Symfony\Bridge\Monolog\Handler\FingersCrossed\HttpCodeActivationStrategy" | ||
# is deprecated, "Monolog\Handler\FingersCrossed\ActivationStrategyInterface" expected. | ||
SYMFONY_DEPRECATIONS_HELPER: 40 | ||
|
||
jobs: | ||
test: | ||
name: "${{ matrix.operating-system }} / PHP ${{ matrix.php-version }}" | ||
runs-on: ${{ matrix.operating-system }} | ||
continue-on-error: false | ||
|
||
strategy: | ||
matrix: | ||
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | ||
php-version: ['7.2.9', '7.3', '7.4', '8.0'] | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v2.3.3 | ||
|
||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@2.7.0 | ||
with: | ||
coverage: "none" | ||
extensions: "intl, mbstring, pdo_sqlite" | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2 | ||
|
||
- name: "Add PHPUnit matcher" | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: "Set composer cache directory" | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: "Cache composer" | ||
uses: actions/cache@v2.1.2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
|
||
- name: "Require symfony/flex" | ||
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main | ||
|
||
- if: matrix.php-version != '8.0' | ||
run: composer update | ||
|
||
- if: matrix.php-version == '8.0' | ||
run: composer update --ignore-platform-req=php | ||
|
||
- if: matrix.php-version != '8.0' | ||
name: "Install PHPUnit" | ||
run: vendor/bin/simple-phpunit install | ||
|
||
- if: matrix.php-version == '8.0' | ||
name: "Install PHPUnit for PHP 8" | ||
run: | | ||
echo 'SYMFONY_PHPUNIT_VERSION=9.4' >> $GITHUB_ENV | ||
vendor/bin/simple-phpunit install | ||
- name: "PHPUnit version" | ||
run: vendor/bin/simple-phpunit --version | ||
|
||
- name: "Run tests" | ||
run: vendor/bin/simple-phpunit ${{ env.PHPUNIT_FLAGS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: "Lint" | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
fail-fast: true | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v2 | ||
|
||
- name: PHP-CS-Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --diff --dry-run | ||
|
||
linters: | ||
name: Linters | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: ['7.4'] | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v2.3.3 | ||
|
||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@2.7.0 | ||
with: | ||
coverage: "none" | ||
extensions: intl | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2 | ||
|
||
- name: "Set composer cache directory" | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: "Cache composer" | ||
uses: actions/cache@v2.1.2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
|
||
- name: "Require symfony/flex" | ||
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main | ||
|
||
- name: "Composer update" | ||
id: install | ||
run: composer update --no-scripts | ||
|
||
- name: Lint YAML files | ||
if: always() && steps.install.outcome == 'success' | ||
run: ./bin/console lint:yaml config --parse-tags | ||
|
||
- name: Lint Twig templates | ||
if: always() && steps.install.outcome == 'success' | ||
run: ./bin/console lint:twig templates --env=prod | ||
|
||
- name: Lint XLIFF translations | ||
if: always() && steps.install.outcome == 'success' | ||
run: ./bin/console lint:xliff translations | ||
|
||
- name: Lint Parameters and Services | ||
if: always() && steps.install.outcome == 'success' | ||
run: ./bin/console lint:container | ||
|
||
- name: Lint Doctrine entities | ||
if: always() && steps.install.outcome == 'success' | ||
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction | ||
|
||
- name: Lint Composer config | ||
if: always() && steps.install.outcome == 'success' | ||
run: composer validate --strict | ||
|
||
- name: Download Symfony CLI | ||
if: always() && steps.install.outcome == 'success' | ||
run: wget https://get.symfony.com/cli/installer -O - | bash | ||
|
||
- name: Check if any dependencies are compromised | ||
if: always() && steps.install.outcome == 'success' | ||
run: /home/runner/.symfony/bin/symfony check:security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/public/build/fonts/glyphicons-* | ||
/public/build/images/glyphicons-* | ||
|
||
###> symfony/framework-bundle ### | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/config/secrets/prod/prod.decrypt.private.php | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
###> symfony/webpack-encore-bundle ### | ||
/node_modules/ | ||
/public/build/ | ||
npm-debug.log | ||
yarn-error.log | ||
###< symfony/webpack-encore-bundle ### | ||
|
||
###> baldinof/roadrunner-bundle ### | ||
/bin/rr | ||
###< baldinof/roadrunner-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
$fileHeaderComment = <<<COMMENT | ||
This file is part of the Symfony package. | ||
(c) Fabien Potencier <fabien@symfony.com> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
COMMENT; | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('config') | ||
->exclude('var') | ||
->exclude('public/bundles') | ||
->exclude('public/build') | ||
// exclude files generated by Symfony Flex recipes | ||
->notPath('bin/console') | ||
->notPath('public/index.php') | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'], | ||
'linebreak_after_opening_tag' => true, | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(__DIR__.'/var/.php_cs.cache') | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
include: | ||
- .rr.yaml | ||
|
||
reload: | ||
enabled: true | ||
interval: 1s | ||
patterns: [".php"] | ||
services: | ||
http: | ||
dirs: ["."] | ||
recursive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
http: | ||
address: "0.0.0.0:8080" | ||
|
||
uploads: | ||
forbid: [".php", ".exe", ".bat"] | ||
|
||
workers: | ||
command: "php bin/console baldinof:roadrunner:worker" | ||
relay: "unix://var/roadrunner.sock" | ||
|
||
static: | ||
dir: "public" | ||
forbid: [".php", ".htaccess"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Contributing | ||
============ | ||
|
||
The Symfony Demo application is an open source project. Contributions made by | ||
the community are welcome. Send us your ideas, code reviews, pull requests and | ||
feature requests to help us improve this project. All contributions must follow | ||
the [usual Symfony contribution requirements](https://symfony.com/doc/current/contributing/index.html). |
Oops, something went wrong.