forked from Sylius/SyliusDemo
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Sylius#59 from pamil/symfony-4.1-structure
Symfony 4.1 with new project structure
- Loading branch information
Showing
125 changed files
with
13,182 additions
and
2,671 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,23 @@ | ||
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file | ||
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_DEBUG=1 | ||
APP_SECRET=EDITME | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" | ||
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls | ||
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment% | ||
###< 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=smtp://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,23 @@ | ||
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file | ||
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=prod | ||
APP_DEBUG=0 | ||
APP_SECRET=EDITME | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" | ||
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls | ||
DATABASE_URL=mysql://root@127.0.0.1/sylius_%kernel.environment% | ||
###< 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=smtp://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,23 @@ | ||
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file | ||
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=test | ||
APP_DEBUG=1 | ||
APP_SECRET=EDITME | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" | ||
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls | ||
DATABASE_URL=mysql://root:pass@127.0.0.1/sylius_%kernel.environment% | ||
###< 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,23 @@ | ||
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file | ||
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production. | ||
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=test_cached | ||
APP_DEBUG=0 | ||
APP_SECRET=EDITME | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" | ||
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls | ||
DATABASE_URL=mysql://root@127.0.0.1/sylius_${APP_ENV} | ||
###< 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 |
---|---|---|
@@ -1,26 +1,54 @@ | ||
/.php_cs.cache | ||
|
||
/app/config/parameters.yml | ||
/app/config/*.local.yml | ||
/var/* | ||
!/var/.gitkeep | ||
|
||
/web/assets | ||
/web/bundles | ||
/web/css | ||
/web/js | ||
/web/media | ||
!/var/.gitignore | ||
|
||
/bin/* | ||
!/bin/console | ||
!/bin/symfony_requirements | ||
/public/assets | ||
/public/bundles | ||
/public/css | ||
/public/js | ||
/public/media | ||
|
||
/vendor | ||
/node_modules | ||
|
||
/etc/build/* | ||
!/etc/build/.gitkeep | ||
!/etc/build/.gitignore | ||
|
||
/behat.yml | ||
/phpunit.xml | ||
/phpspec.yml | ||
|
||
/bin/* | ||
!/bin/console | ||
|
||
/.env | ||
/.env.prod | ||
/.env.test | ||
/.env.test_cached | ||
|
||
###> symfony/web-server-bundle ### | ||
/.web-server-pid | ||
###< symfony/web-server-bundle ### | ||
|
||
###> friendsofphp/php-cs-fixer ### | ||
/.php_cs | ||
/.php_cs.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
|
||
###> phpunit/phpunit ### | ||
/phpunit.xml | ||
###< phpunit/phpunit ### | ||
|
||
###> squizlabs/php_codesniffer ### | ||
/.phpcs-cache | ||
/phpcs.xml | ||
###< squizlabs/php_codesniffer ### | ||
|
||
###> symfony/framework-bundle ### | ||
/.env | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> liip/imagine-bundle ### | ||
/public/media/cache/ | ||
###< liip/imagine-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,8 @@ | ||
<?php | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
]) | ||
; |
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
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,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
$relationships = getenv('PLATFORM_RELATIONSHIPS'); | ||
|
||
if (!$relationships) { | ||
return; | ||
} | ||
|
||
ini_set('session.save_path', '/tmp/sessions'); | ||
|
||
$relationships = json_decode(base64_decode($relationships), true); | ||
|
||
$setEnvVar = function (string $name, ?string $value): void { | ||
if (!putenv("$name=$value")) { | ||
throw new \RuntimeException('Failed to create environment variable: ' . $name); | ||
} | ||
$order = ini_get('variables_order'); | ||
if (stripos($order, 'e') !== false) { | ||
$_ENV[$name] = $value; | ||
} | ||
if (stripos($order, 's') !== false) { | ||
if (strpos($name, 'HTTP_') !== false) { | ||
throw new \RuntimeException('Refusing to add ambiguous environment variable ' . $name . ' to $_SERVER'); | ||
} | ||
$_SERVER[$name] = $value; | ||
} | ||
}; | ||
|
||
foreach ($relationships['redis'] as $endpoint) { | ||
$setEnvVar('REDIS_HOST', $endpoint['host']); | ||
$setEnvVar('REDIS_PORT', (string) $endpoint['port']); | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.