Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8065c6f
Update to use Symfony 3.3 and env() paramters
Jan 25, 2017
3ec8728
[BC] Remove deprecated VCL BAN based code
Feb 20, 2017
1ad57e2
Require PHP 7.0 and drop deprecated symfony boostrap code
May 8, 2017
ab8b995
Temporarily forced session name across siteaccess
Jun 6, 2017
7470410
EZP-27888: Prepare Meta repository to use new eZ Platform Admin UI
Nattfarinn Oct 9, 2017
1c84b37
EZP-27499: Update platform.sh hooks for v2.x
SylvainGuittard Aug 29, 2017
3a91d18
Install react modules (#217)
dew326 Oct 18, 2017
9e7ccaf
Enable Admin UI Assets bundle
Nattfarinn Nov 6, 2017
df34987
EZP-28018: Add Behat dependencies and configuration (#223)
mnocon Nov 8, 2017
0f9ffd0
fix: JMS Translations config
Nattfarinn Nov 16, 2017
18ec04c
Add WhiteOctoberPagerfantaBundle (#227)
mikadamczyk Nov 24, 2017
6dc91b8
[vhost.template] Remove unneeded section for behat testing
andrerom Nov 27, 2017
59b9076
[composer] Updated version for ezsystems/ezplatform-admin-ui-assets t…
Nov 28, 2017
41b57bb
Update Docker readme to refer to "/admin"
andrerom Nov 30, 2017
ac8f9b1
Update composer.json
Nov 30, 2017
5a1ec4c
Force Symfony 3.4.0 because of regression in 3.4.1
Nattfarinn Dec 6, 2017
4266006
EZP-28434 As a developer, I want to compile sass in assetic (#235)
dew326 Dec 8, 2017
fdeecc1
Refactor param names to keep BC with eZ Platform 1.x while still allo…
emodric Dec 11, 2017
97145d4
Merge branch 'master' into 2.0
Dec 11, 2017
f6182e6
EZP-28511: Cannot use assetic:watch (#237)
dew326 Dec 13, 2017
e5c6f0e
EZP-28375: As a Maintainer I want CI to run tests on behat environmen…
alongosz Dec 13, 2017
a4c016b
[Travis] Use .env file for picking install (#238)
andrerom Dec 14, 2017
dc962b9
[Travis] Added check if overwriting dependency was successful
Dec 13, 2017
9d65b07
fix: Add "admin" siteaccess to configuration (#240)
Nattfarinn Dec 15, 2017
6a13575
Merge branch 'master' into 2.0
Dec 15, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -41,6 +53,7 @@ web/fonts/
/web/share
/web/var
/web/.htaccess

composer.phar
composer.lock
.buildpath
Expand Down
10 changes: 6 additions & 4 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ disk: 2048

# The mounts that will be performed when the package is deployed.
mounts:
"/app/cache": "shared:files/cache"
"/app/logs": "shared:files/logs"
"/var/cache": "shared:files/cache"
"/var/logs": "shared:files/logs"
"/web/var": "shared:files/files"
# Might want to not mount this one, it will slow down sessions, if you need cluster use memcached/redis!
"/var/sessions": "shared:files/sessions"

# The hooks that will be performed when the package is deployed.
hooks:
Expand All @@ -61,10 +63,10 @@ hooks:
export SYMFONY_ENV=prod
fi
if [ ! -f web/var/.platform.installed ]; then
php -d memory_limit=-1 app/console ezplatform:install --env=$SYMFONY_ENV $INSTALL_EZ_INSTALL_TYPE
php -d memory_limit=-1 bin/console ezplatform:install --env=$SYMFONY_ENV $INSTALL_EZ_INSTALL_TYPE
touch web/var/.platform.installed
fi
app/console --env=$SYMFONY_ENV cache:clear
bin/console --env=$SYMFONY_ENV cache:clear
# The configuration of scheduled execution.
# see http://symfony.com/doc/current/components/console/introduction.html
Expand Down
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ env:
- SYMFONY_DEBUG=1
# list of behat arguments to test
matrix:
- TEST_CMD="bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken" COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/varnish.yml:doc/docker/selenium.yml" WEB_HOST="varnish"
# TMP disable usage of varnish until we figure out segmentation faulty issue on 2.0
#- TEST_CMD="bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken" COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/varnish.yml:doc/docker/selenium.yml" WEB_HOST="varnish"
- TEST_CMD="bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken" COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/selenium.yml"
- 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" SYMFONY_CMD="ez:behat:create-language 'pol-PL' 'Polish (polski)'"
- TEST_CMD="bin/behat -vv --profile=platformui --tags='@common'" COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/redis.yml:doc/docker/selenium.yml"
- TEST_CMD="bin/behat -v --profile=repository-forms --tags=~@broken" COMPOSE_FILE="doc/docker/base-dev.yml:doc/docker/redis.yml:doc/docker/selenium.yml"
- TEST_CMD="bin/behat -v --profile=behat --tags=~@broken"

# test only master (+ Pull requests)
branches:
Expand All @@ -34,16 +37,16 @@ before_install: ./bin/.travis/trusty/update_docker.sh
before_script:
# Internal auth token dedicated to testing with travis+composer on ezsystems repos, not for reuse!
- echo "{\"github-oauth\":{\"github.com\":\"d0285ed5c8644f30547572ead2ed897431c1fc09\"}}" > auth.json
# In case of dev mode we'll need to install composer packages first
- docker-compose -f doc/docker/install.yml up --abort-on-container-exit
# Run (start containers and execute install command)
- docker-compose up -d
# Setup eZ Platform inside docker container
- /bin/bash ./bin/.travis/trusty/setup_ezplatform.sh "${COMPOSE_FILE}"
# Execute Symfony command if injected into test matrix
- if [ "${SYMFONY_CMD}" != "" ] ; then docker-compose exec --user www-data app sh -c "bin/console ${SYMFONY_CMD}" ; fi
#- docker ps
#- docker-compose logs

# Execute test command, need to use sh to get right exit code (docker/compose/issues/3379)
# Behat will use behat.yml which is a copy of behat.yml.dist with hostnames update by doc/docker/selenium.yml
script: docker-compose exec --user www-data app sh -c "php /scripts/wait_for_db.php; php $TEST_CMD"
script: docker-compose exec --user www-data app sh -c "php $TEST_CMD"

after_failure:
# Will show us the last bit of the log of container's main processes
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
7 changes: 7 additions & 0 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
70 changes: 41 additions & 29 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@

class AppKernel extends Kernel
{
/**
* Returns an array of bundles to registers.
*
* @return array an array of bundle instances
*
* @api
*/
public function registerBundles()
{
$bundles = array(
$bundles = [
// Symfony
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
Expand All @@ -23,58 +17,76 @@ public function registerBundles()
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Tedivm\StashBundle\TedivmStashBundle(),
// Dependencies
new Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle(),
new Liip\ImagineBundle\LiipImagineBundle(),
new FOS\HttpCacheBundle\FOSHttpCacheBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new Oneup\FlysystemBundle\OneupFlysystemBundle(),
new JMS\TranslationBundle\JMSTranslationBundle(),
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
// eZ Systems
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(),
new EzSystems\EzSupportToolsBundle\EzSystemsEzSupportToolsBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
new Oneup\FlysystemBundle\OneupFlysystemBundle(),
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\EzPlatformAdminUiBundle\EzPlatformAdminUiBundle(),
new EzSystems\EzPlatformAdminUiModulesBundle\EzPlatformAdminUiModulesBundle(),
new EzSystems\EzPlatformAdminUiAssetsBundle\EzPlatformAdminUiAssetsBundle(),
// Application
new AppBundle\AppBundle(),
);
];

switch ($this->getEnvironment()) {
case 'test':
case 'behat':
$bundles[] = new EzSystems\BehatBundle\EzSystemsBehatBundle();
$bundles[] = new EzSystems\PlatformBehatBundle\EzPlatformBehatBundle();
// No break, test also needs dev bundles
// No break, test also needs dev bundles
case 'dev':
$bundles[] = new eZ\Bundle\EzPublishDebugBundle\EzPublishDebugBundle();
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Egulias\ListenersDebugCommandBundle\EguliasListenersDebugCommandBundle();
}

return $bundles;
}

/**
* Loads the container configuration.
*
* @param LoaderInterface $loader A LoaderInterface instance
* @throws \RuntimeException when config file is not readable
*
* @api
*/
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';
}

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
Expand Down
File renamed without changes.
20 changes: 0 additions & 20 deletions app/autoload.php

This file was deleted.

10 changes: 10 additions & 0 deletions app/config/cache_pool/cache.memcached.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Reusable service for memcache cache for use in tests/docker/platform.sh
services:
cache.memcached:
parent: cache.adapter.memcached
tags:
- name: cache.pool
clearer: cache.app_clearer
# Example from vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/MemcachedTrait.php:
# memcached://user:pass@localhost?weight=33'
provider: 'memcached://%cache_dsn%'
12 changes: 12 additions & 0 deletions app/config/cache_pool/cache.redis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Reusable service for redis cache for use in tests/docker/platform.sh
services:
cache.redis:
parent: cache.adapter.redis
tags:
- name: cache.pool
clearer: cache.app_clearer
# Examples from vendor/symfony/symfony/src/Symfony/Component/Cache/Traits/RedisTrait.php:
# redis://localhost:6379
# redis://secret@example.com:1234/13
# redis://secret@/var/run/redis.sock/13?persistent_id=4&class=Redis&timeout=3&retry_interval=3
provider: 'redis://%cache_dsn%'
7 changes: 0 additions & 7 deletions app/config/cache_pool/singlememcached.yml

This file was deleted.

7 changes: 0 additions & 7 deletions app/config/cache_pool/singleredis.yml

This file was deleted.

Loading