-
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 18012bd
Showing
227 changed files
with
39,361 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,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,36 @@ | ||
# 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/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629 | ||
#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:[email protected]:3306/db_name" | ||
# For a PostgreSQL database, use: "postgresql://db_user:[email protected]:5432/db_name?serverVersion=11" | ||
# Configure your db driver and server_version in config/packages/doctrine.yaml | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database.sqlite | ||
###< doctrine/doctrine-bundle ### | ||
|
||
###> symfony/swiftmailer-bundle ### | ||
# For Gmail as a transport, use: "gmail://username:password@localhost" | ||
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" | ||
# Delivery is disabled by default via "null://localhost" | ||
MAILER_URL=null://localhost | ||
###< symfony/swiftmailer-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,5 @@ | ||
# define your env variables for the test env here | ||
APP_SECRET='$ecretf0rt3st' | ||
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database_test.sqlite | ||
KERNEL_CLASS='App\Kernel' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 |
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,27 @@ | ||
/public/build/fonts/glyphicons-* | ||
/public/build/images/glyphicons-* | ||
|
||
###> symfony/framework-bundle ### | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
###> friendsofphp/php-cs-fixer ### | ||
/.php_cs | ||
/.php_cs.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
|
||
###> symfony/webpack-encore-bundle ### | ||
/node_modules/ | ||
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,46 @@ | ||
<?php | ||
|
||
$fileHeaderComment = <<<COMMENT | ||
This file is part of the Symfony package. | ||
(c) Fabien Potencier <[email protected]> | ||
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 PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'], | ||
'linebreak_after_opening_tag' => true, | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'no_superfluous_phpdoc_tags' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_imports' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'semicolon_after_instruction' => 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,62 @@ | ||
language: php | ||
sudo: false | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- $HOME/.composer/cache/files | ||
- ./bin/.phpunit | ||
|
||
env: | ||
global: | ||
- SYMFONY_PHPUNIT_DIR=./bin/.phpunit | ||
- SYMFONY_DEPRECATIONS_HELPER=0 | ||
- ACTION="install" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
- php: 7.3 | ||
env: SYMFONY="5.0.*" | ||
ACTION="update" | ||
# 'php: nightly' is PHP 8.0 | ||
- php: 7.4snapshot | ||
allow_failures: | ||
- php: 7.4snapshot | ||
|
||
before_install: | ||
- '[[ "$TRAVIS_PHP_VERSION" == "7.4snapshot" ]] || phpenv config-rm xdebug.ini' | ||
- composer self-update | ||
# Set memory to max (memory fail) | ||
- '[[ "$ACTION" == "install" ]] || echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini' | ||
# Set stability to dev to allow 4.4dev and 5.0dev | ||
- '[[ "$ACTION" == "install" ]] || composer config minimum-stability dev' | ||
# Change version of symfony when need | ||
- '[[ "$ACTION" == "install" ]] || composer config extra.symfony.require $SYMFONY' | ||
|
||
install: | ||
- php -r "echo ini_get('memory_limit').PHP_EOL;" | ||
# install or update | ||
- composer $ACTION | ||
- ./bin/phpunit install | ||
|
||
script: | ||
- ./bin/phpunit | ||
# this checks that the source code follows the Symfony Code Syntax rules | ||
- '[[ "$TRAVIS_PHP_VERSION" == "7.4snapshot" ]] || ./vendor/bin/php-cs-fixer fix --diff --dry-run -v' | ||
# this checks that the YAML config files contain no syntax errors | ||
- ./bin/console lint:yaml config --parse-tags | ||
# this checks that the Twig template files contain no syntax errors | ||
- ./bin/console lint:twig templates --env=prod | ||
# this checks that the XLIFF translations contain no syntax errors | ||
- ./bin/console lint:xliff translations | ||
# this checks that arguments injected into services match type declarations | ||
- ./bin/console lint:container | ||
# TODO: replace the old security checker by the new checker provided by the 'symfony' binary | ||
# this checks that the application doesn't use dependencies with known security vulnerabilities | ||
#- ./bin/console security:check | ||
# this checks that Doctrine's mapping configurations are valid | ||
- ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction | ||
# Fail CI if the repo is in a dirty state after building assets (only for current release ie install) | ||
#- if [[ "$ACTION" == "install" ]]; then yarn install && yarn encore production && git add --all && git diff --staged --exit-code; fi |
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). |
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,19 @@ | ||
Copyright (c) 2015-2019 Fabien Potencier | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,60 @@ | ||
Symfony Demo Application | ||
======================== | ||
|
||
The "Symfony Demo Application" is a reference application created to show how | ||
to develop applications following the [Symfony Best Practices][1]. | ||
|
||
Requirements | ||
------------ | ||
|
||
* PHP 7.1.3 or higher; | ||
* PDO-SQLite PHP extension enabled; | ||
* and the [usual Symfony application requirements][2]. | ||
|
||
Installation | ||
------------ | ||
|
||
[Download Symfony][4] to install the `symfony` binary on your computer and run | ||
this command: | ||
|
||
```bash | ||
$ symfony new --demo my_project | ||
``` | ||
|
||
Alternatively, you can use Composer: | ||
|
||
```bash | ||
$ composer create-project symfony/symfony-demo my_project | ||
``` | ||
|
||
Usage | ||
----- | ||
|
||
There's no need to configure anything to run the application. If you have | ||
[installed Symfony][4], run this command and access the application in your | ||
browser at the given URL (<https://localhost:8000> by default): | ||
|
||
```bash | ||
$ cd my_project/ | ||
$ symfony serve | ||
``` | ||
|
||
If you don't have the Symfony binary installed, run `php -S localhost:8000 -t public/` | ||
to use the built-in PHP web server or [configure a web server][3] like Nginx or | ||
Apache to run the application. | ||
|
||
Tests | ||
----- | ||
|
||
Execute this command to run tests: | ||
|
||
```bash | ||
$ cd my_project/ | ||
$ ./bin/phpunit | ||
``` | ||
|
||
[1]: https://symfony.com/doc/current/best_practices.html | ||
[2]: https://symfony.com/doc/current/reference/requirements.html | ||
[3]: https://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html | ||
[4]: https://symfony.com/download | ||
[5]: https://github.com/symfony/webpack-encore |
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,54 @@ | ||
build: false | ||
clone_depth: 1 | ||
clone_folder: c:\projects\symfony-demo | ||
|
||
cache: | ||
- '%LOCALAPPDATA%\Composer\files' | ||
- '%LOCALAPPDATA%\SymfonyBridge\phpunit' | ||
- c:\projects\symfony-demo\composer.phar | ||
|
||
init: | ||
- SET PATH=c:\php;%PATH% | ||
- SET COMPOSER_NO_INTERACTION=1 | ||
- SET SYMFONY_DEPRECATIONS_HELPER=strict | ||
- SET SYMFONY_PHPUNIT_DIR=%LOCALAPPDATA%\SymfonyBridge\phpunit | ||
- SET ANSICON=121x90 (121x90) | ||
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f | ||
|
||
install: | ||
- mkdir c:\php && cd c:\php | ||
- appveyor DownloadFile https://raw.githubusercontent.com/symfony/binary-utils/master/cacert.pem | ||
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php-7.1.3-Win32-VC14-x86.zip | ||
- 7z x php-7.1.3-Win32-VC14-x86.zip -y >nul | ||
- del /Q *.zip | ||
- cd ext | ||
- appveyor DownloadFile https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.8-7.1-ts-vc14-x86.zip | ||
- 7z x php_apcu-5.1.8-7.1-ts-vc14-x86.zip -y >nul | ||
- del /Q *.zip | ||
- cd .. | ||
- copy /Y php.ini-development php.ini | ||
- echo max_execution_time=1200 >> php.ini | ||
- echo date.timezone="America/Los_Angeles" >> php.ini | ||
- echo extension_dir=ext >> php.ini | ||
- echo zend_extension=php_opcache.dll >> php.ini | ||
- echo opcache.enable_cli=1 >> php.ini | ||
- echo extension=php_openssl.dll >> php.ini | ||
- echo extension=php_apcu.dll >> php.ini | ||
- echo apc.enable_cli=1 >> php.ini | ||
- echo extension=php_intl.dll >> php.ini | ||
- echo extension=php_mbstring.dll >> php.ini | ||
- echo extension=php_fileinfo.dll >> php.ini | ||
- echo extension=php_pdo_sqlite.dll >> php.ini | ||
- echo extension=php_curl.dll >> php.ini | ||
- echo curl.cainfo=c:\php\cacert.pem >> php.ini | ||
- cd c:\projects\symfony-demo | ||
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar) | ||
- php composer.phar self-update | ||
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev) | ||
- php composer.phar update --no-progress --ansi | ||
- SET COMPOSER_ROOT_VERSION= | ||
- vendor\bin\simple-phpunit install | ||
|
||
test_script: | ||
- cd c:\projects\symfony-demo | ||
- vendor/bin/simple-phpunit |
Oops, something went wrong.