Skip to content

Commit

Permalink
eZ Platform 3.0 support (ezsystems#150)
Browse files Browse the repository at this point in the history
* Merge branch 'master-sf4' into eZPlatform3.0-support

# Conflicts:
#	app/AppKernel.php
#	composer.json
#	config/packages/ezplatform.yaml

* Add ezsystems/ezplatform-http-cache support

* Change tests directory namespace from AppBundle to App

* Remove deprecations

* Rename UserGroups To UserGroupHelper

* Clean up services files

* Rename class UserGroupsTest to UserGroupTest
  • Loading branch information
ciastektk authored and damianz5 committed Jul 17, 2019
1 parent f7931a1 commit 8c5c396
Show file tree
Hide file tree
Showing 509 changed files with 2,185 additions and 2,625 deletions.
13 changes: 6 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,19 @@ app/bootstrap.php.cache
var/bootstrap.php.cache
#bin/*
#!bin/console
#!bin/symfony_requirements

# Disabled as this is needed for dev setups unless we change dev to execute composer install automatically
#vendor/

# Assets and user uploads
web/bundles/
web/css/
web/js/
web/uploads/
web/fonts/
public/bundles/
public/css/
public/js/
public/uploads/
public/fonts/

# Assets managed by Bower
web/assets/vendor/
public/assets/vendor/

# PHPUnit
app/phpunit.xml
Expand Down
68 changes: 62 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ COMPOSE_DIR=.

# You'll need to adjust this for Windows and XDB Linux systems: https://getcomposer.org/doc/03-cli.md#composer-home
COMPOSER_HOME=~/.composer
COMPOSER_MEMORY_LIMIT=2G
DATABASE_USER=ezp
DATABASE_PASSWORD=SetYourOwnPassword
DATABASE_NAME=ezp
COMPOSER_MEMORY_LIMIT=4G

## Docker images (name and version)
PHP_IMAGE=ezsystems/php:7.3-v1
Expand All @@ -17,6 +14,9 @@ MYSQL_IMAGE=healthcheck/mariadb
SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.141.59-oxygen
REDIS_IMAGE=healthcheck/redis

SESSION_HANDLER_ID=session.handler.native_file
SESSION_SAVE_PATH=%kernel.project_dir%/var/sessions/%kernel.environment%

APP_DOCKER_FILE=doc/docker/Dockerfile-app

DATASET_VARDIR=my-ez-app
Expand All @@ -36,5 +36,61 @@ SELENIUM_HOST=selenium
#FASTLY_SERVICE_ID=""
#FASTLY_KEY=""

# Enable automated translation by setting valid google translate api key
#GOOGLE_TRANSLATE_API_KEY=""
# eZ Platform Kernel
SEARCH_ENGINE=legacy

# eZ Platform Cache
CACHE_POOL=cache.array

# eZ Platform HTTP Cache
HTTPCACHE_DEFAULT_TTL=86400
HTTPCACHE_PURGE_SERVER=http://localhost:
HTTPCACHE_VARNISH_INVALIDATE_TOKEN=~

# Doctrine DBAL
DATABASE_USER=ezp
DATABASE_PASSWORD=SetYourOwnPassword
DATABASE_NAME=ezp
DATABASE_HOST=db
DATABASE_PORT=3306
DATABASE_DRIVER=mysql

# Doctrine DBAL Schema
# set here for BC reasons, change them in parameters.yml
DATABASE_CHARSET=utf8mb4
DATABASE_COLLATION=utf8mb4_unicode_520_ci

# eZ Platform SOLR Search Engine
SOLR_DSN=http://localhost:8983/solr
SOLR_CORE=collection1

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=ff6dc61a329dc96652bb092ec58981f7
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###

###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=${DATABASE_DRIVER}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
###< doctrine/doctrine-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###

###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN=^https?://localhost(:[0-9]+)?$
###< nelmio/cors-bundle ###

###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=0d30a16bfee14363b574e4b4238ea7ec
###< lexik/jwt-authentication-bundle ###
72 changes: 58 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
/app/config/parameters.yml
/build/
/phpunit.xml
/.phpunit.result.cache
/.rules
/var/*
!/var/cache
/var/cache/*
Expand All @@ -36,12 +38,12 @@
!var/encore/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
/web/assets/translations/*
/web/assets/build/*
!web/assets/build/.gitkeep
/web/assets/ezplatform/build/*
!/web/assets/ezplatform/build/.gitkeep
/public/bundles/
/public/assets/translations/*
/public/assets/build/*
!public/assets/build/.gitkeep
/public/assets/ezplatform/build/*
!/public/assets/ezplatform/build/.gitkeep
/node_modules/

.php~
Expand All @@ -55,17 +57,18 @@
/doc/docker/entrypoint/*/*.sql
/dfsdata

/web/css/
/web/js/
web/fonts/
/web/design
/web/extension
/web/share
/web/var
/web/.htaccess
/public/css/
/public/js/
/public/fonts/
/public/design
/public/extension
/public/share
/public/var
/public/.htaccess

composer.phar
composer.lock
symfony.lock
yarn.lock
.buildpath
.project
Expand All @@ -74,3 +77,44 @@ behat.yml
.php_cs.cache
auth.json
ide-twig.json

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###

###> liip/imagine-bundle ###
/public/media/cache/
###< liip/imagine-bundle ###

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

###> behat/symfony2-extension ###
behat.yml
###< behat/symfony2-extension ###

###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> lexik/jwt-authentication-bundle ###
/config/jwt/*.pem
###< lexik/jwt-authentication-bundle ###
10 changes: 5 additions & 5 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ mounts:
'var/encore':
source: local
source_path: encore
'web/var':
'public/var':
source: local
source_path: var
# To be prepared to move to cluster, please rather use e.g. persisted Redis instance.
'web/sessions':
'public/sessions':
source: local
source_path: sessions
# For Kaliop Migrations on your setup and not able to get it to write to "var" dir.
Expand Down Expand Up @@ -106,19 +106,19 @@ hooks:
composer config github-oauth.github.com $GITHUB_TOKEN
fi
rm web/app_dev.php
rm public/index.php
composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader
# Deploy hook, access to services & done once (per cluster, not per node), only mounts are writable at this point
# Note: Http traffic is paused while this is running, so for prod code this should finish as fast as possible, < 30s
deploy: |
set -e
# Mainly relevant for eZ Platform demo usage, for own setup adapt this or remove and rely on migrations.
if [ ! -f web/var/.platform.installed ]; then
if [ ! -f public/var/.platform.installed ]; then
# To workaround issues with p.sh Varnish we clear container cache & temporary set Symfony Proxy
rm -Rf var/cache/$SYMFONY_ENV/*.*
HTTPCACHE_PURGE_TYPE="local" php -d memory_limit=-1 `which composer` ezplatform-install
touch web/var/.platform.installed
touch public/var/.platform.installed
fi
# Now that mounts are available, clear class/container cache. E.g. in case of interface changes on lazy proxies
Expand Down
11 changes: 0 additions & 11 deletions .platform/routes.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .platform/services.yaml

This file was deleted.

Loading

0 comments on commit 8c5c396

Please sign in to comment.