From d02b205c304067a966322837bf82c0bfe4387a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Wed, 25 Jan 2017 13:50:44 +0100 Subject: [PATCH 01/13] Merge inn changes from symfony 2.8 to 3.2 from symfony-standard --- .gitignore | 31 +++++++++------- Dockerfile | 8 ++--- app/AppKernel.php | 28 +++++++++++++-- app/autoload.php | 2 +- app/config/cache_pool/singlememcached.yml | 7 ---- app/config/cache_pool/singleredis.yml | 7 ---- app/config/config.yml | 43 +++++------------------ app/config/config_dev.yml | 3 -- app/config/config_prod.yml | 4 --- app/config/default_parameters.yml | 7 +--- app/config/ezplatform.yml | 2 +- app/phpunit.xml.dist | 38 -------------------- behat.yml.dist | 4 --- {app => bin}/console | 9 +++-- composer.json | 35 ++++++++++-------- doc/docker-compose/install.yml | 10 +++--- phpunit.xml.dist | 31 ++++++++++++++++ app/cache/.keep => var/cache/.gitkeep | 0 app/logs/.keep => var/logs/.gitkeep | 0 var/sessions/.gitkeep | 0 web/app.php | 14 +++----- 21 files changed, 123 insertions(+), 160 deletions(-) delete mode 100644 app/config/cache_pool/singlememcached.yml delete mode 100644 app/config/cache_pool/singleredis.yml delete mode 100644 app/phpunit.xml.dist rename {app => bin}/console (69%) create mode 100644 phpunit.xml.dist rename app/cache/.keep => var/cache/.gitkeep (100%) rename app/logs/.keep => var/logs/.gitkeep (100%) create mode 100644 var/sessions/.gitkeep diff --git a/.gitignore b/.gitignore index 9995062306..68e3cd0e74 100644 --- a/.gitignore +++ b/.gitignore @@ -17,22 +17,26 @@ # 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/ +/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 +44,7 @@ /web/share /web/var /web/.htaccess + composer.phar composer.lock .buildpath 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/AppKernel.php b/app/AppKernel.php index e72646d56d..c05463e4a1 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,7 +29,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(), @@ -51,7 +50,7 @@ public function registerBundles() new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(), new JMS\TranslationBundle\JMSTranslationBundle(), new AppBundle\AppBundle(), - ); + ]; switch ($this->getEnvironment()) { case 'test': @@ -71,6 +70,29 @@ public function registerBundles() 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 index 79137cbb30..ea8b2c7ce7 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -15,6 +15,6 @@ */ $loader = require __DIR__ . '/../vendor/autoload.php'; -AnnotationRegistry::registerLoader(array($loader, 'loadClass')); +AnnotationRegistry::registerLoader([$loader, 'loadClass']); return $loader; diff --git a/app/config/cache_pool/singlememcached.yml b/app/config/cache_pool/singlememcached.yml deleted file mode 100644 index 561ec4a473..0000000000 --- a/app/config/cache_pool/singlememcached.yml +++ /dev/null @@ -1,7 +0,0 @@ -# This custom cache pool "singlememcached" is loaded by env.php on demand -stash: - caches: - singlememcached: - drivers: [Memcache] - Memcache: - servers: [ {server: '%cache_host%', port: '%cache_memcached_port%'} ] diff --git a/app/config/cache_pool/singleredis.yml b/app/config/cache_pool/singleredis.yml deleted file mode 100644 index 0409207bdf..0000000000 --- a/app/config/cache_pool/singleredis.yml +++ /dev/null @@ -1,7 +0,0 @@ -# This custom cache pool "singleredis" is loaded by env.php on demand -stash: - caches: - singleredis: - drivers: [Redis] - Redis: - servers: [ {server: '%cache_host%', port: '%cache_redis_port%'} ] diff --git a/app/config/config.yml b/app/config/config.yml index 1b2b2f7181..25f6f201bf 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -32,24 +32,6 @@ ez_search_engine_solr: mapping: default: endpoint0 -# Stash is used for persistence cache in eZ Repository -# Can have several caches used by different eZ Repositories in ezplatform.yml, must be one per database -stash: - caches: - default: - drivers: - # When using multiple webservers, you must use Memcache or Redis to share the cache - # For single web server Apc, Memcached and Redis will give you better performance under editing load - - FileSystem - inMemory: true - registerDoctrineAdapter: false - # On Windows, using FileSystem, to avoid hitting filesystem limitations - # you need to change the keyHashFunction used to generate cache directories to "crc32" - # FileSystem: - # keyHashFunction: crc32 - # Disable tracking of cache values to avoid large disk use when using web profiler - tracking_values: false - framework: esi: ~ translator: { fallback: "%locale_fallback%" } @@ -58,12 +40,7 @@ framework: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ csrf_protection: ~ - form: - csrf_protection: - enabled: true - # Note: changing this will break legacy extensions that rely on the default name to alter AJAX requests - # See https://jira.ez.no/browse/EZP-20783 - field_name: ezxform_token + form: ~ validation: { enable_annotations: true } # Place "eztpl" engine first intentionnally. # This is to avoid template name parsing with Twig engine, refusing specific characters @@ -72,13 +49,17 @@ framework: default_locale: "%locale_fallback%" trusted_hosts: ~ session: - # handler_id set to null will use default session handler from php.ini - handler_id: ~ + # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id + handler_id: session.handler.native_file + save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" # Note: eZ Publish also allows session name and session cookie configuration to be per SiteAccess, by # default session name will be set to "eZSESSID{siteaccess_hash}" (unique session name per siteaccess) - # Further reading on sessions: https://doc.ez.no/display/EZP/Session + # Further reading on sessions: https://doc.ez.no/display/DEVELOPER/Sessions fragments: ~ http_method_override: true + assets: true + php_errors: + log: true # Twig Configuration twig: @@ -88,15 +69,9 @@ twig: # Assetic Configuration assetic: debug: "%kernel.debug%" - use_controller: false - bundles: [] - #java: /usr/bin/java + use_controller: "%kernel.debug%" filters: cssrewrite: ~ - #closure: - # jar: "%kernel.root_dir%/Resources/java/compiler.jar" - #yui_css: - # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" # Swiftmailer Configuration swiftmailer: diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index a9864c522f..16fef029e2 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -43,8 +43,5 @@ monolog: # type: chromephp # level: info -assetic: - use_controller: true - #swiftmailer: # delivery_address: me@example.com diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 9815e17dd1..d341097ef7 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -2,10 +2,6 @@ imports: - { resource: config.yml } - { resource: ezplatform_prod.yml } -#framework: -# validation: -# cache: apc - #doctrine: # orm: # metadata_cache_driver: apc diff --git a/app/config/default_parameters.yml b/app/config/default_parameters.yml index 6710401616..2e639f660a 100644 --- a/app/config/default_parameters.yml +++ b/app/config/default_parameters.yml @@ -22,9 +22,4 @@ parameters: log_path: "%kernel.logs_dir%/%kernel.environment%.log" # Settings for Cache pool, to create your own pool see cache/ folder. - cache_pool: "default" - - cache_host: 127.0.0.1 - - cache_memcached_port: 11211 - cache_redis_port: 6379 + cache_pool: "app.cache" diff --git a/app/config/ezplatform.yml b/app/config/ezplatform.yml index c656538996..ddf6f2ae9f 100644 --- a/app/config/ezplatform.yml +++ b/app/config/ezplatform.yml @@ -20,7 +20,7 @@ ezpublish: system: site_group: # Pool to use for cache, needs to be different per repository (database). - cache_pool_name: '%cache_pool%' + #cache_pool_service: '%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. 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/app/console b/bin/console similarity index 69% rename from app/console rename to bin/console index 58b61953f0..21455f9a01 100755 --- a/app/console +++ b/bin/console @@ -10,17 +10,16 @@ set_time_limit(0); // Ensure UTF-8 is used in string operations setlocale(LC_CTYPE, 'C.UTF-8'); -// Use autoload over boostrap here so we don't need to keep the generated files in git -require_once __DIR__ . '/autoload.php'; -require_once __DIR__ . '/AppKernel.php'; +/** @var Composer\Autoload\ClassLoader $loader */ +$loader = require __DIR__.'/../app/autoload.php'; use eZ\Bundle\EzPublishCoreBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Debug\Debug; $input = new ArgvInput(); -$env = $input->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 c26c291cf0..0d922cb0ff 100644 --- a/composer.json +++ b/composer.json @@ -14,20 +14,24 @@ "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/" } }, "require": { "php": "~5.6|~7.0", - "symfony/symfony": "~2.8", + "symfony/symfony": "^3.2.4", "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.0", + "sensio/distribution-bundle": "~5.0", "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", @@ -36,8 +40,8 @@ "ezplatform-i18n/ezplatform-i18n-ach_ug": "^1.1@dev", "ezsystems/ezplatform-multi-file-upload": "^0.1.0@dev", "egulias/listeners-debug-command-bundle": "~1.9", - "white-october/pagerfanta-bundle": "1.0.*", - "hautelook/templated-uri-bundle": "~1.0 | ~2.0", + "white-october/pagerfanta-bundle": "~1.0", + "hautelook/templated-uri-bundle": "~2.0", "doctrine/doctrine-bundle": "~1.5", "sensio/framework-extra-bundle": "~3.0", "ezsystems/content-on-the-fly-prototype": "~0.1.7", @@ -50,11 +54,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": { "build": [ @@ -81,7 +83,10 @@ }, "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": { @@ -89,7 +94,7 @@ "file": "app/config/parameters.yml" }, "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..65e90821d0 --- /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..4aa090c370 100644 --- a/web/app.php +++ b/web/app.php @@ -18,18 +18,12 @@ $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__ . '/../app/autoload.php'; +if (!$useDebugging) { + include_once __DIR__ . '/../var/bootstrap.php.cache'; } -require_once __DIR__ . '/../app/AppKernel.php'; - if ($useDebugging) { Debug::enable(); } From eeea71916386089402aa25661961d64b8f4cad60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Tue, 14 Feb 2017 15:16:46 +0100 Subject: [PATCH 02/13] [Parameters] Change to use native env() parameter support instead of own env/docker.php concept Get rid of custom concept env/docker.php in favour of the following: - For runtime settings the new env() support added in Symfony 3.2 - For compile time settings take advantage of incenteev-parameters env support Same env variable names are used so for the most part BC is kept here. --- app/config/config.yml | 23 ++++---- app/config/config_dev.yml | 4 +- app/config/config_prod.yml | 2 +- app/config/default_parameters.yml | 21 +++---- app/config/env/docker.php | 96 ------------------------------- app/config/ezplatform.yml | 6 +- app/config/parameters.yml.dist | 26 ++++++--- composer.json | 6 +- 8 files changed, 48 insertions(+), 136 deletions(-) delete mode 100644 app/config/env/docker.php diff --git a/app/config/config.yml b/app/config/config.yml index 25f6f201bf..2579674f6e 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -2,7 +2,6 @@ imports: - { resource: default_parameters.yml } - { resource: parameters.yml } - { resource: security.yml } - - { resource: env/docker.php } - { resource: env/platformsh.php } # Configuration for Database connection, can have several connections used by eZ Repositories in ezplatform.yml @@ -10,12 +9,12 @@ doctrine: dbal: connections: default: - driver: "%database_driver%" - host: "%database_host%" - port: "%database_port%" - user: "%database_user%" - password: "%database_password%" - dbname: "%database_name%" + driver: '%env(DATABASE_DRIVER)%' + host: '%env(DATABASE_HOST)%' + port: '%env(DATABASE_PORT)%' + user: '%env(DATABASE_USER)%' + password: '%env(DATABASE_PASSWORD)%' + dbname: '%env(DATABASE_NAME)%' charset: UTF8 # Base configuration for Solr, for more options see: https://doc.ez.no/display/EZP/Solr+Search+Engine+Bundle @@ -23,7 +22,7 @@ doctrine: ez_search_engine_solr: endpoints: endpoint0: - dsn: "%solr_dsn%" + dsn: '%env(SOLR_DSN)%' core: collection1 connections: default: @@ -35,7 +34,7 @@ ez_search_engine_solr: framework: esi: ~ translator: { fallback: "%locale_fallback%" } - secret: "%secret%" + secret: '%env(SYMFONY_SECRET)%' router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ @@ -76,7 +75,7 @@ assetic: # Swiftmailer Configuration swiftmailer: transport: "%mailer_transport%" - host: "%mailer_host%" - username: "%mailer_user%" - password: "%mailer_password%" + host: '%env(MAILER_HOST)%' + username: '%env(MAILER_USER)%' + password: '%env(MAILER_PASSWORD)%' spool: { type: memory } diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 16fef029e2..fb477cbcb7 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -15,8 +15,8 @@ web_profiler: monolog: handlers: main: - type: "%log_type%" - path: "%log_path%" + type: "%log_type%" + path: '%env(LOG_PATH)%' level: debug console: type: console diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index d341097ef7..86d3166c16 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -17,7 +17,7 @@ monolog: handler: nested nested: type: "%log_type%" - path: "%log_path%" + path: '%env(LOG_PATH)%' level: debug console: type: console diff --git a/app/config/default_parameters.yml b/app/config/default_parameters.yml index 2e639f660a..c8549eeaa4 100644 --- a/app/config/default_parameters.yml +++ b/app/config/default_parameters.yml @@ -3,23 +3,18 @@ parameters: locale_fallback: en # Setting for mail system, used by SwiftMailer - mailer_transport: smtp - mailer_host: 127.0.0.1 - mailer_user: ~ - mailer_password: ~ + env(MAILER_HOST): 127.0.0.1 + env(MAILER_USER): ~ + env(MAILER_PASSWORD): ~ # One of `legacy` (default) or `solr` - search_engine: legacy + env(SEARCH_ENGINE): legacy # Solr root endpoint, relevant if `solr` is set as search_engine - solr_dsn: http://localhost:8983/solr - - ## Logging settings - # Log type is one of "stream", "error_log" or other types supported by monolog - log_type: stream + env(SOLR_DSN): http://localhost:8983/solr # Log path, where to store the log files. php://stderr may be used in order to log to standard error - log_path: "%kernel.logs_dir%/%kernel.environment%.log" + env(LOG_PATH): "%kernel.logs_dir%/%kernel.environment%.log" - # Settings for Cache pool, to create your own pool see cache/ folder. - cache_pool: "app.cache" + # Settings for Cache pool, to change add own cache service and optionally inject own arguments + env(CACHE_POOL): "cache.app" diff --git a/app/config/env/docker.php b/app/config/env/docker.php deleted file mode 100644 index 79ca6d6cb5..0000000000 --- a/app/config/env/docker.php +++ /dev/null @@ -1,96 +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 ddf6f2ae9f..26919732a1 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_service: '%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. 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/composer.json b/composer.json index 0d922cb0ff..2da0ed205c 100644 --- a/composer.json +++ b/composer.json @@ -91,7 +91,11 @@ "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": "2.0.x-dev" From ccd5e8e3db13ea90ef4f91a04205efb154d7a6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Mon, 20 Feb 2017 20:40:28 +0100 Subject: [PATCH 03/13] Enable EzSystemsPlatformHttpCacheBundle by default --- app/AppCache.php | 4 ++-- app/AppKernel.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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 c05463e4a1..cadb3b6d5f 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -32,6 +32,7 @@ public function registerBundles() 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(), From 6b08461fbf6173adc9ccb21db34b48547b82e628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Mon, 8 May 2017 13:33:42 +0200 Subject: [PATCH 04/13] Bump to Symfony 3.3 and syncronize with symfony-standard --- .gitignore | 1 + COPYRIGHT | 2 +- app/AppKernel.php | 1 + app/autoload.php | 20 --------------- app/config/config.yml | 52 +++++++++++++++++++------------------- app/config/config_dev.yml | 40 +++++++++++++---------------- app/config/config_prod.yml | 13 +++++----- app/config/routing_dev.yml | 13 +++++----- app/config/security.yml | 13 +++++++++- bin/console | 14 +++++----- composer.json | 25 +++++++++--------- phpunit.xml.dist | 4 +-- web/app.php | 6 ++--- web/app_dev.php | 2 +- 14 files changed, 99 insertions(+), 107 deletions(-) delete mode 100644 app/autoload.php diff --git a/.gitignore b/.gitignore index 68e3cd0e74..7d3d998c07 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ # 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 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/app/AppKernel.php b/app/AppKernel.php index cadb3b6d5f..c8c2f342ad 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -65,6 +65,7 @@ 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(); } diff --git a/app/autoload.php b/app/autoload.php deleted file mode 100644 index ea8b2c7ce7..0000000000 --- a/app/autoload.php +++ /dev/null @@ -1,20 +0,0 @@ -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 2da0ed205c..c391198ae1 100644 --- a/composer.json +++ b/composer.json @@ -20,16 +20,17 @@ "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, "autoload-dev": { - "psr-4": { "Tests\\": "tests/" } + "psr-4": { "Tests\\": "tests/" }, + "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ] }, "require": { "php": "~5.6|~7.0", - "symfony/symfony": "^3.2.4", + "symfony/symfony": "^3.3.0", "twig/extensions": "~1.4", "symfony/assetic-bundle": "~2.8", "symfony/swiftmailer-bundle": "~2.5", - "symfony/monolog-bundle": "~3.0", - "sensio/distribution-bundle": "~5.0", + "symfony/monolog-bundle": "^3.1.0", + "sensio/distribution-bundle": "^5.0.19", "incenteev/composer-parameter-handler": "~2.1", "ezsystems/ezpublish-kernel": "7.0.x-dev as 6.99.x-dev", "ezsystems/repository-forms": "^1.7@dev", @@ -42,9 +43,9 @@ "egulias/listeners-debug-command-bundle": "~1.9", "white-october/pagerfanta-bundle": "~1.0", "hautelook/templated-uri-bundle": "~2.0", - "doctrine/doctrine-bundle": "~1.5", - "sensio/framework-extra-bundle": "~3.0", - "ezsystems/content-on-the-fly-prototype": "~0.1.7", + "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" }, "require-dev": { @@ -59,7 +60,7 @@ "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", @@ -68,18 +69,18 @@ "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", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 65e90821d0..5a12e6762f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,11 +5,11 @@ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd" backupGlobals="false" colors="true" - bootstrap="app/autoload.php" + bootstrap="vendor/autoload.php" > - + diff --git a/web/app.php b/web/app.php index 4aa090c370..49f832e7e7 100644 --- a/web/app.php +++ b/web/app.php @@ -19,8 +19,8 @@ } /** @var \Composer\Autoload\ClassLoader $loader */ -$loader = require __DIR__ . '/../app/autoload.php'; -if (!$useDebugging) { +$loader = require __DIR__ . '/../vendor/autoload.php'; +if (PHP_VERSION_ID < 70000 && !$useDebugging) { include_once __DIR__ . '/../var/bootstrap.php.cache'; } @@ -31,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(); } 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.'); From 9b03747bd2dae4193a779af24fdf36b89c17b5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Mon, 8 May 2017 13:34:20 +0200 Subject: [PATCH 05/13] Require PHP 7.0 and drop deprecated symfony boostrap code --- composer.json | 3 +-- web/app.php | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/composer.json b/composer.json index c391198ae1..2cd46fb367 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ] }, "require": { - "php": "~5.6|~7.0", + "php": "~7.0", "symfony/symfony": "^3.3.0", "twig/extensions": "~1.4", "symfony/assetic-bundle": "~2.8", @@ -62,7 +62,6 @@ "scripts": { "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", diff --git a/web/app.php b/web/app.php index 49f832e7e7..93d6e96134 100644 --- a/web/app.php +++ b/web/app.php @@ -20,9 +20,6 @@ /** @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) { Debug::enable(); @@ -30,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 (PHP_VERSION_ID < 70000 && !$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 === '') { From 462c6ec86a113f771d5b51ee2ca3332d2a16d8c6 Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Tue, 18 Apr 2017 14:40:31 +0200 Subject: [PATCH 06/13] [requirements] added and enabled ezsystems/hybrid-platform-ui --- app/AppKernel.php | 3 ++- app/config/config.yml | 5 +++++ app/config/routing.yml | 11 ++++------- composer.json | 13 +++++++++++-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/AppKernel.php b/app/AppKernel.php index c8c2f342ad..1ece1a81ac 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -47,9 +47,10 @@ public function registerBundles() new EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle(), new EzSystems\RepositoryFormsBundle\EzSystemsRepositoryFormsBundle(), new EzSystems\EzPlatformSolrSearchEngineBundle\EzSystemsEzPlatformSolrSearchEngineBundle(), - new EzSystems\EzContentOnTheFlyBundle\EzSystemsEzContentOnTheFlyBundle(), new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(), new JMS\TranslationBundle\JMSTranslationBundle(), + new EzSystems\HybridPlatformUiBundle\EzSystemsHybridPlatformUiBundle(), + new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new AppBundle\AppBundle(), ]; diff --git a/app/config/config.yml b/app/config/config.yml index b5b4c1f991..052b4f5e2a 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -69,6 +69,8 @@ twig: assetic: debug: '%kernel.debug%' use_controller: '%kernel.debug%' + bundles: [] + #java: /usr/bin/java filters: cssrewrite: ~ @@ -79,3 +81,6 @@ swiftmailer: username: '%env(MAILER_USER)%' password: '%env(MAILER_PASSWORD)%' spool: { type: memory } + +fos_js_routing: + routes_to_expose: [_ez_content_view] 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/composer.json b/composer.json index 2cd46fb367..b13e708384 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "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": "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", @@ -47,6 +47,9 @@ "sensio/framework-extra-bundle": "^3.0.2", "ezsystems/content-on-the-fly-prototype": "^0.1.7", "willdurand/js-translation-bundle": "^2.6.4" + "composer/installers": "dev-ezplatform_assets as 1.3.x-dev", + "ezsystems/hybrid-platform-ui": "dev-master as 1.0.x-dev", + "ezsystems/hybrid-platform-ui-core-components": "^0.1@dev" }, "require-dev": { "ezsystems/ezplatform-i18n": "^1.0@dev", @@ -100,5 +103,11 @@ "branch-alias": { "dev-master": "2.0.x-dev" } - } + }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/dpobel/installers.git" + } + ] } From 771d4d6d947b4955af97b4f991812f543ae6a046 Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Thu, 4 May 2017 14:43:38 +0200 Subject: [PATCH 07/13] Disabled multi-file-upload and content-on-the-fly It requires platform-ui 1.x. --- app/AppKernel.php | 1 - composer.json | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/AppKernel.php b/app/AppKernel.php index 1ece1a81ac..c1f25e9554 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -36,7 +36,6 @@ public function registerBundles() 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(), diff --git a/composer.json b/composer.json index b13e708384..1f77fe38c4 100644 --- a/composer.json +++ b/composer.json @@ -39,14 +39,12 @@ "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", "egulias/listeners-debug-command-bundle": "~1.9", "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" + "willdurand/js-translation-bundle": "^2.6.4", "composer/installers": "dev-ezplatform_assets as 1.3.x-dev", "ezsystems/hybrid-platform-ui": "dev-master as 1.0.x-dev", "ezsystems/hybrid-platform-ui-core-components": "^0.1@dev" From 60611eed258c6458687be9b09fe5215d3245b4ad Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Tue, 6 Jun 2017 22:07:17 +0200 Subject: [PATCH 08/13] Temporarily forced session name across siteaccess Required to ease login to the backoffice until properly implemented. --- app/config/ezplatform.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/config/ezplatform.yml b/app/config/ezplatform.yml index 26919732a1..83c2d8df0b 100644 --- a/app/config/ezplatform.yml +++ b/app/config/ezplatform.yml @@ -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 From 37d696a03158514163c5365f4797f4cbe5a282f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Thu, 22 Jun 2017 12:50:49 +0200 Subject: [PATCH 09/13] [Travis/Behat] Disable platformui profile, instead add repository-forms & behat --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: From 8983c7e67f4c11eb998a89a1a350d22baef6abfd Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Fri, 23 Jun 2017 12:53:37 +0200 Subject: [PATCH 10/13] Added hybrid-platform-ui to the i18n sync script (#185, EZP-27494) --- bin/synchronize-translations.sh | 3 +++ 1 file changed, 3 insertions(+) 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 !'; From a4758525cf41403861dd326af48322575015ba5e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 26 Jul 2017 12:15:42 +0200 Subject: [PATCH 11/13] [Travis] Update Behat setup to make tests passing (#194) * [Travis] Aligned behat setup with Sf3 dir structure * [Travis] Aligned db parameters template with Sf3.2+ --- bin/.travis/parameters.yml | 6 +++--- bin/.travis/trusty/setup_from_external_repo.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) 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" From 8b26a8c3a08c271ebc589bfc7852ee8d7996da7f Mon Sep 17 00:00:00 2001 From: Damien Pobel Date: Thu, 24 Aug 2017 14:38:12 +0200 Subject: [PATCH 12/13] Removed composer/installers repository as it now has an eZ Platform installer --- composer.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 079e262dd8..3b4138d40d 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "doctrine/doctrine-bundle": "^1.6", "sensio/framework-extra-bundle": "^3.0.2", "willdurand/js-translation-bundle": "^2.6.4", - "composer/installers": "dev-ezplatform_assets as 1.3.x-dev", + "composer/installers": "~1.4", "ezsystems/hybrid-platform-ui": "dev-master as 1.0.x-dev", "ezsystems/hybrid-platform-ui-core-components": "^0.1@dev" }, @@ -102,11 +102,5 @@ "branch-alias": { "dev-master": "2.0.x-dev" } - }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/dpobel/installers.git" - } - ] + } } From 5a027d0ac7719384f739fe12aea1a7bcf5e492b1 Mon Sep 17 00:00:00 2001 From: Damien Pobel Date: Thu, 24 Aug 2017 14:43:22 +0200 Subject: [PATCH 13/13] [tmp] Use custom branch to test install --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3b4138d40d..90a00001f0 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "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": "2.0.x-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", @@ -47,7 +47,7 @@ "sensio/framework-extra-bundle": "^3.0.2", "willdurand/js-translation-bundle": "^2.6.4", "composer/installers": "~1.4", - "ezsystems/hybrid-platform-ui": "dev-master as 1.0.x-dev", + "ezsystems/hybrid-platform-ui": "dev-composer_installer as 1.0.x-dev", "ezsystems/hybrid-platform-ui-core-components": "^0.1@dev" }, "require-dev": {