diff --git a/.gitignore b/.gitignore
index 242e454818..17a2e8c7d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,22 +17,27 @@
# 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/
-/ezpublish_legacy
-/app/config/parameters.yml
-/app/bootstrap.php.cache
/doc/docker-compose/entrypoint/*/*.sql
-/web/index_treemenu.php
-/web/index_rest.php
-/web/index_cluster.php
-/web/bundles/
+
/web/css/
/web/js/
/web/design
@@ -40,6 +45,7 @@
/web/share
/web/var
/web/.htaccess
+
composer.phar
composer.lock
.buildpath
diff --git a/.travis.yml b/.travis.yml
index 4eb5ba3901..9ee5f19c48 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,8 @@ env:
- TEST_CMD="bin/behat -vv --profile=rest --suite=fullXml --tags=~@broken"
- TEST_CMD="bin/behat -vv --profile=core --tags=~@broken"
- TEST_CMD="bin/phpunit -v vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/Tests/Functional"
- - TEST_CMD="bin/behat -vv --profile=platformui --tags='@common'"
+ - TEST_CMD="bin/behat -v --profile=repository-forms --tags=~@broken"
+ - TEST_CMD="bin/behat -v --profile=behat --tags=~@broken"
# test only master (+ Pull requests)
branches:
diff --git a/COPYRIGHT b/COPYRIGHT
index 6de43c813a..d79498d3e5 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,4 +1,4 @@
-COPYRIGHT NOTICE: Copyright (C) 1999-2016 eZ Systems AS
+COPYRIGHT NOTICE: Copyright (C) 1999-2017 eZ Systems AS
SOFTWARE LICENSE: GNU General Public License v2.0
NOTICE: >
This program is free software; you can redistribute it and/or
diff --git a/Dockerfile b/Dockerfile
index 82d745a18c..7eeadabe21 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,11 +16,11 @@ RUN if [ -d .git ]; then echo "ERROR: .dockerignore folders detected, exiting" &
RUN mkdir -p web/var \
&& composer install --optimize-autoloader --no-progress --no-interaction --no-suggest --prefer-dist \
# Clear cache again so env variables are taken into account on startup
- && rm -Rf app/logs/* app/cache/*/* \
+ && rm -Rf var/logs/* var/cache/*/* \
# Fix permissions for www-data
- && 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 \
+ && 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 \
# Remove composer cache to avoid it taking space in image
&& rm -rf ~/.composer/*/* \
&& [ "$REMOVE_AUTH" = "1" ] && rm -f auth.json
diff --git a/app/AppCache.php b/app/AppCache.php
index a1b1285c88..e8f90fa587 100644
--- a/app/AppCache.php
+++ b/app/AppCache.php
@@ -6,7 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
-use eZ\Bundle\EzPublishCoreBundle\HttpCache;
+use EzSystems\PlatformHttpCacheBundle\AppCache as PlatformHttpCacheBundleAppCache;
/**
* Class AppCache.
@@ -14,6 +14,6 @@
* For easier upgrade do not change this file, as of 2015.01 possible to extend
* cleanly via SYMFONY_HTTP_CACHE_CLASS & SYMFONY_CLASSLOADER_FILE env variables!
*/
-class AppCache extends HttpCache
+class AppCache extends PlatformHttpCacheBundleAppCache
{
}
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 3171b4cf7a..977f074163 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -20,7 +20,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(),
@@ -29,14 +29,13 @@ 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(),
+ new EzSystems\PlatformHttpCacheBundle\EzSystemsPlatformHttpCacheBundle(),
new eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle(),
new eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle(),
new eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle(),
- new EzSystems\MultiFileUploadBundle\EzSystemsMultiFileUploadBundle(),
new eZ\Bundle\EzPublishRestBundle\EzPublishRestBundle(),
new EzSystems\PlatformUIAssetsBundle\EzSystemsPlatformUIAssetsBundle(),
new EzSystems\PlatformUIBundle\EzSystemsPlatformUIBundle(),
@@ -47,12 +46,13 @@ public function registerBundles()
new EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle(),
new EzSystems\RepositoryFormsBundle\EzSystemsRepositoryFormsBundle(),
new EzSystems\EzPlatformSolrSearchEngineBundle\EzSystemsEzPlatformSolrSearchEngineBundle(),
- new EzSystems\EzContentOnTheFlyBundle\EzSystemsEzContentOnTheFlyBundle(),
new EzSystems\EzPlatformDesignEngineBundle\EzPlatformDesignEngineBundle(),
new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
+ new EzSystems\HybridPlatformUiBundle\EzSystemsHybridPlatformUiBundle(),
+ new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new AppBundle\AppBundle(),
- );
+ ];
switch ($this->getEnvironment()) {
case 'test':
@@ -66,12 +66,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);
- }
-
- $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../cache_pool'));
- $loader->load($pool . '.yml');
-}
diff --git a/app/config/ezplatform.yml b/app/config/ezplatform.yml
index c656538996..83c2d8df0b 100644
--- a/app/config/ezplatform.yml
+++ b/app/config/ezplatform.yml
@@ -4,7 +4,7 @@ ezpublish:
default:
storage: ~
search:
- engine: "%search_engine%"
+ engine: '%env(SEARCH_ENGINE)%'
connection: default
# Siteaccess configuration, with one siteaccess per default
@@ -19,8 +19,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.
@@ -29,3 +29,5 @@ ezpublish:
# so removing eng-GB from this list may lead to errors or content not being shown, unless you change
# all eng-GB data to other locales first.
languages: [eng-GB]
+ session:
+ name: eZSESSID
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 0ff4cba476..49b3ac8201 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -1,13 +1,23 @@
# 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
diff --git a/app/config/routing.yml b/app/config/routing.yml
index 2085c73025..af2cf61cb9 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -27,11 +27,8 @@ _ezpublishPlatformUIRoutes:
_ezplatformRepositoryFormsRoutes:
resource: "@EzSystemsRepositoryFormsBundle/Resources/config/routing.yml"
-_contentOnTheFly:
- resource: "@ContentOnTheFlyBundle/Resources/config/routing.yml"
- prefix: "%ezpublish_rest.path_prefix%"
-
-_multiFileUpload:
- resource: "@EzSystemsMultiFileUploadBundle/Resources/config/routing.yml"
- prefix: "%ezpublish_rest.path_prefix%"
+fos_js_routing:
+ resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
+ez_hybrid_ui:
+ resource: "@EzSystemsHybridPlatformUiBundle/Resources/config/routing.yml"
diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml
index 0fef8dfa7f..20602eb27b 100644
--- a/app/config/routing_dev.yml
+++ b/app/config/routing_dev.yml
@@ -1,15 +1,14 @@
_wdt:
- resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
- prefix: /_wdt
+ resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
+ prefix: /_wdt
_profiler:
- resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
- prefix: /_profiler
+ resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
+ prefix: /_profiler
-# Symfony 2.6
_errors:
- resource: "@TwigBundle/Resources/config/routing/errors.xml"
- prefix: /_error
+ resource: '@TwigBundle/Resources/config/routing/errors.xml'
+ prefix: /_error
_main:
resource: routing.yml
diff --git a/app/config/security.yml b/app/config/security.yml
index ba9b6c295f..6013b1b21e 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -1,4 +1,7 @@
+# To get started with security, check out the documentation:
+# https://symfony.com/doc/current/security.html
security:
+ # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
providers:
ezpublish:
id: ezpublish.security.user_provider
@@ -6,6 +9,7 @@ security:
#! memory: ~
firewalls:
+ # disables authentication for assets and the profiler, adapt it according to your needs
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
@@ -27,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 a8acb88e65..173cac12eb 100644
--- a/behat.yml.dist
+++ b/behat.yml.dist
@@ -19,10 +19,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 799264a5d7..930b14d1a9 100755
--- a/bin/.travis/trusty/setup_from_external_repo.sh
+++ b/bin/.travis/trusty/setup_from_external_repo.sh
@@ -56,10 +56,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-compose/install.yml up --abort-on-container-exit
@@ -69,6 +69,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/bin/synchronize-translations.sh b/bin/synchronize-translations.sh
index d2411b7294..29cbb2e319 100755
--- a/bin/synchronize-translations.sh
+++ b/bin/synchronize-translations.sh
@@ -7,15 +7,18 @@ echo '# Clean corresponding ezplatform-i18n folder';
rm ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle/*.xlf
rm ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel/*.xlf
rm ./vendor/ezsystems/ezplatform-i18n/repository-forms/*.xlf
+rm ./vendor/ezsystems/ezplatform-i18n/hybrid-platform-ui/*.xlf
echo '# Mirror the translation files';
cp ./vendor/ezsystems/platform-ui-bundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle
cp ./vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel
cp ./vendor/ezsystems/repository-forms/bundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/repository-forms
+cp ./vendor/ezsystems/hybrid-platform-ui/src/bundle/Resources/translations/*.xlf ./vendor/ezsystems/ezplatform-i18n/hybrid-platform-ui
echo '# Rename file to fit to crowdin format';
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/platform-ui-bundle/*
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/ezpublish-kernel/*
rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/repository-forms/*
+rename 's/\.en\./\./g' ./vendor/ezsystems/ezplatform-i18n/hybrid-platform-ui/*
echo 'Translation synchronization done !';
diff --git a/composer.json b/composer.json
index 49fa475216..90a00001f0 100644
--- a/composer.json
+++ b/composer.json
@@ -14,35 +14,41 @@
"ezsystems/ezpublish-community": "*"
},
"autoload": {
- "psr-0": { "": "src/" }
+ "psr-4": {
+ "AppBundle\\": "src/AppBundle/"
+ },
+ "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
+ },
+ "autoload-dev": {
+ "psr-4": { "Tests\\": "tests/" },
+ "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
- "php": "~5.6|~7.0",
- "symfony/symfony": "~2.8",
+ "php": "~7.0",
+ "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",
+ "ezsystems/platform-ui-bundle": "dev-composer_installer as 2.0.x-dev",
"ezsystems/ez-support-tools": "~0.1.0",
"ezsystems/ezplatform-http-cache": "^0.1@dev",
"ezplatform-i18n/ezplatform-i18n-ach_ug": "^1.1@dev",
- "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",
- "willdurand/js-translation-bundle": "^2.6.4"
+ "white-october/pagerfanta-bundle": "~1.0",
+ "hautelook/templated-uri-bundle": "~2.0",
+ "doctrine/doctrine-bundle": "^1.6",
+ "sensio/framework-extra-bundle": "^3.0.2",
+ "willdurand/js-translation-bundle": "^2.6.4",
+ "composer/installers": "~1.4",
+ "ezsystems/hybrid-platform-ui": "dev-composer_installer as 1.0.x-dev",
+ "ezsystems/hybrid-platform-ui-core-components": "^0.1@dev"
},
"require-dev": {
"ezsystems/ezplatform-i18n": "^1.0@dev",
@@ -51,46 +57,50 @@
"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": {
- "build": [
+ "symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
- "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"eZ\\Bundle\\EzPublishCoreBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"eZ\\Bundle\\EzPublishCoreBundle\\Composer\\ScriptHandler::dumpAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-install-cmd": [
- "@build"
+ "@symfony-scripts"
],
"post-update-cmd": [
- "@build"
+ "@symfony-scripts"
],
"post-create-project-cmd": [
"eZ\\Bundle\\EzPublishCoreBundle\\Composer\\ScriptHandler::installWelcomeText"
]
},
"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"
+ }
},
"branch-alias": {
- "dev-master": "1.10.x-dev"
+ "dev-master": "2.0.x-dev"
}
}
}
diff --git a/doc/docker-compose/install.yml b/doc/docker-compose/install.yml
index 680aec97bd..c5b76255bb 100644
--- a/doc/docker-compose/install.yml
+++ b/doc/docker-compose/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-compose/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-compose/entrypoint/mysql/2_dump.sql"
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 3cf1f61511..93d6e96134 100644
--- a/web/app.php
+++ b/web/app.php
@@ -18,17 +18,8 @@
$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';
- }
-}
-
-require_once __DIR__ . '/../app/AppKernel.php';
+/** @var \Composer\Autoload\ClassLoader $loader */
+$loader = require __DIR__ . '/../vendor/autoload.php';
if ($useDebugging) {
Debug::enable();
@@ -36,11 +27,6 @@
$kernel = new AppKernel($environment, $useDebugging);
-// we don't want to use the classes cache if we are in a debug session
-if (!$useDebugging) {
- $kernel->loadClassCache();
-}
-
// Depending on the SYMFONY_HTTP_CACHE environment variable, tells whether the internal HTTP Cache mechanism is to be used.
// If not set, or "", it is auto activated if _not_ in "dev" environment.
if (($useHttpCache = getenv('SYMFONY_HTTP_CACHE')) === false || $useHttpCache === '') {
diff --git a/web/app_dev.php b/web/app_dev.php
index 422514d22a..836db57f9c 100644
--- a/web/app_dev.php
+++ b/web/app_dev.php
@@ -6,7 +6,7 @@
// Feel free to remove this, extend it, or make something more sophisticated at your own risk.
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
- || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')
+ || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || PHP_SAPI === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');