From 8c5c396190a11ec68f8aec8cd3047ec6d0229e1d Mon Sep 17 00:00:00 2001 From: ciastektk Date: Wed, 17 Jul 2019 11:31:33 +0200 Subject: [PATCH] eZ Platform 3.0 support (#150) * 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 --- .dockerignore | 13 +- .env | 68 +++- .gitignore | 72 +++- .platform.app.yaml | 10 +- .platform/routes.yaml | 11 - .platform/services.yaml | 65 ---- .platform/varnish.vcl | 320 ------------------ .travis.yml | 8 +- app/.htaccess | 7 - app/AppCache.php | 12 - app/AppKernel.php | 126 ------- app/Resources/views/.keep | 1 - app/config/config.yml | 209 ------------ app/config/config_dev.yml | 43 --- app/config/config_prod.yml | 37 -- app/config/config_test.yml | 17 - app/config/env/generic.php | 86 ----- app/config/env/platformsh.php | 159 --------- app/config/ezplatform_dev.yml | 2 - app/config/ezplatform_prod.yml | 2 - app/config/ezplatform_test.yml | 2 - app/config/parameters.yml.dist | 19 -- app/config/routing.yml | 111 ------ app/config/routing_behat.yml | 5 - app/config/routing_dev.yml | 17 - app/config/services.yml | 113 ------- app/config/services/controllers.yml | 37 -- .../js/blocks/placesMapLoader.js | 0 {web/assets => assets}/js/main.js | 0 {web/assets => assets}/scss/_article.scss | 0 {web/assets => assets}/scss/_base.scss | 0 {web/assets => assets}/scss/_blog.post.scss | 0 {web/assets => assets}/scss/_blog.scss | 0 {web/assets => assets}/scss/_colors.scss | 0 {web/assets => assets}/scss/_custom.tags.scss | 0 {web/assets => assets}/scss/_folder.scss | 0 {web/assets => assets}/scss/_footer.scss | 0 {web/assets => assets}/scss/_form.scss | 0 {web/assets => assets}/scss/_forms.scss | 0 {web/assets => assets}/scss/_header.scss | 0 {web/assets => assets}/scss/_home.scss | 0 .../assets => assets}/scss/_landing.page.scss | 0 .../assets => assets}/scss/_personalized.scss | 0 {web/assets => assets}/scss/_place.list.scss | 0 {web/assets => assets}/scss/_place.scss | 0 .../assets => assets}/scss/_product.list.scss | 0 {web/assets => assets}/scss/_product.scss | 0 .../scss/_recommendations.scss | 0 {web/assets => assets}/scss/_subscribe.scss | 0 {web/assets => assets}/scss/_tags.scss | 0 {web/assets => assets}/scss/_user.forms.scss | 0 .../scss/blocks/_banner.scss | 0 .../scss/blocks/_card.view.scss | 0 .../scss/blocks/_contentlist.scss | 0 .../assets => assets}/scss/blocks/_embed.scss | 0 {web/assets => assets}/scss/blocks/_form.scss | 0 .../scss/blocks/_gallery.scss | 0 {web/assets => assets}/scss/blocks/_hero.scss | 0 .../scss/blocks/_keyword.scss | 0 {web/assets => assets}/scss/blocks/_rss.scss | 0 .../assets => assets}/scss/blocks/_video.scss | 0 assets/scss/demo.scss | 37 ++ .../scss/landing-page/_landing.page.scss | 0 behat.yml.dist | 6 +- bin/console | 40 +-- bin/symfony_requirements | 146 -------- bin/vhost.sh | 10 +- composer.json | 179 +++++----- config/bootstrap.php | 21 ++ config/bundles.php | 64 ++++ .../graphql/types/.gitignore | 0 config/packages/assets.yaml | 5 + .../packages/behat}/config_behat.yml | 7 - .../packages/behat/ezplatform.yaml | 14 +- config/packages/behat/monolog.yaml | 6 + {app/config => config/packages}/blocks.yml | 0 config/packages/buzz.yaml | 41 +++ config/packages/cache.yaml | 19 ++ .../packages}/cache_pool/cache.memcached.yml | 0 .../packages}/cache_pool/cache.redis.yml | 0 .../cache_pool/cache.tagaware.filesystem.yml | 2 +- .../packages}/default_layouts.yml | 0 .../packages/default_parameters.yaml | 6 +- config/packages/dev/debug.yaml | 4 + config/packages/dev/easy_log_handler.yaml | 16 + config/packages/dev/monolog.yaml | 19 ++ config/packages/dev/routing.yaml | 3 + config/packages/dev/swiftmailer.yaml | 4 + config/packages/dev/web_profiler.yaml | 6 + {app/config => config/packages}/dfs/dfs.yml | 0 config/packages/doctrine.yaml | 29 ++ config/packages/doctrine_cache.yaml | 10 + config/packages/doctrine_migrations.yaml | 5 + .../packages/ezplatform.yaml | 35 +- config/packages/ezplatform_admin_ui.yaml | 37 ++ .../packages/ezplatform_admin_ui_modules.yaml | 8 + config/packages/ezplatform_assets.yaml | 10 + .../packages/ezplatform_doctrine_schema.yaml | 11 + config/packages/ezplatform_form_builder.yaml | 8 + config/packages/ezplatform_http_cache.yaml | 24 ++ config/packages/ezplatform_page_builder.yaml | 11 + config/packages/ezplatform_solr.yaml | 18 + .../packages}/field_templates.yml | 0 .../fields/ezrichtext/custom_tags.yml | 0 config/packages/framework.yaml | 15 + config/packages/graphql.yaml | 9 + config/packages/gregwar_captcha.yaml | 2 + .../packages}/image_variations.yml | 0 config/packages/jms_translation.yaml | 6 + config/packages/lexik_jwt_authentication.yaml | 12 + config/packages/liip_imagine.yaml | 4 + config/packages/nelmio_cors.yaml | 10 + config/packages/oneup_flysystem.yaml | 10 + config/packages/prod/doctrine.yaml | 32 ++ config/packages/prod/monolog.yaml | 25 ++ config/packages/prod/webpack_encore.yaml | 4 + config/packages/routing.yaml | 118 +++++++ .../packages/security.yaml | 30 +- config/packages/security_checker.yaml | 8 + config/packages/sensio_framework_extra.yaml | 3 + config/packages/swiftmailer.yaml | 3 + config/packages/test/framework.yaml | 4 + config/packages/test/monolog.yaml | 7 + config/packages/test/routing.yaml | 3 + config/packages/test/swiftmailer.yaml | 2 + config/packages/test/validator.yaml | 3 + config/packages/test/web_profiler.yaml | 6 + config/packages/translation.yaml | 6 + config/packages/twig.yaml | 4 + config/packages/twig_extensions.yaml | 11 + config/packages/validator.yaml | 3 + {app/config => config/packages}/views.yml | 16 +- config/packages/webpack_encore.yaml | 13 + config/packages/workflow.yaml | 2 + {app/config => config/packages}/workflows.yml | 0 config/routes.yaml | 3 + config/routes/annotations.yaml | 3 + config/routes/behat/ezplatform_behat.yaml | 2 + config/routes/dev/graphiql.yaml | 2 + config/routes/dev/twig.yaml | 3 + config/routes/dev/web_profiler.yaml | 7 + config/routes/ezplatform.yaml | 12 + config/routes/ezplatform_admin_ui.yaml | 8 + config/routes/ezplatform_calendar.yaml | 8 + .../ezplatform_date_based_publisher.yaml | 3 + config/routes/ezplatform_flex_workflow.yaml | 2 + config/routes/ezplatform_form_builder.yaml | 4 + config/routes/ezplatform_http_cache.yaml | 2 + config/routes/ezplatform_page_builder.yaml | 4 + config/routes/ezplatform_page_fieldtype.yaml | 2 + .../routes/ezplatform_repository_forms.yaml | 2 + config/routes/ezplatform_rest.yaml | 8 + config/routes/ezplatform_user.yaml | 2 + config/routes/ezplatform_workflow.yaml | 2 + config/routes/fos_js_routing.yaml | 2 + config/routes/graphql.yaml | 5 + config/routes/gregwar_captcha.yaml | 2 + config/routes/js_translation.yaml | 2 + config/routes/liip_imagine.yaml | 2 + config/services.yaml | 25 ++ config/services/content.yaml | 6 + config/services/controllers.yaml | 27 ++ config/services/events.yaml | 35 ++ config/services/helpers.yaml | 8 + .../services/installer.yaml | 13 +- config/services/mailer.yaml | 12 + .../services/migration.yaml | 19 +- config/services/query_types.yaml | 20 ++ config/services/twig.yaml | 29 ++ doc/apache2/Readme.md | 24 +- doc/apache2/vhost.template | 38 +-- doc/docker/Dockerfile-app | 14 +- doc/docker/Dockerfile-nginx | 24 +- doc/docker/Dockerfile-vardir | 10 +- doc/docker/README.md | 10 +- doc/docker/base-dev.yml | 12 +- doc/docker/base-prod.yml | 10 +- doc/docker/demo.yml | 6 +- doc/docker/distribution.yml | 16 +- doc/docker/import-dataset.yml | 6 +- doc/docker/install-dependencies.yml | 6 +- doc/docker/install_script.sh | 12 +- doc/docker/my-ez-app-stack.yml | 18 +- doc/docker/varnish.yml | 4 +- doc/nginx/Readme.md | 4 +- doc/nginx/ez_params.d/ez_fastcgi_params | 4 +- .../ez_params.d/ez_rewrite_dfsimage_params | 2 +- doc/nginx/ez_params.d/ez_rewrite_params | 6 +- doc/nginx/vhost.template | 22 +- doc/platformsh/INSTALL.md | 4 +- ez.webpack.config.js | 2 +- phpunit.xml.dist | 43 ++- {var/cache => public/assets/build}/.gitkeep | 0 .../assets/ezplatform/build}/.gitkeep | 0 .../assets/images/article/premium_content.png | Bin .../custom_tags/admin/icons/ezfacebook.svg | 0 .../assets/images/form/check-icons.png | Bin .../assets/images/form/field_file.png | Bin .../assets/images/landing_page/Amsterdam.png | Bin .../assets/images/landing_page/Brooklyn.png | Bin .../images/landing_page/Homepage-banner.jpg | Bin .../images/landing_page/marker-icon.png | Bin {web => public}/assets/images/map-marker.png | Bin .../assets/images/map_tile/2/-1/0.png | Bin .../assets/images/map_tile/2/-1/0@2x.png | Bin .../assets/images/map_tile/2/-1/1.png | Bin .../assets/images/map_tile/2/-1/1@2x.png | Bin .../assets/images/map_tile/2/-1/2.png | Bin .../assets/images/map_tile/2/-1/2@2x.png | Bin .../assets/images/map_tile/2/-1/3.png | Bin .../assets/images/map_tile/2/-1/3@2x.png | Bin .../assets/images/map_tile/2/-2/0.png | Bin .../assets/images/map_tile/2/-2/0@2x.png | Bin .../assets/images/map_tile/2/-2/1.png | Bin .../assets/images/map_tile/2/-2/1@2x.png | Bin .../assets/images/map_tile/2/-2/2.png | Bin .../assets/images/map_tile/2/-2/2@2x.png | Bin .../assets/images/map_tile/2/-2/3.png | Bin .../assets/images/map_tile/2/-2/3@2x.png | Bin .../assets/images/map_tile/2/0/0.png | Bin .../assets/images/map_tile/2/0/0@2x.png | Bin .../assets/images/map_tile/2/0/1.png | Bin .../assets/images/map_tile/2/0/1@2x.png | Bin .../assets/images/map_tile/2/0/2.png | Bin .../assets/images/map_tile/2/0/2@2x.png | Bin .../assets/images/map_tile/2/0/3.png | Bin .../assets/images/map_tile/2/0/3@2x.png | Bin .../assets/images/map_tile/2/1/0.png | Bin .../assets/images/map_tile/2/1/0@2x.png | Bin .../assets/images/map_tile/2/1/1.png | Bin .../assets/images/map_tile/2/1/1@2x.png | Bin .../assets/images/map_tile/2/1/2.png | Bin .../assets/images/map_tile/2/1/2@2x.png | Bin .../assets/images/map_tile/2/1/3.png | Bin .../assets/images/map_tile/2/1/3@2x.png | Bin .../assets/images/map_tile/2/2/0.png | Bin .../assets/images/map_tile/2/2/0@2x.png | Bin .../assets/images/map_tile/2/2/1.png | Bin .../assets/images/map_tile/2/2/1@2x.png | Bin .../assets/images/map_tile/2/2/2.png | Bin .../assets/images/map_tile/2/2/2@2x.png | Bin .../assets/images/map_tile/2/2/3.png | Bin .../assets/images/map_tile/2/2/3@2x.png | Bin .../assets/images/map_tile/2/3/0.png | Bin .../assets/images/map_tile/2/3/0@2x.png | Bin .../assets/images/map_tile/2/3/1.png | Bin .../assets/images/map_tile/2/3/1@2x.png | Bin .../assets/images/map_tile/2/3/2.png | Bin .../assets/images/map_tile/2/3/2@2x.png | Bin .../assets/images/map_tile/2/3/3.png | Bin .../assets/images/map_tile/2/3/3@2x.png | Bin .../assets/images/map_tile/2/4/0.png | Bin .../assets/images/map_tile/2/4/0@2x.png | Bin .../assets/images/map_tile/2/4/1.png | Bin .../assets/images/map_tile/2/4/1@2x.png | Bin .../assets/images/map_tile/2/4/2.png | Bin .../assets/images/map_tile/2/4/2@2x.png | Bin .../assets/images/map_tile/2/4/3.png | Bin .../assets/images/map_tile/2/4/3@2x.png | Bin .../assets/images/map_tile/2/5/0.png | Bin .../assets/images/map_tile/2/5/0@2x.png | Bin .../assets/images/map_tile/2/5/1.png | Bin .../assets/images/map_tile/2/5/1@2x.png | Bin .../assets/images/map_tile/2/5/2.png | Bin .../assets/images/map_tile/2/5/2@2x.png | Bin .../assets/images/map_tile/2/5/3.png | Bin .../assets/images/map_tile/2/5/3@2x.png | Bin .../images/page_builder/blocks/hero.svg | 0 .../images/page_builder/blocks/places.svg | 0 .../images/page_builder/blocks/tastes.svg | 0 .../assets/images/page_builder/layouts/1.png | Bin .../images/page_builder/layouts/1_2.png | Bin .../images/page_builder/layouts/1__1_2.png | Bin .../images/page_builder/layouts/1__2_1.png | Bin .../images/page_builder/layouts/1w__1__1w.png | Bin .../page_builder/layouts/1w__2_1__2_1__1w.png | Bin .../images/page_builder/layouts/2_1.png | Bin .../images/page_builder/layouts/default.png | Bin .../images/page_builder/layouts/test.png | Bin .../assets/images/product/dairy.svg | 0 {web => public}/assets/images/product/egg.svg | 0 .../assets/images/product/gluten.svg | 0 .../assets/images/product/nuts.svg | 0 .../assets/images/product/seafood.svg | 0 .../assets/images/product/servings.svg | 0 .../assets/images/product/spicy.svg | 0 .../images/recommendations/icon-like.svg | 0 .../images/recommendations/icon-loading.svg | 0 .../images/recommendations/placeholder.png | Bin {web => public}/assets/images/travel-plan.jpg | Bin .../ezplatform}/build/.gitkeep | 0 public/index.php | 56 +++ src/AppBundle/AppBundle.php | 25 -- .../Controller/RecommendationsController.php | 172 ---------- src/CacheKernel.php | 12 + .../.keep => Controller/.gitignore} | 0 .../Controller/ContactFormController.php | 32 +- .../Controller/MenuController.php | 12 +- .../Controller/ProductListController.php | 4 +- .../Compiler/MigrationParameterPass.php | 2 +- .../build/.gitkeep => src/Entity/.gitignore | 0 src/{AppBundle => }/Entity/ProductSearch.php | 2 +- .../Event/AbstractBlockEvent.php | 29 +- .../Event/Listener/RenderMenuListener.php | 24 +- .../AttributeSerializationSubscriber.php | 2 +- .../Subscriber/BuildDemoSchemaSubscriber.php | 2 +- .../Subscriber/EndWorkflowSubscriber.php | 2 +- .../Subscriber/PlacesBlockSubscriber.php | 8 +- .../Subscriber/TastesBlockSubscriber.php | 8 +- .../TemplateAttributeBlockNameListener.php | 2 +- .../Workflow/PublishOnLastStageSubscriber.php | 2 +- src/{AppBundle => }/Form/Type/ContactType.php | 4 +- .../Form/Type/ProductSearchType.php | 4 +- src/{AppBundle => }/Helper/ContentHelper.php | 2 +- src/{AppBundle => }/Helper/LocationHelper.php | 2 +- .../UserGroupHelper.php} | 4 +- .../InstallerCommandExecuteTrait.php | 2 +- .../Installer/PlatformEEDemoInstaller.php | 24 +- .../PlatformEEDemoTestLayoutsInstaller.php | 9 +- src/Kernel.php | 62 ++++ src/{AppBundle => }/Mail/Sender.php | 21 +- src/Migration/.gitignore | 0 .../Migration/FieldHandler/EzImageAsset.php | 13 +- src/MigrationVersions/References/.keep | 0 src/{AppBundle => }/MigrationVersions/all.yml | 4 +- .../MigrationVersions/cleanup-ee.yml | 2 +- .../MigrationVersions/content.yml | 92 ++--- .../MigrationVersions/form.yml | 22 +- .../MigrationVersions/images.yml | 4 +- .../MigrationVersions/landing_page.yml | 6 +- .../landing_page_contenttype.yml | 0 .../MigrationVersions/landing_page_tests.yml | 4 +- .../MigrationVersions/languages.yml | 4 +- .../MigrationVersions/product_list.yml | 4 +- .../MigrationVersions/tags.yml | 2 +- .../MigrationVersions/users.yml | 4 +- src/{AppBundle => }/Model/Contact.php | 2 +- .../PremiumContent/HtmlRenderer.php | 2 +- .../QueryType/BlockQueryType.php | 4 +- .../QueryType/ChildrenQueryType.php | 22 +- .../QueryType/MenuQueryType.php | 24 +- src/Repository/.gitignore | 0 .../Resources/schema/demo.yaml | 0 .../PersonalizationPolicyProvider.php | 2 +- .../Twig/ContentDescriptionExtension.php | 38 +-- .../Twig/ContentInfoByLocationIdExtension.php | 34 +- .../Twig/PremiumContentExtension.php | 42 ++- .../Twig/RecommendationsExtension.php | 20 +- .../Twig/SearchResultExtractorExtension.php | 18 +- .../Twig/YoutubeIdExtractorExtension.php | 22 +- .../Value/BlockPreRenderValueObject.php | 2 +- .../Value/BlockResponseValueObject.php | 2 +- .../Value/PageBuilderBlockValueObject.php | 2 +- templates/base.html.twig | 12 + .../blocks/_block.html.twig | 0 .../blocks/banner.html.twig | 0 .../blocks/gallery.html.twig | 0 .../blocks/schedule.html.twig | 0 .../blocks/video.html.twig | 0 .../change_password/index.html.twig | 0 .../change_password/success.html.twig | 0 .../forgot_password/index.html.twig | 0 .../forgot_password/success.html.twig | 0 .../forgot_password/with_login.html.twig | 0 .../reset_password/index.html.twig | 0 .../reset_password/invalid_link.html.twig | 0 .../reset_password/success.html.twig | 0 .../missing_recommendations.html.twig | 0 .../recommendations.html.twig | 0 .../show_recommendations.html.twig | 0 .../NetgenTagsBundle}/tag/view.html.twig | 0 .../admin/fields/eztags_field.html.twig | 0 .../block_item/article/default.html.twig | 0 .../block_item/blog_post/default.html.twig | 0 .../block_item/blog_post/wide.html.twig | 0 .../block_item/card/default.html.twig | 0 .../block_item/folder/default.html.twig | 2 +- .../block_item/hero/default.html.twig | 0 .../block_item/image/default.html.twig | 0 .../block_item/image/wide.html.twig | 0 .../block_item/list/default.html.twig | 0 .../block_item/place/default.html.twig | 0 .../block_item/place/wide.html.twig | 0 .../block_item/place_list/default.html.twig | 2 +- .../block_item/product/default.html.twig | 0 .../block_item/product/wide.html.twig | 0 .../block_item/product_list/default.html.twig | 0 .../block_item/product_list/wide.html.twig | 0 .../block_item/video/default.html.twig | 0 .../blocks/banner/banner.html.twig | 2 +- .../blocks/collection/cards.html.twig | 2 +- .../blocks/collection/list.html.twig | 2 +- .../blocks/contentlist/blog.html.twig | 0 .../blocks/contentlist/cards.html.twig | 2 +- .../blocks/contentlist/list.html.twig | 2 +- .../blocks/embed/embed.html.twig | 2 +- .../blocks/embed/embed_wide.html.twig | 2 +- .../blocks/gallery/gallery.html.twig | 2 +- .../blocks/hero/default.html.twig | 2 +- .../blocks/list/default.html.twig | 0 .../blocks/places/cards.html.twig | 2 +- .../blocks/places/list.html.twig | 2 +- .../blocks/places/map.html.twig | 2 +- .../tastefulplanet/blocks/rss/list.html.twig | 2 +- .../blocks/schedule/cards.html.twig | 2 +- .../blocks/schedule/list.html.twig | 2 +- .../blocks/tastes/cards.html.twig | 2 +- .../blocks/tastes/home.html.twig | 2 +- .../blocks/tastes/list.html.twig | 2 +- .../blocks/video/player.html.twig | 2 +- .../tastefulplanet/card/article.html.twig | 0 .../tastefulplanet/card/place.html.twig | 0 .../tastefulplanet/card/product.html.twig | 0 .../tastefulplanet/default/default.html.twig | 0 .../embed/home_tastes.html.twig | 0 .../tastefulplanet/featured/article.html.twig | 0 .../fields/bootstrap_4_layout.html.twig | 0 .../fields/ezform_field.html.twig | 4 +- .../custom_tags/call_to_action.html.twig | 0 .../custom_tags/ezfacebook.html.twig | 0 .../custom_tags/eztwitter.html.twig | 0 .../custom_tags/ezyoutube.html.twig | 0 .../ezrichtext/custom_tags/factbox.html.twig | 0 .../fields/eztags_field.html.twig | 0 .../form_builder/default_form_view.html.twig | 0 .../tastefulplanet/full/about.html.twig | 0 .../tastefulplanet/full/article.html.twig | 4 +- .../themes/tastefulplanet/full/blog.html.twig | 2 +- .../tastefulplanet/full/blog_post.html.twig | 6 +- .../full/contact_form_submitted.html.twig | 0 .../tastefulplanet/full/folder.html.twig | 2 +- .../themes/tastefulplanet/full/form.html.twig | 0 .../themes/tastefulplanet/full/home.html.twig | 0 .../full/landing_page.html.twig | 0 .../tastefulplanet/full/place.html.twig | 2 +- .../tastefulplanet/full/place_list.html.twig | 2 +- .../tastefulplanet/full/product.html.twig | 10 +- .../full/product_list.html.twig | 2 +- .../tastefulplanet/full/subscribe.html.twig | 0 .../tastefulplanet/home/place_list.html.twig | 0 .../tastefulplanet/home/tastes.html.twig | 0 .../tastefulplanet/layout/footer.html.twig | 0 .../tastefulplanet/layout/header.html.twig | 7 +- .../themes/tastefulplanet/layouts/1.html.twig | 0 .../tastefulplanet/layouts/1_2.html.twig | 0 .../tastefulplanet/layouts/1__1_2.html.twig | 0 .../tastefulplanet/layouts/1__2_1.html.twig | 0 .../layouts/1w__1__1w.html.twig | 0 .../layouts/1w__2_1__2_1__1w.html.twig | 0 .../tastefulplanet/layouts/2_1.html.twig | 0 .../layouts/test_layout.html.twig | 0 .../tastefulplanet/line/blog_post.html.twig | 6 +- .../tastefulplanet/mail/contact.html.twig | 0 .../tastefulplanet/pagelayout.html.twig | 4 +- .../tastefulplanet/parts/link.html.twig | 0 .../themes/tastefulplanet/parts/map.html.twig | 0 .../parts/product_modal_dialog.html.twig | 0 .../parts/recommendations_header.html.twig | 0 .../parts/render_description.html.twig | 0 .../search_result_item/article.html.twig | 4 +- .../search_result_item/default.html.twig | 6 +- .../search_result_item/place.html.twig | 4 +- .../search_result_item/product.html.twig | 4 +- .../tastefulplanet/user/login.html.twig | 0 .../user/registration_confirmation.html.twig | 0 .../user/registration_content_form.html.twig | 0 .../user/registration_form.html.twig | 0 .../themes/tastefulplanet/zone/zone.html.twig | 0 .../EnterpriseDemoEnvironmentConstants.php | 2 +- .../BlockPreview/DemoBannerPreview.php | 2 +- .../BlockPreview/DemoCollectionPreview.php | 2 +- .../BlockPreview/DemoContentListPreview.php | 2 +- .../DemoContentSchedulerPreview.php | 2 +- .../BlockPreview/DemoEmbedPreview.php | 2 +- .../BlockPreview/DemoGalleryPreview.php | 2 +- .../BlockPreview/DemoRSSPreview.php | 2 +- .../BlockPreview/DemoVideoPreview.php | 2 +- .../PageElement/BlockPreview/HeroPreview.php | 2 +- .../PageElement/Blocks/DemoBannerBlock.php | 2 +- .../PageElement/Blocks/DemoCodeBlock.php | 2 +- .../Blocks/DemoCollectionBlock.php | 2 +- .../Blocks/DemoContentListBlock.php | 2 +- .../Blocks/DemoContentSchedulerBlock.php | 2 +- .../PageElement/Blocks/DemoEmbedBlock.php | 2 +- .../PageElement/Blocks/DemoGalleryBlock.php | 2 +- .../PageElement/Blocks/DemoVideoBlock.php | 2 +- .../Behat/PageElement/Blocks/HeroBlock.php | 2 +- .../DemoEnterpriseElementFactory.php | 38 +-- .../DemoEnterprisePageObjectFactory.php | 2 +- .../PageObject/DemoLandingPagePreview.php | 2 +- tests/App/Helper/UserGroupTest.php | 117 +++++++ .../User => App/Helper}/UserGroupsTest.php | 10 +- .../PremiumContent/HtmlRendererTest.php | 4 +- .../Twig/PremiumContentExtensionTest.php | 14 +- .../Twig/YoutubeIdExtractorExtensionTest.php | 14 +- translations/.gitignore | 0 .../custom_tags.en.yaml | 0 .../forms.de.xlf | 0 .../forms.en.xlf | 0 .../forms.fr.xlf | 0 .../forms.no.xlf | 0 .../messages.de.yml | 0 .../messages.en.yml | 0 .../messages.fr.yml | 0 .../messages.no.yml | 1 - web/app.php | 66 ---- web/app_dev.php | 22 -- web/assets/scss/demo.scss | 37 -- webpack.config.js | 8 +- 509 files changed, 2185 insertions(+), 2625 deletions(-) delete mode 100644 .platform/routes.yaml delete mode 100644 .platform/services.yaml delete mode 100644 .platform/varnish.vcl delete mode 100644 app/.htaccess delete mode 100644 app/AppCache.php delete mode 100644 app/AppKernel.php delete mode 100644 app/Resources/views/.keep delete mode 100644 app/config/config.yml delete mode 100644 app/config/config_dev.yml delete mode 100644 app/config/config_prod.yml delete mode 100644 app/config/config_test.yml delete mode 100644 app/config/env/generic.php delete mode 100644 app/config/env/platformsh.php delete mode 100644 app/config/ezplatform_dev.yml delete mode 100644 app/config/ezplatform_prod.yml delete mode 100644 app/config/ezplatform_test.yml delete mode 100644 app/config/parameters.yml.dist delete mode 100644 app/config/routing.yml delete mode 100644 app/config/routing_behat.yml delete mode 100644 app/config/routing_dev.yml delete mode 100644 app/config/services.yml delete mode 100644 app/config/services/controllers.yml rename {web/assets => assets}/js/blocks/placesMapLoader.js (100%) rename {web/assets => assets}/js/main.js (100%) rename {web/assets => assets}/scss/_article.scss (100%) rename {web/assets => assets}/scss/_base.scss (100%) rename {web/assets => assets}/scss/_blog.post.scss (100%) rename {web/assets => assets}/scss/_blog.scss (100%) rename {web/assets => assets}/scss/_colors.scss (100%) rename {web/assets => assets}/scss/_custom.tags.scss (100%) rename {web/assets => assets}/scss/_folder.scss (100%) rename {web/assets => assets}/scss/_footer.scss (100%) rename {web/assets => assets}/scss/_form.scss (100%) rename {web/assets => assets}/scss/_forms.scss (100%) rename {web/assets => assets}/scss/_header.scss (100%) rename {web/assets => assets}/scss/_home.scss (100%) rename {web/assets => assets}/scss/_landing.page.scss (100%) rename {web/assets => assets}/scss/_personalized.scss (100%) rename {web/assets => assets}/scss/_place.list.scss (100%) rename {web/assets => assets}/scss/_place.scss (100%) rename {web/assets => assets}/scss/_product.list.scss (100%) rename {web/assets => assets}/scss/_product.scss (100%) rename {web/assets => assets}/scss/_recommendations.scss (100%) rename {web/assets => assets}/scss/_subscribe.scss (100%) rename {web/assets => assets}/scss/_tags.scss (100%) rename {web/assets => assets}/scss/_user.forms.scss (100%) rename {web/assets => assets}/scss/blocks/_banner.scss (100%) rename {web/assets => assets}/scss/blocks/_card.view.scss (100%) rename {web/assets => assets}/scss/blocks/_contentlist.scss (100%) rename {web/assets => assets}/scss/blocks/_embed.scss (100%) rename {web/assets => assets}/scss/blocks/_form.scss (100%) rename {web/assets => assets}/scss/blocks/_gallery.scss (100%) rename {web/assets => assets}/scss/blocks/_hero.scss (100%) rename {web/assets => assets}/scss/blocks/_keyword.scss (100%) rename {web/assets => assets}/scss/blocks/_rss.scss (100%) rename {web/assets => assets}/scss/blocks/_video.scss (100%) create mode 100644 assets/scss/demo.scss rename {web/assets => assets}/scss/landing-page/_landing.page.scss (100%) delete mode 100755 bin/symfony_requirements create mode 100644 config/bootstrap.php create mode 100644 config/bundles.php rename app/Resources/views/.gitkeep => config/graphql/types/.gitignore (100%) create mode 100644 config/packages/assets.yaml rename {app/config => config/packages/behat}/config_behat.yml (70%) rename app/config/ezplatform_behat.yml => config/packages/behat/ezplatform.yaml (54%) create mode 100644 config/packages/behat/monolog.yaml rename {app/config => config/packages}/blocks.yml (100%) create mode 100644 config/packages/buzz.yaml create mode 100644 config/packages/cache.yaml rename {app/config => config/packages}/cache_pool/cache.memcached.yml (100%) rename {app/config => config/packages}/cache_pool/cache.redis.yml (100%) rename {app/config => config/packages}/cache_pool/cache.tagaware.filesystem.yml (90%) rename {app/config => config/packages}/default_layouts.yml (100%) rename app/config/default_parameters.yml => config/packages/default_parameters.yaml (95%) create mode 100644 config/packages/dev/debug.yaml create mode 100644 config/packages/dev/easy_log_handler.yaml create mode 100644 config/packages/dev/monolog.yaml create mode 100644 config/packages/dev/routing.yaml create mode 100644 config/packages/dev/swiftmailer.yaml create mode 100644 config/packages/dev/web_profiler.yaml rename {app/config => config/packages}/dfs/dfs.yml (100%) create mode 100644 config/packages/doctrine.yaml create mode 100644 config/packages/doctrine_cache.yaml create mode 100644 config/packages/doctrine_migrations.yaml rename app/config/ezplatform.yml => config/packages/ezplatform.yaml (84%) create mode 100644 config/packages/ezplatform_admin_ui.yaml create mode 100644 config/packages/ezplatform_admin_ui_modules.yaml create mode 100644 config/packages/ezplatform_assets.yaml create mode 100644 config/packages/ezplatform_doctrine_schema.yaml create mode 100644 config/packages/ezplatform_form_builder.yaml create mode 100644 config/packages/ezplatform_http_cache.yaml create mode 100644 config/packages/ezplatform_page_builder.yaml create mode 100644 config/packages/ezplatform_solr.yaml rename {app/config => config/packages}/field_templates.yml (100%) rename {app/config => config/packages}/fields/ezrichtext/custom_tags.yml (100%) create mode 100644 config/packages/framework.yaml create mode 100644 config/packages/graphql.yaml create mode 100644 config/packages/gregwar_captcha.yaml rename {app/config => config/packages}/image_variations.yml (100%) create mode 100644 config/packages/jms_translation.yaml create mode 100644 config/packages/lexik_jwt_authentication.yaml create mode 100644 config/packages/liip_imagine.yaml create mode 100644 config/packages/nelmio_cors.yaml create mode 100644 config/packages/oneup_flysystem.yaml create mode 100644 config/packages/prod/doctrine.yaml create mode 100644 config/packages/prod/monolog.yaml create mode 100644 config/packages/prod/webpack_encore.yaml create mode 100644 config/packages/routing.yaml rename app/config/security.yml => config/packages/security.yaml (57%) create mode 100644 config/packages/security_checker.yaml create mode 100644 config/packages/sensio_framework_extra.yaml create mode 100644 config/packages/swiftmailer.yaml create mode 100644 config/packages/test/framework.yaml create mode 100644 config/packages/test/monolog.yaml create mode 100644 config/packages/test/routing.yaml create mode 100644 config/packages/test/swiftmailer.yaml create mode 100644 config/packages/test/validator.yaml create mode 100644 config/packages/test/web_profiler.yaml create mode 100644 config/packages/translation.yaml create mode 100644 config/packages/twig.yaml create mode 100644 config/packages/twig_extensions.yaml create mode 100644 config/packages/validator.yaml rename {app/config => config/packages}/views.yml (95%) create mode 100644 config/packages/webpack_encore.yaml create mode 100644 config/packages/workflow.yaml rename {app/config => config/packages}/workflows.yml (100%) create mode 100644 config/routes.yaml create mode 100644 config/routes/annotations.yaml create mode 100644 config/routes/behat/ezplatform_behat.yaml create mode 100644 config/routes/dev/graphiql.yaml create mode 100644 config/routes/dev/twig.yaml create mode 100644 config/routes/dev/web_profiler.yaml create mode 100644 config/routes/ezplatform.yaml create mode 100644 config/routes/ezplatform_admin_ui.yaml create mode 100644 config/routes/ezplatform_calendar.yaml create mode 100644 config/routes/ezplatform_date_based_publisher.yaml create mode 100644 config/routes/ezplatform_flex_workflow.yaml create mode 100644 config/routes/ezplatform_form_builder.yaml create mode 100644 config/routes/ezplatform_http_cache.yaml create mode 100644 config/routes/ezplatform_page_builder.yaml create mode 100644 config/routes/ezplatform_page_fieldtype.yaml create mode 100644 config/routes/ezplatform_repository_forms.yaml create mode 100644 config/routes/ezplatform_rest.yaml create mode 100644 config/routes/ezplatform_user.yaml create mode 100644 config/routes/ezplatform_workflow.yaml create mode 100644 config/routes/fos_js_routing.yaml create mode 100644 config/routes/graphql.yaml create mode 100644 config/routes/gregwar_captcha.yaml create mode 100644 config/routes/js_translation.yaml create mode 100644 config/routes/liip_imagine.yaml create mode 100644 config/services.yaml create mode 100644 config/services/content.yaml create mode 100644 config/services/controllers.yaml create mode 100644 config/services/events.yaml create mode 100644 config/services/helpers.yaml rename app/config/services/installer.yml => config/services/installer.yaml (58%) create mode 100644 config/services/mailer.yaml rename app/config/services/migration.yml => config/services/migration.yaml (66%) create mode 100644 config/services/query_types.yaml create mode 100644 config/services/twig.yaml rename {var/cache => public/assets/build}/.gitkeep (100%) rename {var/logs => public/assets/ezplatform/build}/.gitkeep (100%) rename {web => public}/assets/images/article/premium_content.png (100%) rename {web => public}/assets/images/custom_tags/admin/icons/ezfacebook.svg (100%) rename {web => public}/assets/images/form/check-icons.png (100%) rename {web => public}/assets/images/form/field_file.png (100%) rename {web => public}/assets/images/landing_page/Amsterdam.png (100%) rename {web => public}/assets/images/landing_page/Brooklyn.png (100%) rename {web => public}/assets/images/landing_page/Homepage-banner.jpg (100%) rename {web => public}/assets/images/landing_page/marker-icon.png (100%) rename {web => public}/assets/images/map-marker.png (100%) rename {web => public}/assets/images/map_tile/2/-1/0.png (100%) rename {web => public}/assets/images/map_tile/2/-1/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-1/1.png (100%) rename {web => public}/assets/images/map_tile/2/-1/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-1/2.png (100%) rename {web => public}/assets/images/map_tile/2/-1/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-1/3.png (100%) rename {web => public}/assets/images/map_tile/2/-1/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-2/0.png (100%) rename {web => public}/assets/images/map_tile/2/-2/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-2/1.png (100%) rename {web => public}/assets/images/map_tile/2/-2/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-2/2.png (100%) rename {web => public}/assets/images/map_tile/2/-2/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/-2/3.png (100%) rename {web => public}/assets/images/map_tile/2/-2/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/0/0.png (100%) rename {web => public}/assets/images/map_tile/2/0/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/0/1.png (100%) rename {web => public}/assets/images/map_tile/2/0/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/0/2.png (100%) rename {web => public}/assets/images/map_tile/2/0/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/0/3.png (100%) rename {web => public}/assets/images/map_tile/2/0/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/1/0.png (100%) rename {web => public}/assets/images/map_tile/2/1/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/1/1.png (100%) rename {web => public}/assets/images/map_tile/2/1/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/1/2.png (100%) rename {web => public}/assets/images/map_tile/2/1/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/1/3.png (100%) rename {web => public}/assets/images/map_tile/2/1/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/2/0.png (100%) rename {web => public}/assets/images/map_tile/2/2/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/2/1.png (100%) rename {web => public}/assets/images/map_tile/2/2/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/2/2.png (100%) rename {web => public}/assets/images/map_tile/2/2/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/2/3.png (100%) rename {web => public}/assets/images/map_tile/2/2/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/3/0.png (100%) rename {web => public}/assets/images/map_tile/2/3/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/3/1.png (100%) rename {web => public}/assets/images/map_tile/2/3/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/3/2.png (100%) rename {web => public}/assets/images/map_tile/2/3/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/3/3.png (100%) rename {web => public}/assets/images/map_tile/2/3/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/4/0.png (100%) rename {web => public}/assets/images/map_tile/2/4/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/4/1.png (100%) rename {web => public}/assets/images/map_tile/2/4/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/4/2.png (100%) rename {web => public}/assets/images/map_tile/2/4/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/4/3.png (100%) rename {web => public}/assets/images/map_tile/2/4/3@2x.png (100%) rename {web => public}/assets/images/map_tile/2/5/0.png (100%) rename {web => public}/assets/images/map_tile/2/5/0@2x.png (100%) rename {web => public}/assets/images/map_tile/2/5/1.png (100%) rename {web => public}/assets/images/map_tile/2/5/1@2x.png (100%) rename {web => public}/assets/images/map_tile/2/5/2.png (100%) rename {web => public}/assets/images/map_tile/2/5/2@2x.png (100%) rename {web => public}/assets/images/map_tile/2/5/3.png (100%) rename {web => public}/assets/images/map_tile/2/5/3@2x.png (100%) rename {web => public}/assets/images/page_builder/blocks/hero.svg (100%) rename {web => public}/assets/images/page_builder/blocks/places.svg (100%) rename {web => public}/assets/images/page_builder/blocks/tastes.svg (100%) rename {web => public}/assets/images/page_builder/layouts/1.png (100%) rename {web => public}/assets/images/page_builder/layouts/1_2.png (100%) rename {web => public}/assets/images/page_builder/layouts/1__1_2.png (100%) rename {web => public}/assets/images/page_builder/layouts/1__2_1.png (100%) rename {web => public}/assets/images/page_builder/layouts/1w__1__1w.png (100%) rename {web => public}/assets/images/page_builder/layouts/1w__2_1__2_1__1w.png (100%) rename {web => public}/assets/images/page_builder/layouts/2_1.png (100%) rename {web => public}/assets/images/page_builder/layouts/default.png (100%) rename {web => public}/assets/images/page_builder/layouts/test.png (100%) rename {web => public}/assets/images/product/dairy.svg (100%) rename {web => public}/assets/images/product/egg.svg (100%) rename {web => public}/assets/images/product/gluten.svg (100%) rename {web => public}/assets/images/product/nuts.svg (100%) rename {web => public}/assets/images/product/seafood.svg (100%) rename {web => public}/assets/images/product/servings.svg (100%) rename {web => public}/assets/images/product/spicy.svg (100%) rename {web => public}/assets/images/recommendations/icon-like.svg (100%) rename {web => public}/assets/images/recommendations/icon-loading.svg (100%) rename {web => public}/assets/images/recommendations/placeholder.png (100%) rename {web => public}/assets/images/travel-plan.jpg (100%) rename {web/assets => public/ezplatform}/build/.gitkeep (100%) create mode 100644 public/index.php delete mode 100644 src/AppBundle/AppBundle.php delete mode 100644 src/AppBundle/Controller/RecommendationsController.php create mode 100644 src/CacheKernel.php rename src/{AppBundle/MigrationVersions/References/.keep => Controller/.gitignore} (100%) rename src/{AppBundle => }/Controller/ContactFormController.php (77%) rename src/{AppBundle => }/Controller/MenuController.php (90%) rename src/{AppBundle => }/Controller/ProductListController.php (98%) rename src/{AppBundle => }/DependencyInjection/Compiler/MigrationParameterPass.php (96%) rename web/assets/ezplatform/build/.gitkeep => src/Entity/.gitignore (100%) rename src/{AppBundle => }/Entity/ProductSearch.php (93%) rename src/{AppBundle => }/Event/AbstractBlockEvent.php (83%) rename src/{AppBundle => }/Event/Listener/RenderMenuListener.php (86%) rename src/{AppBundle => }/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php (97%) rename src/{AppBundle => }/Event/Subscriber/BuildDemoSchemaSubscriber.php (97%) rename src/{AppBundle => }/Event/Subscriber/EndWorkflowSubscriber.php (99%) rename src/{AppBundle => }/Event/Subscriber/PlacesBlockSubscriber.php (93%) rename src/{AppBundle => }/Event/Subscriber/TastesBlockSubscriber.php (93%) rename src/{AppBundle => }/Event/TemplateAttributeBlockNameListener.php (97%) rename src/{AppBundle => }/Event/Workflow/PublishOnLastStageSubscriber.php (99%) rename src/{AppBundle => }/Form/Type/ContactType.php (90%) rename src/{AppBundle => }/Form/Type/ProductSearchType.php (95%) rename src/{AppBundle => }/Helper/ContentHelper.php (97%) rename src/{AppBundle => }/Helper/LocationHelper.php (98%) rename src/{AppBundle/User/UserGroups.php => Helper/UserGroupHelper.php} (98%) rename src/{AppBundle => }/Installer/InstallerCommandExecuteTrait.php (98%) rename src/{AppBundle => }/Installer/PlatformEEDemoInstaller.php (56%) rename src/{AppBundle => }/Installer/PlatformEEDemoTestLayoutsInstaller.php (67%) create mode 100644 src/Kernel.php rename src/{AppBundle => }/Mail/Sender.php (76%) create mode 100644 src/Migration/.gitignore rename src/{AppBundle => }/Migration/FieldHandler/EzImageAsset.php (85%) create mode 100644 src/MigrationVersions/References/.keep rename src/{AppBundle => }/MigrationVersions/all.yml (99%) rename src/{AppBundle => }/MigrationVersions/cleanup-ee.yml (87%) rename src/{AppBundle => }/MigrationVersions/content.yml (99%) rename src/{AppBundle => }/MigrationVersions/form.yml (90%) rename src/{AppBundle => }/MigrationVersions/images.yml (99%) rename src/{AppBundle => }/MigrationVersions/landing_page.yml (98%) rename src/{AppBundle => }/MigrationVersions/landing_page_contenttype.yml (100%) rename src/{AppBundle => }/MigrationVersions/landing_page_tests.yml (99%) rename src/{AppBundle => }/MigrationVersions/languages.yml (73%) rename src/{AppBundle => }/MigrationVersions/product_list.yml (99%) rename src/{AppBundle => }/MigrationVersions/tags.yml (99%) rename src/{AppBundle => }/MigrationVersions/users.yml (99%) rename src/{AppBundle => }/Model/Contact.php (98%) rename src/{AppBundle => }/PremiumContent/HtmlRenderer.php (97%) rename src/{AppBundle => }/QueryType/BlockQueryType.php (96%) rename src/{AppBundle => }/QueryType/ChildrenQueryType.php (73%) rename src/{AppBundle => }/QueryType/MenuQueryType.php (73%) create mode 100644 src/Repository/.gitignore rename src/{AppBundle => }/Resources/schema/demo.yaml (100%) rename src/{AppBundle => }/Security/PersonalizationPolicyProvider.php (96%) rename src/{AppBundle => }/Twig/ContentDescriptionExtension.php (64%) rename src/{AppBundle => }/Twig/ContentInfoByLocationIdExtension.php (62%) rename src/{AppBundle => }/Twig/PremiumContentExtension.php (64%) rename src/{AppBundle => }/Twig/RecommendationsExtension.php (74%) rename src/{AppBundle => }/Twig/SearchResultExtractorExtension.php (69%) rename src/{AppBundle => }/Twig/YoutubeIdExtractorExtension.php (62%) rename src/{AppBundle => }/Value/BlockPreRenderValueObject.php (93%) rename src/{AppBundle => }/Value/BlockResponseValueObject.php (93%) rename src/{AppBundle => }/Value/PageBuilderBlockValueObject.php (94%) create mode 100644 templates/base.html.twig rename {app/Resources/views => templates}/blocks/_block.html.twig (100%) rename {app/Resources/EzPlatformPageFieldTypeBundle/views => templates/bundles/EzPlatformPageFieldTypeBundle}/blocks/banner.html.twig (100%) rename {app/Resources/EzPlatformPageFieldTypeBundle/views => templates/bundles/EzPlatformPageFieldTypeBundle}/blocks/gallery.html.twig (100%) rename {app/Resources/EzPlatformPageFieldTypeBundle/views => templates/bundles/EzPlatformPageFieldTypeBundle}/blocks/schedule.html.twig (100%) rename {app/Resources/EzPlatformPageFieldTypeBundle/views => templates/bundles/EzPlatformPageFieldTypeBundle}/blocks/video.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/change_password/index.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/change_password/success.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/forgot_password/index.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/forgot_password/success.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/forgot_password/with_login.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/reset_password/index.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/reset_password/invalid_link.html.twig (100%) rename {app/Resources/EzPlatformUserBundle/views => templates/bundles/EzPlatformUserBundle}/reset_password/success.html.twig (100%) rename {app/Resources/EzSystemsRecommendationBundle/views => templates/bundles/EzSystemsRecommendationBundle}/missing_recommendations.html.twig (100%) rename {app/Resources/EzSystemsRecommendationBundle/views => templates/bundles/EzSystemsRecommendationBundle}/recommendations.html.twig (100%) rename {app/Resources/EzSystemsRecommendationBundle/views => templates/bundles/EzSystemsRecommendationBundle}/show_recommendations.html.twig (100%) rename {app/Resources/NetgenTagsBundle/views => templates/bundles/NetgenTagsBundle}/tag/view.html.twig (100%) rename {app/Resources/views => templates}/themes/admin/fields/eztags_field.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/article/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/blog_post/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/blog_post/wide.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/card/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/folder/default.html.twig (89%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/hero/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/image/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/image/wide.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/list/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/place/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/place/wide.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/place_list/default.html.twig (89%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/product/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/product/wide.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/product_list/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/product_list/wide.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/block_item/video/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/banner/banner.html.twig (90%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/collection/cards.html.twig (93%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/collection/list.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/contentlist/blog.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/contentlist/cards.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/contentlist/list.html.twig (95%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/embed/embed.html.twig (87%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/embed/embed_wide.html.twig (87%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/gallery/gallery.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/hero/default.html.twig (93%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/list/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/places/cards.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/places/list.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/places/map.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/rss/list.html.twig (93%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/schedule/cards.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/schedule/list.html.twig (94%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/tastes/cards.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/tastes/home.html.twig (95%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/tastes/list.html.twig (95%) rename {app/Resources/views => templates}/themes/tastefulplanet/blocks/video/player.html.twig (84%) rename {app/Resources/views => templates}/themes/tastefulplanet/card/article.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/card/place.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/card/product.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/default/default.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/embed/home_tastes.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/featured/article.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/bootstrap_4_layout.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezform_field.html.twig (77%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezrichtext/custom_tags/call_to_action.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezfacebook.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezrichtext/custom_tags/eztwitter.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezyoutube.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/ezrichtext/custom_tags/factbox.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/fields/eztags_field.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/form_builder/default_form_view.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/about.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/article.html.twig (96%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/blog.html.twig (96%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/blog_post.html.twig (93%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/contact_form_submitted.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/folder.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/form.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/home.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/landing_page.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/place.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/place_list.html.twig (97%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/product.html.twig (95%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/product_list.html.twig (99%) rename {app/Resources/views => templates}/themes/tastefulplanet/full/subscribe.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/home/place_list.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/home/tastes.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layout/footer.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layout/header.html.twig (98%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1_2.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1__1_2.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1__2_1.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1w__1__1w.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/1w__2_1__2_1__1w.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/2_1.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/layouts/test_layout.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/line/blog_post.html.twig (81%) rename {app/Resources/views => templates}/themes/tastefulplanet/mail/contact.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/pagelayout.html.twig (92%) rename {app/Resources/views => templates}/themes/tastefulplanet/parts/link.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/parts/map.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/parts/product_modal_dialog.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/parts/recommendations_header.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/parts/render_description.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/search_result_item/article.html.twig (92%) rename {app/Resources/views => templates}/themes/tastefulplanet/search_result_item/default.html.twig (87%) rename {app/Resources/views => templates}/themes/tastefulplanet/search_result_item/place.html.twig (92%) rename {app/Resources/views => templates}/themes/tastefulplanet/search_result_item/product.html.twig (92%) rename {app/Resources/views => templates}/themes/tastefulplanet/user/login.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/user/registration_confirmation.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/user/registration_content_form.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/user/registration_form.html.twig (100%) rename {app/Resources/views => templates}/themes/tastefulplanet/zone/zone.html.twig (100%) rename tests/{AppBundle => App}/Behat/EnterpriseDemoEnvironmentConstants.php (96%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoBannerPreview.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoCollectionPreview.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoContentListPreview.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoContentSchedulerPreview.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoEmbedPreview.php (90%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoGalleryPreview.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoRSSPreview.php (90%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/DemoVideoPreview.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/BlockPreview/HeroPreview.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoBannerBlock.php (93%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoCodeBlock.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoCollectionBlock.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoContentListBlock.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoContentSchedulerBlock.php (94%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoEmbedBlock.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoGalleryBlock.php (92%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/DemoVideoBlock.php (93%) rename tests/{AppBundle => App}/Behat/PageElement/Blocks/HeroBlock.php (93%) rename tests/{AppBundle => App}/Behat/PageElement/DemoEnterpriseElementFactory.php (83%) rename tests/{AppBundle => App}/Behat/PageObject/DemoEnterprisePageObjectFactory.php (96%) rename tests/{AppBundle => App}/Behat/PageObject/DemoLandingPagePreview.php (95%) create mode 100644 tests/App/Helper/UserGroupTest.php rename tests/{AppBundle/User => App/Helper}/UserGroupsTest.php (95%) rename tests/{AppBundle => App}/PremiumContent/HtmlRendererTest.php (94%) rename tests/{AppBundle => App}/Twig/PremiumContentExtensionTest.php (85%) rename tests/{AppBundle => App}/Twig/YoutubeIdExtractorExtensionTest.php (87%) create mode 100644 translations/.gitignore rename {app/Resources/translations => translations}/custom_tags.en.yaml (100%) rename {app/Resources/translations => translations}/forms.de.xlf (100%) rename {app/Resources/translations => translations}/forms.en.xlf (100%) rename {app/Resources/translations => translations}/forms.fr.xlf (100%) rename {app/Resources/translations => translations}/forms.no.xlf (100%) rename {app/Resources/translations => translations}/messages.de.yml (100%) rename {app/Resources/translations => translations}/messages.en.yml (100%) rename {app/Resources/translations => translations}/messages.fr.yml (100%) rename {app/Resources/translations => translations}/messages.no.yml (99%) delete mode 100644 web/app.php delete mode 100644 web/app_dev.php delete mode 100644 web/assets/scss/demo.scss diff --git a/.dockerignore b/.dockerignore index 3b43e3825..d7caf9ee0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -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 diff --git a/.env b/.env index a95df053a..01f50515e 100644 --- a/.env +++ b/.env @@ -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 @@ -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 @@ -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 ### diff --git a/.gitignore b/.gitignore index b5e442709..43f29d6ab 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ /app/config/parameters.yml /build/ /phpunit.xml +/.phpunit.result.cache +/.rules /var/* !/var/cache /var/cache/* @@ -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~ @@ -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 @@ -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 ### diff --git a/.platform.app.yaml b/.platform.app.yaml index 4c68f23d3..405fad107 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -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. @@ -106,7 +106,7 @@ 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 @@ -114,11 +114,11 @@ hooks: 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 diff --git a/.platform/routes.yaml b/.platform/routes.yaml deleted file mode 100644 index 1525d9283..000000000 --- a/.platform/routes.yaml +++ /dev/null @@ -1,11 +0,0 @@ -"https://{default}/": - type: upstream - upstream: "varnish:http" - cache: - # As this does not support Vary, and purging, we can't use this as Sf Proxy drop in. - # However it is possible to enable this for anonymous traffic when backend sends expiry headers. - enabled: false - -"https://www.{default}/": - type: redirect - to: "https://{default}/" diff --git a/.platform/services.yaml b/.platform/services.yaml deleted file mode 100644 index 9e82f76ea..000000000 --- a/.platform/services.yaml +++ /dev/null @@ -1,65 +0,0 @@ -mysqldb: - type: mysql:10.2 - # Version 10.1 might be a better option when running Legacy Bridge - # For more information see https://doc.ezplatform.com/en/2.1/getting_started/requirements_and_system_configuration/#supported-setups - disk: 1024 - configuration: - schemas: - - main - # Uncomment if you want to store dfs tables in a separate database: - #- dfs - endpoints: - user: - default_schema: main - privileges: - main: admin - # Uncomment if you want to store dfs tables in a separate database: - #dfs: - # default_schema: dfs - # privileges: - # dfs: admin - -# For use by Symfony Cache (used by eZ Platform SPI Persistence Cache) -rediscache: - type: 'redis:3.2' - -# If you wish to have a separate Redis instance for sessions, uncomment -# this service and the corresponding relationship in .platform.app.yaml. -#redissession: -# type: 'redis:3.2' -# -# Alternatively if you have a requirement that sessions are persisted across server/redis restarts, -# have storage space to spare for this, and don't mind a bit slower instance type of redis -#redissession: -# type: redis-persistent:3.2 -# disk: 512 - -# If you wish to use solr, uncomment this service and the corresponding relationship in .platform.app.yaml. -# Also, you need to generate the config using: -# vendor/ezsystems/ezplatform-solr-search-engine/bin/generate-solr-config.sh -# Multi core setup is currently not supported on Platform.sh. Sharding does not work as the cores are -# unable to reach each other -#solrsearch: -# type: solr:6.6 -# disk: 512 -# configuration: -# configsets: -# mainconfig: !archive "configsets/solr6" -# cores: -# collection1: -# core_properties: | -# configSet=mainconfig -# schema=schema.xml -# endpoints: -# collection1: -# core: collection1 - -# Due to logic in app/config/env/platformsh.php, do not change the service name to something different than 'varnish' -varnish: - type: 'varnish:6.0' - relationships: - app: "app:http" - configuration: - vcl: !include - type: string - path: varnish.vcl diff --git a/.platform/varnish.vcl b/.platform/varnish.vcl deleted file mode 100644 index c319db1c8..000000000 --- a/.platform/varnish.vcl +++ /dev/null @@ -1,320 +0,0 @@ -// Varnish VCL for: -// - Varnish 5.1 or higher (6.0LTS recommended, and is what we mainly test against) -// - Varnish xkey vmod (via varnish-modules package, or via Varnish Plus) -// - eZ Platform 2.5LTS or higher with ezplatform-http-cache (this) bundle -// -// Make sure to at least adjust default parameters.yml, defaults there reflect our testing needs with docker. - -// Not applicable on Platform.sh: -//vcl 4.1; -//import std; -import xkey; - -// For customizing your backend and acl rules see parameters.vcl -// Includes not available on Platform.sh -//include "parameters.vcl"; -acl invalidators { - "127.0.0.1"; - "192.168.0.0"/16; -} - -// ACL for debuggers IP -acl debuggers { - "127.0.0.1"; - "192.168.0.0"/16; -} - -// Called at the beginning of a request, after the complete request has been received -sub vcl_recv { - // Set the backend - //set req.backend_hint = ezplatform; - // Platform.sh specific: - set req.backend_hint = app.backend(); - - // Add a Surrogate-Capability header to announce ESI support. - set req.http.Surrogate-Capability = "abc=ESI/1.0"; - - // Ensure that the Symfony Router generates URLs correctly with Varnish - if (req.http.X-Forwarded-Proto == "https" ) { - set req.http.X-Forwarded-Port = "443"; - } else { - set req.http.X-Forwarded-Port = "80"; - } - - // Trigger cache purge if needed - call ez_purge; - - // Don't cache requests other than GET and HEAD. - if (req.method != "GET" && req.method != "HEAD") { - return (pass); - } - - // Don't cache Authenticate & Authorization - // You may remove this when using REST API with basic auth. - if (req.http.Authenticate || req.http.Authorization) { - if (client.ip ~ debuggers) { - set req.http.X-Debug = "Not Cached according to configuration (Authorization)"; - } - return (hash); - } - - // Remove all cookies besides Session ID, as JS tracker cookies and so will make the responses effectively un-cached - if (req.http.cookie) { - set req.http.cookie = ";" + req.http.cookie; - set req.http.cookie = regsuball(req.http.cookie, "; +", ";"); - set req.http.cookie = regsuball(req.http.cookie, ";(eZSESSID[^=]*)=", "; \1="); - set req.http.cookie = regsuball(req.http.cookie, ";[^ ][^;]*", ""); - set req.http.cookie = regsuball(req.http.cookie, "^[; ]+|[; ]+$", ""); - - if (req.http.cookie == "") { - // If there are no more cookies, remove the header to get page cached. - unset req.http.cookie; - } - } - - // Do a standard lookup on assets (these don't vary by user context hash) - // Note that file extension list below is not extensive, so consider completing it to fit your needs. - if (req.url ~ "\.(css|js|gif|jpe?g|bmp|png|tiff?|ico|img|tga|wmf|svg|swf|ico|mp3|mp4|m4a|ogg|mov|avi|wmv|zip|gz|pdf|ttf|eot|wof)$") { - return (hash); - } - - // Sort the query string for cache normalization. - set req.url = std.querysort(req.url); - - // Retrieve client user context hash and add it to the forwarded request. - call ez_user_context_hash; - - // If it passes all these tests, do a lookup anyway. - return (hash); -} - -// Called when a cache lookup is successful. The object being hit may be stale: It can have a zero or negative ttl with only grace or keep time left. -sub vcl_hit { - if (obj.ttl >= 0s) { - // A pure unadulterated hit, deliver it - return (deliver); - } - - if (obj.ttl + obj.grace > 0s) { - // Object is in grace, logic below in this block is what differs from default: - // https://varnish-cache.org/docs/5.2/users-guide/vcl-grace.html#grace-mode - if (!std.healthy(req.backend_hint)) { - // Service is unhealthy, deliver from cache - return (deliver); - } else if (req.http.cookie) { - // Request it by a user with session, refresh the cache to avoid issues for editors and forum users - return (miss); - } - - // By default deliver cache, automatically triggers a background fetch - return (deliver); - } - - // fetch & deliver once we get the result - return (miss); -} - -// Called when the requested object has been retrieved from the backend -sub vcl_backend_response { - if (bereq.http.accept ~ "application/vnd.fos.user-context-hash" - && beresp.status >= 500 - ) { - return (abandon); - } - - // Check for ESI acknowledgement and remove Surrogate-Control header - if (beresp.http.Surrogate-Control ~ "ESI/1.0") { - unset beresp.http.Surrogate-Control; - set beresp.do_esi = true; - } - - // Make Varnish keep all objects for up to 1 hour beyond their TTL, see vcl_hit for Request logic on this - set beresp.grace = 1h; -} - -// Handle purge -// You may add FOSHttpCacheBundle tagging rules -// See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4 -sub ez_purge { - // Retrieve purge token, needs to be here due to restart, match for PURGE method done within - call ez_invalidate_token; - - # Support how purging was done in earlier versions, this is deprecated and here just for BC for code still using it - if (req.method == "BAN") { - call ez_purge_acl; - - if (req.http.X-Location-Id) { - ban("obj.http.X-Location-Id ~ " + req.http.X-Location-Id); - if (client.ip ~ debuggers) { - set req.http.X-Debug = "Ban done for content connected to LocationId " + req.http.X-Location-Id; - } - return (synth(200, "Banned")); - } - } - - if (req.method == "PURGE") { - call ez_purge_acl; - - # If http header "key" is set, we assume purge is on key and you have Varnish xkey installed - if (req.http.key) { - # By default we recommend using soft purge to respect grace time, if you need to hard purge use: - # set req.http.n-gone = xkey.purge(req.http.key); - set req.http.n-gone = xkey.softpurge(req.http.key); - - return (synth(200, "Invalidated "+req.http.n-gone+" objects")); - } - - # if not, then this is a normal purge by url - return (purge); - } -} - -sub ez_purge_acl { - if (req.http.x-invalidate-token) { - if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) { - return (synth(405, "Method not allowed")); - } - } else if (!client.ip ~ invalidators) { - return (synth(405, "Method not allowed")); - } -} - -// Sub-routine to get client user context hash, used to for being able to vary page cache on user rights. -sub ez_user_context_hash { - // Prevent tampering attacks on the hash mechanism - if (req.restarts == 0 - && (req.http.accept ~ "application/vnd.fos.user-context-hash" - || req.http.x-user-hash - ) - ) { - return (synth(400)); - } - - if (req.restarts == 0 && (req.method == "GET" || req.method == "HEAD")) { - // Backup accept header, if set - if (req.http.accept) { - set req.http.x-fos-original-accept = req.http.accept; - } - set req.http.accept = "application/vnd.fos.user-context-hash"; - - // Backup original URL - set req.http.x-fos-original-url = req.url; - set req.url = "/_fos_user_context_hash"; - - // Force the lookup, the backend must tell not to cache or vary on all - // headers that are used to build the hash. - return (hash); - } - - // Rebuild the original request which now has the hash. - if (req.restarts > 0 - && req.http.accept == "application/vnd.fos.user-context-hash" - ) { - set req.url = req.http.x-fos-original-url; - unset req.http.x-fos-original-url; - if (req.http.x-fos-original-accept) { - set req.http.accept = req.http.x-fos-original-accept; - unset req.http.x-fos-original-accept; - } else { - // If accept header was not set in original request, remove the header here. - unset req.http.accept; - } - - // Force the lookup, the backend must tell not to cache or vary on the - // user context hash to properly separate cached data. - - return (hash); - } -} - -// Sub-routine to get invalidate token. -sub ez_invalidate_token { - // Prevent tampering attacks on the token mechanisms - if (req.restarts == 0 - && (req.http.accept ~ "application/vnd.ezplatform.invalidate-token" - || req.http.x-backend-invalidate-token - ) - ) { - return (synth(400)); - } - - if (req.restarts == 0 && req.method == "PURGE" && req.http.x-invalidate-token) { - set req.http.accept = "application/vnd.ezplatform.invalidate-token"; - - set req.url = "/_ez_http_invalidatetoken"; - - // Force the lookup - return (hash); - } - - // Rebuild the original request which now has the invalidate token. - if (req.restarts > 0 - && req.http.accept == "application/vnd.ezplatform.invalidate-token" - ) { - set req.url = "/"; - set req.method = "PURGE"; - unset req.http.accept; - } -} - -sub vcl_deliver { - // On receiving the invalidate token response, copy the invalidate token to the original - // request and restart. - if (req.restarts == 0 - && resp.http.content-type ~ "application/vnd.ezplatform.invalidate-token" - ) { - set req.http.x-backend-invalidate-token = resp.http.x-invalidate-token; - - return (restart); - } - - // On receiving the hash response, copy the hash header to the original - // request and restart. - if (req.restarts == 0 - && resp.http.content-type ~ "application/vnd.fos.user-context-hash" - ) { - set req.http.x-user-hash = resp.http.x-user-hash; - - return (restart); - } - - // If we get here, this is a real response that gets sent to the client. - - // Remove the vary on user context hash, this is nothing public. Keep all - // other vary headers. - if (resp.http.Vary ~ "X-User-Hash") { - set resp.http.Vary = regsub(resp.http.Vary, "(?i),? *X-User-Hash *", ""); - set resp.http.Vary = regsub(resp.http.Vary, "^, *", ""); - if (resp.http.Vary == "") { - unset resp.http.Vary; - } - - // If we vary by user hash, we'll also adjust the cache control headers going out by default to avoid sending - // large ttl meant for Varnish to shared proxies and such. We assume only session cookie is left after vcl_recv. - if (req.http.cookie) { - // When in session where we vary by user hash we by default avoid caching this in shared proxies & browsers - // For browser cache with it revalidating against varnish, use for instance "private, no-cache" instead - set resp.http.cache-control = "private, no-cache, no-store, must-revalidate"; - } else if (resp.http.cache-control ~ "public") { - // For non logged in users we allow caching on shared proxies (mobile network accelerators, planes, ...) - // But only for a short while, as there is no way to purge them - set resp.http.cache-control = "public, s-maxage=600, stale-while-revalidate=300, stale-if-error=300"; - } - } - - if (client.ip ~ debuggers) { - // Add X-Cache header if debugging is enabled - if (obj.hits > 0) { - set resp.http.X-Cache = "HIT"; - set resp.http.X-Cache-Hits = obj.hits; - set resp.http.X-Cache-TTL = obj.ttl; - } else { - set resp.http.X-Cache = "MISS"; - } - } else { - // Remove tag headers when delivering to non debug client - unset resp.http.xkey; - // Sanity check to prevent ever exposing the hash to a non debug client. - unset resp.http.x-user-hash; - } -} diff --git a/.travis.yml b/.travis.yml index 6295a4a16..242e196df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ # Tests cannot be run from metarepo - it's a public repository, which doesn't have access to private repositories on Travis (for security reasons). # The actual test setup is in Page Builder bundle. language: php -php: - - '7.1' - -script: +php: + - '7.3' + +script: - echo 'Test suite moved to PageBuilder bundle' diff --git a/app/.htaccess b/app/.htaccess deleted file mode 100644 index fb1de45bd..000000000 --- a/app/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - - Require all denied - - - Order deny,allow - Deny from all - diff --git a/app/AppCache.php b/app/AppCache.php deleted file mode 100644 index 0957357c3..000000000 --- a/app/AppCache.php +++ /dev/null @@ -1,12 +0,0 @@ -getEnvironment()) { - case 'test': - case 'behat': - $bundles[] = new EzSystems\BehatBundle\EzSystemsBehatBundle(); - // 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 Overblog\GraphiQLBundle\OverblogGraphiQLBundle(); - } - - return $bundles; - } - - public function getRootDir() - { - return __DIR__; - } - - public function getCacheDir() - { - if (!empty($_SERVER['SYMFONY_TMP_DIR'])) { - return rtrim($_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 rtrim($_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'); - } -} diff --git a/app/Resources/views/.keep b/app/Resources/views/.keep deleted file mode 100644 index fc68291a3..000000000 --- a/app/Resources/views/.keep +++ /dev/null @@ -1 +0,0 @@ -This is the recommended location for your applications templates. diff --git a/app/config/config.yml b/app/config/config.yml deleted file mode 100644 index 3da48c72b..000000000 --- a/app/config/config.yml +++ /dev/null @@ -1,209 +0,0 @@ -imports: - - { resource: default_parameters.yml } - - { resource: parameters.yml } - - { resource: default_layouts.yml } - - { resource: field_templates.yml } - - { resource: security.yml } - - { resource: cache_pool/cache.tagaware.filesystem.yml } - - { resource: env/generic.php } - - { resource: env/platformsh.php } - - { resource: services.yml } - - { resource: services/ } - - { resource: blocks.yml } - -# Put parameters here that don't need to change on each machine where the app is deployed -# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration -parameters: - locale: en - ezpublish_rest.csrf_token_intention: authenticate - # Enabled token based authentication in PB - page_builder.token_authenticator.enabled: true - -# Configuration for Database connection, can have several connections used by eZ Repositories in ezplatform.yml -doctrine: - dbal: - connections: - default: - driver: '%database_driver%' - host: '%database_host%' - port: '%database_port%' - dbname: '%database_name%' - user: '%database_user%' - password: '%database_password%' - charset: '%database_charset%' - orm: - auto_generate_proxy_classes: '%kernel.debug%' - naming_strategy: doctrine.orm.naming_strategy.underscore - auto_mapping: true - -# If you are not using MySQL, you can comment-out this section -ez_doctrine_schema: - tables: - options: - charset: '%database_charset%' - collate: '%database_collation%' - -# Base configuration for Solr, for more options see: https://doc.ezplatform.com/en/latest/guide/search/#solr-bundle -# Can have several connections used by each eZ Repositories in ezplatform.yml -ez_search_engine_solr: - endpoints: - endpoint0: - dsn: '%solr_dsn%' - core: '%solr_core%' - connections: - default: - entry_endpoints: - - endpoint0 - mapping: - default: endpoint0 - -framework: - esi: ~ - translator: { fallback: '%locale_fallback%' } - secret: '%secret%' - router: - resource: '%kernel.project_dir%/app/config/routing.yml' - strict_requirements: ~ - csrf_protection: ~ - form: ~ - validation: { enable_annotations: true } - #serializer: { enable_annotations: true } - # Place "eztpl" engine first intentionally if you setup use with legacy bridge. - # This is to avoid template name parsing with Twig engine, refusing specific characters - # which are valid with legacy tpl files. - templating: - engines: ['twig'] - #assets_version: SomeVersionScheme - default_locale: '%locale_fallback%' - trusted_hosts: ~ - session: - # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id - # if handler_id set to null will use default session handler from php.ini - handler_id: '%ezplatform.session.handler_id%' - save_path: '%ezplatform.session.save_path%' - # Note: eZ Platform 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: http://doc.ezplatform.com/en/latest/guide/sessions/ - fragments: ~ - http_method_override: true - assets: - packages: - ezplatform: - json_manifest_path: '%kernel.project_dir%/web/assets/ezplatform/build/manifest.json' - php_errors: - log: true - workflow: - enabled: true - -# Twig Configuration -twig: - debug: '%kernel.debug%' - strict_variables: '%kernel.debug%' - -# Assetic Configuration -assetic: - debug: '%kernel.debug%' - use_controller: '%kernel.debug%' - bundles: [ EzPlatformAdminUiBundle ] # NetgenTagsBundle - #java: /usr/bin/java - filters: - cssrewrite: ~ - scssphp: - formatter: 'ScssPhp\ScssPhp\Formatter\Crunched' - import_paths: ['%kernel.project_dir%/web/'] - -# Webpack Encore Configuration -webpack_encore: - output_path: "%kernel.project_dir%/web/assets/build" - builds: - ezplatform: "%kernel.project_dir%/web/assets/ezplatform/build" - -# Swiftmailer Configuration -swiftmailer: - transport: '%mailer_transport%' - host: '%mailer_host%' - username: '%mailer_user%' - password: '%mailer_password%' - spool: { type: memory } - -# FOSHttpCache Configuration -fos_http_cache: - cache_control: - rules: - # Make sure already cacheable (fresh) responses from eZ Platform which are errors/redirect gets lower ttl (then default_ttl) - - - match: - match_response: "response.isFresh() && ( response.isServerError() || response.isClientError() || response.isRedirect() )" - headers: - overwrite: true - cache_control: - max_age: 5 - s_maxage: 20 - # Example of performance tuning, force TTL on 404 pages to avoid crawlers / ... taking to much load - # Should not be set to high, as cached 404's can cause issues for future routes, url aliases, wildcards, .. - - - match: - match_response: "!response.isFresh() && response.isNotFound()" - headers: - overwrite: true - cache_control: - public: true - max_age: 0 - s_maxage: 20 - -jms_translation: - source_language: en - locales: [en] - dumper: - add_references: false - add_date: false - configs: - admin: - dirs: - - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui/src' - output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui/src/bundle/Resources/translations/' - excluded_dirs: [Behat, Tests, node_modules] - extractor: - - ez_policy - output_format: "xliff" - form_builder: - dirs: - - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-form-builder/src' - output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-form-builder/src/bundle/Resources/translations/' - excluded_dirs: [Behat, Tests] - output_format: "xliff" - admin_modules: - dirs: - - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui-modules/src' - output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui-modules/Resources/translations/' - excluded_dirs: [Behat, Tests, node_modules] - output_format: "xliff" - page_builder: - dirs: - - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-page-builder/src' - output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-page-builder/src/bundle/Resources/translations/' - excluded_dirs: [Behat, Tests] - output_format: "xlf" - -#ez_platform_automated_translation: -# system: -# default: -# configurations: -# google: -# apiKey: '%env(GOOGLE_TRANSLATE_API_KEY)%' - -gregwar_captcha: - as_url: true - -lexik_jwt_authentication: - secret_key: '%secret%' - encoder: - signature_algorithm: HS256 - # Disabled by default, because Page builder use an custom extractor - token_extractors: - authorization_header: - enabled: false - cookie: - enabled: false - query_parameter: - enabled: false diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml deleted file mode 100644 index 6a8c1e369..000000000 --- a/app/config/config_dev.yml +++ /dev/null @@ -1,43 +0,0 @@ -imports: - - { resource: config.yml } - - { resource: ezplatform_dev.yml } - -framework: - router: - resource: '%kernel.project_dir%/app/config/routing_dev.yml' - strict_requirements: true - profiler: { only_exceptions: false } - -web_profiler: - toolbar: true - intercept_redirects: false - -monolog: - handlers: - main: - type: '%log_type%' - path: '%log_path%' - level: debug - channels: ['!event'] - console: - type: console - process_psr_3_messages: false - channels: ['!event', '!doctrine', '!console'] - # To follow logs in real time, execute the following command: - # `bin/console server:log -vv` - server_log: - type: server_log - process_psr_3_messages: false - host: 127.0.0.1:9911 - - # uncomment to get logging in your browser - # you may have to allow bigger header sizes in your Web server configuration - #firephp: - # type: firephp - # level: info - #chromephp: - # type: chromephp - # level: info - -#swiftmailer: -# delivery_addresses: ['me@example.com'] diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml deleted file mode 100644 index c15f1a9ca..000000000 --- a/app/config/config_prod.yml +++ /dev/null @@ -1,37 +0,0 @@ -imports: - - { resource: config.yml } - - { resource: ezplatform_prod.yml } - -# Example below would make sure some of the symfony caches are written to apc / redis instead of disk -# Make sure to verify if cache clearing is done as you expect when doing such changes. - -#framework: -# validation: -# cache: validator.mapping.cache.doctrine.apc -# serializer: -# cache: serializer.mapping.cache.apc -#doctrine: -# orm: -# metadata_cache_driver: apc -# query_cache_driver: apc -## Result (& the experimental Second level) cache needs to be shared among servers so should use for instance Redis -# result_cache_driver: -# type: redis -# host: -# port: - - -monolog: - handlers: - main: - type: fingers_crossed - # eZ Platform sets this to critical instead of error to avoid too verbose logs in prod - action_level: critical - handler: nested - nested: - type: '%log_type%' - path: '%log_path%' - level: debug - console: - type: console - process_psr_3_messages: false diff --git a/app/config/config_test.yml b/app/config/config_test.yml deleted file mode 100644 index 49e3d3e50..000000000 --- a/app/config/config_test.yml +++ /dev/null @@ -1,17 +0,0 @@ -imports: - - { resource: config_dev.yml } - - { resource: ezplatform_test.yml } - -framework: - test: ~ - session: - storage_id: session.storage.mock_file - profiler: - collect: false - -web_profiler: - toolbar: false - intercept_redirects: false - -swiftmailer: - disable_delivery: true diff --git a/app/config/env/generic.php b/app/config/env/generic.php deleted file mode 100644 index 95b7ea237..000000000 --- a/app/config/env/generic.php +++ /dev/null @@ -1,86 +0,0 @@ -setParameter('dfs_nfs_path', $dfsNfsPath); - - if ($value = getenv('DFS_DATABASE_DRIVER')) { - $container->setParameter('dfs_database_driver', $value); - } else { - $container->setParameter('dfs_database_driver', $container->getParameter('database_driver')); - } - - if ($value = getenv('DFS_DATABASE_HOST')) { - $container->setParameter('dfs_database_host', $value); - } else { - $container->setParameter('dfs_database_host', $container->getParameter('database_host')); - } - - if ($value = getenv('DFS_DATABASE_PORT')) { - $container->setParameter('dfs_database_port', $value); - } else { - $container->setParameter('dfs_database_port', $container->getParameter('database_port')); - } - - if ($value = getenv('DFS_DATABASE_NAME')) { - $container->setParameter('dfs_database_name', $value); - } else { - $container->setParameter('dfs_database_name', $container->getParameter('database_name')); - } - - if ($value = getenv('DFS_DATABASE_USER')) { - $container->setParameter('dfs_database_user', $value); - } else { - $container->setParameter('dfs_database_user', $container->getParameter('database_user')); - } - - if ($value = getenv('DFS_DATABASE_PASSWORD')) { - $container->setParameter('dfs_database_password', $value); - } else { - $container->setParameter('dfs_database_password', $container->getParameter('database_password')); - } - - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../dfs')); - $loader->load('dfs.yml'); -} - -// Cache settings -// If CACHE_POOL env variable is set, check if there is a yml file that needs to be loaded for it -if (($pool = getenv('CACHE_POOL')) && file_exists(__DIR__ . "/../cache_pool/${pool}.yml")) { - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../cache_pool')); - $loader->load($pool . '.yml'); -} - -// Params that needs to be set at compile time and thus can't use Symfony's env() -if ($purgeType = getenv('HTTPCACHE_PURGE_TYPE')) { - $container->setParameter('purge_type', $purgeType); -} - -if ($value = getenv('MAILER_TRANSPORT')) { - $container->setParameter('mailer_transport', $value); -} - -if ($value = getenv('LOG_TYPE')) { - $container->setParameter('log_type', $value); -} - -if ($value = getenv('SESSION_HANDLER_ID')) { - $container->setParameter('ezplatform.session.handler_id', $value); -} - -if ($value = getenv('SESSION_SAVE_PATH')) { - $container->setParameter('ezplatform.session.save_path', $value); -} - -// EzSystemsPlatformFastlyCacheBundle settings -if ($value = getenv('FASTLY_SERVICE_ID')) { - $container->setParameter('fastly_service_id', $value); -} - -if ($value = getenv('FASTLY_KEY')) { - $container->setParameter('fastly_key', $value); -} diff --git a/app/config/env/platformsh.php b/app/config/env/platformsh.php deleted file mode 100644 index c0db889fa..000000000 --- a/app/config/env/platformsh.php +++ /dev/null @@ -1,159 +0,0 @@ -setParameter('ezdesign.phpstorm.enabled', false); -} - -// Will not be executed on build step -$relationships = getenv('PLATFORM_RELATIONSHIPS'); -if (!$relationships) { - return; -} -$routes = getenv('PLATFORM_ROUTES'); - -$relationships = json_decode(base64_decode($relationships), true); -$routes = json_decode(base64_decode($routes), true); - -foreach ($relationships['database'] as $endpoint) { - if (empty($endpoint['query']['is_master'])) { - continue; - } - - $container->setParameter('database_driver', 'pdo_' . $endpoint['scheme']); - $container->setParameter('database_host', $endpoint['host']); - $container->setParameter('database_port', $endpoint['port']); - $container->setParameter('database_name', $endpoint['path']); - $container->setParameter('database_user', $endpoint['username']); - $container->setParameter('database_password', $endpoint['password']); - - // 'cluster_database_name' is deprecated in eZ Platform 1.13.1/2.1 - // Cluster DB name is hardcoded. It will have no any effect if cluster is disabled - $container->setParameter('cluster_database_name', 'cluster'); -} - -// PLATFORMSH_DFS_NFS_PATH is different compared to DFS_NFS_PATH in the sense that it is relative to ezplatform dir -// DFS_NFS_PATH is an absolute path -if ($dfsNfsPath = getenv('PLATFORMSH_DFS_NFS_PATH')) { - $container->setParameter('dfs_nfs_path', sprintf('%s/%s', dirname($container->getParameter('kernel.root_dir')), $dfsNfsPath)); - - if (array_key_exists('dfs_database', $relationships)) { - foreach ($relationships['dfs_database'] as $endpoint) { - if (empty($endpoint['query']['is_master'])) { - continue; - } - - $container->setParameter('dfs_database_driver', 'pdo_' . $endpoint['scheme']); - $container->setParameter('dfs_database_host', $endpoint['host']); - $container->setParameter('dfs_database_port', $endpoint['port']); - $container->setParameter('dfs_database_name', $endpoint['path']); - $container->setParameter('dfs_database_user', $endpoint['username']); - $container->setParameter('dfs_database_password', $endpoint['password']); - } - } else { - // If dfs_database endpoint is not defined, we'll use the default database for DFS too - $container->setParameter('dfs_database_driver', $container->getParameter('database_driver')); - $container->setParameter('dfs_database_host', $container->getParameter('database_host')); - $container->setParameter('dfs_database_port', $container->getParameter('database_port')); - $container->setParameter('dfs_database_name', $container->getParameter('database_name')); - $container->setParameter('dfs_database_user', $container->getParameter('database_user')); - $container->setParameter('dfs_database_password', $container->getParameter('database_password')); - } - - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../dfs')); - $loader->load('dfs.yml'); -} -// Use Redis-based caching if possible. -if (isset($relationships['rediscache'])) { - foreach ($relationships['rediscache'] as $endpoint) { - if ($endpoint['scheme'] !== 'redis') { - continue; - } - - $container->setParameter('cache_pool', 'cache.redis'); - $container->setParameter('cache_dsn', sprintf('%s:%d', $endpoint['host'], $endpoint['port']) . '?retry_interval=3'); - - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../cache_pool')); - $loader->load('cache.redis.yml'); - } -} elseif (isset($relationships['cache'])) { - // Fallback to memcached if here (deprecated, we will only handle redis here in the future) - foreach ($relationships['cache'] as $endpoint) { - if ($endpoint['scheme'] !== 'memcached') { - continue; - } - - @trigger_error('Usage of Memcached is deprecated, redis is recommended', E_USER_DEPRECATED); - - $container->setParameter('cache_pool', 'cache.memcached'); - $container->setParameter('cache_dsn', sprintf('%s:%d', $endpoint['host'], $endpoint['port'])); - - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../cache_pool')); - $loader->load('cache.memcached.yml'); - } -} - -// Use Redis-based sessions if possible. If a separate Redis instance -// is available, use that. If not, share a Redis instance with the -// Cache. (That should be safe to do except on especially high-traffic sites.) -if (isset($relationships['redissession'])) { - foreach ($relationships['redissession'] as $endpoint) { - if ($endpoint['scheme'] !== 'redis') { - continue; - } - - $container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis'); - $container->setParameter('ezplatform.session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port'])); - } -} elseif (isset($relationships['rediscache'])) { - foreach ($relationships['rediscache'] as $endpoint) { - if ($endpoint['scheme'] !== 'redis') { - continue; - } - - $container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis'); - $container->setParameter('ezplatform.session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port'])); - } -} - -if (isset($relationships['solr'])) { - foreach ($relationships['solr'] as $endpoint) { - if ($endpoint['scheme'] !== 'solr') { - continue; - } - - $container->setParameter('search_engine', 'solr'); - $container->setParameter('solr_dsn', sprintf('http://%s:%d/%s', $endpoint['host'], $endpoint['port'], 'solr')); - // To set solr_core parameter we assume path is in form like: "solr/collection1" - $container->setParameter('solr_core', substr($endpoint['path'], 5)); - } -} - -// We will pick a varnish route by the following prioritization: -// - The first route found that has upstream: varnish -// - if primary route has upstream: varnish, that route will be prioritised -// If no route is found with upstream: varnish, then purge_server will not be set -$route = null; -foreach ($routes as $host => $info) { - if ($route === null && $info['type'] === 'upstream' && $info['upstream'] === 'varnish') { - $route = $host; - } - if ($info['type'] === 'upstream' && $info['upstream'] === 'varnish' && $info['primary'] === true) { - $route = $host; - break; - } -} - -if ($route !== null && !getenv('HTTPCACHE_PURGE_TYPE')) { - $container->setParameter('purge_type', 'varnish'); - $container->setParameter('purge_server', rtrim($route, '/')); -} - -// Setting default value for HTTPCACHE_VARNISH_INVALIDATE_TOKEN if it is not explicitly set -if (!getenv('HTTPCACHE_VARNISH_INVALIDATE_TOKEN')) { - $container->setParameter('varnish_invalidate_token', getenv('PLATFORM_PROJECT_ENTROPY')); -} diff --git a/app/config/ezplatform_dev.yml b/app/config/ezplatform_dev.yml deleted file mode 100644 index 967ac2e91..000000000 --- a/app/config/ezplatform_dev.yml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: ezplatform.yml } diff --git a/app/config/ezplatform_prod.yml b/app/config/ezplatform_prod.yml deleted file mode 100644 index 967ac2e91..000000000 --- a/app/config/ezplatform_prod.yml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: ezplatform.yml } diff --git a/app/config/ezplatform_test.yml b/app/config/ezplatform_test.yml deleted file mode 100644 index 967ac2e91..000000000 --- a/app/config/ezplatform_test.yml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: ezplatform.yml } diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist deleted file mode 100644 index 3188cbb80..000000000 --- a/app/config/parameters.yml.dist +++ /dev/null @@ -1,19 +0,0 @@ -# This file is a "template" of what your parameters.yml file should look like -# -# NB!: Some parameters are on purpose placed in default_parameters.yml to not -# prompt on all possible parameters during install with no info to go with it. -# (This will change once we move to use Symfony flex) -parameters: - # A secret key that's used to generate certain security-related tokens - env(SYMFONY_SECRET): ThisEzPlatformTokenIsNotSoSecret_PleaseChangeIt - - # Settings for database backend used by Doctrine DBAL - # 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): - env(DATABASE_CHARSET): utf8mb4 - env(DATABASE_COLLATION): utf8mb4_unicode_520_ci diff --git a/app/config/routing.yml b/app/config/routing.yml deleted file mode 100644 index 4adc02d3e..000000000 --- a/app/config/routing.yml +++ /dev/null @@ -1,111 +0,0 @@ -login: - path: /login - defaults: { _controller: ezpublish.security.controller:loginAction } - -login_check: - path: /login_check - -logout: - path: /logout - -kernel.internal: - resource: '@EzPublishCoreBundle/Resources/config/routing/internal.yml' - -kernel.rest: - resource: '@EzPlatformRestBundle/Resources/config/routing.yml' - prefix: '%ezpublish_rest.path_prefix%' - -kernel.rest.options: - resource: '@EzPlatformRestBundle/Resources/config/routing.yml' - prefix: '%ezpublish_rest.path_prefix%' - type: rest_options - -ezplatform.admin_ui: - resource: '@EzPlatformAdminUiBundle/Resources/config/routing.yml' - defaults: - siteaccess_group_whitelist: '%admin_group_name%' - -ezplatform.admin_ui.rest: - resource: '@EzPlatformAdminUiBundle/Resources/config/routing_rest.yml' - prefix: '%ezpublish_rest.path_prefix%' - -ezplatform.user: - resource: '@EzPlatformUserBundle/Resources/config/routing.yml' - -ezplatform.ee.page_builder: - resource: '@EzPlatformPageBuilderBundle/Resources/config/routing.yml' - defaults: - siteaccess_group_whitelist: '%admin_group_name%' - -ezplatform.ee.form_builder: - resource: '@EzPlatformFormBuilderBundle/Resources/config/routing.yml' - defaults: - siteaccess_group_whitelist: '%admin_group_name%' - -_ezplatformRepositoryFormsRoutes: - resource: '@EzSystemsRepositoryFormsBundle/Resources/config/routing.yml' - -ezplatform.ee.dependencies.bazinga: - resource: '@BazingaJsTranslationBundle/Resources/config/routing/routing.yml' - -ezplatform.ee.fieldtype.page: - resource: '@EzPlatformPageFieldTypeBundle/Resources/config/routing.yml' - -ezplatform.ee.date_based_publisher: - resource: '@EzSystemsDateBasedPublisherBundle/Resources/config/routing.yml' - prefix: '%ez_systems_date_based_publisher_rest_prefix%' - -ezplatform.ee.flex_workflow: - resource: '@FlexWorkflowBundle/Resources/config/routing.yml' - -ezplatform.ee.workflow: - resource: '@EzPlatformWorkflowBundle/Resources/config/routing.yml' - -#recommendationBundleRestRoutes: -# resource: "@EzSystemsRecommendationBundle/Resources/config/routing_rest.yml" -# prefix: %ezpublish_rest.path_prefix% - -fos.js_routing: - resource: '@FOSJsRoutingBundle/Resources/config/routing/routing.xml' - -ezplatform.httpcache: - resource: '@EzSystemsPlatformHttpCacheBundle/Resources/config/routing.yml' - -#_eztagsRoutes: -# resource: "@NetgenTagsBundle/Resources/config/routing.yml" - -#_novaezseoRoutes: -# resource: "@NovaeZSEOBundle/Controller/" -# type: annotation -# prefix: / - -app.submitted: - path: /contact/submitted - defaults: - _controller: app.controller.contactform:submittedAction - template: "@ezdesign/full/contact_form_submitted.html.twig" - methods: [GET] - -gregwar_captcha_routing: - resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml" - -# Custom redirection from /ez to /admin, feel free to adjust to your needs or remove if you don't need it -platform1_admin_route: - path: /ez - controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction - defaults: - path: /admin - permanent: true - -# -# GraphQL -# - -overblog_graphql: - resource: "@OverblogGraphQLBundle/Resources/config/routing/graphql.yml" - -overblog_graphql_endpoint: - path: /graphql - defaults: - _controller: Overblog\GraphQLBundle\Controller\GraphController::endpointAction - _format: json diff --git a/app/config/routing_behat.yml b/app/config/routing_behat.yml deleted file mode 100644 index a9606757b..000000000 --- a/app/config/routing_behat.yml +++ /dev/null @@ -1,5 +0,0 @@ -_main: - resource: routing_dev.yml - -_ezplatform_behat: - resource: '@eZBehatBundle/Resources/config/routing.yml' diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml deleted file mode 100644 index 208dfc895..000000000 --- a/app/config/routing_dev.yml +++ /dev/null @@ -1,17 +0,0 @@ -_wdt: - resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' - prefix: /_wdt - -_profiler: - resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' - prefix: /_profiler - -_errors: - resource: '@TwigBundle/Resources/config/routing/errors.xml' - prefix: /_error - -_main: - resource: routing.yml - -overblog_graphql_graphiql: - resource: "@OverblogGraphiQLBundle/Resources/config/routing.xml" diff --git a/app/config/services.yml b/app/config/services.yml deleted file mode 100644 index 4174168a8..000000000 --- a/app/config/services.yml +++ /dev/null @@ -1,113 +0,0 @@ -# Learn more about services, parameters and containers at -# https://symfony.com/doc/current/service_container.html - -imports: - - { resource: services/controllers.yml } - -parameters: - #parameter_name: value - -services: - # default configuration for services in *this* file - _defaults: - # automatically injects dependencies in your services - autowire: true - # automatically registers your services as commands, event subscribers, etc. - autoconfigure: true - # this means you cannot fetch services directly from the container via $container->get() - # if you need to do this, you can override this setting on individual services - public: false - - app.query_type.menu: - class: AppBundle\QueryType\MenuQueryType - calls: - - [setLanguages, [$languages$]] - tags: - - { name: ezpublish.query_type } - - app.mail.sender: - class: AppBundle\Mail\Sender - public: true - arguments: - - '@mailer' - - '@translator' - - '@templating' - - '%app.contact_form.sender_email%' - - '%app.contact_form.recipient_email%' - - app.twig.content_info_by_location_id_extension: - class: AppBundle\Twig\ContentInfoByLocationIdExtension - arguments: - - '@ezpublish.api.service.location' - - '@ezpublish.api.service.content' - - AppBundle\Twig\YoutubeIdExtractorExtension: - tags: - - { name: twig.extension } - - AppBundle\QueryType\BlockQueryType: ~ - - AppBundle\Event\Subscriber\PlacesBlockSubscriber: - arguments: - $queryType: '@AppBundle\QueryType\BlockQueryType' - - AppBundle\Event\Subscriber\TastesBlockSubscriber: - arguments: - $queryType: '@AppBundle\QueryType\BlockQueryType' - - app.controller.recommendations: - class: AppBundle\Controller\RecommendationsController - public: true - arguments: - - '@ezpublish.api.service.location' - - '@ezpublish.api.service.search' - - '@ezpublish.api.service.content' - - '@router' - - '@templating' - - AppBundle\Twig\RecommendationsExtension: - arguments: - - '@ezpublish.config.resolver' - tags: - - { name: twig.extension } - - AppBundle\Twig\SearchResultExtractorExtension: - tags: - - { name: twig.extension } - - AppBundle\PremiumContent\HtmlRenderer: ~ - AppBundle\User\UserGroups: ~ - - AppBundle\Twig\PremiumContentExtension: - arguments: - - '@AppBundle\PremiumContent\HtmlRenderer' - - '@AppBundle\User\UserGroups' - - '%app.premium_content.allowed_user_groups.location_ids%' - tags: - - { name: twig.extension } - - AppBundle\Twig\ContentDescriptionExtension: - arguments: - - "@ezpublish.field_helper" - - "@?logger" - tags: - - { name: twig.extension } - - AppBundle\Event\TemplateAttributeBlockNameListener: - tags: - - { name: kernel.event_subscriber } - - AppBundle\Event\PageFieldType\Attribute\AttributeSerializationSubscriber: ~ - - AppBundle\Event\Listener\RenderMenuListener: - arguments: - $personalizationCustomerId: '%ez_recommendation.default.yoochoose.customer_id%' - $personalizationLicenseKey: '%ez_recommendation.default.yoochoose.license_key%' - tags: - - { name: kernel.event_listener, event: ezplatform_admin_ui.menu_configure.main_menu, method: renderMenu, priority: -45 } - - AppBundle\Event\Workflow\PublishOnLastStageSubscriber: - arguments: - $publishOnLastStageWorkflows: '%app.workflow.publish_on_last_stage%' - - AppBundle\Event\Subscriber\EndWorkflowSubscriber: ~ diff --git a/app/config/services/controllers.yml b/app/config/services/controllers.yml deleted file mode 100644 index eff636483..000000000 --- a/app/config/services/controllers.yml +++ /dev/null @@ -1,37 +0,0 @@ -services: - # default configuration for services in *this* file - _defaults: - # automatically injects dependencies in your services - autowire: true - # automatically registers your services as commands, event subscribers, etc. - autoconfigure: true - # this means you cannot fetch services directly from the container via $container->get() - # if you need to do this, you can override this setting on individual services - public: false - - app.controller.menu: - class: AppBundle\Controller\MenuController - public: true - arguments: - - '@templating' - - '@ezpublish.api.service.search' - - '@app.query_type.menu' - - '%app.top_menu.parent_location_id%' - - '%app.top_menu.includedContentTypeIdentifier%' - - app.controller.contactform: - class: AppBundle\Controller\ContactFormController - public: true - arguments: - - '@form.factory' - - '@app.mail.sender' - - '@templating' - - '@hautelook.router.template' - - app.controller.product_list_controller: - class: AppBundle\Controller\ProductListController - public: true - arguments: - - '@ezpublish.query_type_content_view_mapper' - - '@ezpublish.api.service.search' - - '@form.factory' diff --git a/web/assets/js/blocks/placesMapLoader.js b/assets/js/blocks/placesMapLoader.js similarity index 100% rename from web/assets/js/blocks/placesMapLoader.js rename to assets/js/blocks/placesMapLoader.js diff --git a/web/assets/js/main.js b/assets/js/main.js similarity index 100% rename from web/assets/js/main.js rename to assets/js/main.js diff --git a/web/assets/scss/_article.scss b/assets/scss/_article.scss similarity index 100% rename from web/assets/scss/_article.scss rename to assets/scss/_article.scss diff --git a/web/assets/scss/_base.scss b/assets/scss/_base.scss similarity index 100% rename from web/assets/scss/_base.scss rename to assets/scss/_base.scss diff --git a/web/assets/scss/_blog.post.scss b/assets/scss/_blog.post.scss similarity index 100% rename from web/assets/scss/_blog.post.scss rename to assets/scss/_blog.post.scss diff --git a/web/assets/scss/_blog.scss b/assets/scss/_blog.scss similarity index 100% rename from web/assets/scss/_blog.scss rename to assets/scss/_blog.scss diff --git a/web/assets/scss/_colors.scss b/assets/scss/_colors.scss similarity index 100% rename from web/assets/scss/_colors.scss rename to assets/scss/_colors.scss diff --git a/web/assets/scss/_custom.tags.scss b/assets/scss/_custom.tags.scss similarity index 100% rename from web/assets/scss/_custom.tags.scss rename to assets/scss/_custom.tags.scss diff --git a/web/assets/scss/_folder.scss b/assets/scss/_folder.scss similarity index 100% rename from web/assets/scss/_folder.scss rename to assets/scss/_folder.scss diff --git a/web/assets/scss/_footer.scss b/assets/scss/_footer.scss similarity index 100% rename from web/assets/scss/_footer.scss rename to assets/scss/_footer.scss diff --git a/web/assets/scss/_form.scss b/assets/scss/_form.scss similarity index 100% rename from web/assets/scss/_form.scss rename to assets/scss/_form.scss diff --git a/web/assets/scss/_forms.scss b/assets/scss/_forms.scss similarity index 100% rename from web/assets/scss/_forms.scss rename to assets/scss/_forms.scss diff --git a/web/assets/scss/_header.scss b/assets/scss/_header.scss similarity index 100% rename from web/assets/scss/_header.scss rename to assets/scss/_header.scss diff --git a/web/assets/scss/_home.scss b/assets/scss/_home.scss similarity index 100% rename from web/assets/scss/_home.scss rename to assets/scss/_home.scss diff --git a/web/assets/scss/_landing.page.scss b/assets/scss/_landing.page.scss similarity index 100% rename from web/assets/scss/_landing.page.scss rename to assets/scss/_landing.page.scss diff --git a/web/assets/scss/_personalized.scss b/assets/scss/_personalized.scss similarity index 100% rename from web/assets/scss/_personalized.scss rename to assets/scss/_personalized.scss diff --git a/web/assets/scss/_place.list.scss b/assets/scss/_place.list.scss similarity index 100% rename from web/assets/scss/_place.list.scss rename to assets/scss/_place.list.scss diff --git a/web/assets/scss/_place.scss b/assets/scss/_place.scss similarity index 100% rename from web/assets/scss/_place.scss rename to assets/scss/_place.scss diff --git a/web/assets/scss/_product.list.scss b/assets/scss/_product.list.scss similarity index 100% rename from web/assets/scss/_product.list.scss rename to assets/scss/_product.list.scss diff --git a/web/assets/scss/_product.scss b/assets/scss/_product.scss similarity index 100% rename from web/assets/scss/_product.scss rename to assets/scss/_product.scss diff --git a/web/assets/scss/_recommendations.scss b/assets/scss/_recommendations.scss similarity index 100% rename from web/assets/scss/_recommendations.scss rename to assets/scss/_recommendations.scss diff --git a/web/assets/scss/_subscribe.scss b/assets/scss/_subscribe.scss similarity index 100% rename from web/assets/scss/_subscribe.scss rename to assets/scss/_subscribe.scss diff --git a/web/assets/scss/_tags.scss b/assets/scss/_tags.scss similarity index 100% rename from web/assets/scss/_tags.scss rename to assets/scss/_tags.scss diff --git a/web/assets/scss/_user.forms.scss b/assets/scss/_user.forms.scss similarity index 100% rename from web/assets/scss/_user.forms.scss rename to assets/scss/_user.forms.scss diff --git a/web/assets/scss/blocks/_banner.scss b/assets/scss/blocks/_banner.scss similarity index 100% rename from web/assets/scss/blocks/_banner.scss rename to assets/scss/blocks/_banner.scss diff --git a/web/assets/scss/blocks/_card.view.scss b/assets/scss/blocks/_card.view.scss similarity index 100% rename from web/assets/scss/blocks/_card.view.scss rename to assets/scss/blocks/_card.view.scss diff --git a/web/assets/scss/blocks/_contentlist.scss b/assets/scss/blocks/_contentlist.scss similarity index 100% rename from web/assets/scss/blocks/_contentlist.scss rename to assets/scss/blocks/_contentlist.scss diff --git a/web/assets/scss/blocks/_embed.scss b/assets/scss/blocks/_embed.scss similarity index 100% rename from web/assets/scss/blocks/_embed.scss rename to assets/scss/blocks/_embed.scss diff --git a/web/assets/scss/blocks/_form.scss b/assets/scss/blocks/_form.scss similarity index 100% rename from web/assets/scss/blocks/_form.scss rename to assets/scss/blocks/_form.scss diff --git a/web/assets/scss/blocks/_gallery.scss b/assets/scss/blocks/_gallery.scss similarity index 100% rename from web/assets/scss/blocks/_gallery.scss rename to assets/scss/blocks/_gallery.scss diff --git a/web/assets/scss/blocks/_hero.scss b/assets/scss/blocks/_hero.scss similarity index 100% rename from web/assets/scss/blocks/_hero.scss rename to assets/scss/blocks/_hero.scss diff --git a/web/assets/scss/blocks/_keyword.scss b/assets/scss/blocks/_keyword.scss similarity index 100% rename from web/assets/scss/blocks/_keyword.scss rename to assets/scss/blocks/_keyword.scss diff --git a/web/assets/scss/blocks/_rss.scss b/assets/scss/blocks/_rss.scss similarity index 100% rename from web/assets/scss/blocks/_rss.scss rename to assets/scss/blocks/_rss.scss diff --git a/web/assets/scss/blocks/_video.scss b/assets/scss/blocks/_video.scss similarity index 100% rename from web/assets/scss/blocks/_video.scss rename to assets/scss/blocks/_video.scss diff --git a/assets/scss/demo.scss b/assets/scss/demo.scss new file mode 100644 index 000000000..37cddee3d --- /dev/null +++ b/assets/scss/demo.scss @@ -0,0 +1,37 @@ +@import 'public/bundles/ezplatformadminuiassets/vendors/bootstrap/scss/bootstrap.scss'; +@import 'assets/scss/colors'; +@import 'assets/scss/base'; +@import 'assets/scss/header'; +@import 'assets/scss/footer'; +@import 'assets/scss/home'; +@import 'assets/scss/_forms'; +@import 'assets/scss/article'; +@import 'assets/scss/folder'; +@import 'assets/scss/place'; +@import 'assets/scss/place.list'; +@import 'assets/scss/product'; +@import 'assets/scss/product.list'; +@import 'assets/scss/blog'; +@import 'assets/scss/blog.post'; +@import 'assets/scss/subscribe'; +@import 'assets/scss/recommendations'; +@import 'assets/scss/personalized'; +@import 'assets/scss/tags'; +@import 'assets/scss/landing.page'; +@import 'assets/scss/user.forms'; +@import 'assets/scss/blocks/banner'; +@import 'assets/scss/blocks/contentlist'; +@import 'assets/scss/blocks/embed'; +@import 'assets/scss/blocks/form'; +@import 'assets/scss/blocks/gallery'; +@import 'assets/scss/blocks/keyword'; +@import 'assets/scss/blocks/rss'; +@import 'assets/scss/blocks/video'; +@import 'assets/scss/blocks/card.view'; +@import 'assets/scss/blocks/hero'; +@import 'assets/scss/landing-page/landing.page'; +@import 'assets/scss/_form'; +@import 'assets/scss/_custom.tags'; +//@import '/bundles/ezsystemspersonalizedblock/css/personalized.css'; +@import 'assets/scss/tags'; +@import 'assets/scss/user.forms'; diff --git a/web/assets/scss/landing-page/_landing.page.scss b/assets/scss/landing-page/_landing.page.scss similarity index 100% rename from web/assets/scss/landing-page/_landing.page.scss rename to assets/scss/landing-page/_landing.page.scss diff --git a/behat.yml.dist b/behat.yml.dist index 6b7d4a8a6..bf01a17e6 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -18,9 +18,9 @@ default: Behat\Symfony2Extension: kernel: - bootstrap: vendor/autoload.php - path: app/AppKernel.php - class: AppKernel + bootstrap: config/bootstrap.php + path: src/Kernel.php + class: App\Kernel env: behat debug: false diff --git a/bin/console b/bin/console index fbc8ce4f7..16ce9c218 100755 --- a/bin/console +++ b/bin/console @@ -1,36 +1,38 @@ #!/usr/bin/env php getParameterOption(['--env', '-e'], null, true)) { + putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); +} -/** @var Composer\Autoload\ClassLoader $loader */ -$loader = require __DIR__.'/../vendor/autoload.php'; +if ($input->hasParameterOption('--no-debug', true)) { + putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); +} -$input = new ArgvInput(); -$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; +require dirname(__DIR__).'/config/bootstrap.php'; -if ($debug) { - Debug::enable(); +if ($_SERVER['APP_DEBUG']) { + umask(0000); + if (class_exists(Debug::class)) { + Debug::enable(); + } } -$kernel = new AppKernel($env, $debug); +$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); $application = new Application($kernel); $application->run($input); diff --git a/bin/symfony_requirements b/bin/symfony_requirements deleted file mode 100755 index a7bf65a1b..000000000 --- a/bin/symfony_requirements +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env php -getPhpIniConfigPath(); - -echo_title('Symfony Requirements Checker'); - -echo '> PHP is using the following php.ini file:'.PHP_EOL; -if ($iniPath) { - echo_style('green', ' '.$iniPath); -} else { - echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); -} - -echo PHP_EOL.PHP_EOL; - -echo '> Checking Symfony requirements:'.PHP_EOL.' '; - -$messages = array(); -foreach ($symfonyRequirements->getRequirements() as $req) { - if ($helpText = get_error_message($req, $lineSize)) { - echo_style('red', 'E'); - $messages['error'][] = $helpText; - } else { - echo_style('green', '.'); - } -} - -$checkPassed = empty($messages['error']); - -foreach ($symfonyRequirements->getRecommendations() as $req) { - if ($helpText = get_error_message($req, $lineSize)) { - echo_style('yellow', 'W'); - $messages['warning'][] = $helpText; - } else { - echo_style('green', '.'); - } -} - -if ($checkPassed) { - echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); -} else { - echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); - - echo_title('Fix the following mandatory requirements', 'red'); - - foreach ($messages['error'] as $helpText) { - echo ' * '.$helpText.PHP_EOL; - } -} - -if (!empty($messages['warning'])) { - echo_title('Optional recommendations to improve your setup', 'yellow'); - - foreach ($messages['warning'] as $helpText) { - echo ' * '.$helpText.PHP_EOL; - } -} - -echo PHP_EOL; -echo_style('title', 'Note'); -echo ' The command console could use a different php.ini file'.PHP_EOL; -echo_style('title', '~~~~'); -echo ' than the one used with your web server. To be on the'.PHP_EOL; -echo ' safe side, please check the requirements from your web'.PHP_EOL; -echo ' server using the '; -echo_style('yellow', 'web/config.php'); -echo ' script.'.PHP_EOL; -echo PHP_EOL; - -exit($checkPassed ? 0 : 1); - -function get_error_message(Requirement $requirement, $lineSize) -{ - if ($requirement->isFulfilled()) { - return; - } - - $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; - $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; - - return $errorMessage; -} - -function echo_title($title, $style = null) -{ - $style = $style ?: 'title'; - - echo PHP_EOL; - echo_style($style, $title.PHP_EOL); - echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); - echo PHP_EOL; -} - -function echo_style($style, $message) -{ - // ANSI color codes - $styles = array( - 'reset' => "\033[0m", - 'red' => "\033[31m", - 'green' => "\033[32m", - 'yellow' => "\033[33m", - 'error' => "\033[37;41m", - 'success' => "\033[37;42m", - 'title' => "\033[34m", - ); - $supports = has_color_support(); - - echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); -} - -function echo_block($style, $title, $message) -{ - $message = ' '.trim($message).' '; - $width = strlen($message); - - echo PHP_EOL.PHP_EOL; - - echo_style($style, str_repeat(' ', $width)); - echo PHP_EOL; - echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT)); - echo PHP_EOL; - echo_style($style, $message); - echo PHP_EOL; - echo_style($style, str_repeat(' ', $width)); - echo PHP_EOL; -} - -function has_color_support() -{ - static $support; - - if (null === $support) { - if (DIRECTORY_SEPARATOR == '\\') { - $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); - } else { - $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); - } - } - - return $support; -} diff --git a/bin/vhost.sh b/bin/vhost.sh index c2d845804..62c17a05f 100755 --- a/bin/vhost.sh +++ b/bin/vhost.sh @@ -9,10 +9,10 @@ declare -a option_vars=( %PORT% %HOST_NAME% %HOST_ALIAS% - %SYMFONY_ENV% - %SYMFONY_DEBUG% - %SYMFONY_HTTP_CACHE% - %SYMFONY_TRUSTED_PROXIES% + %APP_ENV% + %APP_DEBUG% + %APP_HTTP_CACHE% + %APP_TRUSTED_PROXIES% %BODY_SIZE_LIMIT% %TIMEOUT% %FASTCGI_PASS% @@ -201,7 +201,7 @@ if [ ! -f "$template_file" ] ; then fi if [[ "${template_values[0]}" == "" ]] ; then - if [ -d web/ ] ; then + if [ -d public/ ] ; then template_values[0]=`pwd` else show_help "--basedir=" true diff --git a/composer.json b/composer.json index 034325543..4ff1b8ed7 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,6 @@ { + "minimum-stability": "dev", + "prefer-stable": true, "name": "ezsystems/ezplatform-ee-demo", "description": "eZ Platform Enterprise Edition Demo distribution", "homepage": "https://github.com/ezsystems/ezplatform-ee-demo", @@ -13,42 +15,29 @@ "repositories": [ { "type": "composer", "url": "https://updates.ez.no/ttl" } ], - "replace": { - "ezsystems/ezstudio-demo": "*", - "ezsystems/ezpublish-community": "*" - }, - "autoload": { - "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": "^7.1.3", - "doctrine/doctrine-bundle": "^1.9.1", - "doctrine/orm": "^2.6.3", + "php": "^7.3", + "ext-ctype": "*", + "ext-iconv": "*", "ezsystems/date-based-publisher": "^4.0@dev", "ezsystems/doctrine-dbal-schema": "^1.0@dev", "ezsystems/ez-support-tools": "^2.0@dev", "ezsystems/ezplatform-admin-ui": "^2.0@dev", - "ezsystems/ezplatform-admin-ui-assets": "^4.1.0", + "ezsystems/ezplatform-admin-ui-assets": "^5.0@dev", "ezsystems/ezplatform-admin-ui-modules": "^2.0@dev", + "ezsystems/ezplatform-calendar": "^1.0@dev", "ezsystems/ezplatform-core": "^2.0@dev", "ezsystems/ezplatform-cron": "^3.0@dev", - "ezsystems/ezplatform-demo-assets": "^1.0@dev", + "ezsystems/ezplatform-demo-assets": "^1.0", "ezsystems/ezplatform-design-engine": "^3.0@dev", + "ezsystems/ezplatform-graphql": "^2.0@dev", + "ezsystems/ezplatform-http-cache": "^1.0@dev", "ezsystems/ezplatform-ee-installer": "^3.0@dev", "ezsystems/ezplatform-form-builder": "^2.0@dev", - "ezsystems/ezplatform-graphql": "^2.0@dev", - "ezsystems/ezplatform-http-cache": "^0.10@dev", - "ezsystems/ezplatform-http-cache-fastly": "^2.0@dev", "ezsystems/ezplatform-matrix-fieldtype": "^2.0@dev", "ezsystems/ezplatform-page-builder": "^2.0@dev", "ezsystems/ezplatform-page-fieldtype": "^2.0@dev", + "ezsystems/ezplatform-rest": "^1.0@dev", "ezsystems/ezplatform-richtext": "^2.0@dev", "ezsystems/ezplatform-solr-search-engine": "^2.0@dev", "ezsystems/ezplatform-standard-design": "^0.3@dev", @@ -57,95 +46,109 @@ "ezsystems/ezpublish-kernel": "^8.0@dev", "ezsystems/flex-workflow": "^4.0@dev", "ezsystems/repository-forms": "^3.0@dev", - "ezsystems/symfony-tools": "~2.0.0@dev", - "ezsystems/ezplatform-rest": "^1.0@dev", - "friendsofsymfony/jsrouting-bundle": "^1.6.3", + "friendsofsymfony/jsrouting-bundle": "^2.3", "gregwar/captcha-bundle": "^2.0", - "incenteev/composer-parameter-handler": "^2.1.3", "kaliop/ezmigrationbundle": "^5.9", - "knplabs/knp-menu-bundle": "^2.2.1", - "overblog/graphql-bundle": "^0.11.11", - "ramsey/uuid": "^3.8", - "roave/security-advisories": "dev-master", - "scssphp/scssphp": "~1.0", - "sensio/distribution-bundle": "^5.0.23", + "knplabs/knp-menu-bundle": "^2.2", + "php-http/guzzle6-adapter": "^2.0", "sensio/framework-extra-bundle": "^5.1", "sensiolabs/security-checker": "^5.0", - "symfony/assetic-bundle": "^2.8.2", - "symfony/monolog-bundle": "^3.3.1", - "symfony/swiftmailer-bundle": "^3.2.4", - "symfony/symfony": "^3.4.18", - "symfony/thanks": "^1.1.0", - "symfony/webpack-encore-bundle": "^1.0.0", - "twig/extensions": "^1.5.3", - "twig/twig": "^2.5", - "white-october/pagerfanta-bundle": "^1.2.2", - "willdurand/js-translation-bundle": "^2.6.6" + "symfony/asset": "^4.3", + "symfony/cache": "^4.3", + "symfony/console": "^4.3", + "symfony/dotenv": "^4.3", + "symfony/expression-language": "^4.3", + "symfony/flex": "^1.1", + "symfony/form": "^4.3", + "symfony/framework-bundle": "^4.3", + "symfony/monolog-bundle": "^3.1", + "symfony/orm-pack": "^1.0", + "symfony/process": "^4.3", + "symfony/proxy-manager-bridge": "^4.3", + "symfony/security-bundle": "^4.3", + "symfony/serializer-pack": "^1.0", + "symfony/swiftmailer-bundle": "^3.1", + "symfony/thanks": "^1.1", + "symfony/translation": "^4.3", + "symfony/twig-bundle": "^4.3", + "symfony/validator": "^4.3", + "symfony/web-link": "^4.3", + "symfony/webpack-encore-bundle": "^1.4", + "symfony/yaml": "^4.3", + "leafo/scssphp": "^0.7.7" }, "require-dev": { - "behat/behat": "^3.5.0", - "behat/mink-extension": "^2.3.1", - "behat/mink-goutte-driver": "^1.2.1", - "behat/mink-selenium2-driver": "^1.3.1", - "behat/symfony2-extension": "^2.1.5", - "bex/behat-screenshot": "^1.2.7", - "ezsystems/behat-screenshot-image-driver-cloudinary": "^1.1.0@dev", - "ezsystems/behatbundle": "^7.0.0@dev", + "behat/behat": "^3.5", + "behat/mink": "^1.7", + "behat/mink-extension": "^2.3", + "behat/mink-goutte-driver": "^1.2", + "behat/mink-selenium2-driver": "^1.3", + "behat/symfony2-extension": "^2.1", + "bex/behat-screenshot": "^1.2", + "ezsystems/behat-screenshot-image-driver-cloudinary": "^1.1@dev", + "ezsystems/behatbundle": "^7.0@dev", + "liuggio/fastest": "^1.6", "overblog/graphiql-bundle": "^0.1.2", - "phpunit/phpunit": "^6.5.13", - "sensio/generator-bundle": "^3.1.7", - "symfony/phpunit-bridge": "^3.4.18", - "liuggio/fastest": "^1.6" + "symfony/debug-pack": "^1.0", + "symfony/maker-bundle": "^1.0", + "symfony/test-pack": "^1.0", + "symfony/web-server-bundle": "^4.2", + "phpunit/phpunit": "^8.2" }, "conflict": { - "symfony/symfony": "3.4.9||3.4.12||3.4.16", - "doctrine/dbal": "2.7.0", - "twig/twig": "2.6.1", - "symfony/webpack-encore-bundle": "1.2.0||1.2.1" + "symfony/symfony": "*" + }, + "replace": { + "ezsystems/ezstudio": "*", + "ezsystems/ezpublish-community": "*", + "paragonie/random_compat": "2.*", + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php71": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php56": "*", + "ezsystems/ezstudio-demo": "*" + }, + "autoload": { + "psr-4": { + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } }, "scripts": { - "symfony-scripts": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", - "eZ\\Bundle\\EzPublishCoreBundle\\Composer\\ScriptHandler::clearCache", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", - "@php bin/console bazinga:js-translation:dump web/assets --merge-domains", - "@php bin/console assetic:dump", - "yarn install", - "EzSystems\\EzPlatformEncoreBundle\\Composer\\ScriptHandler::compileAssets", - "@php bin/security-checker security:check" - ], + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd", + "bazinga:js-translation:dump %PUBLIC_DIR%/assets --merge-domains": "symfony-cmd", + "yarn install": "script", + "ezplatform:encore:compile": "symfony-cmd", + "security-checker security:check": "script" + }, "post-install-cmd": [ - "@symfony-scripts" + "@auto-scripts" ], "post-update-cmd": [ - "@symfony-scripts" - ], - "post-create-project-cmd": [ - "eZ\\Bundle\\EzPublishCoreBundle\\Composer\\ScriptHandler::installWelcomeText" + "@auto-scripts" ], "ezplatform-install": [ - "@php bin/console ezplatform:install ezplatform-ee-demo" + "@php bin/console ezplatform:install ezplatform-ee-demo", + "@auto-scripts" ] }, "config": { - "process-timeout":0, - "bin-dir": "bin", - "sort-packages": true, "preferred-install": { "ezsystems/*": "dist" - } + }, + "sort-packages": true, + "bin-dir": "bin/" }, "extra": { - "symfony-app-dir": "app", - "symfony-bin-dir": "bin", - "symfony-var-dir": "var", - "symfony-web-dir": "web", - "symfony-tests-dir": "tests", - "symfony-assets-install": "relative", - "incenteev-parameters": { - "keep-outdated": true, - "file": "app/config/parameters.yml" + "symfony": { + "allow-contrib": true }, "branch-alias": { "dev-master": "3.0.x-dev" diff --git a/config/bootstrap.php b/config/bootstrap.php new file mode 100644 index 000000000..f6afb4042 --- /dev/null +++ b/config/bootstrap.php @@ -0,0 +1,21 @@ +=1.2) +if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { + $_SERVER += $env; + $_ENV += $env; +} elseif (!class_exists(Dotenv::class)) { + throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); +} else { + // load all the .env files + (new Dotenv())->loadEnv(dirname(__DIR__).'/.env'); +} + +$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; +$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 000000000..382a429ff --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,64 @@ + ['all' => true], + Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], + Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'behat' => true], + Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'behat' => true], + Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], + Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], + Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], + FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true], + JMS\TranslationBundle\JMSTranslationBundle::class => ['all' => true], + Oneup\FlysystemBundle\OneupFlysystemBundle::class => ['all' => true], + Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], + Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle::class => ['all' => true], + Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], + Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle::class => ['all' => true], + Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], + WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], + Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true], + Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true], + FOS\HttpCacheBundle\FOSHttpCacheBundle::class => ['all' => true], + eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle::class => ['all' => true], + eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle::class => ['all' => true], + EzSystems\EzPlatformSolrSearchEngineBundle\EzSystemsEzPlatformSolrSearchEngineBundle::class => ['all' => true], + eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle::class => ['all' => true], + EzSystems\EzPlatformRestBundle\EzPlatformRestBundle::class => ['all' => true], + eZ\Bundle\EzPublishDebugBundle\EzPublishDebugBundle::class => ['dev' => true, 'test' => true, 'behat' => true], + EzSystems\EzSupportToolsBundle\EzSystemsEzSupportToolsBundle::class => ['all' => true], + EzSystems\EzPlatformCronBundle\EzPlatformCronBundle::class => ['all' => true], + EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle::class => ['all' => true], + EzSystems\DoctrineSchemaBundle\DoctrineSchemaBundle::class => ['all' => true], + EzSystems\RepositoryFormsBundle\EzSystemsRepositoryFormsBundle::class => ['all' => true], + EzSystems\EzPlatformDesignEngineBundle\EzPlatformDesignEngineBundle::class => ['all' => true], + EzSystems\EzPlatformStandardDesignBundle\EzPlatformStandardDesignBundle::class => ['all' => true], + EzSystems\EzPlatformRichTextBundle\EzPlatformRichTextBundle::class => ['all' => true], + EzSystems\EzPlatformAdminUiBundle\EzPlatformAdminUiBundle::class => ['all' => true], + EzSystems\EzPlatformUserBundle\EzPlatformUserBundle::class => ['all' => true], + EzSystems\EzPlatformAdminUiModulesBundle\EzPlatformAdminUiModulesBundle::class => ['all' => true], + EzSystems\EzPlatformAdminUiAssetsBundle\EzPlatformAdminUiAssetsBundle::class => ['all' => true], + EzSystems\EzPlatformEncoreBundle\EzSystemsEzPlatformEncoreBundle::class => ['all' => true], + EzSystems\EzPlatformMatrixFieldtypeBundle\EzPlatformMatrixFieldtypeBundle::class => ['all' => true], + EzSystems\BehatBundle\EzSystemsBehatBundle::class => ['behat' => true], + EzSystems\PlatformHttpCacheBundle\EzSystemsPlatformHttpCacheBundle::class => ['all' => true], + EzSystems\EzPlatformPageBuilderBundle\EzPlatformPageBuilderBundle::class => ['all' => true], + EzSystems\EzPlatformPageFieldTypeBundle\EzPlatformPageFieldTypeBundle::class => ['all' => true], + EzSystems\EzPlatformFormBuilderBundle\EzPlatformFormBuilderBundle::class => ['all' => true], + EzSystems\DateBasedPublisherBundle\EzSystemsDateBasedPublisherBundle::class => ['all' => true], + EzSystems\FlexWorkflowBundle\EzSystemsFlexWorkflowBundle::class => ['all' => true], + EzSystems\EzPlatformEnterpriseEditionInstallerBundle\EzPlatformEnterpriseEditionInstallerBundle::class => ['all' => true], + EzSystems\EzPlatformWorkflowBundle\EzPlatformWorkflowBundle::class => ['all' => true], + EzSystems\EzPlatformCalendarBundle\EzPlatformCalendarBundle::class => ['all' => true], + EzSystems\EzPlatformGraphQL\EzSystemsEzPlatformGraphQLBundle::class => ['all' => true], + Overblog\GraphQLBundle\OverblogGraphQLBundle::class => ['all' => true], + Overblog\GraphiQLBundle\OverblogGraphiQLBundle::class => ['dev' => true], + Kaliop\eZMigrationBundle\EzMigrationBundle::class => ['all' => true], +]; diff --git a/app/Resources/views/.gitkeep b/config/graphql/types/.gitignore similarity index 100% rename from app/Resources/views/.gitkeep rename to config/graphql/types/.gitignore diff --git a/config/packages/assets.yaml b/config/packages/assets.yaml new file mode 100644 index 000000000..5c64870bf --- /dev/null +++ b/config/packages/assets.yaml @@ -0,0 +1,5 @@ +framework: + assets: + packages: + ezplatform: + json_manifest_path: '%kernel.project_dir%/public/assets/ezplatform/build/manifest.json' diff --git a/app/config/config_behat.yml b/config/packages/behat/config_behat.yml similarity index 70% rename from app/config/config_behat.yml rename to config/packages/behat/config_behat.yml index 5089f2d8f..319ef61fb 100644 --- a/app/config/config_behat.yml +++ b/config/packages/behat/config_behat.yml @@ -17,10 +17,3 @@ swiftmailer: assetic: use_controller: false - -monolog: - handlers: - travis: - type: stream - path: "%kernel.logs_dir%/travis_test.log" - level: error diff --git a/app/config/ezplatform_behat.yml b/config/packages/behat/ezplatform.yaml similarity index 54% rename from app/config/ezplatform_behat.yml rename to config/packages/behat/ezplatform.yaml index bb16605b8..12ba37712 100644 --- a/app/config/ezplatform_behat.yml +++ b/config/packages/behat/ezplatform.yaml @@ -1,21 +1,21 @@ -imports: - - { resource: ezplatform.yml } +# Siteaccesses are first added in ../ezplatform.yaml. +# Only merge additional siteaccesses here. ezpublish: siteaccess: - list: ["site", "other_site"] + list: + - other_site groups: - site_group: ["site", "other_site"] - default_siteaccess: "site" + site_group: + - other_site + default_siteaccess: site match: URIElement: 1 - ezdesign: phpstorm: enabled: false ez_platform_standard_design: - # for pre eZ Design Engine tests use old template naming override_kernel_templates: false parameters: diff --git a/config/packages/behat/monolog.yaml b/config/packages/behat/monolog.yaml new file mode 100644 index 000000000..bf10f1bb3 --- /dev/null +++ b/config/packages/behat/monolog.yaml @@ -0,0 +1,6 @@ +monolog: + handlers: + travis: + type: stream + path: "%kernel.logs_dir%/travis_test.log" + level: error diff --git a/app/config/blocks.yml b/config/packages/blocks.yml similarity index 100% rename from app/config/blocks.yml rename to config/packages/blocks.yml diff --git a/config/packages/buzz.yaml b/config/packages/buzz.yaml new file mode 100644 index 000000000..16cfcccb2 --- /dev/null +++ b/config/packages/buzz.yaml @@ -0,0 +1,41 @@ +# Read more about client options at: https://github.com/kriswallsmith/Buzz/blob/master/doc/client.md +services: + _defaults: + public: false + + # Tell the auto wire system to use "FileGetContents" client as default client. + # Set this to any of the other clients below (e.g. Curl or MultiCurl) to use a different default client. + Buzz\Client\BuzzClientInterface: '@buzz.file_get_contents_client' + + # Clients + buzz.file_get_contents_client: + class: Buzz\Client\FileGetContents + arguments: + - timeout: 10 + + buzz.curl_client: + class: Buzz\Client\Curl + arguments: + - timeout: 10 + + buzz.multi_curl_client: + class: Buzz\Client\MultiCurl + arguments: + - timeout: 10 + + # Browser + Buzz\Browser: + arguments: ['@Buzz\Client\BuzzClientInterface'] + calls: + - ['addMiddleware', ['@buzz.middleware.content_length']] + - ['addMiddleware', ['@buzz.middleware.logger']] + + # Middlewares + buzz.middleware.content_length: + class: Buzz\Middleware\ContentLengthMiddleware + + buzz.middleware.logger: + class: Buzz\Middleware\LoggerMiddleware + arguments: ['@?logger'] + tags: + - { name: monolog.logger, channel: buzz } diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml new file mode 100644 index 000000000..93e620efa --- /dev/null +++ b/config/packages/cache.yaml @@ -0,0 +1,19 @@ +framework: + cache: + # Put the unique name of your app here: the prefix seed + # is used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The app cache caches to the filesystem by default. + # Other options include: + + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost + + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu + + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: ~ diff --git a/app/config/cache_pool/cache.memcached.yml b/config/packages/cache_pool/cache.memcached.yml similarity index 100% rename from app/config/cache_pool/cache.memcached.yml rename to config/packages/cache_pool/cache.memcached.yml diff --git a/app/config/cache_pool/cache.redis.yml b/config/packages/cache_pool/cache.redis.yml similarity index 100% rename from app/config/cache_pool/cache.redis.yml rename to config/packages/cache_pool/cache.redis.yml diff --git a/app/config/cache_pool/cache.tagaware.filesystem.yml b/config/packages/cache_pool/cache.tagaware.filesystem.yml similarity index 90% rename from app/config/cache_pool/cache.tagaware.filesystem.yml rename to config/packages/cache_pool/cache.tagaware.filesystem.yml index 3893f9f4b..13e1b6a72 100644 --- a/app/config/cache_pool/cache.tagaware.filesystem.yml +++ b/config/packages/cache_pool/cache.tagaware.filesystem.yml @@ -1,9 +1,9 @@ # Optimized File cache adapter (from: https://github.com/ezsystems/symfony-tools) # # Loaded by default, for use on single server setups. -# If you are on Windows you would have to use `cache.app` by setting `env(CACHE_POOL): "cache.app"` parameter services: cache.tagaware.filesystem: + public: true # @todo should be private class: Symfony\Component\Cache\Adapter\TagAware\FilesystemTagAwareAdapter parent: cache.adapter.filesystem tags: diff --git a/app/config/default_layouts.yml b/config/packages/default_layouts.yml similarity index 100% rename from app/config/default_layouts.yml rename to config/packages/default_layouts.yml diff --git a/app/config/default_parameters.yml b/config/packages/default_parameters.yaml similarity index 95% rename from app/config/default_parameters.yml rename to config/packages/default_parameters.yaml index 76ae7cd8e..92b2f7391 100644 --- a/app/config/default_parameters.yml +++ b/config/packages/default_parameters.yaml @@ -128,10 +128,10 @@ parameters: # Top menu parameters app.top_menu.parent_location_id: 2 - app.top_menu.includedContentTypeIdentifier: ["folder", "article", "place_list", "product_list", "blog", "about", "landing_page"] + app.top_menu.included_content_type_identifier: ["folder", "article", "place_list", "product_list", "blog", "about", "landing_page"] # Subscribe location id: 227 - demo, 228 - ee demo - ezsettings.default.app_subscribe_location_id: 228 + ezsettings.default.app_subscribe_location_id: 232 # locationIds used for fetching items on home page app.home.place_list_location_id: 223 @@ -144,7 +144,7 @@ parameters: # 12 - members, 13 administrator_users, 14 - editors app.premium_content.allowed_user_groups.location_ids: [12, 13, 14] - app.migration_reference_file: '/src/AppBundle/MigrationVersions/References/references.yml' + app.migration_reference_file: '/src/App/MigrationVersions/References/references.yml' app.migration.values_mapping: app.home.place_list_location_id: 'ref_location_place_list__home__places_and_tastes__places' diff --git a/config/packages/dev/debug.yaml b/config/packages/dev/debug.yaml new file mode 100644 index 000000000..26d4e53d2 --- /dev/null +++ b/config/packages/dev/debug.yaml @@ -0,0 +1,4 @@ +debug: + # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. + # See the "server:dump" command to start a new server. + dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" diff --git a/config/packages/dev/easy_log_handler.yaml b/config/packages/dev/easy_log_handler.yaml new file mode 100644 index 000000000..27bfc6087 --- /dev/null +++ b/config/packages/dev/easy_log_handler.yaml @@ -0,0 +1,16 @@ +services: + EasyCorp\EasyLog\EasyLogHandler: + public: false + arguments: ['%kernel.logs_dir%/%kernel.environment%.log'] + +#// FIXME: How to add this configuration automatically without messing up with the monolog configuration? +#monolog: +# handlers: +# buffered: +# type: buffer +# handler: easylog +# channels: ['!event'] +# level: debug +# easylog: +# type: service +# id: EasyCorp\EasyLog\EasyLogHandler diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml new file mode 100644 index 000000000..b1998da1a --- /dev/null +++ b/config/packages/dev/monolog.yaml @@ -0,0 +1,19 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info + console: + type: console + process_psr_3_messages: false + channels: ["!event", "!doctrine", "!console"] diff --git a/config/packages/dev/routing.yaml b/config/packages/dev/routing.yaml new file mode 100644 index 000000000..4116679a2 --- /dev/null +++ b/config/packages/dev/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: true diff --git a/config/packages/dev/swiftmailer.yaml b/config/packages/dev/swiftmailer.yaml new file mode 100644 index 000000000..b98158ee1 --- /dev/null +++ b/config/packages/dev/swiftmailer.yaml @@ -0,0 +1,4 @@ +# See https://symfony.com/doc/current/email/dev_environment.html +swiftmailer: + # send all emails to a specific address + #delivery_addresses: ['me@example.com'] diff --git a/config/packages/dev/web_profiler.yaml b/config/packages/dev/web_profiler.yaml new file mode 100644 index 000000000..e92166a7f --- /dev/null +++ b/config/packages/dev/web_profiler.yaml @@ -0,0 +1,6 @@ +web_profiler: + toolbar: true + intercept_redirects: false + +framework: + profiler: { only_exceptions: false } diff --git a/app/config/dfs/dfs.yml b/config/packages/dfs/dfs.yml similarity index 100% rename from app/config/dfs/dfs.yml rename to config/packages/dfs/dfs.yml diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml new file mode 100644 index 000000000..9521fad7d --- /dev/null +++ b/config/packages/doctrine.yaml @@ -0,0 +1,29 @@ +parameters: + # Adds a fallback DATABASE_URL if the env var is not set. + # This allows you to run cache:warmup even if your + # environment variables are not available yet. + # You should not need to change this value. + env(DATABASE_URL): '' + +doctrine: + dbal: + # configure these for your database server + driver: 'pdo_mysql' + server_version: '5.7' + charset: utf8mb4 + default_table_options: + charset: utf8mb4 + collate: utf8mb4_unicode_ci + + url: '%env(resolve:DATABASE_URL)%' + orm: + auto_generate_proxy_classes: true + naming_strategy: doctrine.orm.naming_strategy.underscore + auto_mapping: true + mappings: + App: + is_bundle: false + type: annotation + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App diff --git a/config/packages/doctrine_cache.yaml b/config/packages/doctrine_cache.yaml new file mode 100644 index 000000000..2a1fc2143 --- /dev/null +++ b/config/packages/doctrine_cache.yaml @@ -0,0 +1,10 @@ +doctrine_cache: + aliases: + apc_cache: my_apc_cache + + providers: + my_apc_cache: + type: apc + namespace: my_apc_cache_ns + aliases: + - apc_cache diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml new file mode 100644 index 000000000..3bf0fbcae --- /dev/null +++ b/config/packages/doctrine_migrations.yaml @@ -0,0 +1,5 @@ +doctrine_migrations: + dir_name: '%kernel.project_dir%/src/Migrations' + # namespace is arbitrary but should be different from App\Migrations + # as migrations classes should NOT be autoloaded + namespace: DoctrineMigrations diff --git a/app/config/ezplatform.yml b/config/packages/ezplatform.yaml similarity index 84% rename from app/config/ezplatform.yml rename to config/packages/ezplatform.yaml index 50b863c9d..6b9481700 100644 --- a/app/config/ezplatform.yml +++ b/config/packages/ezplatform.yaml @@ -3,10 +3,10 @@ imports: - { resource: views.yml } - { resource: fields/ezrichtext/custom_tags.yml } - { resource: workflows.yml } + - { resource: default_parameters.yaml } ezpublish: # HttpCache settings, By default 'local' (Symfony HttpCache Proxy), by setting it to 'http' you can point it to Varnish - # You may also set it to 'fastly' if you want to use the fastly CDN http_cache: purge_type: '%purge_type%' @@ -57,12 +57,8 @@ ezpublish: default_ttl: '%httpcache_default_ttl%' # HttpCache purge server(s) setting, eg Varnish, for when ezpublish.http_cache.purge_type is set to 'http'. http_cache: - # If using fastly, 'purge_server' must be set to 'https://api.fastly.com' purge_servers: ['%purge_server%'] - varnish_invalidate_token: '%varnish_invalidate_token%' - fastly: - service_id: '%fastly_service_id%' - key: '%fastly_key%' + # varnish_invalidate_token: '%varnish_invalidate_token%' # @todo enable ezplatform-http-cache first site_group: design: main @@ -83,9 +79,6 @@ ezpublish: - 43 # Media - 48 # Setup - 249 # Forms - subtree_paths: - content: /1/2/ - media: /1/43/ site: languages: [eng-GB, fre-FR, ger-DE, nor-NO] @@ -103,6 +96,30 @@ ezpublish: slug_converter: transformation: 'urlalias_lowercase' +framework: + translator: { fallback: '%locale_fallback%' } + validation: { enable_annotations: true } + default_locale: '%locale_fallback%' + esi: true + fragments: true + session: + # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id + # if handler_id set to null will use default session handler from php.ini + handler_id: '%ezplatform.session.handler_id%' + save_path: '%ezplatform.session.save_path%' + # Note: eZ Platform 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: http://doc.ezplatform.com/en/latest/guide/sessions/ + http_method_override: true + templating: + engines: [twig] + cache: + pools: + cache.array: + adapter: cache.adapter.array + default_lifetime: 3600 + public: true + tags: true ezdesign: design_list: main: [tastefulplanet] diff --git a/config/packages/ezplatform_admin_ui.yaml b/config/packages/ezplatform_admin_ui.yaml new file mode 100644 index 000000000..d3f305f47 --- /dev/null +++ b/config/packages/ezplatform_admin_ui.yaml @@ -0,0 +1,37 @@ +parameters: + # Admin siteaccess group name + admin_group_name: admin_group + +ezpublish: + siteaccess: + list: [admin] + groups: + # WARNING: Do not remove or rename this group. + # It's used to distinguish common siteaccesses from admin ones. + # In case of multisite with multiple admin panels, remember to add any additional admin siteaccess to this group. + admin_group: [admin] + + system: + admin_group: + # For admin this needs to contain all languages you want to translate content to on the given repository. + languages: [eng-GB] + content_tree_module: + contextual_tree_root_location_ids: + - 2 # Home (Content structure) + - 5 # Users + - 43 # Media + - 48 # Setup + subtree_paths: + content: /1/2/ + media: /1/43/ + +jms_translation: + configs: + admin: + dirs: + - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui/src' + output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui/src/bundle/Resources/translations/' + excluded_dirs: [Behat, Tests, node_modules] + extractor: + - ez_policy + output_format: "xliff" diff --git a/config/packages/ezplatform_admin_ui_modules.yaml b/config/packages/ezplatform_admin_ui_modules.yaml new file mode 100644 index 000000000..c80a5094d --- /dev/null +++ b/config/packages/ezplatform_admin_ui_modules.yaml @@ -0,0 +1,8 @@ +jms_translation: + configs: + admin_modules: + dirs: + - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui-modules/src' + output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-admin-ui-modules/Resources/translations/' + excluded_dirs: [Behat, Tests, node_modules] + output_format: "xliff" diff --git a/config/packages/ezplatform_assets.yaml b/config/packages/ezplatform_assets.yaml new file mode 100644 index 000000000..316b21a14 --- /dev/null +++ b/config/packages/ezplatform_assets.yaml @@ -0,0 +1,10 @@ +webpack_encore: + output_path: "%kernel.project_dir%/public/assets/build" + builds: + ezplatform: "%kernel.project_dir%/public/assets/ezplatform/build" + +framework: + assets: + packages: + ezplatform: + json_manifest_path: '%kernel.project_dir%/public/assets/ezplatform/build/manifest.json' diff --git a/config/packages/ezplatform_doctrine_schema.yaml b/config/packages/ezplatform_doctrine_schema.yaml new file mode 100644 index 000000000..08ddf4e5e --- /dev/null +++ b/config/packages/ezplatform_doctrine_schema.yaml @@ -0,0 +1,11 @@ +parameters: + database_charset: '%env(DATABASE_CHARSET)%' + # collation currently has effect on MySQL only + database_collation: '%env(DATABASE_COLLATION)%' + +# If you are not using MySQL, you can comment-out this section +ez_doctrine_schema: + tables: + options: + charset: '%database_charset%' + collate: '%database_collation%' diff --git a/config/packages/ezplatform_form_builder.yaml b/config/packages/ezplatform_form_builder.yaml new file mode 100644 index 000000000..439e140b4 --- /dev/null +++ b/config/packages/ezplatform_form_builder.yaml @@ -0,0 +1,8 @@ +jms_translation: + configs: + form_builder: + dirs: + - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-form-builder/src' + output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-form-builder/src/bundle/Resources/translations/' + excluded_dirs: [Behat, Tests] + output_format: "xliff" diff --git a/config/packages/ezplatform_http_cache.yaml b/config/packages/ezplatform_http_cache.yaml new file mode 100644 index 000000000..9638acc42 --- /dev/null +++ b/config/packages/ezplatform_http_cache.yaml @@ -0,0 +1,24 @@ +## FOSHttpCache Configuration +fos_http_cache: + cache_control: + rules: + # Make sure already cacheable (fresh) responses from eZ Platform which are errors/redirect gets lower ttl (then default_ttl) + - + match: + match_response: "response.isFresh() && ( response.isServerError() || response.isClientError() || response.isRedirect() )" + headers: + overwrite: true + cache_control: + max_age: 5 + s_maxage: 20 + # Example of performance tuning, force TTL on 404 pages to avoid crawlers / ... taking to much load + # Should not be set to high, as cached 404's can cause issues for future routes, url aliases, wildcards, .. + - + match: + match_response: "!response.isFresh() && response.isNotFound()" + headers: + overwrite: true + cache_control: + public: true + max_age: 0 + s_maxage: 20 diff --git a/config/packages/ezplatform_page_builder.yaml b/config/packages/ezplatform_page_builder.yaml new file mode 100644 index 000000000..139c95a45 --- /dev/null +++ b/config/packages/ezplatform_page_builder.yaml @@ -0,0 +1,11 @@ +parameters: + page_builder.token_authenticator.enabled: true + +jms_translation: + configs: + page_builder: + dirs: + - '%kernel.root_dir%/../vendor/ezsystems/ezplatform-page-builder/src' + output_dir: '%kernel.root_dir%/../vendor/ezsystems/ezplatform-page-builder/src/bundle/Resources/translations/' + excluded_dirs: [Behat, Tests] + output_format: "xlf" diff --git a/config/packages/ezplatform_solr.yaml b/config/packages/ezplatform_solr.yaml new file mode 100644 index 000000000..b09b1e75d --- /dev/null +++ b/config/packages/ezplatform_solr.yaml @@ -0,0 +1,18 @@ +# Base configuration for Solr, for more options see: https://doc.ezplatform.com/en/latest/guide/search/#solr-bundle +# Can have several connections used by each eZ Repositories in ezplatform.yml +parameters: + # Solr root endpoint, relevant if `solr` is set as search_engine + solr_dsn: '%env(SOLR_DSN)%' + solr_core: '%env(SOLR_CORE)%' + +ez_search_engine_solr: + endpoints: + endpoint0: + dsn: '%solr_dsn%' + core: '%solr_core%' + connections: + default: + entry_endpoints: + - endpoint0 + mapping: + default: endpoint0 diff --git a/app/config/field_templates.yml b/config/packages/field_templates.yml similarity index 100% rename from app/config/field_templates.yml rename to config/packages/field_templates.yml diff --git a/app/config/fields/ezrichtext/custom_tags.yml b/config/packages/fields/ezrichtext/custom_tags.yml similarity index 100% rename from app/config/fields/ezrichtext/custom_tags.yml rename to config/packages/fields/ezrichtext/custom_tags.yml diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 000000000..d3f1bc5c8 --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,15 @@ +framework: + secret: '%env(APP_SECRET)%' + #default_locale: en + #csrf_protection: true + #http_method_override: true + + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: ~ + cookie_secure: auto + cookie_samesite: lax + + php_errors: + log: true diff --git a/config/packages/graphql.yaml b/config/packages/graphql.yaml new file mode 100644 index 000000000..640f8d9e3 --- /dev/null +++ b/config/packages/graphql.yaml @@ -0,0 +1,9 @@ +overblog_graphql: + definitions: + mappings: + auto_discover: false + types: + - + type: yaml + dir: "%kernel.project_dir%/config/graphql/types" + suffix: ~ diff --git a/config/packages/gregwar_captcha.yaml b/config/packages/gregwar_captcha.yaml new file mode 100644 index 000000000..8c14bd234 --- /dev/null +++ b/config/packages/gregwar_captcha.yaml @@ -0,0 +1,2 @@ +gregwar_captcha: + as_url: true diff --git a/app/config/image_variations.yml b/config/packages/image_variations.yml similarity index 100% rename from app/config/image_variations.yml rename to config/packages/image_variations.yml diff --git a/config/packages/jms_translation.yaml b/config/packages/jms_translation.yaml new file mode 100644 index 000000000..0b6cee505 --- /dev/null +++ b/config/packages/jms_translation.yaml @@ -0,0 +1,6 @@ +jms_translation: + source_language: en + locales: [en] + dumper: + add_references: false + add_date: false diff --git a/config/packages/lexik_jwt_authentication.yaml b/config/packages/lexik_jwt_authentication.yaml new file mode 100644 index 000000000..42ddd3cea --- /dev/null +++ b/config/packages/lexik_jwt_authentication.yaml @@ -0,0 +1,12 @@ +lexik_jwt_authentication: + secret_key: '%env(APP_SECRET)%' + encoder: + signature_algorithm: HS256 + # Disabled by default, because Page builder use an custom extractor + token_extractors: + authorization_header: + enabled: false + cookie: + enabled: false + query_parameter: + enabled: false diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml new file mode 100644 index 000000000..cec90474f --- /dev/null +++ b/config/packages/liip_imagine.yaml @@ -0,0 +1,4 @@ +# See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html +liip_imagine: + # valid drivers options include "gd" or "gmagick" or "imagick" + driver: "gd" diff --git a/config/packages/nelmio_cors.yaml b/config/packages/nelmio_cors.yaml new file mode 100644 index 000000000..6f202c264 --- /dev/null +++ b/config/packages/nelmio_cors.yaml @@ -0,0 +1,10 @@ +nelmio_cors: + defaults: + origin_regex: true + allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] + allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] + allow_headers: ['Content-Type', 'Authorization'] + expose_headers: ['Link'] + max_age: 3600 + paths: + '^/': ~ diff --git a/config/packages/oneup_flysystem.yaml b/config/packages/oneup_flysystem.yaml new file mode 100644 index 000000000..50b807665 --- /dev/null +++ b/config/packages/oneup_flysystem.yaml @@ -0,0 +1,10 @@ +# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle/tree/master/Resources/doc/index.md +oneup_flysystem: + adapters: + default_adapter: + local: + directory: '%kernel.cache_dir%/flysystem' + filesystems: + default_filesystem: + adapter: default_adapter + alias: League\Flysystem\Filesystem diff --git a/config/packages/prod/doctrine.yaml b/config/packages/prod/doctrine.yaml new file mode 100644 index 000000000..0a7c53b44 --- /dev/null +++ b/config/packages/prod/doctrine.yaml @@ -0,0 +1,32 @@ +doctrine: + orm: + auto_generate_proxy_classes: false + metadata_cache_driver: + type: service + id: doctrine.system_cache_provider + query_cache_driver: + type: service + id: doctrine.system_cache_provider + result_cache_driver: + type: service + id: doctrine.result_cache_provider + +services: + doctrine.result_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.result_cache_pool' + doctrine.system_cache_provider: + class: Symfony\Component\Cache\DoctrineProvider + public: false + arguments: + - '@doctrine.system_cache_pool' + +framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml new file mode 100644 index 000000000..96dbf9693 --- /dev/null +++ b/config/packages/prod/monolog.yaml @@ -0,0 +1,25 @@ +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + excluded_404s: + # regex: exclude all 404 errors from the logs + - ^/ + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console + process_psr_3_messages: false + channels: ["!event", "!doctrine"] + deprecation: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" + deprecation_filter: + type: filter + handler: deprecation + max_level: info + channels: ["php"] diff --git a/config/packages/prod/webpack_encore.yaml b/config/packages/prod/webpack_encore.yaml new file mode 100644 index 000000000..d0b3ba81e --- /dev/null +++ b/config/packages/prod/webpack_encore.yaml @@ -0,0 +1,4 @@ +#webpack_encore: + # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) + # Available in version 1.2 + #cache: true diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 000000000..42f0e8088 --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,118 @@ +framework: + router: + strict_requirements: ~ + utf8: true + + +# +#login: +# path: /login +# defaults: { _controller: ezpublish.security.controller:loginAction } +# +#login_check: +# path: /login_check +# +#logout: +# path: /logout +# +#kernel.internal: +# resource: '@EzPublishCoreBundle/Resources/config/routing/internal.yml' +# +#kernel.rest: +# resource: '@EzPlatformRestBundle/Resources/config/routing.yml' +# prefix: '%ezpublish_rest.path_prefix%' +# +#kernel.rest.options: +# resource: '@EzPlatformRestBundle/Resources/config/routing.yml' +# prefix: '%ezpublish_rest.path_prefix%' +# type: rest_options +# +#ezplatform.admin_ui: +# resource: '@EzPlatformAdminUiBundle/Resources/config/routing.yml' +# defaults: +# siteaccess_group_whitelist: '%admin_group_name%' +# +#ezplatform.admin_ui.rest: +# resource: '@EzPlatformAdminUiBundle/Resources/config/routing_rest.yml' +# prefix: '%ezpublish_rest.path_prefix%' +# +#ezplatform.user: +# resource: '@EzPlatformUserBundle/Resources/config/routing.yml' +# +#ezplatform.ee.page_builder: +# resource: '@EzPlatformPageBuilderBundle/Resources/config/routing.yml' +# defaults: +# siteaccess_group_whitelist: '%admin_group_name%' +# +#ezplatform.ee.form_builder: +# resource: '@EzPlatformFormBuilderBundle/Resources/config/routing.yml' +# defaults: +# siteaccess_group_whitelist: '%admin_group_name%' +# +#_ezplatformRepositoryFormsRoutes: +# resource: '@EzSystemsRepositoryFormsBundle/Resources/config/routing.yml' +# +#ezplatform.ee.dependencies.bazinga: +# resource: '@BazingaJsTranslationBundle/Resources/config/routing/routing.yml' +# +#ezplatform.ee.fieldtype.page: +# resource: '@EzPlatformPageFieldTypeBundle/Resources/config/routing.yml' +# +#ezplatform.ee.date_based_publisher: +# resource: '@EzSystemsDateBasedPublisherBundle/Resources/config/routing.yml' +# prefix: '%ez_systems_date_based_publisher_rest_prefix%' +# +#ezplatform.ee.flex_workflow: +# resource: '@FlexWorkflowBundle/Resources/config/routing.yml' +# +#ezplatform.ee.workflow: +# resource: '@EzPlatformWorkflowBundle/Resources/config/routing.yml' +# +##recommendationBundleRestRoutes: +## resource: "@EzSystemsRecommendationBundle/Resources/config/routing_rest.yml" +## prefix: %ezpublish_rest.path_prefix% +# +#fos.js_routing: +# resource: '@FOSJsRoutingBundle/Resources/config/routing/routing.xml' +# +#ezplatform.httpcache: +# resource: '@EzSystemsPlatformHttpCacheBundle/Resources/config/routing.yml' +# +##_eztagsRoutes: +## resource: "@NetgenTagsBundle/Resources/config/routing.yml" +# +##_novaezseoRoutes: +## resource: "@NovaeZSEOBundle/Controller/" +## type: annotation +## prefix: / +# +#app.submitted: +# path: /contact/submitted +# defaults: +# _controller: app.controller.contactform:submittedAction +# template: "@ezdesign/full/contact_form_submitted.html.twig" +# methods: [GET] +# +#gregwar_captcha_routing: +# resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml" +# +## Custom redirection from /ez to /admin, feel free to adjust to your needs or remove if you don't need it +#platform1_admin_route: +# path: /ez +# controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction +# defaults: +# path: /admin +# permanent: true +# +## +## GraphQL +## +# +#overblog_graphql: +# resource: "@OverblogGraphQLBundle/Resources/config/routing/graphql.yml" +# +#overblog_graphql_endpoint: +# path: /graphql +# defaults: +# _controller: Overblog\GraphQLBundle\Controller\GraphController::endpointAction +# _format: json diff --git a/app/config/security.yml b/config/packages/security.yaml similarity index 57% rename from app/config/security.yml rename to config/packages/security.yaml index 4f9dea8a5..b82e05054 100644 --- a/app/config/security.yml +++ b/config/packages/security.yaml @@ -1,3 +1,29 @@ +#security: +# # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers +# providers: +# in_memory: { memory: ~ } +# firewalls: +# dev: +# pattern: ^/(_(profiler|wdt)|css|images|js)/ +# security: false +# main: +# anonymous: true +# +# # activate different ways to authenticate +# +# # http_basic: true +# # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate +# +# # form_login: true +# # https://symfony.com/doc/current/security/form_login_setup.html +# +# # Easy way to control access for large sections of your site +# # Note: Only the *first* access control that matches will be used +# access_control: +# # - { path: ^/admin, roles: ROLE_ADMIN } +# # - { path: ^/profile, roles: ROLE_USER } +# + # To get started with security, check out the documentation: # https://symfony.com/doc/current/security.html security: @@ -5,8 +31,8 @@ security: providers: ezpublish: id: ezpublish.security.user_provider -#! in_memory: -#! memory: ~ + #! in_memory: + #! memory: ~ firewalls: # disables authentication for assets and the profiler, adapt it according to your needs diff --git a/config/packages/security_checker.yaml b/config/packages/security_checker.yaml new file mode 100644 index 000000000..615e2d761 --- /dev/null +++ b/config/packages/security_checker.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + + SensioLabs\Security\SecurityChecker: ~ + + SensioLabs\Security\Command\SecurityCheckerCommand: ~ diff --git a/config/packages/sensio_framework_extra.yaml b/config/packages/sensio_framework_extra.yaml new file mode 100644 index 000000000..1821ccc07 --- /dev/null +++ b/config/packages/sensio_framework_extra.yaml @@ -0,0 +1,3 @@ +sensio_framework_extra: + router: + annotations: false diff --git a/config/packages/swiftmailer.yaml b/config/packages/swiftmailer.yaml new file mode 100644 index 000000000..cae65084a --- /dev/null +++ b/config/packages/swiftmailer.yaml @@ -0,0 +1,3 @@ +swiftmailer: + url: '%env(MAILER_URL)%' + spool: { type: 'memory' } diff --git a/config/packages/test/framework.yaml b/config/packages/test/framework.yaml new file mode 100644 index 000000000..d051c8400 --- /dev/null +++ b/config/packages/test/framework.yaml @@ -0,0 +1,4 @@ +framework: + test: true + session: + storage_id: session.storage.mock_file diff --git a/config/packages/test/monolog.yaml b/config/packages/test/monolog.yaml new file mode 100644 index 000000000..2762653c8 --- /dev/null +++ b/config/packages/test/monolog.yaml @@ -0,0 +1,7 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] diff --git a/config/packages/test/routing.yaml b/config/packages/test/routing.yaml new file mode 100644 index 000000000..4116679a2 --- /dev/null +++ b/config/packages/test/routing.yaml @@ -0,0 +1,3 @@ +framework: + router: + strict_requirements: true diff --git a/config/packages/test/swiftmailer.yaml b/config/packages/test/swiftmailer.yaml new file mode 100644 index 000000000..f43807805 --- /dev/null +++ b/config/packages/test/swiftmailer.yaml @@ -0,0 +1,2 @@ +swiftmailer: + disable_delivery: true diff --git a/config/packages/test/validator.yaml b/config/packages/test/validator.yaml new file mode 100644 index 000000000..1e5ab7880 --- /dev/null +++ b/config/packages/test/validator.yaml @@ -0,0 +1,3 @@ +framework: + validation: + not_compromised_password: false diff --git a/config/packages/test/web_profiler.yaml b/config/packages/test/web_profiler.yaml new file mode 100644 index 000000000..03752de21 --- /dev/null +++ b/config/packages/test/web_profiler.yaml @@ -0,0 +1,6 @@ +web_profiler: + toolbar: false + intercept_redirects: false + +framework: + profiler: { collect: false } diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml new file mode 100644 index 000000000..e6b1cd667 --- /dev/null +++ b/config/packages/translation.yaml @@ -0,0 +1,6 @@ +framework: + default_locale: '%locale%' + translator: + default_path: '%kernel.project_dir%/translations' + fallbacks: + - '%locale%' diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml new file mode 100644 index 000000000..d1582a23d --- /dev/null +++ b/config/packages/twig.yaml @@ -0,0 +1,4 @@ +twig: + default_path: '%kernel.project_dir%/templates' + debug: '%kernel.debug%' + strict_variables: '%kernel.debug%' diff --git a/config/packages/twig_extensions.yaml b/config/packages/twig_extensions.yaml new file mode 100644 index 000000000..0881cc958 --- /dev/null +++ b/config/packages/twig_extensions.yaml @@ -0,0 +1,11 @@ +services: + _defaults: + public: false + autowire: true + autoconfigure: true + + # Uncomment any lines below to activate that Twig extension + #Twig\Extensions\ArrayExtension: ~ + #Twig\Extensions\DateExtension: ~ + #Twig\Extensions\IntlExtension: ~ + #Twig\Extensions\TextExtension: ~ diff --git a/config/packages/validator.yaml b/config/packages/validator.yaml new file mode 100644 index 000000000..a695e1a62 --- /dev/null +++ b/config/packages/validator.yaml @@ -0,0 +1,3 @@ +framework: + validation: + email_validation_mode: html5 diff --git a/app/config/views.yml b/config/packages/views.yml similarity index 95% rename from app/config/views.yml rename to config/packages/views.yml index 40e64b75d..45a04d837 100644 --- a/app/config/views.yml +++ b/config/packages/views.yml @@ -39,7 +39,7 @@ ezpublish: Identifier\ContentType: [folder] params: query: - query_type: "AppBundle:Children" + query_type: "App:Children" parameters: parent_location_id: "@=location.id" assign_results_to: children @@ -56,7 +56,7 @@ ezpublish: Identifier\ContentType: [place_list] params: query: - query_type: "AppBundle:Children" + query_type: "App:Children" parameters: parent_location_id: "@=location.id" assign_results_to: places @@ -68,7 +68,7 @@ ezpublish: Identifier\ContentType: [blog] params: query: - query_type: "AppBundle:Children" + query_type: "App:Children" parameters: parent_location_id: "@=location.id" assign_results_to: children @@ -79,7 +79,7 @@ ezpublish: Identifier\ContentType: [blog_post] subscribe: - controller: app.controller.contactform:showContactFormAction + controller: App\Controller\ContactFormController::showContactFormAction template: "@ezdesign/full/subscribe.html.twig" match: Identifier\ContentType: [subscribe] @@ -95,12 +95,12 @@ ezpublish: Identifier\ContentType: [product] product_list: - controller: "app.controller.product_list_controller:contentQueryPaginationAction" + controller: App\Controller\ProductListController::contentQueryPaginationAction params: page_limit: 12 view_type: card query: - query_type: "AppBundle:Children" + query_type: "App:Children" parameters: parent_location_id: '@=location.id' included_content_type_identifier: 'product' @@ -125,7 +125,7 @@ ezpublish: template: '@ezdesign/home/place_list.html.twig' params: query: - query_type: 'AppBundle:Children' + query_type: 'App:Children' parameters: limit: 3 parent_location_id: '@=location.id' @@ -139,7 +139,7 @@ ezpublish: template: '@ezdesign/home/tastes.html.twig' params: query: - query_type: 'AppBundle:Children' + query_type: 'App:Children' parameters: limit: 3 parent_location_id: '@=location.id' diff --git a/config/packages/webpack_encore.yaml b/config/packages/webpack_encore.yaml new file mode 100644 index 000000000..47e9b129d --- /dev/null +++ b/config/packages/webpack_encore.yaml @@ -0,0 +1,13 @@ +webpack_encore: + # The path where Encore is building the assets. + # This should match Encore.setOutputPath() in webpack.config.js. + output_path: '%kernel.project_dir%/public/assets/build' + # If multiple builds are defined (as shown below), you can disable the default build: + # output_path: false + + # if using Encore.enableIntegrityHashes() specify the crossorigin attribute value (default: false, or use 'anonymous' or 'use-credentials') + # crossorigin: 'anonymous' + + # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) + # Available in version 1.2 + cache: '%kernel.debug%' diff --git a/config/packages/workflow.yaml b/config/packages/workflow.yaml new file mode 100644 index 000000000..2a716ff0a --- /dev/null +++ b/config/packages/workflow.yaml @@ -0,0 +1,2 @@ +framework: + workflows: ~ diff --git a/app/config/workflows.yml b/config/packages/workflows.yml similarity index 100% rename from app/config/workflows.yml rename to config/packages/workflows.yml diff --git a/config/routes.yaml b/config/routes.yaml new file mode 100644 index 000000000..c3283aa2e --- /dev/null +++ b/config/routes.yaml @@ -0,0 +1,3 @@ +#index: +# path: / +# controller: App\Controller\DefaultController::index diff --git a/config/routes/annotations.yaml b/config/routes/annotations.yaml new file mode 100644 index 000000000..d49a502a8 --- /dev/null +++ b/config/routes/annotations.yaml @@ -0,0 +1,3 @@ +controllers: + resource: ../../src/Controller/ + type: annotation diff --git a/config/routes/behat/ezplatform_behat.yaml b/config/routes/behat/ezplatform_behat.yaml new file mode 100644 index 000000000..49c9759f3 --- /dev/null +++ b/config/routes/behat/ezplatform_behat.yaml @@ -0,0 +1,2 @@ +_ezplatform_behat: + resource: '@eZBehatBundle/Resources/config/routing.yaml' diff --git a/config/routes/dev/graphiql.yaml b/config/routes/dev/graphiql.yaml new file mode 100644 index 000000000..d8c38835c --- /dev/null +++ b/config/routes/dev/graphiql.yaml @@ -0,0 +1,2 @@ +overblog_graphql_graphiql: + resource: "@OverblogGraphiQLBundle/Resources/config/routing.xml" diff --git a/config/routes/dev/twig.yaml b/config/routes/dev/twig.yaml new file mode 100644 index 000000000..f4ee83960 --- /dev/null +++ b/config/routes/dev/twig.yaml @@ -0,0 +1,3 @@ +_errors: + resource: '@TwigBundle/Resources/config/routing/errors.xml' + prefix: /_error diff --git a/config/routes/dev/web_profiler.yaml b/config/routes/dev/web_profiler.yaml new file mode 100644 index 000000000..c82beff2f --- /dev/null +++ b/config/routes/dev/web_profiler.yaml @@ -0,0 +1,7 @@ +web_profiler_wdt: + resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' + prefix: /_wdt + +web_profiler_profiler: + resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' + prefix: /_profiler diff --git a/config/routes/ezplatform.yaml b/config/routes/ezplatform.yaml new file mode 100644 index 000000000..33a964751 --- /dev/null +++ b/config/routes/ezplatform.yaml @@ -0,0 +1,12 @@ +login: + path: /login + defaults: { _controller: ezpublish.security.controller:loginAction } + +login_check: + path: /login_check + +logout: + path: /logout + +ezplatform_kernel_internal: + resource: '@EzPublishCoreBundle/Resources/config/routing/internal.yml' diff --git a/config/routes/ezplatform_admin_ui.yaml b/config/routes/ezplatform_admin_ui.yaml new file mode 100644 index 000000000..be565b7bf --- /dev/null +++ b/config/routes/ezplatform_admin_ui.yaml @@ -0,0 +1,8 @@ +ezplatform_admin_ui: + resource: '@EzPlatformAdminUiBundle/Resources/config/routing.yaml' + defaults: + siteaccess_group_whitelist: '%admin_group_name%' + +ezplatform_admin_ui_rest: + resource: '@EzPlatformAdminUiBundle/Resources/config/routing_rest.yaml' + prefix: '%ezpublish_rest.path_prefix%' diff --git a/config/routes/ezplatform_calendar.yaml b/config/routes/ezplatform_calendar.yaml new file mode 100644 index 000000000..3c675d958 --- /dev/null +++ b/config/routes/ezplatform_calendar.yaml @@ -0,0 +1,8 @@ +ezplatform.ee.calendar: + resource: '@EzPlatformCalendarBundle/Resources/config/routing.yaml' + defaults: + siteaccess_group_whitelist: '%admin_group_name%' + +ezplatform.ee.calendar.rest: + resource: '@EzPlatformCalendarBundle/Resources/config/routing_rest.yaml' + prefix: '%ezpublish_rest.path_prefix%' diff --git a/config/routes/ezplatform_date_based_publisher.yaml b/config/routes/ezplatform_date_based_publisher.yaml new file mode 100644 index 000000000..b97fef533 --- /dev/null +++ b/config/routes/ezplatform_date_based_publisher.yaml @@ -0,0 +1,3 @@ +ezplatform.ee.date_based_publisher: + resource: '@EzSystemsDateBasedPublisherBundle/Resources/config/routing.yaml' + prefix: '%ez_systems_date_based_publisher_rest_prefix%' diff --git a/config/routes/ezplatform_flex_workflow.yaml b/config/routes/ezplatform_flex_workflow.yaml new file mode 100644 index 000000000..96467167b --- /dev/null +++ b/config/routes/ezplatform_flex_workflow.yaml @@ -0,0 +1,2 @@ +ezplatform.ee.flex_workflow: + resource: '@FlexWorkflowBundle/Resources/config/routing.yaml' diff --git a/config/routes/ezplatform_form_builder.yaml b/config/routes/ezplatform_form_builder.yaml new file mode 100644 index 000000000..0c3c61577 --- /dev/null +++ b/config/routes/ezplatform_form_builder.yaml @@ -0,0 +1,4 @@ +ezplatform.ee.form_builder: + resource: '@EzPlatformFormBuilderBundle/Resources/config/routing.yaml' + defaults: + siteaccess_group_whitelist: '%admin_group_name%' diff --git a/config/routes/ezplatform_http_cache.yaml b/config/routes/ezplatform_http_cache.yaml new file mode 100644 index 000000000..761e3e88a --- /dev/null +++ b/config/routes/ezplatform_http_cache.yaml @@ -0,0 +1,2 @@ +#ezplatform_http_cache: +# resource: '@EzSystemsPlatformHttpCacheBundle/Resources/config/routing.yml' diff --git a/config/routes/ezplatform_page_builder.yaml b/config/routes/ezplatform_page_builder.yaml new file mode 100644 index 000000000..0d5757d66 --- /dev/null +++ b/config/routes/ezplatform_page_builder.yaml @@ -0,0 +1,4 @@ +ezplatform.ee.page_builder: + resource: '@EzPlatformPageBuilderBundle/Resources/config/routing.yaml' + defaults: + siteaccess_group_whitelist: '%admin_group_name%' diff --git a/config/routes/ezplatform_page_fieldtype.yaml b/config/routes/ezplatform_page_fieldtype.yaml new file mode 100644 index 000000000..5dbc0b4b6 --- /dev/null +++ b/config/routes/ezplatform_page_fieldtype.yaml @@ -0,0 +1,2 @@ +ezplatform.ee.fieldtype.page: + resource: '@EzPlatformPageFieldTypeBundle/Resources/config/routing.yaml' diff --git a/config/routes/ezplatform_repository_forms.yaml b/config/routes/ezplatform_repository_forms.yaml new file mode 100644 index 000000000..c0d1b7571 --- /dev/null +++ b/config/routes/ezplatform_repository_forms.yaml @@ -0,0 +1,2 @@ +ezplatform_repository_forms: + resource: '@EzSystemsRepositoryFormsBundle/Resources/config/routing.yaml' diff --git a/config/routes/ezplatform_rest.yaml b/config/routes/ezplatform_rest.yaml new file mode 100644 index 000000000..7b11c52c1 --- /dev/null +++ b/config/routes/ezplatform_rest.yaml @@ -0,0 +1,8 @@ +ezplatform_rest: + resource: '@EzPlatformRestBundle/Resources/config/routing.yml' + prefix: '%ezpublish_rest.path_prefix%' + +ezplatform_rest_options: + resource: '@EzPlatformRestBundle/Resources/config/routing.yml' + prefix: '%ezpublish_rest.path_prefix%' + type: rest_options diff --git a/config/routes/ezplatform_user.yaml b/config/routes/ezplatform_user.yaml new file mode 100644 index 000000000..1f4bdcfc9 --- /dev/null +++ b/config/routes/ezplatform_user.yaml @@ -0,0 +1,2 @@ +ezplatform_user: + resource: '@EzPlatformUserBundle/Resources/config/routing.yaml' diff --git a/config/routes/ezplatform_workflow.yaml b/config/routes/ezplatform_workflow.yaml new file mode 100644 index 000000000..7fc2c47e9 --- /dev/null +++ b/config/routes/ezplatform_workflow.yaml @@ -0,0 +1,2 @@ +ezplatform.ee.workflow: + resource: '@EzPlatformWorkflowBundle/Resources/config/routing.yaml' diff --git a/config/routes/fos_js_routing.yaml b/config/routes/fos_js_routing.yaml new file mode 100644 index 000000000..79d25e2cd --- /dev/null +++ b/config/routes/fos_js_routing.yaml @@ -0,0 +1,2 @@ +fos_js_routing: + resource: "@FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml" diff --git a/config/routes/graphql.yaml b/config/routes/graphql.yaml new file mode 100644 index 000000000..b6957e01f --- /dev/null +++ b/config/routes/graphql.yaml @@ -0,0 +1,5 @@ +overblog_graphql_endpoint: + path: /graphql + defaults: + _controller: Overblog\GraphQLBundle\Controller\GraphController::endpointAction + _format: "json" diff --git a/config/routes/gregwar_captcha.yaml b/config/routes/gregwar_captcha.yaml new file mode 100644 index 000000000..713aa8605 --- /dev/null +++ b/config/routes/gregwar_captcha.yaml @@ -0,0 +1,2 @@ +gregwar_captcha_routing: + resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml" diff --git a/config/routes/js_translation.yaml b/config/routes/js_translation.yaml new file mode 100644 index 000000000..c226bb495 --- /dev/null +++ b/config/routes/js_translation.yaml @@ -0,0 +1,2 @@ +bazinga_js_translation: + resource: "@BazingaJsTranslationBundle/Resources/config/routing/routing.yml" diff --git a/config/routes/liip_imagine.yaml b/config/routes/liip_imagine.yaml new file mode 100644 index 000000000..201cbd5d4 --- /dev/null +++ b/config/routes/liip_imagine.yaml @@ -0,0 +1,2 @@ +_liip_imagine: + resource: "@LiipImagineBundle/Resources/config/routing.yaml" diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 000000000..e502a7e62 --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,25 @@ +# This file is the entry point to configure your own services. +# Files in the packages/ subdirectory configure your dependencies. + +# Put parameters here that don't need to change on each machine where the app is deployed +# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration + +imports: + - { resource: services/content.yaml } + - { resource: services/controllers.yaml } + - { resource: services/events.yaml } + - { resource: services/helpers.yaml } + - { resource: services/installer.yaml } + - { resource: services/mailer.yaml } + - { resource: services/migration.yaml } + - { resource: services/query_types.yaml } + - { resource: services/twig.yaml } + +parameters: + locale: 'en' + +services: + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. diff --git a/config/services/content.yaml b/config/services/content.yaml new file mode 100644 index 000000000..5545a77f7 --- /dev/null +++ b/config/services/content.yaml @@ -0,0 +1,6 @@ +services: + _defaults: + autowire: true + autoconfigure: true + + App\PremiumContent\HtmlRenderer: ~ diff --git a/config/services/controllers.yaml b/config/services/controllers.yaml new file mode 100644 index 000000000..087f5211d --- /dev/null +++ b/config/services/controllers.yaml @@ -0,0 +1,27 @@ +services: + # default configuration for services in *this* file + _defaults: + # automatically injects dependencies in your services + autowire: true + # automatically registers your services as commands, event subscribers, etc. + autoconfigure: true + # this means you cannot fetch services directly from the container via $container->get() + # if you need to do this, you can override this setting on individual services + + App\Controller\: + resource: '../../src/Controller/*' + tags: ['controller.service_arguments'] + + App\Controller\MenuController: + public: true + arguments: + $topMenuParentLocationId: '%app.top_menu.parent_location_id%' + $topMenuContentTypeIdentifier: '%app.top_menu.included_content_type_identifier%' + + App\Controller\ProductListController: + public: true + arguments: + $contentViewQueryTypeMapper: '@ezpublish.query_type_content_view_mapper' + + App\Controller\ContactFormController: + public: true diff --git a/config/services/events.yaml b/config/services/events.yaml new file mode 100644 index 000000000..6f4604b34 --- /dev/null +++ b/config/services/events.yaml @@ -0,0 +1,35 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + App\Event\: + resource: '../../src/Event/*' + + App\Event\Subscriber\PlacesBlockSubscriber: + arguments: + $queryType: '@App\QueryType\BlockQueryType' + $tagHandler: '@ezplatform.http_cache.fos_tag_handler.xkey' + + App\Event\Subscriber\TastesBlockSubscriber: + arguments: + $queryType: '@App\QueryType\BlockQueryType' + $tagHandler: '@ezplatform.http_cache.fos_tag_handler.xkey' + + App\Event\TemplateAttributeBlockNameListener: + tags: + - { name: kernel.event_subscriber } + + App\Event\PageFieldType\Attribute\AttributeSerializationSubscriber: ~ + + App\Event\Listener\RenderMenuListener: + arguments: + $personalizationCustomerId: '%ez_recommendation.default.yoochoose.customer_id%' + $personalizationLicenseKey: '%ez_recommendation.default.yoochoose.license_key%' + tags: + - { name: kernel.event_listener, event: ezplatform_admin_ui.menu_configure.main_menu, method: renderMenu, priority: -45 } + + App\Event\Workflow\PublishOnLastStageSubscriber: + arguments: + $publishOnLastStageWorkflows: '%app.workflow.publish_on_last_stage%' diff --git a/config/services/helpers.yaml b/config/services/helpers.yaml new file mode 100644 index 000000000..3bfbe955f --- /dev/null +++ b/config/services/helpers.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + App\Helper\: + resource: '../../src/Helper/*' diff --git a/app/config/services/installer.yml b/config/services/installer.yaml similarity index 58% rename from app/config/services/installer.yml rename to config/services/installer.yaml index b71e3e222..51d944087 100644 --- a/app/config/services/installer.yml +++ b/config/services/installer.yaml @@ -1,21 +1,22 @@ services: - AppBundle\Event\Subscriber\BuildDemoSchemaSubscriber: + App\Event\Subscriber\BuildDemoSchemaSubscriber: autoconfigure: true arguments: - - '@=service("kernel").locateResource("@AppBundle/Resources/schema/demo.yaml")' + - 'src/Resources/schema/demo.yaml' - app.installer.ee-demo_installer: + App\Installer\PlatformEEDemoInstaller: autowire: true + autoconfigure: false parent: ezplatform.installer.db_based_installer - class: AppBundle\Installer\PlatformEEDemoInstaller calls: - [setEnvironment, ["%kernel.environment%"]] tags: - { name: ezplatform.installer, type: ezplatform-ee-demo } - app.installer.demo-test-layouts_installer: + App\Installer\PlatformEEDemoTestLayoutsInstaller: + autowire: true + autoconfigure: false parent: ezplatform.installer.db_based_installer - class: AppBundle\Installer\PlatformEEDemoTestLayoutsInstaller calls: - [setEnvironment, ["%kernel.environment%"]] tags: diff --git a/config/services/mailer.yaml b/config/services/mailer.yaml new file mode 100644 index 000000000..308c777f5 --- /dev/null +++ b/config/services/mailer.yaml @@ -0,0 +1,12 @@ +services: + _defaults: + autowire: true + autoconfigure: true + + App\Mail\Sender: + arguments: + - '@mailer' + - '@translator' + - '@twig' + - '%app.contact_form.sender_email%' + - '%app.contact_form.recipient_email%' diff --git a/app/config/services/migration.yml b/config/services/migration.yaml similarity index 66% rename from app/config/services/migration.yml rename to config/services/migration.yaml index 62ee7f038..ff4f1d5a4 100644 --- a/app/config/services/migration.yml +++ b/config/services/migration.yaml @@ -2,6 +2,8 @@ services: ez_migration_bundle.complex_field.ezlandingpage: parent: ez_migration_bundle.complex_field class: '%ez_migration_bundle.complex_field.ezxmltext.class%' + autowire: true + autoconfigure: false arguments: - '@ez_migration_bundle.reference_resolver.customreference' tags: @@ -10,14 +12,19 @@ services: ez_migration_bundle.complex_field.ezform: parent: ez_migration_bundle.complex_field class: '%ez_migration_bundle.complex_field.ezrichtext.class%' + autowire: true + autoconfigure: false arguments: - - '@ez_migration_bundle.reference_resolver.customreference' + - '@ez_migration_bundle.reference_resolver.customreference' tags: - - { name: ez_migration_bundle.complex_field, fieldtype: ezform, priority: 0 } + - { name: ez_migration_bundle.complex_field, fieldtype: ezform, priority: 0 } - AppBundle\Migration\FieldHandler\EzImageAsset: - parent: ez_migration_bundle.complex_field - arguments: - - '@ez_migration_bundle.reference_resolver.customreference' + App\Migration\FieldHandler\EzImageAsset: + autowire: true + autoconfigure: false tags: - { name: ez_migration_bundle.complex_field, fieldtype: ezimageasset, priority: 0 } + + # hack for migration bundle + ezpublish.fieldType.ezpage.pageService: + synthetic: true diff --git a/config/services/query_types.yaml b/config/services/query_types.yaml new file mode 100644 index 000000000..447112da4 --- /dev/null +++ b/config/services/query_types.yaml @@ -0,0 +1,20 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + App\QueryType\: + resource: '../../src/QueryType/*' + + eZ\Publish\Core\QueryType\QueryType: '@App\QueryType\BlockQueryType' + + App\QueryType\MenuQueryType: + arguments: + $languages: '%languages%' + + App\QueryType\BlockQueryType: ~ + + App\QueryType\ChildrenQueryType: + tags: + - {name: ezpublish.query_type} diff --git a/config/services/twig.yaml b/config/services/twig.yaml new file mode 100644 index 000000000..7eb638190 --- /dev/null +++ b/config/services/twig.yaml @@ -0,0 +1,29 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + App\Twig\ContentInfoByLocationIdExtension: ~ + + App\Twig\YoutubeIdExtractorExtension: + tags: + - { name: twig.extension } + + App\Twig\RecommendationsExtension: + tags: + - { name: twig.extension } + + App\Twig\SearchResultExtractorExtension: + tags: + - { name: twig.extension } + + App\Twig\PremiumContentExtension: + arguments: + $allowedUserGroupsLocationIds: '%app.premium_content.allowed_user_groups.location_ids%' + tags: + - { name: twig.extension } + + App\Twig\ContentDescriptionExtension: + tags: + - { name: twig.extension } diff --git a/doc/apache2/Readme.md b/doc/apache2/Readme.md index b76c7f0c1..6176c5e78 100644 --- a/doc/apache2/Readme.md +++ b/doc/apache2/Readme.md @@ -31,7 +31,7 @@ These examples are simplified to get you up and running, see [Virtual host templ - [ServerName](https://httpd.apache.org/docs/2.4/en/mod/core.html#servername): Your host name, example `ez.no`. - Or for local dev for instance `ezinstall.localhost`, with corresponding entry in your [hosts file](https://en.wikipedia.org/wiki/Hosts_file). - [ServerAlias](https://httpd.apache.org/docs/2.4/en/mod/core.html#serveralias): Optional host alias list, example `www.ez.no login.ez.no`, or `*.ez.no`. - - [DocumentRoot](https://httpd.apache.org/docs/2.4/en/mod/core.html#documentroot): Point this and *Directory* to `web` directory of eZ installation. + - [DocumentRoot](https://httpd.apache.org/docs/2.4/en/mod/core.html#documentroot): Point this and *Directory* to `public` directory of eZ installation. - If you can't install `mod_setenvif`, adjust the "Environment" section like described inline. 3. Restart Apache, as follows: - Debian/Ubuntu: `sudo service apache2 restart` @@ -42,14 +42,14 @@ Example config for Apache 2.4 in prefork mode: ServerName localhost #ServerAlias *.localhost - DocumentRoot /var/www/ezinstall/web - DirectoryIndex app.php + DocumentRoot %BASEDIR%/public + DirectoryIndex index.php # Set default timeout to 90s, and max upload to 48mb TimeOut 90 LimitRequestBody 50331648 - + Options FollowSymLinks AllowOverride None # Depending on your global Apache settings, you may need to comment this: @@ -74,7 +74,7 @@ Example config for Apache 2.4 in prefork mode: # Access to repository images in single server setup RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L] - # Makes it possible to placed your favicon and robots.txt at the root of your web folder + # Makes it possible to place your favicon and robots.txt at the root of your public folder RewriteRule ^/favicon\.ico - [L] RewriteRule ^/robots\.txt - [L] @@ -87,22 +87,22 @@ Example config for Apache 2.4 in prefork mode: RewriteCond %{ENV:SYMFONY_ENV} !^(dev) RewriteRule ^/(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] - RewriteRule .* /app.php + RewriteRule .* /index.php #### .htaccess -If you do not have an access to use virtualhost config, use the `.htaccess` file in a simplified form. It must be placed in the `web/` folder to make it running. *This will not work if Apache is configured with the `AllowOverride None` for this directory.* +If you do not have an access to use virtualhost config, use the `.htaccess` file in a simplified form. It must be placed in the `public/` folder to make it running. *This will not work if Apache is configured with the `AllowOverride None` for this directory.* - DirectoryIndex app.php + DirectoryIndex index.php # Set default timeout to 90s, and max upload to 48mb TimeOut 90 LimitRequestBody 50331648 - # Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve - # to the front controller "/app.php" but be rewritten to "/app.php/app". + # Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve + # to the front controller "/index.php" but be rewritten to "/index.php/index". Options -MultiViews @@ -122,7 +122,7 @@ If you do not have an access to use virtualhost config, use the `.htaccess` file # Disable .php(3) and other executable extensions in the var directory RewriteRule ^var/.*(?i)\.(php3?|phar|phtml|sh|exe|pl|bin)$ - [F] - # Makes it possible to placed your favicon and robots.txt at the root of your web folder + # Makes it possible to place your favicon and robots.txt at the root of your public folder RewriteRule ^favicon\.ico - [L] RewriteRule ^robots\.txt - [L] @@ -138,7 +138,7 @@ If you do not have an access to use virtualhost config, use the `.htaccess` file RewriteRule ^(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] # Rewrite all other queries to the front controller. - RewriteRule .* app.php + RewriteRule .* index.php Virtual host template diff --git a/doc/apache2/vhost.template b/doc/apache2/vhost.template index b47e6f75a..eaa346f97 100644 --- a/doc/apache2/vhost.template +++ b/doc/apache2/vhost.template @@ -7,8 +7,8 @@ ServerName %HOST_NAME% ServerAlias %HOST_ALIAS% - DocumentRoot %BASEDIR%/web - DirectoryIndex app.php + DocumentRoot %BASEDIR%/public + DirectoryIndex index.php # Request size limit in bytes, 0 to disable LimitRequestBody %BODY_SIZE_LIMIT% @@ -19,8 +19,8 @@ # Enabled for Dev environment #LogLevel debug - # "web" folder is what we expose to the world, all rewrite rules further down is relative to it. - + # "public" folder is what we expose to the world, all rewrite rules further down are relative to it. + # For serving php files configure mod_proxy to talk to php-fpm using Apache 2.4.10 and higher. # See: https://wiki.apache.org/httpd/PHP-FPM#apache_httpd_2.4 @@ -40,31 +40,31 @@ Require all granted - ## eZ Platform/Symfony ENVIRONMENT variables, for customizing app.php* execution - # * Only SYMFONY_ENV and SYMFONY_DEBUG supported by console command, rest are eZ Platform features in app.php. + ## eZ Platform/Symfony ENVIRONMENT variables, for customizing index.php* execution + # * Only APP_ENV and APP_DEBUG supported by console command, rest are eZ Platform features in index.php. # Environment. # Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration # Defaults to "prod" if omitted (uses SetEnvIf so value can be used in rewrite rules) - #if[SYMFONY_ENV] SetEnvIf Request_URI ".*" SYMFONY_ENV=%SYMFONY_ENV% + #if[APP_ENV] SetEnvIf Request_URI ".*" APP_ENV=%APP_ENV% # Optional: Whether to use debugging. # Possible values: 0, 1 or "" - # Defaults to enabled if SYMFONY_ENV is set to "dev" if env value is omitted or empty - #if[SYMFONY_DEBUG] SetEnv SYMFONY_DEBUG "%SYMFONY_DEBUG%" + # Defaults to enabled if APP_ENV is set to "dev" if env value is omitted or empty + #if[APP_DEBUG] SetEnv APP_DEBUG "%APP_DEBUG%" # Optional: Whether to use Symfony's builtin HTTP Caching Proxy. # Disable it if you are using an external reverse proxy (e.g. Varnish) # Possible values: 0, 1 or "" - # Defaults to disabled if SYMFONY_ENV is set to "dev" or SYMFONY_TRUSTED_PROXIES is set, + # Defaults to disabled if APP_ENV is set to "dev" or APP_TRUSTED_PROXIES is set, # and if this env value is omitted or empty - #if[SYMFONY_HTTP_CACHE] SetEnv SYMFONY_HTTP_CACHE "%SYMFONY_HTTP_CACHE%" + #if[APP_HTTP_CACHE] SetEnv APP_HTTP_CACHE "%APP_HTTP_CACHE%" # Optional: Defines the proxies to trust - # Needed when using Varnish as proxy, if so disable SYMFONY_HTTP_CACHE. + # Needed when using Varnish as proxy, if so disable APP_HTTP_CACHE. # Separate entries by a comma, example: "ip1,ip2" # Defaults to not be set if env value is omitted or empty - #if[SYMFONY_TRUSTED_PROXIES] SetEnv SYMFONY_TRUSTED_PROXIES "%SYMFONY_TRUSTED_PROXIES%" + #if[APP_TRUSTED_PROXIES] SetEnv APP_TRUSTED_PROXIES "%APP_TRUSTED_PROXIES%" # TIP: There are many more environment variables supported by eZ Platform. However unlike those listed above # they should in most cases rather be set in the environment then in vhost config to make sure cronjobs @@ -81,11 +81,11 @@ # Cluster/streamed files rewrite rules. Enable on cluster with DFS as a binary data handler RewriteCond %{ENV:BINARY_DATA_HANDLER} "dfs" - RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /app.php [L] + RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /index.php [L] RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L] - # Makes it possible to placed your favicon and robots.txt at the root of your web folder + # Makes it possible to placed your favicon and robots.txt at the root of your public folder RewriteRule ^/favicon\.ico - [L] RewriteRule ^/robots\.txt - [L] @@ -95,13 +95,13 @@ # Additional Assetic rules for environments different from dev, # remember to run php bin/console assetic:dump --env=prod - RewriteCond %{ENV:SYMFONY_ENV} !^(dev) + RewriteCond %{ENV:APP_ENV} !^(dev) RewriteRule ^/(css|js|fonts?)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] - # Prevent access to website with direct usage of app.php in URL - RewriteRule ^/(.+/)?app\.php - [R=404,L] + # Prevent access to website with direct usage of index.php in URL + RewriteRule ^/(.+/)?index\.php - [R=404,L] - RewriteRule .* /app.php + RewriteRule .* /index.php # Everything below is optional to improve performance by forcing diff --git a/doc/docker/Dockerfile-app b/doc/docker/Dockerfile-app index 2ea4f08d7..0e1ac1759 100644 --- a/doc/docker/Dockerfile-app +++ b/doc/docker/Dockerfile-app @@ -2,7 +2,7 @@ ARG PHP_IMAGE=ezsystems/php:7.3-v1 FROM ${PHP_IMAGE}-node as builder # This is prod image (for dev use just mount your application as host volume into php image we extend here) -ENV SYMFONY_ENV=prod +ENV APP_ENV=prod # Copy in project files into work dir COPY . /var/www @@ -11,7 +11,7 @@ COPY . /var/www RUN if [ -d .git ]; then echo "ERROR: .dockerignore folders detected, exiting" && exit 1; fi # Install and prepare install -RUN mkdir -p web/var +RUN mkdir -p public/var # For now, only run composer in order to generate parameters.yml RUN composer run-script post-install-cmd --no-interaction RUN composer dump-autoload --optimize @@ -20,18 +20,18 @@ RUN composer dump-autoload --optimize # Clear cache again so env variables are taken into account on startup 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 +# Looks like we need to keep public/bundles ( like public/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 -# The other directories (except web/var) can be removed as they will be located in the web (nginx) image -# web/var can be removed as will be mounted via vardir volume -RUN rm -rf web/css web/fonts web/js web/var +# The other directories (except public/var) can be removed as they will be located in the web (nginx) image +# public/var can be removed as will be mounted via vardir volume +RUN rm -rf public/css public/fonts public/js public/var FROM ${PHP_IMAGE} # This is prod image (for dev use just mount your application as host volume into php image we extend here) -ENV SYMFONY_ENV=prod +ENV APP_ENV=prod COPY --from=builder /var/www /var/www diff --git a/doc/docker/Dockerfile-nginx b/doc/docker/Dockerfile-nginx index b251dc3d2..1264ddf43 100644 --- a/doc/docker/Dockerfile-nginx +++ b/doc/docker/Dockerfile-nginx @@ -1,21 +1,21 @@ ARG PHP_IMAGE=ezsystems/php:7.3-v1 FROM ${PHP_IMAGE}-node as web-build -ENV SYMFONY_ENV=prod +ENV APP_ENV=prod # Copy in project files into work dir COPY . /var/www # Create asset directories that might not exists -RUN if [ ! -d /var/www/web/bundles ]; then mkdir /var/www/web/bundles; fi -RUN if [ ! -d /var/www/web/css ]; then mkdir /var/www/web/css; fi -RUN if [ ! -d /var/www/web/fonts ]; then mkdir /var/www/web/fonts; fi -RUN if [ ! -d /var/www/web/js ]; then mkdir /var/www/web/js; fi -RUN if [ ! -d /var/www/web/assets ]; then mkdir /var/www/web/assets; fi +RUN if [ ! -d /var/www/public/bundles ]; then mkdir /var/www/public/bundles; fi +RUN if [ ! -d /var/www/public/css ]; then mkdir /var/www/public/css; fi +RUN if [ ! -d /var/www/public/fonts ]; then mkdir /var/www/public/fonts; fi +RUN if [ ! -d /var/www/public/js ]; then mkdir /var/www/public/js; fi +RUN if [ ! -d /var/www/public/assets ]; then mkdir /var/www/public/assets; fi # Generate assets using hard copy as we need to copy them over to resulting image RUN composer config extra.symfony-assets-install hard -RUN composer run-script post-install-cmd --no-interaction +RUN composer run-script auto-scripts --no-interaction # Copy over just the files we want in second stage, so resulting stage only has assets @@ -26,13 +26,13 @@ COPY bin/vhost.sh /var/www/bin/vhost.sh COPY doc/nginx/vhost.template /var/www/doc/nginx/vhost.template # Auto generated assets -COPY --from=web-build /var/www/web/bundles /var/www/web/bundles -COPY --from=web-build /var/www/web/css /var/www/web/css -COPY --from=web-build /var/www/web/fonts /var/www/web/fonts -COPY --from=web-build /var/www/web/js /var/www/web/js +COPY --from=web-build /var/www/public/bundles /var/www/public/bundles +COPY --from=web-build /var/www/public/css /var/www/public/css +COPY --from=web-build /var/www/public/fonts /var/www/public/fonts +COPY --from=web-build /var/www/public/js /var/www/public/js # User provided assets -COPY --from=web-build /var/www/web/assets /var/www/web/assets +COPY --from=web-build /var/www/public/assets /var/www/public/assets # In third stage build the resulting image diff --git a/doc/docker/Dockerfile-vardir b/doc/docker/Dockerfile-vardir index aff6c4c42..629cf4e1f 100644 --- a/doc/docker/Dockerfile-vardir +++ b/doc/docker/Dockerfile-vardir @@ -1,14 +1,14 @@ FROM busybox -COPY ./web/var /var/www/web/var +COPY ./public/var /var/www/public/var WORKDIR /var/www # Fix permissions for www-data -RUN chown -R www-data:www-data web/var \ - && find web/var -type d -print0 | xargs -0 chmod -R 775 \ - && find web/var -type f -print0 | xargs -0 chmod -R 664 +RUN chown -R www-data:www-data public/var \ + && find public/var -type d -print0 | xargs -0 chmod -R 775 \ + && find public/var -type f -print0 | xargs -0 chmod -R 664 -VOLUME ["/var/www/web/var"] +VOLUME ["/var/www/public/var"] CMD ["/bin/true"] diff --git a/doc/docker/README.md b/doc/docker/README.md index f861e44dc..e5e9b0297 100644 --- a/doc/docker/README.md +++ b/doc/docker/README.md @@ -57,7 +57,7 @@ However below environment variable `COMPOSE_FILE` is used instead since this is ### Demo "image" use Using this approach, everything will run in containers and volumes. This means that if you for instance upload a image -using the eZ Platform backend, that image will land in a volume, not somewhere below web/var/ in your project directory. +using the eZ Platform backend, that image will land in a volume, not somewhere below public/var/ in your project directory. From root of your projects clone of this distribution, [setup composer auth.json](#composer) and execute the following: ```sh @@ -71,7 +71,7 @@ docker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-data # Optionally, build dbdump and vardir images. # The dbdump image is created based on doc/docker/entrypoint/mysql/2_dump.sql which is created by above command -# The vardir image is created based on the content of web/var +# The vardir image is created based on the content of public/var # If you don't build these image explicitly, they will automaticly be builded later when running `docker-compose up` docker-compose build dataset-vardir dataset-dbdump @@ -138,7 +138,7 @@ docker-compose exec --user www-data app composer ezplatform-install If you want to use the DFS cluster handler, you'll need to run the migration script manually, after starting the containers ( run `docker-compose up -d --force-create` first). -The migration script will copy the binary files in web/var to the nfs mount point ( ./dfsdata ) and add the files' +The migration script will copy the binary files in public/var to the nfs mount point ( ./dfsdata ) and add the files' metadata to the database. If your are going to run eZ Platform in a cluster you must then ensure ./dfsdata is a mounted nfs share on every node/app container. @@ -151,7 +151,7 @@ php app/console ezplatform:io:migrate-files --from=default,default --to=dfs,nfs ``` -Once this is done, you may delete web/var/* if you don't intendt to run the migration scripts ever again. +Once this is done, you may delete public/var/* if you don't intendt to run the migration scripts ever again. ### Production use @@ -180,7 +180,7 @@ docker-compose -f doc/docker/base-prod.yml build --no-cache app web docker-compose -f doc/docker/base-prod.yml -f doc/docker/varnish.yml build --no-cache varnish # Create dataset images ( my-ez-app-dataset-dbdump and my-ez-app-dataset-vardir ) -# The dataset images contains a dump of the database and a dump of the var/ files ( located in web/var ) +# The dataset images contains a dump of the database and a dump of the var/ files ( located in public/var ) docker-compose -f doc/docker/create-dataset.yml build --no-cache # Tag the images diff --git a/doc/docker/base-dev.yml b/doc/docker/base-dev.yml index 885e3658f..77afc416d 100644 --- a/doc/docker/base-dev.yml +++ b/doc/docker/base-dev.yml @@ -11,10 +11,10 @@ services: - db environment: - COMPOSER_MEMORY_LIMIT - - SYMFONY_ENV=${SYMFONY_ENV-dev} - - SYMFONY_DEBUG - - SYMFONY_HTTP_CACHE - - SYMFONY_TRUSTED_PROXIES + - APP_ENV=${APP_ENV-dev} + - APP_DEBUG + - APP_HTTP_CACHE + - APP_TRUSTED_PROXIES - DATABASE_USER - DATABASE_PASSWORD - DATABASE_NAME @@ -38,11 +38,11 @@ services: ports: - "8080:80" environment: - - SYMFONY_ENV=${SYMFONY_ENV-dev} + - APP_ENV=${APP_ENV-dev} - MAX_BODY_SIZE=20 - FASTCGI_PASS=app:9000 - TIMEOUT=190 - command: /bin/bash -c "cd /var/www && cp -a doc/nginx/ez_params.d /etc/nginx && bin/vhost.sh --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" + command: /bin/bash -c "cd /var/www && cp -a doc/nginx/ez_params.d /etc/nginx && bin/vhost.sh --basedir=/var/www --template-file=doc/nginx/vhost.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" networks: - frontend - backend diff --git a/doc/docker/base-prod.yml b/doc/docker/base-prod.yml index b99f4d4f9..8257b5bd5 100644 --- a/doc/docker/base-prod.yml +++ b/doc/docker/base-prod.yml @@ -12,10 +12,10 @@ services: - db environment: - COMPOSER_MEMORY_LIMIT - - SYMFONY_ENV=${SYMFONY_ENV-prod} - - SYMFONY_DEBUG - - SYMFONY_HTTP_CACHE - - SYMFONY_TRUSTED_PROXIES + - APP_ENV=${APP_ENV-prod} + - APP_DEBUG + - APP_HTTP_CACHE + - APP_TRUSTED_PROXIES - DATABASE_USER - DATABASE_PASSWORD - DATABASE_NAME @@ -41,7 +41,7 @@ services: ports: - "8080:80" environment: - - SYMFONY_ENV=${SYMFONY_ENV-prod} + - APP_ENV=${APP_ENV-prod} - MAX_BODY_SIZE=20 - FASTCGI_PASS=app:9000 - TIMEOUT=190 diff --git a/doc/docker/demo.yml b/doc/docker/demo.yml index 1df8fbe2c..10063fcde 100644 --- a/doc/docker/demo.yml +++ b/doc/docker/demo.yml @@ -4,17 +4,17 @@ version: '3.3' services: app: volumes: - - vardir:/var/www/web/var + - vardir:/var/www/public/var depends_on: - dataset-vardir web: volumes: - - vardir:/var/www/web/var:ro + - vardir:/var/www/public/var:ro dataset-vardir: volumes: - - vardir:/var/www/web/var:ro + - vardir:/var/www/public/var:ro networks: - backend diff --git a/doc/docker/distribution.yml b/doc/docker/distribution.yml index 3cbef921e..f314fb079 100644 --- a/doc/docker/distribution.yml +++ b/doc/docker/distribution.yml @@ -20,10 +20,10 @@ services: - distribution - dataset-vardir environment: - - SYMFONY_ENV=${SYMFONY_ENV-prod} - - SYMFONY_DEBUG - - SYMFONY_HTTP_CACHE - - SYMFONY_TRUSTED_PROXIES + - APP_ENV=${APP_ENV-prod} + - APP_DEBUG + - APP_HTTP_CACHE + - APP_TRUSTED_PROXIES - DATABASE_USER - DATABASE_PASSWORD - DATABASE_NAME @@ -36,7 +36,7 @@ services: - backend volumes: - distribution:/var/www - - vardir:/var/www/web/var + - vardir:/var/www/public/var web: image: ${NGINX_IMAGE} @@ -46,13 +46,13 @@ services: ports: - "8080:80" environment: - - SYMFONY_ENV=${SYMFONY_ENV-prod} + - APP_ENV=${APP_ENV-prod} - MAX_BODY_SIZE=20 - FASTCGI_PASS=app:9000 - TIMEOUT=190 volumes: - distribution:/var/www:ro - - vardir:/var/www/web/var:ro + - vardir:/var/www/public/var:ro networks: - frontend - backend @@ -64,7 +64,7 @@ services: dataset-vardir: volumes: - - vardir:/var/www/web/var:ro + - vardir:/var/www/public/var:ro networks: - backend diff --git a/doc/docker/import-dataset.yml b/doc/docker/import-dataset.yml index f3df06ae6..203a9a1c6 100644 --- a/doc/docker/import-dataset.yml +++ b/doc/docker/import-dataset.yml @@ -43,9 +43,9 @@ services: command: > /bin/sh -c " if [ ! -e /nfs/vardirs/$${DATASET_VARDIR} ]; then - echo Copying files from /var/www/web/var to /nfs/vardirs/$${DATASET_VARDIR}; + echo Copying files from /var/www/public/var to /nfs/vardirs/$${DATASET_VARDIR}; mkdir /nfs/vardirs/$${DATASET_VARDIR} && \ - time cp -a /var/www/web/var/ /nfs/vardirs/$${DATASET_VARDIR}; + time cp -a /var/www/public/var/ /nfs/vardirs/$${DATASET_VARDIR}; else echo Aborted, /nfs/vardirs/$${DATASET_VARDIR} already exists; exit 2; @@ -62,4 +62,4 @@ volumes: driver_opts: type: nfs o: addr=swarmmanager,rw,vers=4.0 - device: ":/vardirs" \ No newline at end of file + device: ":/vardirs" diff --git a/doc/docker/install-dependencies.yml b/doc/docker/install-dependencies.yml index 4adfa76bd..bbdf4f80b 100644 --- a/doc/docker/install-dependencies.yml +++ b/doc/docker/install-dependencies.yml @@ -9,9 +9,9 @@ services: - ${COMPOSER_HOME}:/root/.composer:cached environment: - COMPOSER_MEMORY_LIMIT - - SYMFONY_ENV=${SYMFONY_ENV-prod} - - SYMFONY_DEBUG - - SYMFONY_CMD + - APP_ENV=${APP_ENV-prod} + - APP_DEBUG + - APP_CMD - DATABASE_USER - DATABASE_PASSWORD - DATABASE_NAME diff --git a/doc/docker/install_script.sh b/doc/docker/install_script.sh index 5b4619806..1dbc5bbf2 100755 --- a/doc/docker/install_script.sh +++ b/doc/docker/install_script.sh @@ -4,18 +4,18 @@ # Second chown line: For dev and behat tests we give a bit extra rights, never do this for prod. for i in $(seq 1 3); do composer install --no-progress --no-interaction --prefer-dist --no-suggest --optimize-autoloader && s=0 && break || s=$? && sleep 1; done; (exit $s); -mkdir -p web/var; +mkdir -p public/var; if [ "${INSTALL_DATABASE}" == "1" ]; then php /scripts/wait_for_db.php; composer ezplatform-install; - if [ "$SYMFONY_CMD" != '' ]; then echo '> Executing' "$SYMFONY_CMD"; php bin/console $SYMFONY_CMD; fi; + if [ "$APP_CMD" != '' ]; then echo '> Executing' "$APP_CMD"; php bin/console $APP_CMD; fi; echo 'Dumping database into doc/docker/entrypoint/mysql/2_dump.sql for use by mysql on startup.'; mysqldump -u $DATABASE_USER --password=$DATABASE_PASSWORD -h $DATABASE_HOST --add-drop-table --extended-insert --protocol=tcp $DATABASE_NAME > doc/docker/entrypoint/mysql/2_dump.sql; fi; 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; +chown -R www-data:www-data var/cache var/logs public/var; +find var/cache var/logs public/var -type d -print0 | xargs -0 chmod -R 775; +find var/cache var/logs public/var -type f -print0 | xargs -0 chmod -R 664; +chown -R www-data:www-data config src; diff --git a/doc/docker/my-ez-app-stack.yml b/doc/docker/my-ez-app-stack.yml index 3ff3c33f8..6ae74f5d4 100644 --- a/doc/docker/my-ez-app-stack.yml +++ b/doc/docker/my-ez-app-stack.yml @@ -8,12 +8,12 @@ services: ports: - "8081:80" environment: - - SYMFONY_ENV + - APP_ENV - MAX_BODY_SIZE=20 - FASTCGI_PASS=app:9000 - TIMEOUT=190 volumes: - - vardir:/var/www/web/var + - vardir:/var/www/public/var networks: - my-ez-app deploy: @@ -22,18 +22,18 @@ services: app: image: swarmmanager:5000/my-ez-app/app environment: - - SYMFONY_ENV=prod - - SYMFONY_DEBUG - - SYMFONY_HTTP_CACHE - - SYMFONY_TRUSTED_PROXIES + - APP_ENV=prod + - APP_DEBUG + - APP_HTTP_CACHE + - APP_TRUSTED_PROXIES - DATABASE_USER=ezp - DATABASE_PASSWORD=SetYourOwnPassword - DATABASE_NAME=ezp - DATABASE_HOST=db - CUSTOM_CACHE_POOL=singleredis - CACHE_HOST=redis - - SYMFONY_HTTP_CACHE=0 - - SYMFONY_TRUSTED_PROXIES=varnish + - APP_HTTP_CACHE=0 + - APP_TRUSTED_PROXIES=varnish - HTTPCACHE_PURGE_SERVER=http://varnish - HTTPCACHE_PURGE_TYPE=http - PHP_INI_ENV_session.save_handler=redis @@ -44,7 +44,7 @@ services: - FASTLY_SERVICE_ID - FASTLY_KEY volumes: - - vardir:/var/www/web/var + - vardir:/var/www/public/var networks: - stack-db_db - my-ez-app diff --git a/doc/docker/varnish.yml b/doc/docker/varnish.yml index 1c66ae32a..6138bb5ed 100644 --- a/doc/docker/varnish.yml +++ b/doc/docker/varnish.yml @@ -8,8 +8,8 @@ version: '3.3' services: app: environment: - - SYMFONY_HTTP_CACHE=0 - - SYMFONY_TRUSTED_PROXIES=varnish + - APP_HTTP_CACHE=0 + - APP_TRUSTED_PROXIES=varnish - HTTPCACHE_PURGE_SERVER=http://varnish - HTTPCACHE_PURGE_TYPE=http diff --git a/doc/nginx/Readme.md b/doc/nginx/Readme.md index 54f32025b..19515ee05 100644 --- a/doc/nginx/Readme.md +++ b/doc/nginx/Readme.md @@ -25,7 +25,7 @@ This example is simplified to get you up and running, see [Virtual host template - [listen](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen): IP and port number to listen to. - [server_name](http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name): Host list, example `ez.no *.ez.no` - Or for local dev for instance `ezinstall.localhost`, with corresponding entry in your [hosts file](https://en.wikipedia.org/wiki/Hosts_file). - - [root](http://nginx.org/en/docs/http/ngx_http_core_module.html#root): Point this to `web` directory of your eZ installation. + - [root](http://nginx.org/en/docs/http/ngx_http_core_module.html#root): Point this to `public` directory of your eZ installation. - [fastcgi_pass](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_pass): Socket or TCP address of `php-fpm`. 2. Copy `ez_params.d` directory to folder to you nginx config folder, for examples: - Debian/Ubuntu: `sudo cp -R doc/nginx/ez_params.d /etc/nginx/` @@ -39,7 +39,7 @@ Example config: # Further documentation: http://nginx.org/en/docs/http/server_names.html server_name localhost; - root /var/www/ezinstall/web; + root /var/www/ezinstall/public; # Additional Assetic rules for environments different from dev, # remember to run php bin/console assetic:dump --env=prod diff --git a/doc/nginx/ez_params.d/ez_fastcgi_params b/doc/nginx/ez_params.d/ez_fastcgi_params index d30e9296a..f433ab302 100644 --- a/doc/nginx/ez_params.d/ez_fastcgi_params +++ b/doc/nginx/ez_params.d/ez_fastcgi_params @@ -6,7 +6,7 @@ fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; -set $fc_script_name "app.php"; +set $fc_script_name "index.php"; if ( $uri ~ "^/(.*\.php)" ) { set $fc_script_name $1; @@ -19,5 +19,5 @@ fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_NAME $fc_script_name; fastcgi_param SCRIPT_FILENAME $document_root/$fc_script_name; -fastcgi_index app.php; +fastcgi_index index.php; diff --git a/doc/nginx/ez_params.d/ez_rewrite_dfsimage_params b/doc/nginx/ez_params.d/ez_rewrite_dfsimage_params index 2fe597f65..d1cacbb63 100644 --- a/doc/nginx/ez_params.d/ez_rewrite_dfsimage_params +++ b/doc/nginx/ez_params.d/ez_rewrite_dfsimage_params @@ -1 +1 @@ -rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/app.php" break; +rewrite "^/var/([^/]+/)?storage/images(-versioned)?/(.*)" "/index.php" break; diff --git a/doc/nginx/ez_params.d/ez_rewrite_params b/doc/nginx/ez_params.d/ez_rewrite_params index c551faa17..70750c0b6 100644 --- a/doc/nginx/ez_params.d/ez_rewrite_params +++ b/doc/nginx/ez_params.d/ez_rewrite_params @@ -17,10 +17,10 @@ rewrite "^/w3c/p3p\.xml" "/w3c/p3p.xml" break; rewrite "^/bundles/(.*)" "/bundles/$1" break; rewrite "^/assets/(.*)" "/assets/$1" break; -# Prevent access to website with direct usage of app.php in URL -if ($request_uri ~ "^/(.+/)?app\.php") { +# Prevent access to website with direct usage of index.php in URL +if ($request_uri ~ "^/(.+/)?index\.php") { return 404; } -rewrite "^(.*)$" "/app.php$1" last; +rewrite "^(.*)$" "/index.php$1" last; diff --git a/doc/nginx/vhost.template b/doc/nginx/vhost.template index a1d47665d..5eef50460 100644 --- a/doc/nginx/vhost.template +++ b/doc/nginx/vhost.template @@ -4,12 +4,12 @@ server { # Further documentation: http://nginx.org/en/docs/http/server_names.html server_name %HOST_LIST%; - root %BASEDIR%/web; + root %BASEDIR%/public; # Additional Assetic rules ## Don't forget to run php bin/console assetic:dump --env=prod ## and make sure to comment these out in DEV environment. - #if[SYMFONY_ENV!=dev] include ez_params.d/ez_prod_rewrite_params; + #if[APP_ENV!=dev] include ez_params.d/ez_prod_rewrite_params; # Include image rule for DFS or binary handler include ez_params.d/ez_rewrite_%BINARY_DATA_HANDLER%image_params; @@ -28,37 +28,37 @@ server { gzip_types text/plain text/css application/json text/javascript application/javascript text/xml application/xml application/xml+rss; location / { - location ~ ^/app\.php(/|$) { + location ~ ^/index\.php(/|$) { include ez_params.d/ez_fastcgi_params; # FPM socket # Possible values : unix:/var/run/php5-fpm.sock or 127.0.0.1:9000 fastcgi_pass %FASTCGI_PASS%; - ## eZ Platform ENVIRONMENT variables, used for customizing app.php execution (not used by console commands) + ## eZ Platform ENVIRONMENT variables, used for customizing index.php execution (not used by console commands) # Environment. # Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration # Make sure to comment the "ez_params.d/ez_prod_rewrite_params" include above in dev. # Defaults to "prod" if omitted - #if[SYMFONY_ENV] fastcgi_param SYMFONY_ENV %SYMFONY_ENV%; + #if[APP_ENV] fastcgi_param APP_ENV %APP_ENV%; # Whether to use debugging. # Possible values: 0 or 1 - # Defaults to 0 if omitted, unless SYMFONY_ENV is set to: "dev" - #if[SYMFONY_DEBUG] fastcgi_param SYMFONY_DEBUG "%SYMFONY_DEBUG%"; + # Defaults to 0 if omitted, unless APP_ENV is set to: "dev" + #if[APP_DEBUG] fastcgi_param APP_DEBUG "%APP_DEBUG%"; # Optional: Whether to use Symfony's builtin HTTP Caching Proxy. # Disable it if you are using an external reverse proxy (e.g. Varnish) # Possible values: 0 or 1 - # Defaults to 1 if omitted, unless SYMFONY_ENV is set to: "dev" - #if[SYMFONY_HTTP_CACHE] fastcgi_param SYMFONY_HTTP_CACHE "%SYMFONY_HTTP_CACHE%"; + # Defaults to 1 if omitted, unless APP_ENV is set to: "dev" + #if[APP_HTTP_CACHE] fastcgi_param APP_HTTP_CACHE "%APP_HTTP_CACHE%"; # Optional: Defines the proxies to trust - # Needed when using Varnish as proxy, if so disable SYMFONY_HTTP_CACHE. + # Needed when using Varnish as proxy, if so disable APP_HTTP_CACHE. # Separate entries by a comma, example: "ip1,ip2" # Defaults to not be set if env value is omitted or empty - #if[SYMFONY_TRUSTED_PROXIES] fastcgi_param SYMFONY_TRUSTED_PROXIES "%SYMFONY_TRUSTED_PROXIES%"; + #if[APP_TRUSTED_PROXIES] fastcgi_param APP_TRUSTED_PROXIES "%APP_TRUSTED_PROXIES%"; # TIP: There are many more environment variables supported by eZ Platform. However unlike those listed above # they should in most cases rather be set in the environment then in vhost config to make sure cronjobs diff --git a/doc/platformsh/INSTALL.md b/doc/platformsh/INSTALL.md index b2d043717..c942ddaf7 100644 --- a/doc/platformsh/INSTALL.md +++ b/doc/platformsh/INSTALL.md @@ -43,10 +43,10 @@ `platform environment:activate ezplatform-ee-v1.9.1` This will trigger a new Platform.sh build. -> **NB:** If you have installed eZ Platform or the Enterprise Edition on this Platform.sh instance before, you may need to remove the web/var/.platform.installed file to ensure the installation is performed in the deploy stage. +> **NB:** If you have installed eZ Platform or the Enterprise Edition on this Platform.sh instance before, you may need to remove the public/var/.platform.installed file to ensure the installation is performed in the deploy stage. > > The symptom for this is when, in the backend, you go to Content -> Form Manager and get an error message, or when the "My Drafts Scheduled for Future Publication" and "All Drafts Scheduled for Future Publication" sections on "My Dashboard" will not load. > > To do this, go to the Platform.sh web interface -> "Access site" and copy the "SSH access" command. Then, run the SSH command from a terminal, and: -> `rm web/var/.platform.installed` +> `rm public/var/.platform.installed` > The next time you trigger a rebuild (see above), the full install will run. diff --git a/ez.webpack.config.js b/ez.webpack.config.js index 633977ca6..12f8da01d 100644 --- a/ez.webpack.config.js +++ b/ez.webpack.config.js @@ -4,7 +4,7 @@ const eZConfigManager = require('./ez.webpack.config.manager.js'); const configManagers = require('./var/encore/ez.config.manager.js'); module.exports = (Encore) => { - Encore.setOutputPath('web/assets/ezplatform/build') + Encore.setOutputPath('public/assets/ezplatform/build') .setPublicPath('/assets/ezplatform/build') .addExternals({ react: 'React', diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5a12e6762..51e2eb68b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,14 +2,46 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21,11 +53,6 @@ src - - src/*Bundle/Resources - src/*/*Bundle/Resources - src/*/Bundle/*Bundle/Resources - diff --git a/var/cache/.gitkeep b/public/assets/build/.gitkeep similarity index 100% rename from var/cache/.gitkeep rename to public/assets/build/.gitkeep diff --git a/var/logs/.gitkeep b/public/assets/ezplatform/build/.gitkeep similarity index 100% rename from var/logs/.gitkeep rename to public/assets/ezplatform/build/.gitkeep diff --git a/web/assets/images/article/premium_content.png b/public/assets/images/article/premium_content.png similarity index 100% rename from web/assets/images/article/premium_content.png rename to public/assets/images/article/premium_content.png diff --git a/web/assets/images/custom_tags/admin/icons/ezfacebook.svg b/public/assets/images/custom_tags/admin/icons/ezfacebook.svg similarity index 100% rename from web/assets/images/custom_tags/admin/icons/ezfacebook.svg rename to public/assets/images/custom_tags/admin/icons/ezfacebook.svg diff --git a/web/assets/images/form/check-icons.png b/public/assets/images/form/check-icons.png similarity index 100% rename from web/assets/images/form/check-icons.png rename to public/assets/images/form/check-icons.png diff --git a/web/assets/images/form/field_file.png b/public/assets/images/form/field_file.png similarity index 100% rename from web/assets/images/form/field_file.png rename to public/assets/images/form/field_file.png diff --git a/web/assets/images/landing_page/Amsterdam.png b/public/assets/images/landing_page/Amsterdam.png similarity index 100% rename from web/assets/images/landing_page/Amsterdam.png rename to public/assets/images/landing_page/Amsterdam.png diff --git a/web/assets/images/landing_page/Brooklyn.png b/public/assets/images/landing_page/Brooklyn.png similarity index 100% rename from web/assets/images/landing_page/Brooklyn.png rename to public/assets/images/landing_page/Brooklyn.png diff --git a/web/assets/images/landing_page/Homepage-banner.jpg b/public/assets/images/landing_page/Homepage-banner.jpg similarity index 100% rename from web/assets/images/landing_page/Homepage-banner.jpg rename to public/assets/images/landing_page/Homepage-banner.jpg diff --git a/web/assets/images/landing_page/marker-icon.png b/public/assets/images/landing_page/marker-icon.png similarity index 100% rename from web/assets/images/landing_page/marker-icon.png rename to public/assets/images/landing_page/marker-icon.png diff --git a/web/assets/images/map-marker.png b/public/assets/images/map-marker.png similarity index 100% rename from web/assets/images/map-marker.png rename to public/assets/images/map-marker.png diff --git a/web/assets/images/map_tile/2/-1/0.png b/public/assets/images/map_tile/2/-1/0.png similarity index 100% rename from web/assets/images/map_tile/2/-1/0.png rename to public/assets/images/map_tile/2/-1/0.png diff --git a/web/assets/images/map_tile/2/-1/0@2x.png b/public/assets/images/map_tile/2/-1/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-1/0@2x.png rename to public/assets/images/map_tile/2/-1/0@2x.png diff --git a/web/assets/images/map_tile/2/-1/1.png b/public/assets/images/map_tile/2/-1/1.png similarity index 100% rename from web/assets/images/map_tile/2/-1/1.png rename to public/assets/images/map_tile/2/-1/1.png diff --git a/web/assets/images/map_tile/2/-1/1@2x.png b/public/assets/images/map_tile/2/-1/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-1/1@2x.png rename to public/assets/images/map_tile/2/-1/1@2x.png diff --git a/web/assets/images/map_tile/2/-1/2.png b/public/assets/images/map_tile/2/-1/2.png similarity index 100% rename from web/assets/images/map_tile/2/-1/2.png rename to public/assets/images/map_tile/2/-1/2.png diff --git a/web/assets/images/map_tile/2/-1/2@2x.png b/public/assets/images/map_tile/2/-1/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-1/2@2x.png rename to public/assets/images/map_tile/2/-1/2@2x.png diff --git a/web/assets/images/map_tile/2/-1/3.png b/public/assets/images/map_tile/2/-1/3.png similarity index 100% rename from web/assets/images/map_tile/2/-1/3.png rename to public/assets/images/map_tile/2/-1/3.png diff --git a/web/assets/images/map_tile/2/-1/3@2x.png b/public/assets/images/map_tile/2/-1/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-1/3@2x.png rename to public/assets/images/map_tile/2/-1/3@2x.png diff --git a/web/assets/images/map_tile/2/-2/0.png b/public/assets/images/map_tile/2/-2/0.png similarity index 100% rename from web/assets/images/map_tile/2/-2/0.png rename to public/assets/images/map_tile/2/-2/0.png diff --git a/web/assets/images/map_tile/2/-2/0@2x.png b/public/assets/images/map_tile/2/-2/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-2/0@2x.png rename to public/assets/images/map_tile/2/-2/0@2x.png diff --git a/web/assets/images/map_tile/2/-2/1.png b/public/assets/images/map_tile/2/-2/1.png similarity index 100% rename from web/assets/images/map_tile/2/-2/1.png rename to public/assets/images/map_tile/2/-2/1.png diff --git a/web/assets/images/map_tile/2/-2/1@2x.png b/public/assets/images/map_tile/2/-2/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-2/1@2x.png rename to public/assets/images/map_tile/2/-2/1@2x.png diff --git a/web/assets/images/map_tile/2/-2/2.png b/public/assets/images/map_tile/2/-2/2.png similarity index 100% rename from web/assets/images/map_tile/2/-2/2.png rename to public/assets/images/map_tile/2/-2/2.png diff --git a/web/assets/images/map_tile/2/-2/2@2x.png b/public/assets/images/map_tile/2/-2/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-2/2@2x.png rename to public/assets/images/map_tile/2/-2/2@2x.png diff --git a/web/assets/images/map_tile/2/-2/3.png b/public/assets/images/map_tile/2/-2/3.png similarity index 100% rename from web/assets/images/map_tile/2/-2/3.png rename to public/assets/images/map_tile/2/-2/3.png diff --git a/web/assets/images/map_tile/2/-2/3@2x.png b/public/assets/images/map_tile/2/-2/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/-2/3@2x.png rename to public/assets/images/map_tile/2/-2/3@2x.png diff --git a/web/assets/images/map_tile/2/0/0.png b/public/assets/images/map_tile/2/0/0.png similarity index 100% rename from web/assets/images/map_tile/2/0/0.png rename to public/assets/images/map_tile/2/0/0.png diff --git a/web/assets/images/map_tile/2/0/0@2x.png b/public/assets/images/map_tile/2/0/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/0/0@2x.png rename to public/assets/images/map_tile/2/0/0@2x.png diff --git a/web/assets/images/map_tile/2/0/1.png b/public/assets/images/map_tile/2/0/1.png similarity index 100% rename from web/assets/images/map_tile/2/0/1.png rename to public/assets/images/map_tile/2/0/1.png diff --git a/web/assets/images/map_tile/2/0/1@2x.png b/public/assets/images/map_tile/2/0/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/0/1@2x.png rename to public/assets/images/map_tile/2/0/1@2x.png diff --git a/web/assets/images/map_tile/2/0/2.png b/public/assets/images/map_tile/2/0/2.png similarity index 100% rename from web/assets/images/map_tile/2/0/2.png rename to public/assets/images/map_tile/2/0/2.png diff --git a/web/assets/images/map_tile/2/0/2@2x.png b/public/assets/images/map_tile/2/0/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/0/2@2x.png rename to public/assets/images/map_tile/2/0/2@2x.png diff --git a/web/assets/images/map_tile/2/0/3.png b/public/assets/images/map_tile/2/0/3.png similarity index 100% rename from web/assets/images/map_tile/2/0/3.png rename to public/assets/images/map_tile/2/0/3.png diff --git a/web/assets/images/map_tile/2/0/3@2x.png b/public/assets/images/map_tile/2/0/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/0/3@2x.png rename to public/assets/images/map_tile/2/0/3@2x.png diff --git a/web/assets/images/map_tile/2/1/0.png b/public/assets/images/map_tile/2/1/0.png similarity index 100% rename from web/assets/images/map_tile/2/1/0.png rename to public/assets/images/map_tile/2/1/0.png diff --git a/web/assets/images/map_tile/2/1/0@2x.png b/public/assets/images/map_tile/2/1/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/1/0@2x.png rename to public/assets/images/map_tile/2/1/0@2x.png diff --git a/web/assets/images/map_tile/2/1/1.png b/public/assets/images/map_tile/2/1/1.png similarity index 100% rename from web/assets/images/map_tile/2/1/1.png rename to public/assets/images/map_tile/2/1/1.png diff --git a/web/assets/images/map_tile/2/1/1@2x.png b/public/assets/images/map_tile/2/1/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/1/1@2x.png rename to public/assets/images/map_tile/2/1/1@2x.png diff --git a/web/assets/images/map_tile/2/1/2.png b/public/assets/images/map_tile/2/1/2.png similarity index 100% rename from web/assets/images/map_tile/2/1/2.png rename to public/assets/images/map_tile/2/1/2.png diff --git a/web/assets/images/map_tile/2/1/2@2x.png b/public/assets/images/map_tile/2/1/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/1/2@2x.png rename to public/assets/images/map_tile/2/1/2@2x.png diff --git a/web/assets/images/map_tile/2/1/3.png b/public/assets/images/map_tile/2/1/3.png similarity index 100% rename from web/assets/images/map_tile/2/1/3.png rename to public/assets/images/map_tile/2/1/3.png diff --git a/web/assets/images/map_tile/2/1/3@2x.png b/public/assets/images/map_tile/2/1/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/1/3@2x.png rename to public/assets/images/map_tile/2/1/3@2x.png diff --git a/web/assets/images/map_tile/2/2/0.png b/public/assets/images/map_tile/2/2/0.png similarity index 100% rename from web/assets/images/map_tile/2/2/0.png rename to public/assets/images/map_tile/2/2/0.png diff --git a/web/assets/images/map_tile/2/2/0@2x.png b/public/assets/images/map_tile/2/2/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/2/0@2x.png rename to public/assets/images/map_tile/2/2/0@2x.png diff --git a/web/assets/images/map_tile/2/2/1.png b/public/assets/images/map_tile/2/2/1.png similarity index 100% rename from web/assets/images/map_tile/2/2/1.png rename to public/assets/images/map_tile/2/2/1.png diff --git a/web/assets/images/map_tile/2/2/1@2x.png b/public/assets/images/map_tile/2/2/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/2/1@2x.png rename to public/assets/images/map_tile/2/2/1@2x.png diff --git a/web/assets/images/map_tile/2/2/2.png b/public/assets/images/map_tile/2/2/2.png similarity index 100% rename from web/assets/images/map_tile/2/2/2.png rename to public/assets/images/map_tile/2/2/2.png diff --git a/web/assets/images/map_tile/2/2/2@2x.png b/public/assets/images/map_tile/2/2/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/2/2@2x.png rename to public/assets/images/map_tile/2/2/2@2x.png diff --git a/web/assets/images/map_tile/2/2/3.png b/public/assets/images/map_tile/2/2/3.png similarity index 100% rename from web/assets/images/map_tile/2/2/3.png rename to public/assets/images/map_tile/2/2/3.png diff --git a/web/assets/images/map_tile/2/2/3@2x.png b/public/assets/images/map_tile/2/2/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/2/3@2x.png rename to public/assets/images/map_tile/2/2/3@2x.png diff --git a/web/assets/images/map_tile/2/3/0.png b/public/assets/images/map_tile/2/3/0.png similarity index 100% rename from web/assets/images/map_tile/2/3/0.png rename to public/assets/images/map_tile/2/3/0.png diff --git a/web/assets/images/map_tile/2/3/0@2x.png b/public/assets/images/map_tile/2/3/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/3/0@2x.png rename to public/assets/images/map_tile/2/3/0@2x.png diff --git a/web/assets/images/map_tile/2/3/1.png b/public/assets/images/map_tile/2/3/1.png similarity index 100% rename from web/assets/images/map_tile/2/3/1.png rename to public/assets/images/map_tile/2/3/1.png diff --git a/web/assets/images/map_tile/2/3/1@2x.png b/public/assets/images/map_tile/2/3/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/3/1@2x.png rename to public/assets/images/map_tile/2/3/1@2x.png diff --git a/web/assets/images/map_tile/2/3/2.png b/public/assets/images/map_tile/2/3/2.png similarity index 100% rename from web/assets/images/map_tile/2/3/2.png rename to public/assets/images/map_tile/2/3/2.png diff --git a/web/assets/images/map_tile/2/3/2@2x.png b/public/assets/images/map_tile/2/3/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/3/2@2x.png rename to public/assets/images/map_tile/2/3/2@2x.png diff --git a/web/assets/images/map_tile/2/3/3.png b/public/assets/images/map_tile/2/3/3.png similarity index 100% rename from web/assets/images/map_tile/2/3/3.png rename to public/assets/images/map_tile/2/3/3.png diff --git a/web/assets/images/map_tile/2/3/3@2x.png b/public/assets/images/map_tile/2/3/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/3/3@2x.png rename to public/assets/images/map_tile/2/3/3@2x.png diff --git a/web/assets/images/map_tile/2/4/0.png b/public/assets/images/map_tile/2/4/0.png similarity index 100% rename from web/assets/images/map_tile/2/4/0.png rename to public/assets/images/map_tile/2/4/0.png diff --git a/web/assets/images/map_tile/2/4/0@2x.png b/public/assets/images/map_tile/2/4/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/4/0@2x.png rename to public/assets/images/map_tile/2/4/0@2x.png diff --git a/web/assets/images/map_tile/2/4/1.png b/public/assets/images/map_tile/2/4/1.png similarity index 100% rename from web/assets/images/map_tile/2/4/1.png rename to public/assets/images/map_tile/2/4/1.png diff --git a/web/assets/images/map_tile/2/4/1@2x.png b/public/assets/images/map_tile/2/4/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/4/1@2x.png rename to public/assets/images/map_tile/2/4/1@2x.png diff --git a/web/assets/images/map_tile/2/4/2.png b/public/assets/images/map_tile/2/4/2.png similarity index 100% rename from web/assets/images/map_tile/2/4/2.png rename to public/assets/images/map_tile/2/4/2.png diff --git a/web/assets/images/map_tile/2/4/2@2x.png b/public/assets/images/map_tile/2/4/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/4/2@2x.png rename to public/assets/images/map_tile/2/4/2@2x.png diff --git a/web/assets/images/map_tile/2/4/3.png b/public/assets/images/map_tile/2/4/3.png similarity index 100% rename from web/assets/images/map_tile/2/4/3.png rename to public/assets/images/map_tile/2/4/3.png diff --git a/web/assets/images/map_tile/2/4/3@2x.png b/public/assets/images/map_tile/2/4/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/4/3@2x.png rename to public/assets/images/map_tile/2/4/3@2x.png diff --git a/web/assets/images/map_tile/2/5/0.png b/public/assets/images/map_tile/2/5/0.png similarity index 100% rename from web/assets/images/map_tile/2/5/0.png rename to public/assets/images/map_tile/2/5/0.png diff --git a/web/assets/images/map_tile/2/5/0@2x.png b/public/assets/images/map_tile/2/5/0@2x.png similarity index 100% rename from web/assets/images/map_tile/2/5/0@2x.png rename to public/assets/images/map_tile/2/5/0@2x.png diff --git a/web/assets/images/map_tile/2/5/1.png b/public/assets/images/map_tile/2/5/1.png similarity index 100% rename from web/assets/images/map_tile/2/5/1.png rename to public/assets/images/map_tile/2/5/1.png diff --git a/web/assets/images/map_tile/2/5/1@2x.png b/public/assets/images/map_tile/2/5/1@2x.png similarity index 100% rename from web/assets/images/map_tile/2/5/1@2x.png rename to public/assets/images/map_tile/2/5/1@2x.png diff --git a/web/assets/images/map_tile/2/5/2.png b/public/assets/images/map_tile/2/5/2.png similarity index 100% rename from web/assets/images/map_tile/2/5/2.png rename to public/assets/images/map_tile/2/5/2.png diff --git a/web/assets/images/map_tile/2/5/2@2x.png b/public/assets/images/map_tile/2/5/2@2x.png similarity index 100% rename from web/assets/images/map_tile/2/5/2@2x.png rename to public/assets/images/map_tile/2/5/2@2x.png diff --git a/web/assets/images/map_tile/2/5/3.png b/public/assets/images/map_tile/2/5/3.png similarity index 100% rename from web/assets/images/map_tile/2/5/3.png rename to public/assets/images/map_tile/2/5/3.png diff --git a/web/assets/images/map_tile/2/5/3@2x.png b/public/assets/images/map_tile/2/5/3@2x.png similarity index 100% rename from web/assets/images/map_tile/2/5/3@2x.png rename to public/assets/images/map_tile/2/5/3@2x.png diff --git a/web/assets/images/page_builder/blocks/hero.svg b/public/assets/images/page_builder/blocks/hero.svg similarity index 100% rename from web/assets/images/page_builder/blocks/hero.svg rename to public/assets/images/page_builder/blocks/hero.svg diff --git a/web/assets/images/page_builder/blocks/places.svg b/public/assets/images/page_builder/blocks/places.svg similarity index 100% rename from web/assets/images/page_builder/blocks/places.svg rename to public/assets/images/page_builder/blocks/places.svg diff --git a/web/assets/images/page_builder/blocks/tastes.svg b/public/assets/images/page_builder/blocks/tastes.svg similarity index 100% rename from web/assets/images/page_builder/blocks/tastes.svg rename to public/assets/images/page_builder/blocks/tastes.svg diff --git a/web/assets/images/page_builder/layouts/1.png b/public/assets/images/page_builder/layouts/1.png similarity index 100% rename from web/assets/images/page_builder/layouts/1.png rename to public/assets/images/page_builder/layouts/1.png diff --git a/web/assets/images/page_builder/layouts/1_2.png b/public/assets/images/page_builder/layouts/1_2.png similarity index 100% rename from web/assets/images/page_builder/layouts/1_2.png rename to public/assets/images/page_builder/layouts/1_2.png diff --git a/web/assets/images/page_builder/layouts/1__1_2.png b/public/assets/images/page_builder/layouts/1__1_2.png similarity index 100% rename from web/assets/images/page_builder/layouts/1__1_2.png rename to public/assets/images/page_builder/layouts/1__1_2.png diff --git a/web/assets/images/page_builder/layouts/1__2_1.png b/public/assets/images/page_builder/layouts/1__2_1.png similarity index 100% rename from web/assets/images/page_builder/layouts/1__2_1.png rename to public/assets/images/page_builder/layouts/1__2_1.png diff --git a/web/assets/images/page_builder/layouts/1w__1__1w.png b/public/assets/images/page_builder/layouts/1w__1__1w.png similarity index 100% rename from web/assets/images/page_builder/layouts/1w__1__1w.png rename to public/assets/images/page_builder/layouts/1w__1__1w.png diff --git a/web/assets/images/page_builder/layouts/1w__2_1__2_1__1w.png b/public/assets/images/page_builder/layouts/1w__2_1__2_1__1w.png similarity index 100% rename from web/assets/images/page_builder/layouts/1w__2_1__2_1__1w.png rename to public/assets/images/page_builder/layouts/1w__2_1__2_1__1w.png diff --git a/web/assets/images/page_builder/layouts/2_1.png b/public/assets/images/page_builder/layouts/2_1.png similarity index 100% rename from web/assets/images/page_builder/layouts/2_1.png rename to public/assets/images/page_builder/layouts/2_1.png diff --git a/web/assets/images/page_builder/layouts/default.png b/public/assets/images/page_builder/layouts/default.png similarity index 100% rename from web/assets/images/page_builder/layouts/default.png rename to public/assets/images/page_builder/layouts/default.png diff --git a/web/assets/images/page_builder/layouts/test.png b/public/assets/images/page_builder/layouts/test.png similarity index 100% rename from web/assets/images/page_builder/layouts/test.png rename to public/assets/images/page_builder/layouts/test.png diff --git a/web/assets/images/product/dairy.svg b/public/assets/images/product/dairy.svg similarity index 100% rename from web/assets/images/product/dairy.svg rename to public/assets/images/product/dairy.svg diff --git a/web/assets/images/product/egg.svg b/public/assets/images/product/egg.svg similarity index 100% rename from web/assets/images/product/egg.svg rename to public/assets/images/product/egg.svg diff --git a/web/assets/images/product/gluten.svg b/public/assets/images/product/gluten.svg similarity index 100% rename from web/assets/images/product/gluten.svg rename to public/assets/images/product/gluten.svg diff --git a/web/assets/images/product/nuts.svg b/public/assets/images/product/nuts.svg similarity index 100% rename from web/assets/images/product/nuts.svg rename to public/assets/images/product/nuts.svg diff --git a/web/assets/images/product/seafood.svg b/public/assets/images/product/seafood.svg similarity index 100% rename from web/assets/images/product/seafood.svg rename to public/assets/images/product/seafood.svg diff --git a/web/assets/images/product/servings.svg b/public/assets/images/product/servings.svg similarity index 100% rename from web/assets/images/product/servings.svg rename to public/assets/images/product/servings.svg diff --git a/web/assets/images/product/spicy.svg b/public/assets/images/product/spicy.svg similarity index 100% rename from web/assets/images/product/spicy.svg rename to public/assets/images/product/spicy.svg diff --git a/web/assets/images/recommendations/icon-like.svg b/public/assets/images/recommendations/icon-like.svg similarity index 100% rename from web/assets/images/recommendations/icon-like.svg rename to public/assets/images/recommendations/icon-like.svg diff --git a/web/assets/images/recommendations/icon-loading.svg b/public/assets/images/recommendations/icon-loading.svg similarity index 100% rename from web/assets/images/recommendations/icon-loading.svg rename to public/assets/images/recommendations/icon-loading.svg diff --git a/web/assets/images/recommendations/placeholder.png b/public/assets/images/recommendations/placeholder.png similarity index 100% rename from web/assets/images/recommendations/placeholder.png rename to public/assets/images/recommendations/placeholder.png diff --git a/web/assets/images/travel-plan.jpg b/public/assets/images/travel-plan.jpg similarity index 100% rename from web/assets/images/travel-plan.jpg rename to public/assets/images/travel-plan.jpg diff --git a/web/assets/build/.gitkeep b/public/ezplatform/build/.gitkeep similarity index 100% rename from web/assets/build/.gitkeep rename to public/ezplatform/build/.gitkeep diff --git a/public/index.php b/public/index.php new file mode 100644 index 000000000..3afd1945d --- /dev/null +++ b/public/index.php @@ -0,0 +1,56 @@ +handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/src/AppBundle/AppBundle.php b/src/AppBundle/AppBundle.php deleted file mode 100644 index 2b493a223..000000000 --- a/src/AppBundle/AppBundle.php +++ /dev/null @@ -1,25 +0,0 @@ -getExtension('ezpublish'); - $extension->addPolicyProvider(new PersonalizationPolicyProvider()); - - $container->addCompilerPass(new MigrationParameterPass()); - } -} diff --git a/src/AppBundle/Controller/RecommendationsController.php b/src/AppBundle/Controller/RecommendationsController.php deleted file mode 100644 index d973c009f..000000000 --- a/src/AppBundle/Controller/RecommendationsController.php +++ /dev/null @@ -1,172 +0,0 @@ -locationService = $locationService; - $this->searchService = $searchService; - $this->contentService = $contentService; - $this->router = $router; - $this->templating = $templating; - } - - /** - * Displays template with random recommendations. - * - * @param string $template - * @param array|string $selectedContentTypes - * @param int $limit - * @param bool $useCache - * - * @return \Symfony\Component\HttpFoundation\Response - */ - public function showRandom( - $template, - $selectedContentTypes, - $limit = 3, - $useCache = true - ) { - if (!$useCache || empty($this->randomRecommendations)) { - $this->randomRecommendations = $this->getRandomContent( - $this->getQuery($selectedContentTypes), - $limit - ); - } - - return $this->templating->renderResponse( - $template, - [ - 'randomRecommendations' => $this->randomRecommendations, - ], - new Response() - ); - } - - /** - * Returns random recommendations in JSON format. - * - * @param array|string $selectedContentTypes - * @param int $limit - * @param bool $useCache - * - * @return \Symfony\Component\HttpFoundation\JsonResponse - */ - public function getRandomJSON( - $selectedContentTypes, - $limit = 3, - $useCache = true - ) { - if (!$useCache || empty($this->randomRecommendations)) { - $this->randomRecommendations = $this->getRandomContent( - $this->getQuery($selectedContentTypes), - $limit - ); - } - - $randomContent = []; - foreach ($this->randomRecommendations as $content) { - $randomContent[] = [ - 'name' => $content->contentInfo->name, - 'uri' => $this->router->generate('ez_urlalias', ['contentId' => $content->id]), - 'image' => $content->getFieldValue('image')->uri, - ]; - } - - return new JsonResponse([ - 'data' => $randomContent, - ]); - } - - /** - * Returns limited and randomized array of Content objects based on given arguments. - * - * @param \eZ\Publish\API\Repository\Values\Content\LocationQuery $query - * @param int $limit - * - * @return array - */ - private function getRandomContent(LocationQuery $query, $limit) - { - $results = $this->searchService->findLocations($query); - - shuffle($results->searchHits); - - $items = []; - foreach ($results->searchHits as $item) { - $items[] = $this->contentService->loadContentByContentInfo( - $item->valueObject->contentInfo - ); - - if (count($items) == $limit) { - break; - } - } - - return $items; - } - - /** - * Returns LocationQuery object based on given arguments. - * - * @param array|string $selectedContentTypes - * - * @return \eZ\Publish\API\Repository\Values\Content\LocationQuery - */ - private function getQuery($selectedContentTypes) - { - $query = new LocationQuery(); - - $query->query = new Criterion\LogicalAnd([ - new Criterion\Visibility(Criterion\Visibility::VISIBLE), - new Criterion\ContentTypeIdentifier($selectedContentTypes), - ]); - - return $query; - } -} diff --git a/src/CacheKernel.php b/src/CacheKernel.php new file mode 100644 index 000000000..1d54f8968 --- /dev/null +++ b/src/CacheKernel.php @@ -0,0 +1,12 @@ +formFactory = $formFactory; $this->sender = $sender; diff --git a/src/AppBundle/Controller/MenuController.php b/src/Controller/MenuController.php similarity index 90% rename from src/AppBundle/Controller/MenuController.php rename to src/Controller/MenuController.php index 1b8aa4899..9417e6e61 100644 --- a/src/AppBundle/Controller/MenuController.php +++ b/src/Controller/MenuController.php @@ -3,12 +3,12 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Controller; +namespace App\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Templating\EngineInterface; use eZ\Publish\API\Repository\SearchService; -use AppBundle\QueryType\MenuQueryType; +use App\QueryType\MenuQueryType; class MenuController { @@ -18,7 +18,7 @@ class MenuController /** @var \eZ\Publish\API\Repository\SearchService */ protected $searchService; - /** @var \AppBundle\QueryType\MenuQueryType */ + /** @var \App\QueryType\MenuQueryType */ protected $menuQueryType; /** @var int */ @@ -30,7 +30,7 @@ class MenuController /** * @param \Symfony\Component\Templating\EngineInterface $templating * @param \eZ\Publish\API\Repository\SearchService $searchService - * @param \AppBundle\QueryType\MenuQueryType $menuQueryType + * @param \App\QueryType\MenuQueryType $menuQueryType * @param int $topMenuParentLocationId * @param array $topMenuContentTypeIdentifier */ @@ -38,8 +38,8 @@ public function __construct( EngineInterface $templating, SearchService $searchService, MenuQueryType $menuQueryType, - $topMenuParentLocationId, - $topMenuContentTypeIdentifier + int $topMenuParentLocationId, + array $topMenuContentTypeIdentifier ) { $this->templating = $templating; $this->searchService = $searchService; diff --git a/src/AppBundle/Controller/ProductListController.php b/src/Controller/ProductListController.php similarity index 98% rename from src/AppBundle/Controller/ProductListController.php rename to src/Controller/ProductListController.php index d5bf95a16..d5110fcbb 100644 --- a/src/AppBundle/Controller/ProductListController.php +++ b/src/Controller/ProductListController.php @@ -3,14 +3,14 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Controller; +namespace App\Controller; use eZ\Publish\API\Repository\SearchService; use eZ\Publish\API\Repository\Values\Content\Query\Criterion; use eZ\Publish\Core\MVC\Symfony\View\ContentView; use eZ\Publish\Core\QueryType\ContentViewQueryTypeMapper; use eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter; -use AppBundle\Form\Type\ProductSearchType; +use App\Form\Type\ProductSearchType; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; diff --git a/src/AppBundle/DependencyInjection/Compiler/MigrationParameterPass.php b/src/DependencyInjection/Compiler/MigrationParameterPass.php similarity index 96% rename from src/AppBundle/DependencyInjection/Compiler/MigrationParameterPass.php rename to src/DependencyInjection/Compiler/MigrationParameterPass.php index 6483da28d..f6ea6f280 100644 --- a/src/AppBundle/DependencyInjection/Compiler/MigrationParameterPass.php +++ b/src/DependencyInjection/Compiler/MigrationParameterPass.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\DependencyInjection\Compiler; +namespace App\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/web/assets/ezplatform/build/.gitkeep b/src/Entity/.gitignore similarity index 100% rename from web/assets/ezplatform/build/.gitkeep rename to src/Entity/.gitignore diff --git a/src/AppBundle/Entity/ProductSearch.php b/src/Entity/ProductSearch.php similarity index 93% rename from src/AppBundle/Entity/ProductSearch.php rename to src/Entity/ProductSearch.php index 83d68bf54..6dc94ce21 100644 --- a/src/AppBundle/Entity/ProductSearch.php +++ b/src/Entity/ProductSearch.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Entity; +namespace App\Entity; class ProductSearch { diff --git a/src/AppBundle/Event/AbstractBlockEvent.php b/src/Event/AbstractBlockEvent.php similarity index 83% rename from src/AppBundle/Event/AbstractBlockEvent.php rename to src/Event/AbstractBlockEvent.php index 829a986de..4f2c76fbe 100644 --- a/src/AppBundle/Event/AbstractBlockEvent.php +++ b/src/Event/AbstractBlockEvent.php @@ -6,13 +6,13 @@ */ declare(strict_types=1); -namespace AppBundle\Event; +namespace App\Event; -use AppBundle\Helper\ContentHelper; -use AppBundle\Helper\LocationHelper; -use AppBundle\Value\BlockPreRenderValueObject; -use AppBundle\Value\BlockResponseValueObject; -use AppBundle\Value\PageBuilderBlockValueObject; +use App\Helper\ContentHelper; +use App\Helper\LocationHelper; +use App\Value\BlockPreRenderValueObject; +use App\Value\BlockResponseValueObject; +use App\Value\PageBuilderBlockValueObject; use eZ\Publish\API\Repository\Exceptions\InvalidArgumentException; use eZ\Publish\API\Repository\Exceptions\NotFoundException; use eZ\Publish\API\Repository\Exceptions\UnauthorizedException; @@ -21,10 +21,10 @@ abstract class AbstractBlockEvent { - /** @var \AppBundle\Helper\LocationHelper */ + /** @var \App\Helper\LocationHelper */ protected $locationHelper; - /** @var \AppBundle\Helper\ContentHelper */ + /** @var \App\Helper\ContentHelper */ protected $contentHelper; /** @var \eZ\Publish\Core\QueryType\QueryType */ @@ -34,8 +34,8 @@ abstract class AbstractBlockEvent protected $tagHandler; /** - * @param \AppBundle\Helper\LocationHelper $locationHelper - * @param \AppBundle\Helper\ContentHelper $contentHelper + * @param \App\Helper\LocationHelper $locationHelper + * @param \App\Helper\ContentHelper $contentHelper * @param \eZ\Publish\Core\QueryType\QueryType $queryType * @param \EzSystems\PlatformHttpCacheBundle\Handler\TagHandler $tagHandler */ @@ -52,7 +52,7 @@ public function __construct( } /** - * @param \AppBundle\Value\PageBuilderBlockValueObject $blockValueObject + * @param \App\Value\PageBuilderBlockValueObject $blockValueObject * * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException @@ -63,14 +63,13 @@ protected function setPreRenderParameters(PageBuilderBlockValueObject $blockValu /** @var BlockPreRenderValueObject $blockValueObject */ $contentArray = $this->getContentItems($blockValueObject); $parameters = $blockValueObject->renderRequest->getParameters(); - $parameters['contentArray'] = $contentArray; $parameters['location'] = $this->locationHelper->getLocationIdByContentId((int) $blockValueObject->blockValue->getAttribute('contentId')->getValue()); $blockValueObject->renderRequest->setParameters($parameters); } - /** @param \AppBundle\Value\PageBuilderBlockValueObject $blockValueObject */ + /** @param \App\Value\PageBuilderBlockValueObject $blockValueObject */ protected function processResponse(PageBuilderBlockValueObject $blockValueObject): void { /** @var BlockResponseValueObject $blockValueObject */ @@ -91,11 +90,11 @@ protected function processResponse(PageBuilderBlockValueObject $blockValueObject } $this->tagHandler->addTags(array_unique($tags)); - $this->tagHandler->tagResponse($blockValueObject->response); + $this->tagHandler->tagSymfonyResponse($blockValueObject->response); } /** - * @param \AppBundle\Value\PageBuilderBlockValueObject $blockValueObject + * @param \App\Value\PageBuilderBlockValueObject $blockValueObject * * @return array * diff --git a/src/AppBundle/Event/Listener/RenderMenuListener.php b/src/Event/Listener/RenderMenuListener.php similarity index 86% rename from src/AppBundle/Event/Listener/RenderMenuListener.php rename to src/Event/Listener/RenderMenuListener.php index e7a6bf744..3ec6e20fa 100644 --- a/src/AppBundle/Event/Listener/RenderMenuListener.php +++ b/src/Event/Listener/RenderMenuListener.php @@ -6,15 +6,15 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Listener; +namespace App\Event\Listener; -use AppBundle\User\UserGroups; use eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute; use EzSystems\EzPlatformAdminUi\Menu\Event\ConfigureMenuEvent; use Knp\Menu\ItemInterface; use Knp\Menu\Util\MenuManipulator; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; -use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface; + class RenderMenuListener { @@ -25,10 +25,7 @@ class RenderMenuListener /** @var \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface */ private $authorizationChecker; - /** @var \AppBundle\User\UserGroups */ - private $userGroups; - - /** @var \Symfony\Component\Translation\TranslatorInterface */ + /** @var \Symfony\Contracts\Translation\TranslatorInterface */ private $translator; /** @var string */ @@ -39,26 +36,25 @@ class RenderMenuListener /** * @param \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface $authorizationChecker - * @param \AppBundle\User\UserGroups $userGroups - * @param \Symfony\Component\Translation\TranslatorInterface $translator + * @param \Symfony\Contracts\Translation\TranslatorInterface $translator * @param int|null $personalizationCustomerId * @param string|null $personalizationLicenseKey */ public function __construct( AuthorizationCheckerInterface $authorizationChecker, - UserGroups $userGroups, TranslatorInterface $translator, ?int $personalizationCustomerId, ?string $personalizationLicenseKey ) { $this->authorizationChecker = $authorizationChecker; - $this->userGroups = $userGroups; $this->translator = $translator; $this->personalizationCustomerId = $personalizationCustomerId; $this->personalizationLicenseKey = $personalizationLicenseKey; } - /** @param \EzSystems\EzPlatformAdminUi\Menu\Event\ConfigureMenuEvent $event */ + /** + * @param \EzSystems\EzPlatformAdminUi\Menu\Event\ConfigureMenuEvent $event + */ public function renderMenu(ConfigureMenuEvent $event): void { $menu = $event->getMenu(); @@ -101,7 +97,9 @@ private function configurePersonalization(ItemInterface $item, MenuManipulator $ } } - /** @return bool */ + /** + * @return bool + */ private function hasPersonalizationCredentials(): bool { return !empty($this->personalizationCustomerId) && !empty($this->personalizationLicenseKey); diff --git a/src/AppBundle/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php b/src/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php similarity index 97% rename from src/AppBundle/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php rename to src/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php index fd868634d..1bc9f47ed 100644 --- a/src/AppBundle/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php +++ b/src/Event/PageFieldType/Attribute/AttributeSerializationSubscriber.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Event\PageFieldType\Attribute; +namespace App\Event\PageFieldType\Attribute; use EzSystems\EzPlatformPageFieldType\Event\AttributeSerializationEvent; use EzSystems\EzPlatformPageFieldType\Event\PageEvents; diff --git a/src/AppBundle/Event/Subscriber/BuildDemoSchemaSubscriber.php b/src/Event/Subscriber/BuildDemoSchemaSubscriber.php similarity index 97% rename from src/AppBundle/Event/Subscriber/BuildDemoSchemaSubscriber.php rename to src/Event/Subscriber/BuildDemoSchemaSubscriber.php index e9ce33ee9..6df6c0dd1 100644 --- a/src/AppBundle/Event/Subscriber/BuildDemoSchemaSubscriber.php +++ b/src/Event/Subscriber/BuildDemoSchemaSubscriber.php @@ -8,7 +8,7 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Subscriber; +namespace App\Event\Subscriber; use EzSystems\DoctrineSchema\API\Event\SchemaBuilderEvent; use EzSystems\DoctrineSchema\API\Event\SchemaBuilderEvents; diff --git a/src/AppBundle/Event/Subscriber/EndWorkflowSubscriber.php b/src/Event/Subscriber/EndWorkflowSubscriber.php similarity index 99% rename from src/AppBundle/Event/Subscriber/EndWorkflowSubscriber.php rename to src/Event/Subscriber/EndWorkflowSubscriber.php index ca46c7678..1bf6c8a85 100644 --- a/src/AppBundle/Event/Subscriber/EndWorkflowSubscriber.php +++ b/src/Event/Subscriber/EndWorkflowSubscriber.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Subscriber; +namespace App\Event\Subscriber; use eZ\Publish\API\Repository\ContentService; use eZ\Publish\API\Repository\PermissionResolver; diff --git a/src/AppBundle/Event/Subscriber/PlacesBlockSubscriber.php b/src/Event/Subscriber/PlacesBlockSubscriber.php similarity index 93% rename from src/AppBundle/Event/Subscriber/PlacesBlockSubscriber.php rename to src/Event/Subscriber/PlacesBlockSubscriber.php index eb8af8487..7624af059 100644 --- a/src/AppBundle/Event/Subscriber/PlacesBlockSubscriber.php +++ b/src/Event/Subscriber/PlacesBlockSubscriber.php @@ -6,11 +6,11 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Subscriber; +namespace App\Event\Subscriber; -use AppBundle\Event\AbstractBlockEvent; -use AppBundle\Value\BlockPreRenderValueObject; -use AppBundle\Value\BlockResponseValueObject; +use App\Event\AbstractBlockEvent; +use App\Value\BlockPreRenderValueObject; +use App\Value\BlockResponseValueObject; use EzSystems\EzPlatformPageFieldType\Event\BlockResponseEvent; use EzSystems\EzPlatformPageFieldType\Event\BlockResponseEvents; use EzSystems\EzPlatformPageFieldType\FieldType\Page\Block\Renderer\BlockRenderEvents; diff --git a/src/AppBundle/Event/Subscriber/TastesBlockSubscriber.php b/src/Event/Subscriber/TastesBlockSubscriber.php similarity index 93% rename from src/AppBundle/Event/Subscriber/TastesBlockSubscriber.php rename to src/Event/Subscriber/TastesBlockSubscriber.php index dc9d75b13..6589c052b 100644 --- a/src/AppBundle/Event/Subscriber/TastesBlockSubscriber.php +++ b/src/Event/Subscriber/TastesBlockSubscriber.php @@ -6,11 +6,11 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Subscriber; +namespace App\Event\Subscriber; -use AppBundle\Event\AbstractBlockEvent; -use AppBundle\Value\BlockPreRenderValueObject; -use AppBundle\Value\BlockResponseValueObject; +use App\Event\AbstractBlockEvent; +use App\Value\BlockPreRenderValueObject; +use App\Value\BlockResponseValueObject; use EzSystems\EzPlatformPageFieldType\Event\BlockResponseEvent; use EzSystems\EzPlatformPageFieldType\Event\BlockResponseEvents; use EzSystems\EzPlatformPageFieldType\FieldType\Page\Block\Renderer\BlockRenderEvents; diff --git a/src/AppBundle/Event/TemplateAttributeBlockNameListener.php b/src/Event/TemplateAttributeBlockNameListener.php similarity index 97% rename from src/AppBundle/Event/TemplateAttributeBlockNameListener.php rename to src/Event/TemplateAttributeBlockNameListener.php index 4590faeec..be85ed52e 100644 --- a/src/AppBundle/Event/TemplateAttributeBlockNameListener.php +++ b/src/Event/TemplateAttributeBlockNameListener.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Event; +namespace App\Event; use EzSystems\EzPlatformPageFieldType\FieldType\Page\Block\Renderer\BlockRenderEvents; use EzSystems\EzPlatformPageFieldType\FieldType\Page\Block\Renderer\Event\PreRenderEvent; diff --git a/src/AppBundle/Event/Workflow/PublishOnLastStageSubscriber.php b/src/Event/Workflow/PublishOnLastStageSubscriber.php similarity index 99% rename from src/AppBundle/Event/Workflow/PublishOnLastStageSubscriber.php rename to src/Event/Workflow/PublishOnLastStageSubscriber.php index 934a29bce..0cfe509a5 100644 --- a/src/AppBundle/Event/Workflow/PublishOnLastStageSubscriber.php +++ b/src/Event/Workflow/PublishOnLastStageSubscriber.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Event\Workflow; +namespace App\Event\Workflow; use eZ\Publish\API\Repository\ContentService; use eZ\Publish\API\Repository\PermissionResolver; diff --git a/src/AppBundle/Form/Type/ContactType.php b/src/Form/Type/ContactType.php similarity index 90% rename from src/AppBundle/Form/Type/ContactType.php rename to src/Form/Type/ContactType.php index 30b5a2a82..a0fa56dc9 100644 --- a/src/AppBundle/Form/Type/ContactType.php +++ b/src/Form/Type/ContactType.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Form\Type; +namespace App\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -30,6 +30,6 @@ public function getName() public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(['data_class' => 'AppBundle\Model\Contact']); + $resolver->setDefaults(['data_class' => 'App\Model\Contact']); } } diff --git a/src/AppBundle/Form/Type/ProductSearchType.php b/src/Form/Type/ProductSearchType.php similarity index 95% rename from src/AppBundle/Form/Type/ProductSearchType.php rename to src/Form/Type/ProductSearchType.php index 91cec6ca8..f887a57ba 100644 --- a/src/AppBundle/Form/Type/ProductSearchType.php +++ b/src/Form/Type/ProductSearchType.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Form\Type; +namespace App\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -85,6 +85,6 @@ public function getName() */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array('data_class' => 'AppBundle\Entity\ProductSearch')); + $resolver->setDefaults(array('data_class' => 'App\Entity\ProductSearch')); } } diff --git a/src/AppBundle/Helper/ContentHelper.php b/src/Helper/ContentHelper.php similarity index 97% rename from src/AppBundle/Helper/ContentHelper.php rename to src/Helper/ContentHelper.php index ef40f3545..04ad3a49b 100644 --- a/src/AppBundle/Helper/ContentHelper.php +++ b/src/Helper/ContentHelper.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Helper; +namespace App\Helper; use eZ\Publish\API\Repository\SearchService as SearchServiceInterface; use eZ\Publish\API\Repository\Values\Content\Query; diff --git a/src/AppBundle/Helper/LocationHelper.php b/src/Helper/LocationHelper.php similarity index 98% rename from src/AppBundle/Helper/LocationHelper.php rename to src/Helper/LocationHelper.php index 008e562c0..fb537405d 100644 --- a/src/AppBundle/Helper/LocationHelper.php +++ b/src/Helper/LocationHelper.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Helper; +namespace App\Helper; use eZ\Publish\API\Repository\ContentService; use eZ\Publish\API\Repository\LocationService; diff --git a/src/AppBundle/User/UserGroups.php b/src/Helper/UserGroupHelper.php similarity index 98% rename from src/AppBundle/User/UserGroups.php rename to src/Helper/UserGroupHelper.php index 16e416b59..6b90ae6d4 100644 --- a/src/AppBundle/User/UserGroups.php +++ b/src/Helper/UserGroupHelper.php @@ -3,13 +3,13 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\User; +namespace App\Helper; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use eZ\Publish\API\Repository\Repository as RepositoryInterface; use eZ\Publish\API\Repository\Values\User\User as ApiUser; -class UserGroups +class UserGroupHelper { /** @var \eZ\Publish\API\Repository\Repository */ private $repository; diff --git a/src/AppBundle/Installer/InstallerCommandExecuteTrait.php b/src/Installer/InstallerCommandExecuteTrait.php similarity index 98% rename from src/AppBundle/Installer/InstallerCommandExecuteTrait.php rename to src/Installer/InstallerCommandExecuteTrait.php index ae809405c..10c76f480 100644 --- a/src/AppBundle/Installer/InstallerCommandExecuteTrait.php +++ b/src/Installer/InstallerCommandExecuteTrait.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Installer; +namespace App\Installer; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\PhpExecutableFinder; diff --git a/src/AppBundle/Installer/PlatformEEDemoInstaller.php b/src/Installer/PlatformEEDemoInstaller.php similarity index 56% rename from src/AppBundle/Installer/PlatformEEDemoInstaller.php rename to src/Installer/PlatformEEDemoInstaller.php index 5b11eb4fe..e10d9227f 100644 --- a/src/AppBundle/Installer/PlatformEEDemoInstaller.php +++ b/src/Installer/PlatformEEDemoInstaller.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Installer; +namespace App\Installer; use EzSystems\PlatformInstallerBundle\Installer\CoreInstaller; use Symfony\Component\Filesystem\Filesystem; @@ -29,17 +29,17 @@ public function importData() $migrationCommands = [ 'cache:clear', - //'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/tags.yml -n', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/languages.yml -v -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/product_list.yml -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/all.yml -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/images.yml -v -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/content.yml -v -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/users.yml -v -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/landing_page_contenttype.yml -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/landing_page.yml -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/form.yml -n -u', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/cleanup-ee.yml -n -u', + //'kaliop:migration:migrate --path=src/App/MigrationVersions/tags.yml -n', + 'kaliop:migration:migrate --path=src/MigrationVersions/languages.yml -v -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/product_list.yml -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/all.yml -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/images.yml -v -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/content.yml -v -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/users.yml -v -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/landing_page_contenttype.yml -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/landing_page.yml -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/form.yml -n -u', + 'kaliop:migration:migrate --path=src/MigrationVersions/cleanup-ee.yml -n -u', ]; foreach ($migrationCommands as $cmd) { diff --git a/src/AppBundle/Installer/PlatformEEDemoTestLayoutsInstaller.php b/src/Installer/PlatformEEDemoTestLayoutsInstaller.php similarity index 67% rename from src/AppBundle/Installer/PlatformEEDemoTestLayoutsInstaller.php rename to src/Installer/PlatformEEDemoTestLayoutsInstaller.php index 113c5cd09..8620bca92 100644 --- a/src/AppBundle/Installer/PlatformEEDemoTestLayoutsInstaller.php +++ b/src/Installer/PlatformEEDemoTestLayoutsInstaller.php @@ -3,12 +3,11 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Installer; +namespace App\Installer; -use EzSystems\PlatformInstallerBundle\Installer\CleanInstaller; -use Symfony\Component\Filesystem\Filesystem; +use EzSystems\PlatformInstallerBundle\Installer\CoreInstaller; -class PlatformEEDemoTestLayoutsInstaller extends CleanInstaller +class PlatformEEDemoTestLayoutsInstaller extends CoreInstaller { use InstallerCommandExecuteTrait; @@ -20,7 +19,7 @@ public function importData() { $migrationCommands = [ 'cache:clear', - 'kaliop:migration:migrate --path=src/AppBundle/MigrationVersions/landing_page_tests.yml -n', + 'kaliop:migration:migrate --path=src/App/MigrationVersions/landing_page_tests.yml -n', ]; foreach ($migrationCommands as $cmd) { diff --git a/src/Kernel.php b/src/Kernel.php new file mode 100644 index 000000000..91d90a4df --- /dev/null +++ b/src/Kernel.php @@ -0,0 +1,62 @@ +getProjectDir().'/config/bundles.php'; + + foreach ($contents as $class => $envs) { + if ($envs[$this->environment] ?? $envs['all'] ?? false) { + yield new $class(); + } + } + } + + protected function build(ContainerBuilder $container): void + { + parent::build($container); + + $container->addCompilerPass(new MigrationParameterPass()); + + /** @var \eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension $extension */ + $extension = $container->getExtension('ezpublish'); + $extension->addPolicyProvider(new PersonalizationPolicyProvider()); + } + + protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void + { + $container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php')); + $container->setParameter('container.dumper.inline_class_loader', true); + $confDir = $this->getProjectDir().'/config'; + + $loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob'); + $loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob'); + } + + protected function configureRoutes(RouteCollectionBuilder $routes): void + { + $confDir = $this->getProjectDir().'/config'; + + $routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob'); + $routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob'); + $routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob'); + } +} diff --git a/src/AppBundle/Mail/Sender.php b/src/Mail/Sender.php similarity index 76% rename from src/AppBundle/Mail/Sender.php rename to src/Mail/Sender.php index e26668abf..26ef8ef33 100644 --- a/src/AppBundle/Mail/Sender.php +++ b/src/Mail/Sender.php @@ -3,20 +3,20 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Mail; +namespace App\Mail; -use AppBundle\Model\Contact; -use Symfony\Bundle\TwigBundle\TwigEngine as Templating; -use Symfony\Component\Translation\TranslatorInterface; +use App\Model\Contact; use Swift_Mailer; use Swift_Message; +use Symfony\Contracts\Translation\TranslatorInterface; +use Twig\Environment as Templating; class Sender { /** @var \Swift_Mailer */ protected $mailer; - /** @var \Symfony\Component\Translation\TranslatorInterface */ + /** @var \Symfony\Component\Translation\TranslatorInterface|TranslatorInterface */ protected $translator; /** @var \Symfony\Bundle\TwigBundle\TwigEngine */ @@ -31,7 +31,7 @@ class Sender /** * @param \Swift_Mailer $mailer * @param \Symfony\Component\Translation\TranslatorInterface $translator - * @param \Symfony\Bundle\TwigBundle\TwigEngine $templating + * @param \Twig\Environment $templating * @param string $senderEmail * @param string $recipientEmail */ @@ -50,9 +50,14 @@ public function __construct( } /** - * @param Contact $contact + * @param \App\Model\Contact $contact + * + * @throws \Twig\Error\Error + * @throws \Twig\Error\LoaderError + * @throws \Twig\Error\RuntimeError + * @throws \Twig\Error\SyntaxError */ - public function send(Contact $contact) + public function send(Contact $contact): void { $title = $this->translator->trans('You have a new message from %from%', ['%from%' => $contact->getFrom()]); $message = Swift_Message::newInstance($title, $contact->getMessage()) diff --git a/src/Migration/.gitignore b/src/Migration/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/src/AppBundle/Migration/FieldHandler/EzImageAsset.php b/src/Migration/FieldHandler/EzImageAsset.php similarity index 85% rename from src/AppBundle/Migration/FieldHandler/EzImageAsset.php rename to src/Migration/FieldHandler/EzImageAsset.php index 0e69d5b20..641df33ab 100644 --- a/src/AppBundle/Migration/FieldHandler/EzImageAsset.php +++ b/src/Migration/FieldHandler/EzImageAsset.php @@ -1,25 +1,16 @@ resolver = $resolver; - } - /** * @inheritdoc */ @@ -34,7 +25,7 @@ public function hashToFieldValue($fieldValue, array $context = array()) } return new ImageValue( - (int)$this->resolver->resolveReference($fieldValue['destinationContentId']), + (int)$this->referenceResolver->resolveReference($fieldValue['destinationContentId']), $fieldValue['alternativeText'] ); } diff --git a/src/MigrationVersions/References/.keep b/src/MigrationVersions/References/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/src/AppBundle/MigrationVersions/all.yml b/src/MigrationVersions/all.yml similarity index 99% rename from src/AppBundle/MigrationVersions/all.yml rename to src/MigrationVersions/all.yml index a13dd9c99..15683ee61 100644 --- a/src/AppBundle/MigrationVersions/all.yml +++ b/src/MigrationVersions/all.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true # media / images @@ -1406,5 +1406,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/cleanup-ee.yml b/src/MigrationVersions/cleanup-ee.yml similarity index 87% rename from src/AppBundle/MigrationVersions/cleanup-ee.yml rename to src/MigrationVersions/cleanup-ee.yml index e4da12090..21ed17901 100644 --- a/src/AppBundle/MigrationVersions/cleanup-ee.yml +++ b/src/MigrationVersions/cleanup-ee.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true - diff --git a/src/AppBundle/MigrationVersions/content.yml b/src/MigrationVersions/content.yml similarity index 99% rename from src/AppBundle/MigrationVersions/content.yml rename to src/MigrationVersions/content.yml index 33079d9db..ea20303ed 100644 --- a/src/AppBundle/MigrationVersions/content.yml +++ b/src/MigrationVersions/content.yml @@ -1,7 +1,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true # places and tastes container @@ -170,9 +170,9 @@ #related_articles: # content 77, 78, 79 authors_position: Senior Editor premium_content: false -# tags: -# - { tag_keyword:'Mexican' } -# - { tag_keyword:'Mexico' } + # tags: + # - { tag_keyword:'Mexican' } + # - { tag_keyword:'Mexico' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__mexican_cuisine @@ -607,9 +607,9 @@ #related_articles: content 78, 79, 62 authors_position: Editorial Director premium_content: false -# tags: -# - { tag_keyword:'Ethiopian' } -# - { tag_keyword:'Ethiopia' } + # tags: + # - { tag_keyword:'Ethiopian' } + # - { tag_keyword:'Ethiopia' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__ethiopian_cuisine @@ -987,9 +987,9 @@ #related_articles: content 79, 80, 81 authors_position: Social Media Editor premium_content: false -# tags: -# - { tag_keyword:'Thai' } -# - { tag_keyword:'Thailand' } + # tags: + # - { tag_keyword:'Thai' } + # - { tag_keyword:'Thailand' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__thailand_cuisine @@ -1406,8 +1406,8 @@ #related_articles: content 80, 81, 62 authors_position: Senior Editor premium_content: false -# tags: -# - { tag_keyword:'Israel' } + # tags: + # - { tag_keyword:'Israel' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__israeli_cuisine @@ -1880,9 +1880,9 @@ #related_articles: content 81, 62, 77 authors_position: Senior Editor premium_content: false -# tags: -# - { tag_keyword:'Jamaican' } -# - { tag_keyword:'Jamaica' } + # tags: + # - { tag_keyword:'Jamaican' } + # - { tag_keyword:'Jamaica' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__jamaican_cuisine @@ -2374,9 +2374,9 @@ #related_articles: content 62, 77, 78 authors_position: Senior Editor premium_content: true -# tags: -# - { tag_keyword:'Polish' } -# - { tag_keyword:'Poland' } + # tags: + # - { tag_keyword:'Polish' } + # - { tag_keyword:'Poland' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__polish_cuisine @@ -2972,8 +2972,8 @@ #publish_date: 2016-10-26 19:10:00 authors_position: Senior Editor premium_content: false -# tags: -# - { tag_keyword:'Norway' } + # tags: + # - { tag_keyword:'Norway' } references: - identifier: ref_location_article__home__places_and_tastes__tastes__norwegian_cuisine @@ -3543,9 +3543,9 @@ name: 'Yura Rajzer' email: yura.rajzer@example.com authors_position: 'Content Marketing Editor' -# tags: -# - { tag_keyword:'New York (city, US)' } -# - { tag_keyword:'Writing Tips' } + # tags: + # - { tag_keyword:'New York (city, US)' } + # - { tag_keyword:'Writing Tips' } references: - identifier: ref_location_blog_post__home__blog__where_we_get_our_best_writing_done @@ -3598,8 +3598,8 @@ name: 'Yura Rajzer' email: yura.rajzer@example.com authors_position: 'Content Marketing Editor' -# tags: -# - { tag_keyword:'Travel Journal' } + # tags: + # - { tag_keyword:'Travel Journal' } references: - identifier: ref_location_blog_post__home__blog__travel_literature @@ -3771,8 +3771,8 @@ name: 'Yura Rajzer' email: yura.rajzer@example.com authors_position: 'Content Marketing Editor' -# tags: -# - { tag_keyword:'New York (city, US)' } + # tags: + # - { tag_keyword:'New York (city, US)' } references: - identifier: ref_location_blog_post__home__blog__why_we_love_nyc @@ -4063,9 +4063,9 @@ authors_position: 'Editorial Director' -# tags: -# - { id: 'reference:ref_tag_geo__europe__spain' } -# - { tag_keyword:'Valencia' } + # tags: + # - { id: 'reference:ref_tag_geo__europe__spain' } + # - { tag_keyword:'Valencia' } references: - identifier: ref_location_place__home__places_and_tastes__places__valencia_spain @@ -4791,9 +4791,9 @@ - name: 'Sandip Patel' email: sandip.patel@example.com -# tags: -# - { tag_keyword:'India' } -# - { tag_keyword:'Kochin' } + # tags: + # - { tag_keyword:'India' } + # - { tag_keyword:'Kochin' } references: - identifier: ref_location_place__home__places_and_tastes__places__kochin_india @@ -5631,9 +5631,9 @@ - name: 'Michael Wang' email: michael.wang@example.com -# tags: -# - { tag_keyword:'Dominican Republic' } -# - { tag_keyword:'Santo Domingo' } + # tags: + # - { tag_keyword:'Dominican Republic' } + # - { tag_keyword:'Santo Domingo' } references: - identifier: ref_location_place__home__places_and_tastes__places__santo_domingo_dominican_republic @@ -6234,9 +6234,9 @@ name: 'Usman Ekmekci' email: usman.ekmekci@example.com publication_date: 2015-09-17 14:31:00 -# tags: -# - { tag_keyword:'Alaska' } -# - { tag_keyword:'Anchorage' } + # tags: + # - { tag_keyword:'Alaska' } + # - { tag_keyword:'Anchorage' } references: - identifier: ref_location_place__home__places_and_tastes__places__anchorage_alaska @@ -6794,9 +6794,9 @@ name: 'Elizabeth Liu' email: elizabeth.liu@example.com publication_date: 2015-09-17 14:31:00 -# tags: -# - { tag_keyword:'New York (city, US)' } -# - { tag_keyword:'Brooklyn' } + # tags: + # - { tag_keyword:'New York (city, US)' } + # - { tag_keyword:'Brooklyn' } references: - identifier: ref_location_place__home__places_and_tastes__places__brooklyn_new_york @@ -7485,9 +7485,9 @@ name: 'Helena Karczewski' email: helena.karczewski@example.com publication_date: 2015-09-17 14:31:00 -# tags: -# - { tag_keyword:'Netherlands' } -# - { tag_keyword:'Amsterdam' } + # tags: + # - { tag_keyword:'Netherlands' } + # - { tag_keyword:'Amsterdam' } references: - identifier: ref_location_place__home__places_and_tastes__places__amsterdam_netherlands @@ -8449,5 +8449,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/form.yml b/src/MigrationVersions/form.yml similarity index 90% rename from src/AppBundle/MigrationVersions/form.yml rename to src/MigrationVersions/form.yml index f0e2798b1..7e7a7587c 100644 --- a/src/AppBundle/MigrationVersions/form.yml +++ b/src/MigrationVersions/form.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true # form content type @@ -86,15 +86,15 @@ "identifier": "single_line", "name": "Name", "attributes": [ - { "identifier": "placeholder", "value": null }, - { "identifier": "help", "value": null }, - { "identifier": "default_value", "value": null } + { "identifier": "placeholder", "value": "" }, + { "identifier": "help", "value": "" }, + { "identifier": "default_value", "value": "" } ], "validators": [ { "identifier": "required", "value": "" }, { "identifier": "min_length", "value": "0" }, { "identifier": "max_length", "value": "0" }, - { "identifier": "regex", "value": null } + { "identifier": "regex", "value": "" } ], "id": "f39ba579-7188-467f-b6a4-cc7539d86686" }, @@ -102,12 +102,12 @@ "identifier": "email", "name": "Email", "attributes": [ - { "identifier": "placeholder", "value": null }, - { "identifier": "help", "value": null } + { "identifier": "placeholder", "value": "" }, + { "identifier": "help", "value": "" } ], "validators": [ { "identifier": "required", "value": "" }, - { "identifier": "regex", "value": null } + { "identifier": "regex", "value": "" } ], "id": "8882245c-4931-4021-955b-bbf6699bb3cb" }, @@ -115,7 +115,7 @@ "identifier": "checkbox_list", "name": "Interest", "attributes": [ - { "identifier": "help", "value": null }, + { "identifier": "help", "value": "" }, { "identifier": "options", "value": "[\"Adventure\",\"Cultural\",\"Food\"]" } ], "validators": [ @@ -133,7 +133,7 @@ "identifier": "action", "value": "{\"action\":\"message\",\"location_id\":null,\"url\":null,\"message\":\"Thank you for your message.\"}" }, - { "identifier": "notification_email", "value": null } + { "identifier": "notification_email", "value": "" } ], "validators": [], "id": "d971820c-3ed6-4d6f-94f7-32facf7b9188" @@ -151,5 +151,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/images.yml b/src/MigrationVersions/images.yml similarity index 99% rename from src/AppBundle/MigrationVersions/images.yml rename to src/MigrationVersions/images.yml index 02a65f511..2ce0dd637 100644 --- a/src/AppBundle/MigrationVersions/images.yml +++ b/src/MigrationVersions/images.yml @@ -1,7 +1,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true ### images @@ -1925,5 +1925,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/landing_page.yml b/src/MigrationVersions/landing_page.yml similarity index 98% rename from src/AppBundle/MigrationVersions/landing_page.yml rename to src/MigrationVersions/landing_page.yml index 559ce76e8..519e70096 100644 --- a/src/AppBundle/MigrationVersions/landing_page.yml +++ b/src/MigrationVersions/landing_page.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true ## Home page content @@ -14,7 +14,7 @@ parent_location: reference:ref_folder__media__images attributes: name: Homepage hero - image: 'web/assets/images/landing_page/Homepage-banner.jpg' + image: 'public/assets/images/landing_page/Homepage-banner.jpg' references: - identifier: ref_location_image__media__images__homepage_hero @@ -361,5 +361,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/landing_page_contenttype.yml b/src/MigrationVersions/landing_page_contenttype.yml similarity index 100% rename from src/AppBundle/MigrationVersions/landing_page_contenttype.yml rename to src/MigrationVersions/landing_page_contenttype.yml diff --git a/src/AppBundle/MigrationVersions/landing_page_tests.yml b/src/MigrationVersions/landing_page_tests.yml similarity index 99% rename from src/AppBundle/MigrationVersions/landing_page_tests.yml rename to src/MigrationVersions/landing_page_tests.yml index d58d897d3..a52f2bf98 100644 --- a/src/AppBundle/MigrationVersions/landing_page_tests.yml +++ b/src/MigrationVersions/landing_page_tests.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true # folder - tests container @@ -8372,5 +8372,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/languages.yml b/src/MigrationVersions/languages.yml similarity index 73% rename from src/AppBundle/MigrationVersions/languages.yml rename to src/MigrationVersions/languages.yml index d4f851280..567f4713d 100644 --- a/src/AppBundle/MigrationVersions/languages.yml +++ b/src/MigrationVersions/languages.yml @@ -1,7 +1,7 @@ #- # type: reference # mode: load -# file: 'src/AppBundle/MigrationVersions/References/references.yml' +# file: 'src/MigrationVersions/References/references.yml' # overwrite: true # languages French 4, German 8, Norwegian 16 @@ -26,5 +26,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/product_list.yml b/src/MigrationVersions/product_list.yml similarity index 99% rename from src/AppBundle/MigrationVersions/product_list.yml rename to src/MigrationVersions/product_list.yml index 49e5fd5c2..d30e14bf9 100644 --- a/src/AppBundle/MigrationVersions/product_list.yml +++ b/src/MigrationVersions/product_list.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true # product_list content type @@ -8691,5 +8691,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/tags.yml b/src/MigrationVersions/tags.yml similarity index 99% rename from src/AppBundle/MigrationVersions/tags.yml rename to src/MigrationVersions/tags.yml index 56cf5d128..ded363a1c 100644 --- a/src/AppBundle/MigrationVersions/tags.yml +++ b/src/MigrationVersions/tags.yml @@ -6209,5 +6209,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/MigrationVersions/users.yml b/src/MigrationVersions/users.yml similarity index 99% rename from src/AppBundle/MigrationVersions/users.yml rename to src/MigrationVersions/users.yml index eb9a16d14..23b87aa53 100644 --- a/src/AppBundle/MigrationVersions/users.yml +++ b/src/MigrationVersions/users.yml @@ -2,7 +2,7 @@ - type: reference mode: load - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true - @@ -803,5 +803,5 @@ - type: reference mode: save - file: 'src/AppBundle/MigrationVersions/References/references.yml' + file: 'src/MigrationVersions/References/references.yml' overwrite: true diff --git a/src/AppBundle/Model/Contact.php b/src/Model/Contact.php similarity index 98% rename from src/AppBundle/Model/Contact.php rename to src/Model/Contact.php index 8b4aca299..c6e1b36a1 100644 --- a/src/AppBundle/Model/Contact.php +++ b/src/Model/Contact.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Model; +namespace App\Model; use Symfony\Component\Validator\Constraints as Assert; diff --git a/src/AppBundle/PremiumContent/HtmlRenderer.php b/src/PremiumContent/HtmlRenderer.php similarity index 97% rename from src/AppBundle/PremiumContent/HtmlRenderer.php rename to src/PremiumContent/HtmlRenderer.php index 0c1d97cbd..047cf89d9 100644 --- a/src/AppBundle/PremiumContent/HtmlRenderer.php +++ b/src/PremiumContent/HtmlRenderer.php @@ -3,7 +3,7 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\PremiumContent; +namespace App\PremiumContent; use DOMDocument; use DOMElement; diff --git a/src/AppBundle/QueryType/BlockQueryType.php b/src/QueryType/BlockQueryType.php similarity index 96% rename from src/AppBundle/QueryType/BlockQueryType.php rename to src/QueryType/BlockQueryType.php index 421754094..d789b8652 100644 --- a/src/AppBundle/QueryType/BlockQueryType.php +++ b/src/QueryType/BlockQueryType.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\QueryType; +namespace App\QueryType; use eZ\Publish\API\Repository\Values\Content\Query; use eZ\Publish\API\Repository\Values\Content\Query\Criterion; @@ -62,6 +62,6 @@ public function getSupportedParameters(): array /** @return string */ public static function getName(): string { - return 'AppBundle:BlockQueryType'; + return 'App:BlockQueryType'; } } diff --git a/src/AppBundle/QueryType/ChildrenQueryType.php b/src/QueryType/ChildrenQueryType.php similarity index 73% rename from src/AppBundle/QueryType/ChildrenQueryType.php rename to src/QueryType/ChildrenQueryType.php index bba4fb6dc..32b465cc6 100644 --- a/src/AppBundle/QueryType/ChildrenQueryType.php +++ b/src/QueryType/ChildrenQueryType.php @@ -1,14 +1,18 @@ languages = $value; + $this->languages = $languages; } - public function getQuery(array $parameters = []) + /** + * @param string[] $parameters + * + * @return \eZ\Publish\API\Repository\Values\Content\LocationQuery + */ + public function getQuery(array $parameters = []): LocationQuery { $criteria = new Query\Criterion\LogicalAnd([ new Query\Criterion\Visibility(Query\Criterion\Visibility::VISIBLE), @@ -42,9 +47,12 @@ public function getQuery(array $parameters = []) return new LocationQuery($options); } - public static function getName() + /** + * @return string + */ + public static function getName(): string { - return 'AppBundle:Menu'; + return 'App:Menu'; } /** @@ -52,7 +60,7 @@ public static function getName() * * @return array */ - public function getSupportedParameters() + public function getSupportedParameters(): array { return [ 'parent_location_id', diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore new file mode 100644 index 000000000..e69de29bb diff --git a/src/AppBundle/Resources/schema/demo.yaml b/src/Resources/schema/demo.yaml similarity index 100% rename from src/AppBundle/Resources/schema/demo.yaml rename to src/Resources/schema/demo.yaml diff --git a/src/AppBundle/Security/PersonalizationPolicyProvider.php b/src/Security/PersonalizationPolicyProvider.php similarity index 96% rename from src/AppBundle/Security/PersonalizationPolicyProvider.php rename to src/Security/PersonalizationPolicyProvider.php index 6f14ae4b2..9166b993d 100644 --- a/src/AppBundle/Security/PersonalizationPolicyProvider.php +++ b/src/Security/PersonalizationPolicyProvider.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Security; +namespace App\Security; use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigBuilderInterface; use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface; diff --git a/src/AppBundle/Twig/ContentDescriptionExtension.php b/src/Twig/ContentDescriptionExtension.php similarity index 64% rename from src/AppBundle/Twig/ContentDescriptionExtension.php rename to src/Twig/ContentDescriptionExtension.php index 11e4a28d0..24b09eac0 100644 --- a/src/AppBundle/Twig/ContentDescriptionExtension.php +++ b/src/Twig/ContentDescriptionExtension.php @@ -6,50 +6,37 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; -use eZ\Publish\Core\Helper\FieldHelper; use eZ\Publish\API\Repository\Values\Content\Content; use Psr\Log\LoggerInterface; -use Twig_Extension; -use Twig_SimpleFunction; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; /** * Twig content extension for eZ Publish Demo specific usage. */ -class ContentDescriptionExtension extends Twig_Extension +class ContentDescriptionExtension extends AbstractExtension { - /** - * @var \eZ\Publish\Core\Helper\FieldHelper - */ - protected $fieldHelper; - - /** - * @var LoggerInterface - */ + /** @var \Psr\Log\LoggerInterface */ protected $logger; /** - * @param \eZ\Publish\Core\Helper\FieldHelper $fieldHelper * @param \Psr\Log\LoggerInterface|null $logger */ public function __construct( - FieldHelper $fieldHelper, LoggerInterface $logger = null ) { - $this->fieldHelper = $fieldHelper; $this->logger = $logger; } /** - * Returns a list of functions to add to the existing list. - * - * @return array + * @inheritDoc */ - public function getFunctions() + public function getFunctions(): array { return array( - new Twig_SimpleFunction( + new TwigFunction( 'ez_get_description_or_first_richtext_field_name', array($this, 'getDescriptionOrFirstRichtextFieldName') ), @@ -61,7 +48,7 @@ public function getFunctions() * * @return string The extension name */ - public function getName() + public function getName(): string { return 'app.content'; } @@ -69,7 +56,7 @@ public function getName() /** * Returns description field Identifier or first Richtext field. * - * @param Content $content + * @param \eZ\Publish\API\Repository\Values\Content\Content $content * * @return null|string */ @@ -80,10 +67,7 @@ public function getDescriptionOrFirstRichtextFieldName(Content $content): ?strin } foreach ($content->getFieldsByLanguage() as $field) { - $fieldTypeIdentifier = $this->fieldHelper->getFieldDefinition( - $content->contentInfo, - $field->fieldDefIdentifier - )->fieldTypeIdentifier; + $fieldTypeIdentifier = $content->getContentType()->getFieldDefinition($field->fieldDefIdentifier); if ($fieldTypeIdentifier !== 'ezrichtext') { continue; diff --git a/src/AppBundle/Twig/ContentInfoByLocationIdExtension.php b/src/Twig/ContentInfoByLocationIdExtension.php similarity index 62% rename from src/AppBundle/Twig/ContentInfoByLocationIdExtension.php rename to src/Twig/ContentInfoByLocationIdExtension.php index c4f4726cf..81046ac68 100644 --- a/src/AppBundle/Twig/ContentInfoByLocationIdExtension.php +++ b/src/Twig/ContentInfoByLocationIdExtension.php @@ -3,18 +3,18 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; use eZ\Publish\API\Repository\Values\Content\ContentInfo; -use Twig_Extension; -use Twig_SimpleFunction; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; use eZ\Publish\API\Repository\LocationService as LocationServiceInterface; use eZ\Publish\API\Repository\ContentService as ContentServiceInterface; /** * Twig helper for fetching ContentInfo Based on Location Id. */ -class ContentInfoByLocationIdExtension extends Twig_Extension +class ContentInfoByLocationIdExtension extends AbstractExtension { /** var \eZ\Publish\API\Repository\LocationService */ private $locationService; @@ -39,21 +39,19 @@ public function __construct( * * @return string the extension name */ - public function getName() + public function getName(): string { return 'app.content_info'; } /** - * Returns a list of functions to add to the existing list. - * - * @return array + * @inheritDoc */ - public function getFunctions() + public function getFunctions(): array { return [ - new Twig_SimpleFunction('app_content_info_by_location_id', [$this, 'contentInfoByLocationId']), - new Twig_SimpleFunction('app_content_info_by_content_id', [$this, 'contentInfoByContentId']), + new TwigFunction('app_content_info_by_location_id', [$this, 'contentInfoByLocationId']), + new TwigFunction('app_content_info_by_content_id', [$this, 'contentInfoByContentId']), ]; } @@ -62,9 +60,12 @@ public function getFunctions() * * @param $locationId int * - * @return ContentInfo + * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo + + * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException + * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException */ - public function contentInfoByLocationId($locationId) + public function contentInfoByLocationId(int $locationId): ContentInfo { return $this->locationService->loadLocation($locationId)->getContentInfo(); } @@ -74,9 +75,12 @@ public function contentInfoByLocationId($locationId) * * @param $contentId int * - * @return ContentInfo + * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo + * + * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException + * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException */ - public function contentInfoByContentId($contentId) + public function contentInfoByContentId(int $contentId): ContentInfo { return $this->contentService->loadContent($contentId)->getVersionInfo()->getContentInfo(); } diff --git a/src/AppBundle/Twig/PremiumContentExtension.php b/src/Twig/PremiumContentExtension.php similarity index 64% rename from src/AppBundle/Twig/PremiumContentExtension.php rename to src/Twig/PremiumContentExtension.php index 02afed478..294e55410 100644 --- a/src/AppBundle/Twig/PremiumContentExtension.php +++ b/src/Twig/PremiumContentExtension.php @@ -3,23 +3,23 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; -use AppBundle\PremiumContent\HtmlRenderer; -use AppBundle\User\UserGroups; -use Twig_Extension; -use Twig_SimpleFilter; -use Twig_SimpleFunction; +use App\Helper\UserGroupHelper; +use App\PremiumContent\HtmlRenderer; +use Twig\Extension\AbstractExtension; +use Twig\TwigFilter; +use Twig\TwigFunction; /** * Twig helper for premium content. */ -class PremiumContentExtension extends Twig_Extension +class PremiumContentExtension extends AbstractExtension { - /** @var \AppBundle\PremiumContent\HtmlRenderer */ + /** @var \App\PremiumContent\HtmlRenderer */ private $htmlRenderer; - /** @var \AppBundle\User\UserGroups */ + /** @var \App\Helper\UserGroupHelper */ private $userGroups; /** @var int[] */ @@ -29,13 +29,13 @@ class PremiumContentExtension extends Twig_Extension private $hasAccess; /** - * @param \AppBundle\PremiumContent\HtmlRenderer $htmlRenderer - * @param \AppBundle\User\UserGroups $userGroups + * @param \App\PremiumContent\HtmlRenderer $htmlRenderer + * @param \App\Helper\UserGroupHelper $userGroups * @param array $allowedUserGroupsLocationIds */ public function __construct( HtmlRenderer $htmlRenderer, - UserGroups $userGroups, + UserGroupHelper $userGroups, array $allowedUserGroupsLocationIds ) { $this->htmlRenderer = $htmlRenderer; @@ -48,32 +48,28 @@ public function __construct( * * @return string The extension name */ - public function getName() + public function getName(): string { return 'premium_content_extension'; } /** - * Returns a list of functions to add to the existing list. - * - * @return Twig_SimpleFunction[] + * @inheritDoc */ - public function getFunctions() + public function getFunctions(): array { return [ - new Twig_SimpleFunction('ez_has_access_to_premium_content', [$this, 'hasAccessToPremiumContent']), + new TwigFunction('ez_has_access_to_premium_content', [$this, 'hasAccessToPremiumContent']), ]; } /** - * Returns a list of filters to add to the existing list. - * - * @return Twig_SimpleFilter[] + * @inheritDoc */ - public function getFilters() + public function getFilters(): array { return [ - new Twig_SimpleFilter('previewPremiumContent', [$this, 'previewPremiumContent'], ['is_safe' => ['html']]), + new TwigFilter('previewPremiumContent', [$this, 'previewPremiumContent'], ['is_safe' => ['html']]), ]; } diff --git a/src/AppBundle/Twig/RecommendationsExtension.php b/src/Twig/RecommendationsExtension.php similarity index 74% rename from src/AppBundle/Twig/RecommendationsExtension.php rename to src/Twig/RecommendationsExtension.php index fdec053f5..4ddc6b0fc 100644 --- a/src/AppBundle/Twig/RecommendationsExtension.php +++ b/src/Twig/RecommendationsExtension.php @@ -3,16 +3,16 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; -use Twig_Extension; -use Twig_SimpleFunction; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; use eZ\Publish\Core\MVC\ConfigResolverInterface as ConfigResolver; /** * Recommendations Twig helper for additional integration with RecommendationBundle. */ -class RecommendationsExtension extends Twig_Extension +class RecommendationsExtension extends AbstractExtension { /** var \eZ\Publish\Core\MVC\ConfigResolverInterface */ private $configResolver; @@ -30,20 +30,18 @@ public function __construct(ConfigResolver $configResolver) * * @return string the extension name */ - public function getName() + public function getName(): string { return 'recommendations_extension'; } /** - * Returns a list of functions to add to the existing list. - * - * @return array + * @inheritDoc */ - public function getFunctions() + public function getFunctions(): array { return [ - new Twig_SimpleFunction('ez_reco_enabled', [$this, 'isRecommendationsEnabled']), + new TwigFunction('ez_reco_enabled', [$this, 'isRecommendationsEnabled']), ]; } @@ -52,7 +50,7 @@ public function getFunctions() * * @return bool */ - public function isRecommendationsEnabled() + public function isRecommendationsEnabled(): bool { if ($this->configResolver->hasParameter('yoochoose.license_key', 'ez_recommendation') && !empty($this->configResolver->getParameter('yoochoose.license_key', 'ez_recommendation'))) { diff --git a/src/AppBundle/Twig/SearchResultExtractorExtension.php b/src/Twig/SearchResultExtractorExtension.php similarity index 69% rename from src/AppBundle/Twig/SearchResultExtractorExtension.php rename to src/Twig/SearchResultExtractorExtension.php index 7ce31c5ea..73256d9a3 100644 --- a/src/AppBundle/Twig/SearchResultExtractorExtension.php +++ b/src/Twig/SearchResultExtractorExtension.php @@ -3,22 +3,24 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; use eZ\Publish\API\Repository\Values\Content\Search\SearchHit; use eZ\Publish\API\Repository\Values\Content\Search\SearchResult; -use Twig_Extension; -use Twig_Function; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; /** * Twig helper for extract SearchResult object and returns array */ -class SearchResultExtractorExtension extends Twig_Extension +class SearchResultExtractorExtension extends AbstractExtension { /** - * {@inheritdoc} + * Returns the name of the extension. + * + * @return string the extension name */ - public function getName() + public function getName(): string { return 'app.search_result_extract'; } @@ -26,10 +28,10 @@ public function getName() /** * {@inheritdoc} */ - public function getFunctions() + public function getFunctions(): array { return [ - new Twig_Function('app_search_result_extract', [$this, 'extractSearchResult']) + new TwigFunction('app_search_result_extract', [$this, 'extractSearchResult']) ]; } diff --git a/src/AppBundle/Twig/YoutubeIdExtractorExtension.php b/src/Twig/YoutubeIdExtractorExtension.php similarity index 62% rename from src/AppBundle/Twig/YoutubeIdExtractorExtension.php rename to src/Twig/YoutubeIdExtractorExtension.php index 15febfcd7..2d2b9115c 100644 --- a/src/AppBundle/Twig/YoutubeIdExtractorExtension.php +++ b/src/Twig/YoutubeIdExtractorExtension.php @@ -3,20 +3,22 @@ * @copyright Copyright (C) eZ Systems AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ -namespace AppBundle\Twig; +namespace App\Twig; -use Twig_Extension; -use Twig_SimpleFunction; +use Twig\Extension\AbstractExtension; +use Twig\TwigFunction; /** * Twig helper for extract video id from youtube url. */ -class YoutubeIdExtractorExtension extends Twig_Extension +class YoutubeIdExtractorExtension extends AbstractExtension { /** - * @inheritdoc + * Returns the name of the extension. + * + * @return string the extension name */ - public function getName() + public function getName(): string { return 'app.youtube_extract_id'; } @@ -24,19 +26,21 @@ public function getName() /** * @inheritdoc */ - public function getFunctions() + public function getFunctions(): array { return [ - new Twig_SimpleFunction('app_youtube_extract_id', [$this, 'extractId']), + new TwigFunction('app_youtube_extract_id', [$this, 'extractId']), ]; } /** * Returns youtube video id. * + * @param string $string + * * @return string|null */ - public function extractId($string) + public function extractId(string $string): ?string { $regexp = '/(?:https?:)?(?:\/\/)?(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*?[^\w\s-])' . '(?P[\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:[\'"][^<>]*>|<\/a>))[?=&+%\w.-]*/i'; diff --git a/src/AppBundle/Value/BlockPreRenderValueObject.php b/src/Value/BlockPreRenderValueObject.php similarity index 93% rename from src/AppBundle/Value/BlockPreRenderValueObject.php rename to src/Value/BlockPreRenderValueObject.php index 2b5140076..bf69f2c8b 100644 --- a/src/AppBundle/Value/BlockPreRenderValueObject.php +++ b/src/Value/BlockPreRenderValueObject.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Value; +namespace App\Value; class BlockPreRenderValueObject extends PageBuilderBlockValueObject { diff --git a/src/AppBundle/Value/BlockResponseValueObject.php b/src/Value/BlockResponseValueObject.php similarity index 93% rename from src/AppBundle/Value/BlockResponseValueObject.php rename to src/Value/BlockResponseValueObject.php index 1338891fa..0dd7c7f56 100644 --- a/src/AppBundle/Value/BlockResponseValueObject.php +++ b/src/Value/BlockResponseValueObject.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Value; +namespace App\Value; class BlockResponseValueObject extends PageBuilderBlockValueObject { diff --git a/src/AppBundle/Value/PageBuilderBlockValueObject.php b/src/Value/PageBuilderBlockValueObject.php similarity index 94% rename from src/AppBundle/Value/PageBuilderBlockValueObject.php rename to src/Value/PageBuilderBlockValueObject.php index 23dfe9476..e6543ee02 100644 --- a/src/AppBundle/Value/PageBuilderBlockValueObject.php +++ b/src/Value/PageBuilderBlockValueObject.php @@ -6,7 +6,7 @@ */ declare(strict_types=1); -namespace AppBundle\Value; +namespace App\Value; class PageBuilderBlockValueObject { diff --git a/templates/base.html.twig b/templates/base.html.twig new file mode 100644 index 000000000..043f42d1a --- /dev/null +++ b/templates/base.html.twig @@ -0,0 +1,12 @@ + + + + + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + + diff --git a/app/Resources/views/blocks/_block.html.twig b/templates/blocks/_block.html.twig similarity index 100% rename from app/Resources/views/blocks/_block.html.twig rename to templates/blocks/_block.html.twig diff --git a/app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/banner.html.twig b/templates/bundles/EzPlatformPageFieldTypeBundle/blocks/banner.html.twig similarity index 100% rename from app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/banner.html.twig rename to templates/bundles/EzPlatformPageFieldTypeBundle/blocks/banner.html.twig diff --git a/app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/gallery.html.twig b/templates/bundles/EzPlatformPageFieldTypeBundle/blocks/gallery.html.twig similarity index 100% rename from app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/gallery.html.twig rename to templates/bundles/EzPlatformPageFieldTypeBundle/blocks/gallery.html.twig diff --git a/app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/schedule.html.twig b/templates/bundles/EzPlatformPageFieldTypeBundle/blocks/schedule.html.twig similarity index 100% rename from app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/schedule.html.twig rename to templates/bundles/EzPlatformPageFieldTypeBundle/blocks/schedule.html.twig diff --git a/app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/video.html.twig b/templates/bundles/EzPlatformPageFieldTypeBundle/blocks/video.html.twig similarity index 100% rename from app/Resources/EzPlatformPageFieldTypeBundle/views/blocks/video.html.twig rename to templates/bundles/EzPlatformPageFieldTypeBundle/blocks/video.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/change_password/index.html.twig b/templates/bundles/EzPlatformUserBundle/change_password/index.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/change_password/index.html.twig rename to templates/bundles/EzPlatformUserBundle/change_password/index.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/change_password/success.html.twig b/templates/bundles/EzPlatformUserBundle/change_password/success.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/change_password/success.html.twig rename to templates/bundles/EzPlatformUserBundle/change_password/success.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/forgot_password/index.html.twig b/templates/bundles/EzPlatformUserBundle/forgot_password/index.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/forgot_password/index.html.twig rename to templates/bundles/EzPlatformUserBundle/forgot_password/index.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/forgot_password/success.html.twig b/templates/bundles/EzPlatformUserBundle/forgot_password/success.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/forgot_password/success.html.twig rename to templates/bundles/EzPlatformUserBundle/forgot_password/success.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/forgot_password/with_login.html.twig b/templates/bundles/EzPlatformUserBundle/forgot_password/with_login.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/forgot_password/with_login.html.twig rename to templates/bundles/EzPlatformUserBundle/forgot_password/with_login.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/reset_password/index.html.twig b/templates/bundles/EzPlatformUserBundle/reset_password/index.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/reset_password/index.html.twig rename to templates/bundles/EzPlatformUserBundle/reset_password/index.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/reset_password/invalid_link.html.twig b/templates/bundles/EzPlatformUserBundle/reset_password/invalid_link.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/reset_password/invalid_link.html.twig rename to templates/bundles/EzPlatformUserBundle/reset_password/invalid_link.html.twig diff --git a/app/Resources/EzPlatformUserBundle/views/reset_password/success.html.twig b/templates/bundles/EzPlatformUserBundle/reset_password/success.html.twig similarity index 100% rename from app/Resources/EzPlatformUserBundle/views/reset_password/success.html.twig rename to templates/bundles/EzPlatformUserBundle/reset_password/success.html.twig diff --git a/app/Resources/EzSystemsRecommendationBundle/views/missing_recommendations.html.twig b/templates/bundles/EzSystemsRecommendationBundle/missing_recommendations.html.twig similarity index 100% rename from app/Resources/EzSystemsRecommendationBundle/views/missing_recommendations.html.twig rename to templates/bundles/EzSystemsRecommendationBundle/missing_recommendations.html.twig diff --git a/app/Resources/EzSystemsRecommendationBundle/views/recommendations.html.twig b/templates/bundles/EzSystemsRecommendationBundle/recommendations.html.twig similarity index 100% rename from app/Resources/EzSystemsRecommendationBundle/views/recommendations.html.twig rename to templates/bundles/EzSystemsRecommendationBundle/recommendations.html.twig diff --git a/app/Resources/EzSystemsRecommendationBundle/views/show_recommendations.html.twig b/templates/bundles/EzSystemsRecommendationBundle/show_recommendations.html.twig similarity index 100% rename from app/Resources/EzSystemsRecommendationBundle/views/show_recommendations.html.twig rename to templates/bundles/EzSystemsRecommendationBundle/show_recommendations.html.twig diff --git a/app/Resources/NetgenTagsBundle/views/tag/view.html.twig b/templates/bundles/NetgenTagsBundle/tag/view.html.twig similarity index 100% rename from app/Resources/NetgenTagsBundle/views/tag/view.html.twig rename to templates/bundles/NetgenTagsBundle/tag/view.html.twig diff --git a/app/Resources/views/themes/admin/fields/eztags_field.html.twig b/templates/themes/admin/fields/eztags_field.html.twig similarity index 100% rename from app/Resources/views/themes/admin/fields/eztags_field.html.twig rename to templates/themes/admin/fields/eztags_field.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/article/default.html.twig b/templates/themes/tastefulplanet/block_item/article/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/article/default.html.twig rename to templates/themes/tastefulplanet/block_item/article/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/blog_post/default.html.twig b/templates/themes/tastefulplanet/block_item/blog_post/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/blog_post/default.html.twig rename to templates/themes/tastefulplanet/block_item/blog_post/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/blog_post/wide.html.twig b/templates/themes/tastefulplanet/block_item/blog_post/wide.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/blog_post/wide.html.twig rename to templates/themes/tastefulplanet/block_item/blog_post/wide.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/card/default.html.twig b/templates/themes/tastefulplanet/block_item/card/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/card/default.html.twig rename to templates/themes/tastefulplanet/block_item/card/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/folder/default.html.twig b/templates/themes/tastefulplanet/block_item/folder/default.html.twig similarity index 89% rename from app/Resources/views/themes/tastefulplanet/block_item/folder/default.html.twig rename to templates/themes/tastefulplanet/block_item/folder/default.html.twig index 376cb0e1a..4f10d01c9 100644 --- a/app/Resources/views/themes/tastefulplanet/block_item/folder/default.html.twig +++ b/templates/themes/tastefulplanet/block_item/folder/default.html.twig @@ -1,6 +1,6 @@ {% block content %} - {% if not ez_is_field_empty(content, 'image') %} + {% if not ez_field_is_empty(content, 'image') %} {% set imageAlias = ez_image_alias(content.getField('image'), content.versionInfo, 'embed-header') %}
{% else %} diff --git a/app/Resources/views/themes/tastefulplanet/block_item/hero/default.html.twig b/templates/themes/tastefulplanet/block_item/hero/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/hero/default.html.twig rename to templates/themes/tastefulplanet/block_item/hero/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/image/default.html.twig b/templates/themes/tastefulplanet/block_item/image/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/image/default.html.twig rename to templates/themes/tastefulplanet/block_item/image/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/image/wide.html.twig b/templates/themes/tastefulplanet/block_item/image/wide.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/image/wide.html.twig rename to templates/themes/tastefulplanet/block_item/image/wide.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/list/default.html.twig b/templates/themes/tastefulplanet/block_item/list/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/list/default.html.twig rename to templates/themes/tastefulplanet/block_item/list/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/place/default.html.twig b/templates/themes/tastefulplanet/block_item/place/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/place/default.html.twig rename to templates/themes/tastefulplanet/block_item/place/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/place/wide.html.twig b/templates/themes/tastefulplanet/block_item/place/wide.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/place/wide.html.twig rename to templates/themes/tastefulplanet/block_item/place/wide.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/place_list/default.html.twig b/templates/themes/tastefulplanet/block_item/place_list/default.html.twig similarity index 89% rename from app/Resources/views/themes/tastefulplanet/block_item/place_list/default.html.twig rename to templates/themes/tastefulplanet/block_item/place_list/default.html.twig index 376cb0e1a..4f10d01c9 100644 --- a/app/Resources/views/themes/tastefulplanet/block_item/place_list/default.html.twig +++ b/templates/themes/tastefulplanet/block_item/place_list/default.html.twig @@ -1,6 +1,6 @@ {% block content %} - {% if not ez_is_field_empty(content, 'image') %} + {% if not ez_field_is_empty(content, 'image') %} {% set imageAlias = ez_image_alias(content.getField('image'), content.versionInfo, 'embed-header') %}
{% else %} diff --git a/app/Resources/views/themes/tastefulplanet/block_item/product/default.html.twig b/templates/themes/tastefulplanet/block_item/product/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/product/default.html.twig rename to templates/themes/tastefulplanet/block_item/product/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/product/wide.html.twig b/templates/themes/tastefulplanet/block_item/product/wide.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/product/wide.html.twig rename to templates/themes/tastefulplanet/block_item/product/wide.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/product_list/default.html.twig b/templates/themes/tastefulplanet/block_item/product_list/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/product_list/default.html.twig rename to templates/themes/tastefulplanet/block_item/product_list/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/product_list/wide.html.twig b/templates/themes/tastefulplanet/block_item/product_list/wide.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/product_list/wide.html.twig rename to templates/themes/tastefulplanet/block_item/product_list/wide.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/block_item/video/default.html.twig b/templates/themes/tastefulplanet/block_item/video/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/block_item/video/default.html.twig rename to templates/themes/tastefulplanet/block_item/video/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/blocks/banner/banner.html.twig b/templates/themes/tastefulplanet/blocks/banner/banner.html.twig similarity index 90% rename from app/Resources/views/themes/tastefulplanet/blocks/banner/banner.html.twig rename to templates/themes/tastefulplanet/blocks/banner/banner.html.twig index 25c72aaa8..9af282211 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/banner/banner.html.twig +++ b/templates/themes/tastefulplanet/blocks/banner/banner.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}banner{% endblock %} {% block block_class %}block-banner--narrow{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/collection/cards.html.twig b/templates/themes/tastefulplanet/blocks/collection/cards.html.twig similarity index 93% rename from app/Resources/views/themes/tastefulplanet/blocks/collection/cards.html.twig rename to templates/themes/tastefulplanet/blocks/collection/cards.html.twig index 100a63e70..dd4bb5b9b 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/collection/cards.html.twig +++ b/templates/themes/tastefulplanet/blocks/collection/cards.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}collection{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/collection/list.html.twig b/templates/themes/tastefulplanet/blocks/collection/list.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/collection/list.html.twig rename to templates/themes/tastefulplanet/blocks/collection/list.html.twig index 724dcedfc..5bba67fd8 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/collection/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/collection/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}collection{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/contentlist/blog.html.twig b/templates/themes/tastefulplanet/blocks/contentlist/blog.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/blocks/contentlist/blog.html.twig rename to templates/themes/tastefulplanet/blocks/contentlist/blog.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/blocks/contentlist/cards.html.twig b/templates/themes/tastefulplanet/blocks/contentlist/cards.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/contentlist/cards.html.twig rename to templates/themes/tastefulplanet/blocks/contentlist/cards.html.twig index 7445a1372..bd03868f7 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/contentlist/cards.html.twig +++ b/templates/themes/tastefulplanet/blocks/contentlist/cards.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}contentlist{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/contentlist/list.html.twig b/templates/themes/tastefulplanet/blocks/contentlist/list.html.twig similarity index 95% rename from app/Resources/views/themes/tastefulplanet/blocks/contentlist/list.html.twig rename to templates/themes/tastefulplanet/blocks/contentlist/list.html.twig index 15d8f5bca..fe398babe 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/contentlist/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/contentlist/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}contentlist{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/embed/embed.html.twig b/templates/themes/tastefulplanet/blocks/embed/embed.html.twig similarity index 87% rename from app/Resources/views/themes/tastefulplanet/blocks/embed/embed.html.twig rename to templates/themes/tastefulplanet/blocks/embed/embed.html.twig index 99e596e47..15c55b452 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/embed/embed.html.twig +++ b/templates/themes/tastefulplanet/blocks/embed/embed.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}embed{% endblock %} {% block block_class %}col-md-12 {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/embed/embed_wide.html.twig b/templates/themes/tastefulplanet/blocks/embed/embed_wide.html.twig similarity index 87% rename from app/Resources/views/themes/tastefulplanet/blocks/embed/embed_wide.html.twig rename to templates/themes/tastefulplanet/blocks/embed/embed_wide.html.twig index edd62e89e..0fad200ee 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/embed/embed_wide.html.twig +++ b/templates/themes/tastefulplanet/blocks/embed/embed_wide.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}embed{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/gallery/gallery.html.twig b/templates/themes/tastefulplanet/blocks/gallery/gallery.html.twig similarity index 97% rename from app/Resources/views/themes/tastefulplanet/blocks/gallery/gallery.html.twig rename to templates/themes/tastefulplanet/blocks/gallery/gallery.html.twig index e14fa6b10..c0d0ce733 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/gallery/gallery.html.twig +++ b/templates/themes/tastefulplanet/blocks/gallery/gallery.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}gallery{% endblock %} {% block block_class %}row {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/hero/default.html.twig b/templates/themes/tastefulplanet/blocks/hero/default.html.twig similarity index 93% rename from app/Resources/views/themes/tastefulplanet/blocks/hero/default.html.twig rename to templates/themes/tastefulplanet/blocks/hero/default.html.twig index 4a25d9051..12d32798e 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/hero/default.html.twig +++ b/templates/themes/tastefulplanet/blocks/hero/default.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}hero{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/list/default.html.twig b/templates/themes/tastefulplanet/blocks/list/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/blocks/list/default.html.twig rename to templates/themes/tastefulplanet/blocks/list/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/blocks/places/cards.html.twig b/templates/themes/tastefulplanet/blocks/places/cards.html.twig similarity index 97% rename from app/Resources/views/themes/tastefulplanet/blocks/places/cards.html.twig rename to templates/themes/tastefulplanet/blocks/places/cards.html.twig index 3776c8572..8319373b2 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/places/cards.html.twig +++ b/templates/themes/tastefulplanet/blocks/places/cards.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}contentlist{% endblock %} {% block block_class %}block-contentlist--places-list {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/places/list.html.twig b/templates/themes/tastefulplanet/blocks/places/list.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/places/list.html.twig rename to templates/themes/tastefulplanet/blocks/places/list.html.twig index a7e30c3cf..d5f82944f 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/places/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/places/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}schedule{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/places/map.html.twig b/templates/themes/tastefulplanet/blocks/places/map.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/places/map.html.twig rename to templates/themes/tastefulplanet/blocks/places/map.html.twig index f117af2bf..fba944b5a 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/places/map.html.twig +++ b/templates/themes/tastefulplanet/blocks/places/map.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}map{% endblock %} {% block block_class %}places-background {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/rss/list.html.twig b/templates/themes/tastefulplanet/blocks/rss/list.html.twig similarity index 93% rename from app/Resources/views/themes/tastefulplanet/blocks/rss/list.html.twig rename to templates/themes/tastefulplanet/blocks/rss/list.html.twig index d7e2a3200..43254add8 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/rss/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/rss/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}rss{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/schedule/cards.html.twig b/templates/themes/tastefulplanet/blocks/schedule/cards.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/schedule/cards.html.twig rename to templates/themes/tastefulplanet/blocks/schedule/cards.html.twig index c1a5cc115..04f8b88e4 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/schedule/cards.html.twig +++ b/templates/themes/tastefulplanet/blocks/schedule/cards.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}schedule{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/schedule/list.html.twig b/templates/themes/tastefulplanet/blocks/schedule/list.html.twig similarity index 94% rename from app/Resources/views/themes/tastefulplanet/blocks/schedule/list.html.twig rename to templates/themes/tastefulplanet/blocks/schedule/list.html.twig index 4224ed54c..12e91e941 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/schedule/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/schedule/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}schedule{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/tastes/cards.html.twig b/templates/themes/tastefulplanet/blocks/tastes/cards.html.twig similarity index 97% rename from app/Resources/views/themes/tastefulplanet/blocks/tastes/cards.html.twig rename to templates/themes/tastefulplanet/blocks/tastes/cards.html.twig index 3f04ee330..b495271b4 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/tastes/cards.html.twig +++ b/templates/themes/tastefulplanet/blocks/tastes/cards.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}tastes{% endblock %} {% block block_class %}block-contentlist--tastes-list {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/tastes/home.html.twig b/templates/themes/tastefulplanet/blocks/tastes/home.html.twig similarity index 95% rename from app/Resources/views/themes/tastefulplanet/blocks/tastes/home.html.twig rename to templates/themes/tastefulplanet/blocks/tastes/home.html.twig index cddc1b58f..f12554d5e 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/tastes/home.html.twig +++ b/templates/themes/tastefulplanet/blocks/tastes/home.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}tastes{% endblock %} {% block block_class %}tastes-content-list {{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/tastes/list.html.twig b/templates/themes/tastefulplanet/blocks/tastes/list.html.twig similarity index 95% rename from app/Resources/views/themes/tastefulplanet/blocks/tastes/list.html.twig rename to templates/themes/tastefulplanet/blocks/tastes/list.html.twig index b1bc9708d..912cbcc98 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/tastes/list.html.twig +++ b/templates/themes/tastefulplanet/blocks/tastes/list.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}tastes{% endblock %} {% block block_class %}{{ block_class }}{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/blocks/video/player.html.twig b/templates/themes/tastefulplanet/blocks/video/player.html.twig similarity index 84% rename from app/Resources/views/themes/tastefulplanet/blocks/video/player.html.twig rename to templates/themes/tastefulplanet/blocks/video/player.html.twig index df84745b9..c5e261ff4 100644 --- a/app/Resources/views/themes/tastefulplanet/blocks/video/player.html.twig +++ b/templates/themes/tastefulplanet/blocks/video/player.html.twig @@ -1,4 +1,4 @@ -{% extends ':blocks:_block.html.twig' %} +{% extends 'blocks/_block.html.twig' %} {% block block_identifier %}video{% endblock %} diff --git a/app/Resources/views/themes/tastefulplanet/card/article.html.twig b/templates/themes/tastefulplanet/card/article.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/card/article.html.twig rename to templates/themes/tastefulplanet/card/article.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/card/place.html.twig b/templates/themes/tastefulplanet/card/place.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/card/place.html.twig rename to templates/themes/tastefulplanet/card/place.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/card/product.html.twig b/templates/themes/tastefulplanet/card/product.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/card/product.html.twig rename to templates/themes/tastefulplanet/card/product.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/default/default.html.twig b/templates/themes/tastefulplanet/default/default.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/default/default.html.twig rename to templates/themes/tastefulplanet/default/default.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/embed/home_tastes.html.twig b/templates/themes/tastefulplanet/embed/home_tastes.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/embed/home_tastes.html.twig rename to templates/themes/tastefulplanet/embed/home_tastes.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/featured/article.html.twig b/templates/themes/tastefulplanet/featured/article.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/featured/article.html.twig rename to templates/themes/tastefulplanet/featured/article.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/bootstrap_4_layout.html.twig b/templates/themes/tastefulplanet/fields/bootstrap_4_layout.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/bootstrap_4_layout.html.twig rename to templates/themes/tastefulplanet/fields/bootstrap_4_layout.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezform_field.html.twig b/templates/themes/tastefulplanet/fields/ezform_field.html.twig similarity index 77% rename from app/Resources/views/themes/tastefulplanet/fields/ezform_field.html.twig rename to templates/themes/tastefulplanet/fields/ezform_field.html.twig index b7b5ff894..16e0f34f9 100644 --- a/app/Resources/views/themes/tastefulplanet/fields/ezform_field.html.twig +++ b/templates/themes/tastefulplanet/fields/ezform_field.html.twig @@ -1,4 +1,4 @@ -{% extends "EzPublishCoreBundle::content_fields.html.twig" %} +{% extends "@EzPublishCore/content_fields.html.twig" %} {% block ezform_field %} {% set formValue = field.value.getForm() %} @@ -6,7 +6,7 @@ {% set form = formValue.createView() %} {% form_theme form '@ezdesign/fields/bootstrap_4_layout.html.twig' %} {% spaceless %} - {% if not ez_is_field_empty(content, field) %} + {% if not ez_field_is_empty(content, field) %} {{ form(form.children.fields is defined ? form.children.fields : form) }} {% endif %} {% endspaceless %} diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/call_to_action.html.twig b/templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/call_to_action.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/call_to_action.html.twig rename to templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/call_to_action.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezfacebook.html.twig b/templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezfacebook.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezfacebook.html.twig rename to templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezfacebook.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/eztwitter.html.twig b/templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/eztwitter.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/eztwitter.html.twig rename to templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/eztwitter.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezyoutube.html.twig b/templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezyoutube.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezyoutube.html.twig rename to templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/ezyoutube.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/factbox.html.twig b/templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/factbox.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/ezrichtext/custom_tags/factbox.html.twig rename to templates/themes/tastefulplanet/fields/ezrichtext/custom_tags/factbox.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/fields/eztags_field.html.twig b/templates/themes/tastefulplanet/fields/eztags_field.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/fields/eztags_field.html.twig rename to templates/themes/tastefulplanet/fields/eztags_field.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/form_builder/default_form_view.html.twig b/templates/themes/tastefulplanet/form_builder/default_form_view.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/form_builder/default_form_view.html.twig rename to templates/themes/tastefulplanet/form_builder/default_form_view.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/full/about.html.twig b/templates/themes/tastefulplanet/full/about.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/full/about.html.twig rename to templates/themes/tastefulplanet/full/about.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/full/article.html.twig b/templates/themes/tastefulplanet/full/article.html.twig similarity index 96% rename from app/Resources/views/themes/tastefulplanet/full/article.html.twig rename to templates/themes/tastefulplanet/full/article.html.twig index b2f9bf08c..5046d5cd5 100644 --- a/app/Resources/views/themes/tastefulplanet/full/article.html.twig +++ b/templates/themes/tastefulplanet/full/article.html.twig @@ -51,7 +51,7 @@
{% set displayPremiumContentInfo = false %} - {% if not ez_is_field_empty(content, 'premium_content') %} + {% if not ez_field_is_empty(content, 'premium_content') %} {% if ez_has_access_to_premium_content() %} {{ ez_render_field(content, 'body') }} {% else %} @@ -74,7 +74,7 @@ {% endif %}
- {{ ez_render_field(content, 'tags') }} +{# {{ ez_render_field(content, 'tags') }}#}
diff --git a/app/Resources/views/themes/tastefulplanet/full/blog.html.twig b/templates/themes/tastefulplanet/full/blog.html.twig similarity index 96% rename from app/Resources/views/themes/tastefulplanet/full/blog.html.twig rename to templates/themes/tastefulplanet/full/blog.html.twig index eaafd6418..3b99aedc3 100644 --- a/app/Resources/views/themes/tastefulplanet/full/blog.html.twig +++ b/templates/themes/tastefulplanet/full/blog.html.twig @@ -7,7 +7,7 @@ {% block content %}
- {% if not ez_is_field_empty( content, 'image' ) %} + {% if not ez_field_is_empty( content, 'image' ) %}
diff --git a/app/Resources/views/themes/tastefulplanet/full/contact_form_submitted.html.twig b/templates/themes/tastefulplanet/full/contact_form_submitted.html.twig similarity index 100% rename from app/Resources/views/themes/tastefulplanet/full/contact_form_submitted.html.twig rename to templates/themes/tastefulplanet/full/contact_form_submitted.html.twig diff --git a/app/Resources/views/themes/tastefulplanet/full/folder.html.twig b/templates/themes/tastefulplanet/full/folder.html.twig similarity index 97% rename from app/Resources/views/themes/tastefulplanet/full/folder.html.twig rename to templates/themes/tastefulplanet/full/folder.html.twig index 82cc2fbff..f8e0f7509 100644 --- a/app/Resources/views/themes/tastefulplanet/full/folder.html.twig +++ b/templates/themes/tastefulplanet/full/folder.html.twig @@ -7,7 +7,7 @@ {% block content %}
- {% if not ez_is_field_empty(content, 'image') %} + {% if not ez_field_is_empty(content, 'image') %} diff --git a/app/Resources/views/themes/tastefulplanet/full/place_list.html.twig b/templates/themes/tastefulplanet/full/place_list.html.twig similarity index 97% rename from app/Resources/views/themes/tastefulplanet/full/place_list.html.twig rename to templates/themes/tastefulplanet/full/place_list.html.twig index 70ba6a6f6..9dc3edfe6 100644 --- a/app/Resources/views/themes/tastefulplanet/full/place_list.html.twig +++ b/templates/themes/tastefulplanet/full/place_list.html.twig @@ -7,7 +7,7 @@ {% block content %}
- {% if not ez_is_field_empty( content, 'image' ) %} + {% if not ez_field_is_empty( content, 'image' ) %}