diff --git a/.gitignore b/.gitignore
index 8c2fd1f608..3350e520bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,22 +17,34 @@
# More details about excluding specific file on your local environment can be found
# in the official GitHub article: https://help.github.com/articles/ignoring-files/
+/.web-server-pid
+/app/config/parameters.yml
+/build/
+/phpunit.xml
+/var/*
+!/var/cache
+/var/cache/*
+!var/cache/.gitkeep
+!/var/logs
+/var/logs/*
+!var/logs/.gitkeep
+!/var/sessions
+/var/sessions/*
+!var/sessions/.gitkeep
+!var/SymfonyRequirements.php
/vendor/
+/web/bundles/
+
.php~
-/bin/behat
-/bin/phpunit
-/app/check.php
-/app/SymfonyRequirements.php
-/app/cache/
-/app/logs/
+
+# Legacy related ignores, that are generated by composer (settings not handled out of the box)
/ezpublish_legacy
-/app/config/parameters.yml
-/app/bootstrap.php.cache
-/doc/docker/entrypoint/*/*.sql
/web/index_treemenu.php
/web/index_rest.php
/web/index_cluster.php
-/web/bundles/
+
+/doc/docker/entrypoint/*/*.sql
+
/web/css/
/web/js/
web/fonts/
@@ -41,6 +53,7 @@ web/fonts/
/web/share
/web/var
/web/.htaccess
+
composer.phar
composer.lock
.buildpath
diff --git a/Dockerfile b/Dockerfile
index 9bff30112e..2e083599ad 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,7 +17,8 @@ RUN composer dump-autoload --optimize
# Next, remove everything we don't want to be copied to next build stage
# Clear cache again so env variables are taken into account on startup
-RUN rm -Rf app/logs/* app/cache/*/*
+RUN rm -Rf var/logs/* var/cache/*/*
+
# Looks like we need to keep web/bundles ( like web/bundles/ezstudioui/js/views/ezs-landingpageview.js ) or else
# urls like http://localhost:8080/_ezcombo?/bundles/ezstudioui/js/views/ezs-landingpageview.js&/tpl/handlebars/studiolandingpageconfigview-ez-template.js&/bundles/ezstudioui/js/views/ezs-landingpageconfigview.js&/tpl/handlebars/studiolayoutselectorview-ez-template.js&/bundles/ezstudioui/js/views/ezs-layoutselectorview.js&/tpl/handlebars/studiolandingpageconfigpopupformview-ez-template.js&/bundles/ezstudioui/js/views/forms/ezs-landingpageconfigpopupformview.js&/tpl/handlebars/landingpagecreatorview-ez-template.js&/bundles/ezsystemsformbuilder/js/models/fb-formfield-model.js&/bundles/ezsystemsformbuilder/js/lists/fb-formfields-modellist.js&/bundles/ezsystemsformbuilder/js/models/fb-formpage-model.js&/bundles/ezsystemsformbuilder/js/lists/fb-formpages-modellist.js&/bundles/ezsystemsformbuilder/js/models/fb-form-model.js&/tpl/handlebars/fbbasetabview-ez-template.js&/bundles/ezsystemsformbuilder/js/tabs/fb-base-tabview.js&/tpl/handlebars/fbpanelview-ez-template.js&/bundles/ezsystemsformbuilder/js/panels/fb-panelview.js
# will not work when loading http://localhost:8080/ez
@@ -34,6 +35,6 @@ ENV SYMFONY_ENV=prod
COPY --from=builder /var/www /var/www
# Fix permissions for www-data
-RUN chown -R www-data:www-data app/cache app/logs \
- && find app/cache app/logs -type d -print0 | xargs -0 chmod -R 775 \
- && find app/cache app/logs -type f -print0 | xargs -0 chmod -R 664
+RUN chown -R www-data:www-data var web/var \
+ && find var web/var -type d -print0 | xargs -0 chmod -R 775 \
+ && find var web/var -type f -print0 | xargs -0 chmod -R 664
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 007ec741c9..63932b99e4 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -14,7 +14,7 @@ class AppKernel extends Kernel
*/
public function registerBundles()
{
- $bundles = array(
+ $bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
@@ -23,7 +23,6 @@ public function registerBundles()
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
- new Tedivm\StashBundle\TedivmStashBundle(),
new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
@@ -47,7 +46,7 @@ public function registerBundles()
new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
new AppBundle\AppBundle(),
- );
+ ];
switch ($this->getEnvironment()) {
case 'test':
@@ -61,12 +60,36 @@ public function registerBundles()
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
+ $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
$bundles[] = new Egulias\ListenersDebugCommandBundle\EguliasListenersDebugCommandBundle();
}
return $bundles;
}
+ public function getRootDir()
+ {
+ return __DIR__;
+ }
+
+ public function getCacheDir()
+ {
+ if (!empty($_SERVER['SYMFONY_TMP_DIR'])) {
+ return dirname($_SERVER['SYMFONY_TMP_DIR']) . '/var/cache/' . $this->getEnvironment();
+ }
+
+ return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
+ }
+
+ public function getLogDir()
+ {
+ if (!empty($_SERVER['SYMFONY_TMP_DIR'])) {
+ return dirname($_SERVER['SYMFONY_TMP_DIR']) . '/var/logs';
+ }
+
+ return dirname(__DIR__) . '/var/logs';
+ }
+
/**
* Loads the container configuration.
*
diff --git a/app/autoload.php b/app/autoload.php
deleted file mode 100644
index 79137cbb30..0000000000
--- a/app/autoload.php
+++ /dev/null
@@ -1,20 +0,0 @@
-setParameter('secret', $value);
-}
-
-// Mailer settings
-if ($value = getenv('MAILER_TRANSPORT')) {
- $container->setParameter('mailer_transport', $value);
-}
-
-if ($value = getenv('MAILER_HOST')) {
- $container->setParameter('mailer_host', $value);
-}
-
-if ($value = getenv('MAILER_USER')) {
- $container->setParameter('mailer_user', $value);
-}
-
-if ($value = getenv('MAILER_PASSWORD')) {
- $container->setParameter('mailer_password', $value);
-}
-
-// Database settings
-if ($value = getenv('DATABASE_DRIVER')) {
- $container->setParameter('database_driver', $value);
-}
-
-if ($value = getenv('DATABASE_HOST')) {
- $container->setParameter('database_host', $value);
-}
-
-if ($value = getenv('DATABASE_PORT')) {
- $container->setParameter('database_port', $value);
-}
-
-if ($value = getenv('DATABASE_NAME')) {
- $container->setParameter('database_name', $value);
-}
-
-if ($value = getenv('DATABASE_USER')) {
- $container->setParameter('database_user', $value);
-}
-
-if ($value = getenv('DATABASE_PASSWORD')) {
- $container->setParameter('database_password', $value);
-}
-
-// Search Engine settings
-if ($value = getenv('SEARCH_ENGINE')) {
- $container->setParameter('search_engine', $value);
-}
-
-if ($value = getenv('SOLR_DSN')) {
- $container->setParameter('solr_dsn', $value);
-}
-
-// Logging settings
-if ($value = getenv('LOG_TYPE')) {
- $container->setParameter('log_type', $value);
-}
-
-if ($value = getenv('LOG_PATH')) {
- $container->setParameter('log_path', $value);
-}
-
// Cache settings
-// Config validation by Stash prohbitis us from pre defining pools using drivers not supported by all systems
-// So we expose a env variable to load and use other pools when needed, additional pools can be added in cache_pool/ folder.
-if ($pool = getenv('CUSTOM_CACHE_POOL')) {
- $container->setParameter('cache_pool', $pool);
-
- if ($host = getenv('CACHE_HOST')) {
- $container->setParameter('cache_host', $host);
- }
-
- // Optional port settings in case not default
- if ($host = getenv('CACHE_MEMCACHED_PORT')) {
- $container->setParameter('cache_memcached_port', $host);
- } elseif ($host = getenv('CACHE_REDIS_PORT')) {
- $container->setParameter('cache_redis_port', $host);
- }
-
+// If CACHE_POOL env variable is set, check if there is a yml file that needs to be loaded for it
+if (($pool = getenv('CACHE_POOL')) && file_exists(__DIR__ . "/../cache_pool/${pool}.yml")) {
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../cache_pool'));
- $loader->load($pool . '.yml');
-}
-
-// HttpCache setting (for configuring Varnish purging)
-if ($purgeServer = getenv('HTTPCACHE_PURGE_SERVER')) {
- $container->setParameter('purge_type', 'http');
- $container->setParameter('purge_server', $purgeServer);
+ $loader->load("${pool}.yml");
}
if ($value = getenv('HTTPCACHE_DEFAULT_TTL')) {
diff --git a/app/config/ezplatform.yml b/app/config/ezplatform.yml
index eeaefd3366..dae7e0f039 100644
--- a/app/config/ezplatform.yml
+++ b/app/config/ezplatform.yml
@@ -8,7 +8,7 @@ ezpublish:
default:
storage: ~
search:
- engine: '%search_engine%'
+ engine: '%env(SEARCH_ENGINE)%'
connection: default
# Siteaccess configuration, with one siteaccess per default
@@ -23,8 +23,8 @@ ezpublish:
# System settings, grouped by siteaccess and/or siteaccess group
system:
site_group:
- # Pool to use for cache, needs to be different per repository (database).
- cache_pool_name: '%cache_pool%'
+ # Cache pool service, needs to be different per repository (database) on multi repository install.
+ cache_service_name: '%env(CACHE_POOL)%'
# These reflect the current installers, complete installation before you change them. For changing var_dir
# it is recommended to install clean, then change setting before you start adding binary content, otherwise you'll
# need to manually modify your database data to reflect this to avoid exceptions.
@@ -36,7 +36,7 @@ ezpublish:
content:
# As we by default enable EzSystemsPlatformHttpCacheBundle which is designed to expire all affected cache
# on changes, and as error / redirects now have separate ttl, we easier allow ttl to be greatly increased
- default_ttl: '%httpcache_default_ttl%'
+ default_ttl: '%env(HTTPCACHE_TTL)%'
# HttpCache purge server(s) setting, eg Varnish, for when ezpublish.http_cache.purge_type is set to 'http'.
http_cache:
- purge_servers: ['%purge_server%']
+ purge_servers: ['%env(PURGE_SERVERS)%']
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 0ff4cba476..25c54600d4 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -1,13 +1,26 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
# A secret key that's used to generate certain security-related tokens
- secret: ThisEzPlatformTokenIsNotSoSecretChangeIt
+ env(SYMFONY_SECRET): ThisEzPlatformTokenIsNotSoSecretChangeIt
# Settings for database backend used by Doctrine DBAL
- # In turn used for Content Repository Persistence, and default database powered search engine
- database_driver: pdo_mysql
- database_host: localhost
- database_port: ~
- database_name: ezplatform
- database_user: root
- database_password:
+ # In turn used for default storage engine & default search engine (if legacy is configured as search engine)
+ env(DATABASE_DRIVER): pdo_mysql
+ env(DATABASE_HOST): localhost
+ env(DATABASE_PORT): ~
+ env(DATABASE_NAME): ezplatform
+ env(DATABASE_USER): root
+ env(DATABASE_PASSWORD):
+
+ # Compile time handlers
+ ## These are defined at compile time, and hence can't be set at runtime using env()
+ ## Compile time env variables mapping of these are set in composer.json
+
+ ## Log type is one of "stream", "error_log" or other types supported by monolog
+ log_type: stream
+
+ ## Mail transport used by SwiftMailer
+ mailer_transport: smtp
+
+ # Purge type used by HttpCache system
+ purge_type: local
diff --git a/app/config/security.yml b/app/config/security.yml
index 8f194241e4..6013b1b21e 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -31,5 +31,12 @@ security:
require_previous_session: false
logout: ~
- default:
+ main:
anonymous: ~
+ # activate different ways to authenticate
+
+ # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
+ #http_basic: ~
+
+ # https://symfony.com/doc/current/security/form_login_setup.html
+ #form_login: ~
diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist
deleted file mode 100644
index 5549ae627c..0000000000
--- a/app/phpunit.xml.dist
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
- ../src/*/*Bundle/Tests
- ../src/*/Bundle/*Bundle/Tests
- ../src/*Bundle/Tests
-
-
-
-
-
-
-
- ../src
-
- ../src/*/*Bundle/Resources
- ../src/*/*Bundle/Tests
- ../src/*/Bundle/*Bundle/Resources
- ../src/*/Bundle/*Bundle/Tests
-
-
-
-
diff --git a/behat.yml.dist b/behat.yml.dist
index a8a65961a3..b9de5c398d 100644
--- a/behat.yml.dist
+++ b/behat.yml.dist
@@ -25,10 +25,6 @@ default:
env: behat
debug: false
- jarnaiz\JUnitFormatter\JUnitFormatterExtension:
- filename: report.xml
- outputDir: %paths.base%/app/logs/junit
-
EzSystems\PlatformBehatBundle\ServiceContainer\EzBehatExtension: ~
# default profile: no suites
diff --git a/bin/.travis/parameters.yml b/bin/.travis/parameters.yml
index 67ecd0bb76..b047a671b1 100644
--- a/bin/.travis/parameters.yml
+++ b/bin/.travis/parameters.yml
@@ -1,5 +1,5 @@
# Only settings different then parameters.yml.dist, buildParameters will inject those we don't define from there!
parameters:
- database_name: behattestdb
- database_user: ezp
- database_password: ezp
+ env(DATABASE_NAME): behattestdb
+ env(DATABASE_USER): ezp
+ env(DATABASE_PASSWORD): ezp
diff --git a/bin/.travis/trusty/setup_from_external_repo.sh b/bin/.travis/trusty/setup_from_external_repo.sh
index 86d0df97e1..b4f9e9401f 100755
--- a/bin/.travis/trusty/setup_from_external_repo.sh
+++ b/bin/.travis/trusty/setup_from_external_repo.sh
@@ -60,10 +60,10 @@ if [ "$RUN_INSTALL" = "1" ] ; then
echo "> Run composer install"
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
mkdir -p web/var
- rm -Rf app/logs/* app/cache/*/*
- sudo chown -R www-data:www-data app/cache app/logs web/var
- find app/cache app/logs web/var -type d | xargs chmod -R 775
- find app/cache app/logs web/var -type f | xargs chmod -R 664
+ rm -Rf var/logs/* var/cache/*/*
+ sudo chown -R www-data:www-data var/cache var/logs web/var
+ find var/cache var/logs web/var -type d | xargs chmod -R 775
+ find var/cache var/logs web/var -type f | xargs chmod -R 664
# Do NOT use this for your prod setup, this is done like this for behat
sudo chown -R www-data:www-data app/config src
#docker-compose -f doc/docker/install.yml up --abort-on-container-exit
@@ -73,6 +73,6 @@ INSTALL_EZ_INSTALL_TYPE=${INSTALL_EZ_INSTALL_TYPE:-clean}
echo "> Start containers and install data"
docker-compose up -d
-docker-compose exec --user www-data app sh -c "php /scripts/wait_for_db.php; php app/console ezplatform:install $INSTALL_EZ_INSTALL_TYPE"
+docker-compose exec --user www-data app sh -c "php /scripts/wait_for_db.php; php bin/console ezplatform:install $INSTALL_EZ_INSTALL_TYPE"
echo "> Done, ready to run behatphpcli container"
diff --git a/app/console b/bin/console
similarity index 58%
rename from app/console
rename to bin/console
index 58b61953f0..5af600e5c1 100755
--- a/app/console
+++ b/bin/console
@@ -1,8 +1,13 @@
#!/usr/bin/env php
getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
-$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
+$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
+$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
+
if ($debug) {
Debug::enable();
}
diff --git a/composer.json b/composer.json
index 96556ea3db..bf93767bba 100644
--- a/composer.json
+++ b/composer.json
@@ -25,16 +25,14 @@
},
"require": {
"php": "~5.6|~7.0",
- "symfony/symfony": "~2.8",
+ "symfony/symfony": "^3.3.0",
"twig/extensions": "~1.4",
"symfony/assetic-bundle": "~2.8",
"symfony/swiftmailer-bundle": "~2.5",
- "symfony/monolog-bundle": "~2.12|~3.0",
- "sensio/distribution-bundle": "^3.0.36|^4.0.6|^5.0",
- "sensio/generator-bundle": "^2.3|^3.0",
+ "symfony/monolog-bundle": "^3.1.0",
+ "sensio/distribution-bundle": "^5.0.19",
"incenteev/composer-parameter-handler": "~2.1",
- "tedivm/stash-bundle": "~0.6",
- "ezsystems/ezpublish-kernel": "^6.9@dev",
+ "ezsystems/ezpublish-kernel": "7.0.x-dev as 6.99.x-dev",
"ezsystems/repository-forms": "^1.7@dev",
"ezsystems/ezplatform-solr-search-engine": "^1.3@dev",
"ezsystems/platform-ui-bundle": "^1.9@dev",
@@ -44,11 +42,11 @@
"ezsystems/ezplatform-multi-file-upload": "^0.1.0@dev",
"ezsystems/ezplatform-design-engine": "^1.0@dev",
"egulias/listeners-debug-command-bundle": "~1.9",
- "white-october/pagerfanta-bundle": "1.0.*",
- "hautelook/templated-uri-bundle": "~1.0 | ~2.0",
- "doctrine/doctrine-bundle": "~1.5",
- "sensio/framework-extra-bundle": "~3.0",
- "ezsystems/content-on-the-fly-prototype": "~0.1.7",
+ "white-october/pagerfanta-bundle": "~1.0",
+ "hautelook/templated-uri-bundle": "~2.0",
+ "doctrine/doctrine-bundle": "^1.6",
+ "sensio/framework-extra-bundle": "^3.0.2",
+ "ezsystems/content-on-the-fly-prototype": "^0.1.7",
"willdurand/js-translation-bundle": "^2.6.4",
"roave/security-advisories": "dev-master"
},
@@ -59,11 +57,9 @@
"behat/mink-extension": "~2.0",
"behat/mink-goutte-driver": "~1.0",
"behat/mink-selenium2-driver": "~1.0",
- "jarnaiz/behat-junit-formatter": "^1.3",
- "ezsystems/behatbundle": "^6.3"
- },
- "suggest": {
- "ezsystems/legacy-bridge": "Provides the full legacy backoffice and legacy features"
+ "ezsystems/behatbundle": "^6.3",
+ "sensio/generator-bundle": "~3.1",
+ "symfony/phpunit-bridge": "~3.2"
},
"scripts": {
"symfony-scripts": [
@@ -85,20 +81,28 @@
]
},
"config": {
- "process-timeout": 3000,
- "bin-dir": "bin"
+ "bin-dir": "bin",
+ "sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
+ "symfony-bin-dir": "bin",
+ "symfony-var-dir": "var",
"symfony-web-dir": "web",
+ "symfony-tests-dir": "tests",
"___symfony-assets-install": "One of 'symlink', 'relative' (symlinks) or 'hard'",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"keep-outdated": true,
- "file": "app/config/parameters.yml"
+ "file": "app/config/parameters.yml",
+ "env-map": {
+ "log_type": "LOG_TYPE",
+ "mailer_transport": "MAILER_TRANSPORT",
+ "purge_type": "PURGE_TYPE"
+ }
},
"branch-alias": {
- "dev-master": "1.12.x-dev"
+ "dev-master": "2.0.x-dev"
}
}
}
diff --git a/doc/docker/install.yml b/doc/docker/install.yml
index 97d74b5f91..45144c98ea 100644
--- a/doc/docker/install.yml
+++ b/doc/docker/install.yml
@@ -33,11 +33,11 @@ services:
composer install --no-progress --no-interaction --prefer-dist --no-suggest --optimize-autoloader;
mkdir -p web/var;
php /scripts/wait_for_db.php;
- php app/console ezplatform:install ${INSTALL_EZ_INSTALL_TYPE};
- rm -Rf app/logs/* app/cache/*/*;
- chown -R www-data:www-data app/cache app/logs web/var;
- find app/cache app/logs web/var -type d -print0 | xargs -0 chmod -R 775;
- find app/cache app/logs web/var -type f -print0 | xargs -0 chmod -R 664;
+ php bin/console ezplatform:install ${INSTALL_EZ_INSTALL_TYPE};
+ rm -Rf var/logs/* var/cache/*/*;
+ chown -R www-data:www-data var/cache var/logs web/var;
+ find var/cache var/logs web/var -type d -print0 | xargs -0 chmod -R 775;
+ find var/cache var/logs web/var -type f -print0 | xargs -0 chmod -R 664;
chown -R www-data:www-data app/config src;
echo 'Dumping database into doc/docker/entrypoint/mysql/2_dump.sql for use by mysql on startup.';
mysqldump -u $$DATABASE_USER --password=$$DATABASE_PASSWORD -h $$DATABASE_HOST --add-drop-table --extended-insert --protocol=tcp $$DATABASE_NAME > doc/docker/entrypoint/mysql/2_dump.sql"
diff --git a/doc/docker/redis.yml b/doc/docker/redis.yml
index 0daa26df94..1a0c59c0df 100644
--- a/doc/docker/redis.yml
+++ b/doc/docker/redis.yml
@@ -10,8 +10,8 @@ services:
depends_on:
- redis
environment:
- - CUSTOM_CACHE_POOL=singleredis
- - CACHE_HOST=redis
+ - CACHE_POOL=cache.redis
+ - CACHE_DSN=redis:6379
redis:
image: ${REDIS_IMAGE}
diff --git a/doc/docker/varnish.yml b/doc/docker/varnish.yml
index e27c37102d..7c988656f1 100644
--- a/doc/docker/varnish.yml
+++ b/doc/docker/varnish.yml
@@ -10,7 +10,8 @@ services:
environment:
- SYMFONY_HTTP_CACHE=0
- SYMFONY_TRUSTED_PROXIES=varnish
- - HTTPCACHE_PURGE_SERVER=http://varnish
+ - PURGE_TYPE=http
+ - PURGE_SERVERS=http://varnish
varnish:
build:
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000000..5a12e6762f
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+ tests
+
+
+
+
+
+ src
+
+ src/*Bundle/Resources
+ src/*/*Bundle/Resources
+ src/*/Bundle/*Bundle/Resources
+
+
+
+
diff --git a/app/cache/.keep b/var/cache/.gitkeep
similarity index 100%
rename from app/cache/.keep
rename to var/cache/.gitkeep
diff --git a/app/logs/.keep b/var/logs/.gitkeep
similarity index 100%
rename from app/logs/.keep
rename to var/logs/.gitkeep
diff --git a/var/sessions/.gitkeep b/var/sessions/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/web/app.php b/web/app.php
index b8a2e86830..62dc108fc8 100644
--- a/web/app.php
+++ b/web/app.php
@@ -18,14 +18,10 @@
$useDebugging = $environment === 'dev';
}
-// Depending on SYMFONY_CLASSLOADER_FILE use custom class loader, otherwise use bootstrap cache, or autoload in debug
-if ($loaderFile = getenv('SYMFONY_CLASSLOADER_FILE')) {
- require_once $loaderFile;
-} else {
- require_once __DIR__ . '/../app/autoload.php';
- if (!$useDebugging) {
- require_once __DIR__ . '/../app/bootstrap.php.cache';
- }
+/** @var \Composer\Autoload\ClassLoader $loader */
+$loader = require __DIR__ . '/../vendor/autoload.php';
+if (PHP_VERSION_ID < 70000 && !$useDebugging) {
+ include_once __DIR__ . '/../var/bootstrap.php.cache';
}
if ($useDebugging) {
@@ -35,7 +31,7 @@
$kernel = new AppKernel($environment, $useDebugging);
// we don't want to use the classes cache if we are in a debug session
-if (!$useDebugging) {
+if (PHP_VERSION_ID < 70000 && !$useDebugging) {
$kernel->loadClassCache();
}