├── .docker ├── messenger.yaml ├── nginx.conf └── supervisord.conf ├── .editorconfig ├── .env ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── Bug-Report.yml │ ├── Feature-Request.yml │ ├── Improvement.yml │ └── config.yml └── workflows │ ├── cla.yaml │ ├── php-cs-fixer.yaml │ ├── pimcore-skeleton.yml │ └── stale.yml ├── .gitignore ├── .php-cs-fixer.dist.php ├── LICENSE.md ├── README.md ├── SECURITY.md ├── bin └── console ├── codeception.yml ├── composer.enterprise.json ├── composer.json ├── config ├── bundles.php ├── config.yaml ├── installer.yaml ├── local │ └── .gitkeep ├── packages │ ├── dev │ │ └── config.yaml │ ├── prod │ │ └── config.yaml │ ├── security.yaml │ └── test │ │ └── config.yaml ├── pimcore │ ├── constants.example.php │ └── google-api-private-key.json.example ├── preload.php ├── routes.yaml ├── routes │ └── dev │ │ └── routes.yaml └── services.yaml ├── docker-compose.yaml ├── public └── index.php ├── src ├── Command │ └── .gitkeep ├── Controller │ ├── DefaultController.php │ └── Web2printController.php ├── EventSubscriber │ └── BundleSetupSubscriber.php └── Kernel.php ├── symfony.lock ├── templates ├── default │ └── default.html.twig └── web2print │ ├── container.html.twig │ ├── default.html.twig │ ├── default_no_layout.html.twig │ └── layout.html.twig ├── tests ├── Functional.suite.yml ├── Functional │ ├── Command │ │ └── CliCommandTest.php │ └── bootstrap.php ├── Support │ └── .gitkeep ├── Unit.suite.yml ├── Unit │ ├── Controller │ │ └── DefaultControllerTest.php │ └── ReadmeTest.php ├── _output │ └── .gitignore └── bootstrap.php ├── translations └── .gitkeep └── var └── config ├── needs-install.lock └── web-to-print └── web_to_print.yaml /.docker/messenger.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | messenger: 3 | transports: 4 | pimcore_core: 'amqp://rabbitmq:5672/%2f/pimcore_core' 5 | pimcore_maintenance: 'amqp://rabbitmq:5672/%2f/pimcore_maintenance' 6 | pimcore_scheduled_tasks: 'amqp://rabbitmq:5672/%2f/pimcore_scheduled_tasks' 7 | pimcore_image_optimize: 'amqp://rabbitmq:5672/%2f/pimcore_image_optimize' 8 | pimcore_asset_update: 'amqp://rabbitmq:5672/%2f/pimcore_asset_update' 9 | -------------------------------------------------------------------------------- /.docker/nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | # mime types are already covered in nginx.conf 3 | #include mime.types; 4 | 5 | upstream php-pimcore10 { 6 | server php:9000; 7 | } 8 | 9 | map $args $static_page_root { 10 | default /var/tmp/pages; 11 | "~*(^|&)pimcore_editmode=true(&|$)" /var/nonexistent; 12 | "~*(^|&)pimcore_preview=true(&|$)" /var/nonexistent; 13 | "~*(^|&)pimcore_version=[^&]+(&|$)" /var/nonexistent; 14 | } 15 | 16 | map $uri $static_page_uri { 17 | default $uri; 18 | "/" /%home; 19 | } 20 | 21 | server { 22 | listen [::]:80 default_server; 23 | listen 80 default_server; 24 | 25 | #server_name pimcore.localhost; 26 | 27 | root /var/www/html/public; 28 | index index.php; 29 | 30 | # Filesize depending on your data 31 | client_max_body_size 100m; 32 | 33 | # It is recommended to seclude logs per virtual host 34 | #access_log /var/log/access.log; 35 | #error_log /var/log/error.log error; 36 | 37 | # Protected Assets 38 | # 39 | ### 1. Option - Restricting access to certain assets completely 40 | # 41 | # location ~ ^/protected/.* { 42 | # return 403; 43 | # } 44 | # location ~ ^/var/.*/protected(.*) { 45 | # return 403; 46 | # } 47 | # 48 | # location ~ ^/cache-buster\-[\d]+/protected(.*) { 49 | # return 403; 50 | # } 51 | # 52 | ### 2. Option - Checking permissions before delivery 53 | # 54 | # rewrite ^(/protected/.*) /index.php$is_args$args last; 55 | # 56 | # location ~ ^/var/.*/protected(.*) { 57 | # return 403; 58 | # } 59 | # 60 | # location ~ ^/cache-buster\-[\d]+/protected(.*) { 61 | # return 403; 62 | # } 63 | 64 | # Pimcore Head-Link Cache-Busting 65 | rewrite ^/cache-buster-(?:\d+)/(.*) /$1 last; 66 | 67 | # Stay secure 68 | # 69 | # a) don't allow PHP in folders allowing file uploads 70 | location ~* /var/assets/.*\.php(/|$) { 71 | return 404; 72 | } 73 | 74 | # b) Prevent clients from accessing hidden files (starting with a dot) 75 | # Access to `/.well-known/` is allowed. 76 | # https://www.mnot.net/blog/2010/04/07/well-known 77 | # https://tools.ietf.org/html/rfc5785 78 | location ~* /\.(?!well-known/) { 79 | deny all; 80 | log_not_found off; 81 | access_log off; 82 | } 83 | 84 | # c) Prevent clients from accessing to backup/config/source files 85 | location ~* (?:\.(?:bak|conf(ig)?|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ { 86 | deny all; 87 | } 88 | 89 | # Some Admin Modules need this: 90 | # Server Info, Opcache 91 | location ~* ^/admin/external { 92 | rewrite .* /index.php$is_args$args last; 93 | } 94 | 95 | # Thumbnails 96 | location ~* .*/(image|video)-thumb__\d+__.* { 97 | try_files /var/tmp/thumbnails$uri /index.php; 98 | expires 2w; 99 | access_log off; 100 | add_header Cache-Control "public"; 101 | } 102 | 103 | # Assets 104 | # Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine. 105 | location ~* ^(?!/admin|/asset/webdav|/studio/api)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|json|zip|mp\d|m4a|ogg|ogv|webp|webm|pdf|csv|docx?|xlsx?|pptx?)$ { 106 | try_files /var/assets$uri $uri =404; 107 | expires 2w; 108 | access_log off; 109 | log_not_found off; 110 | add_header Cache-Control "public"; 111 | } 112 | 113 | location / { 114 | error_page 404 /meta/404; 115 | try_files $static_page_root$static_page_uri.html $uri /index.php$is_args$args; 116 | } 117 | 118 | # Use this location when the installer has to be run 119 | # location ~ /(index|install)\.php(/|$) { 120 | # 121 | # Use this after initial install is done: 122 | location ~ ^/index\.php(/|$) { 123 | send_timeout 1800; 124 | fastcgi_read_timeout 1800; 125 | # regex to split $uri to $fastcgi_script_name and $fastcgi_path_info 126 | fastcgi_split_path_info ^(.+\.php)(/.+)$; 127 | # Check that the PHP script exists before passing it 128 | #try_files $fastcgi_script_name =404; 129 | # include fastcgi.conf if needed 130 | include fastcgi_params; 131 | # Bypass the fact that try_files resets $fastcgi_path_info 132 | # see: http://trac.nginx.org/nginx/ticket/321 133 | set $path_info $fastcgi_path_info; 134 | fastcgi_param PATH_INFO $path_info; 135 | 136 | # Activate these, if using Symlinks and opcache 137 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 138 | fastcgi_param DOCUMENT_ROOT $realpath_root; 139 | 140 | # Mitigate https://httpoxy.org/ vulnerabilities 141 | fastcgi_param HTTP_PROXY ""; 142 | 143 | fastcgi_pass php-pimcore10; 144 | # Prevents URIs that include the front controller. This will 404: 145 | # http://domain.tld/index.php/some-path 146 | # Remove the internal directive to allow URIs like this 147 | internal; 148 | } 149 | 150 | # PHP-FPM Status and Ping 151 | location /fpm- { 152 | access_log off; 153 | include fastcgi_params; 154 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 155 | location /fpm-status { 156 | allow 127.0.0.1; 157 | # add additional IP's or Ranges 158 | deny all; 159 | fastcgi_pass php-pimcore10; 160 | } 161 | location /fpm-ping { 162 | fastcgi_pass php-pimcore10; 163 | } 164 | } 165 | # nginx Status 166 | # see: https://nginx.org/en/docs/http/ngx_http_stub_status_module.html 167 | location /nginx-status { 168 | allow 127.0.0.1; 169 | deny all; 170 | access_log off; 171 | stub_status; 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /.docker/supervisord.conf: -------------------------------------------------------------------------------- 1 | 2 | # Important Notice: this configuration is not optimized for production use! 3 | 4 | [program:messenger-consume] 5 | command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize --memory-limit=250M --time-limit=3600 6 | numprocs=1 7 | startsecs=0 8 | autostart=true 9 | autorestart=true 10 | process_name=%(program_name)s_%(process_num)02d 11 | stdout_logfile=/dev/fd/1 12 | stdout_logfile_maxbytes=0 13 | redirect_stderr=true 14 | 15 | [program:consume-asset-update] 16 | command=php /var/www/html/bin/console messenger:consume pimcore_asset_update --memory-limit=250M --time-limit=3600 17 | numprocs=1 18 | startsecs=0 19 | autostart=true 20 | autorestart=true 21 | process_name=%(program_name)s_%(process_num)02d 22 | stdout_logfile=/dev/fd/1 23 | stdout_logfile_maxbytes=0 24 | redirect_stderr=true 25 | 26 | 27 | [program:maintenance] 28 | command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance' 29 | autostart=true 30 | autorestart=true 31 | stdout_logfile=/dev/fd/1 32 | stdout_logfile_maxbytes=0 33 | redirect_stderr=true 34 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 4 8 | 9 | [*.php] 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | 16 | [*.{yml,yaml}] 17 | indent_size = 4 18 | 19 | [*.json] 20 | indent_style = space 21 | indent_size = 2 22 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the latter taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_DEBUG=true 19 | PIMCORE_DEV_MODE=false 20 | 21 | #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 22 | #TRUSTED_HOSTS='^(localhost|example\.com)$' 23 | ###< symfony/framework-bundle ### 24 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | * -text 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug-Report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: File a bug report 3 | title: "[Bug]: " 4 | labels: [Bug] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Important notice 10 | As an open core project we love to work together with our community to improve and develop our products. 11 | It's also important for us to make clear that **we're not working for you or your company**, 12 | but we enjoy to work together to solve existing bugs. 13 | So we would love to see PRs with bugfixes, discuss them and we are happy to merge them when they are ready. 14 | For details see also our [contributing guidelines](https://github.com/pimcore/pimcore/blob/10.x/CONTRIBUTING.md). 15 | 16 | Bug reports that do not meet the conditions listed below will be closed/deleted without comment. 17 | 18 | - Bug was verified on the latest supported version. 19 | - This is not a security issue -> see [our security policy](https://github.com/pimcore/pimcore/security/policy) instead. 20 | - You are not able to provide a pull request that fixes the issue. 21 | - There's no existing ticket for the same issue. 22 | 23 | - type: textarea 24 | attributes: 25 | label: Expected behavior 26 | validations: 27 | required: true 28 | - type: textarea 29 | attributes: 30 | label: Actual behavior 31 | validations: 32 | required: true 33 | - type: textarea 34 | attributes: 35 | label: Steps to reproduce 36 | validations: 37 | required: true 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature-Request.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Request or propose a new feature 3 | title: "[Feature]: " 4 | labels: ["New Feature"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Important notice 10 | As an open core project we love to work together with our community to improve and develop our products. 11 | It's also important for us to make clear that **we're not working for you or your company**, 12 | but we enjoy to work together to improve or add new features to the product. 13 | So we are always ready to discuss features and improvements with our community. 14 | Especially for bigger topics, please [start a discussion](https://github.com/pimcore/pimcore/discussions) first to aviod unnecessary efforts. 15 | 16 | As soon as a topic is more specific, feel free to create issues for it or even better provide a corresponding PR as we love to 17 | review and merge contributions. 18 | 19 | Feature requests that do not meet the conditions listed below will be closed/deleted without comment. 20 | - There's no existing ticket for the same topic 21 | - This is already a specific ready-to-work-on feature request 22 | 23 | - type: textarea 24 | attributes: 25 | label: Feature description 26 | validations: 27 | required: true 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Improvement.yml: -------------------------------------------------------------------------------- 1 | name: Improvement 2 | description: Request or propose an improvement 3 | title: "[Improvement]: " 4 | labels: ["Improvement"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Important notice 10 | As an open core project we love to work together with our community to improve and develop our products. 11 | It's also important for us to make clear that **we're not working for you or your company**, 12 | but we enjoy to work together to improve or add new features to the product. 13 | So we are always ready to discuss features and improvements with our community. 14 | Especially for bigger topics, please [start a discussion](https://github.com/pimcore/pimcore/discussions) first to aviod unnecessary efforts. 15 | 16 | As soon as a topic is more specific, feel free to create issues for it or even better provide a corresponding PR as we love to 17 | review and merge contributions. 18 | 19 | Feature requests that do not meet the conditions listed below will be closed/deleted without comment. 20 | - There's no existing ticket for the same topic 21 | - This is already a specific ready-to-work-on feature request 22 | 23 | - type: textarea 24 | attributes: 25 | label: Improvement description 26 | validations: 27 | required: true 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: We are hiring! 4 | url: https://pimcore.com/en/careers?utm_source=github&utm_medium=issue-template-skeleton&utm_campaign=careers 5 | about: Enjoy working with Pimcore? Join us on our mission! 6 | - name: Community Support 7 | url: https://github.com/pimcore/pimcore/discussions 8 | about: Please ask and answer questions here. 9 | -------------------------------------------------------------------------------- /.github/workflows/cla.yaml: -------------------------------------------------------------------------------- 1 | name: CLA check 2 | on: 3 | issue_comment: 4 | types: [created] 5 | pull_request_target: 6 | types: [opened, closed, synchronize] 7 | jobs: 8 | cla-workflow: 9 | uses: pimcore/workflows-collection-public/.github/workflows/reusable-cla-check.yaml@v1.3.0 10 | if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' 11 | secrets: 12 | CLA_ACTION_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/php-cs-fixer.yaml: -------------------------------------------------------------------------------- 1 | name: "PHP-CS-Fixer" 2 | 3 | on: 4 | pull_request_target: 5 | branches: 6 | - "[0-9]+.[0-9]+" 7 | - "[0-9]+.x" 8 | - "feature-*" 9 | push: 10 | branches: 11 | - "[0-9]+.[0-9]+" 12 | - "[0-9]+.x" 13 | - "*_actions" 14 | - "feature-*" 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | php-cs-fixer: 21 | permissions: 22 | contents: write # for stefanzweifel/git-auto-commit-action to push code in repo 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v4 26 | with: 27 | ref: ${{ github.event.pull_request.head.ref }} 28 | repository: ${{ github.event.pull_request.head.repo.full_name }} 29 | 30 | - name: PHP-CS-Fixer 31 | uses: docker://oskarstark/php-cs-fixer-ga:latest 32 | 33 | - uses: stefanzweifel/git-auto-commit-action@v5 34 | with: 35 | commit_message: Apply php-cs-fixer changes 36 | -------------------------------------------------------------------------------- /.github/workflows/pimcore-skeleton.yml: -------------------------------------------------------------------------------- 1 | name: Test Pimcore Skeleton 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - "[0-9]+.[0-9]+" 7 | - "[0-9]+.x" 8 | push: 9 | branches: 10 | - "[0-9]+.[0-9]+" 11 | - "[0-9]+.x" 12 | - "*_actions" 13 | 14 | jobs: 15 | test-pimcore-skeleton: 16 | runs-on: ubuntu-latest 17 | steps: 18 | # Check out the repo in a sub-dir to see if it can serve as 19 | # teplate for `composer create-project` 20 | # See: https://github.com/actions/checkout#usage 21 | - uses: actions/checkout@v2 22 | with: 23 | path: 'skeleton' 24 | 25 | - name: Pull latest pimcore image 26 | run: | 27 | # Echo commands and terminate on first error 28 | set -ex 29 | 30 | # Pull latest build of pimcore's image 31 | docker pull docker.io/pimcore/pimcore:php8.3-latest 32 | 33 | - name: Create project from skeleton in latest pimcore environment 34 | run: | 35 | # Echo commands and terminate on first error 36 | set -ex 37 | 38 | # Try creating a new project with composer using contents of this repo as the package. 39 | # We execute composer within docker container to suttisfy platform requirements. 40 | # The value of ´"url":` must match checkout path in the first step. 41 | # 42 | # See: https://getcomposer.org/doc/03-cli.md#create-project 43 | # See: https://getcomposer.org/doc/05-repositories.md#path 44 | docker run \ 45 | --volume=${{ github.workspace }}/:/test/ \ 46 | --workdir=/test/ \ 47 | --user=$(id -u):$(id -g) \ 48 | docker.io/pimcore/pimcore:php8.3-latest \ 49 | composer create-project \ 50 | pimcore/skeleton:@dev \ 51 | --repository='{"type": "path", "url": "./skeleton"}' \ 52 | sample-project 53 | 54 | - name: Smoke-test compose file 55 | run: | 56 | # Echo commands and terminate on first error 57 | set -ex 58 | 59 | # Check (lint) the compose file 60 | docker compose version 61 | cd sample-project/ 62 | docker compose config -q 63 | 64 | - name: Test pimcore installation 65 | env: 66 | PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} 67 | PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} 68 | PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} 69 | run: | 70 | # Echo commands and terminate on first error 71 | set -ex 72 | 73 | cd sample-project/ 74 | 75 | # Set up docker-compose.yaml to use current user's uid:gid, just like README.md suggests. 76 | sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml 77 | 78 | # Start containers 79 | docker compose pull --quiet 80 | docker compose up -d 81 | 82 | # Run pimcore installation. 83 | docker compose exec -T \ 84 | -e PIMCORE_INSTALL_ADMIN_USERNAME=pimcore \ 85 | -e PIMCORE_INSTALL_ADMIN_PASSWORD=pimcore \ 86 | -e PIMCORE_INSTALL_ENCRYPTION_SECRET=${PIMCORE_ENCRYPTION_SECRET} \ 87 | -e PIMCORE_INSTALL_INSTANCE_IDENTIFIER=${PIMCORE_INSTANCE_IDENTIFIER} \ 88 | -e PIMCORE_INSTALL_PRODUCT_KEY=${PIMCORE_PRODUCT_KEY} \ 89 | -- \ 90 | php vendor/bin/pimcore-install -n 91 | 92 | - name: Run codeception tests 93 | env: 94 | PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} 95 | PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} 96 | PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} 97 | run: | 98 | # Echo commands and terminate on first error 99 | set -ex 100 | 101 | cd sample-project/ 102 | 103 | # Set up and execute codeception tests, just like README.md suggests. 104 | docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/ 105 | docker compose run --rm -T \ 106 | -e PIMCORE_INSTALL_ADMIN_USERNAME=pimcore \ 107 | -e PIMCORE_INSTALL_ADMIN_PASSWORD=pimcore \ 108 | -e PIMCORE_INSTALL_ENCRYPTION_SECRET=${PIMCORE_ENCRYPTION_SECRET} \ 109 | -e PIMCORE_INSTALL_INSTANCE_IDENTIFIER=${PIMCORE_INSTANCE_IDENTIFIER} \ 110 | -e PIMCORE_INSTALL_PRODUCT_KEY=${PIMCORE_PRODUCT_KEY} \ 111 | test-php vendor/bin/pimcore-install -n 112 | docker compose run --rm -T test-php vendor/bin/codecept run -vv 113 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Handle stale issues 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '37 7 * * *' 7 | 8 | jobs: 9 | call-stale-workflow: 10 | uses: pimcore/workflows-collection-public/.github/workflows/stale.yml@v1.1.0 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # remove the following ignores for your project 2 | /config/pimcore/constants.php 3 | 4 | # symfony default 5 | /.web-server-pid 6 | /config/pimcore/parameters.yml 7 | /build/ 8 | /phpunit.xml 9 | /public/bundles/ 10 | 11 | # local config 12 | /.env.local 13 | /.env.local.php 14 | /.env.*.local 15 | !/config/local 16 | /config/local/* 17 | !config/local/.gitkeep 18 | 19 | /var/* 20 | !/var/.gitkeep 21 | !/var/classes/ 22 | /var/classes/DataObject 23 | 24 | !/var/config 25 | /var/config/system.yml 26 | /var/config/maintenance.php 27 | 28 | # project specific recommendations 29 | /var/config/tag-manager.php 30 | /var/config/reports.php 31 | 32 | 33 | /public/var/ 34 | /public/sitemap*.xml 35 | 36 | # PHP-CS-Fixer 37 | /.php-cs-fixer.php 38 | /.php-cs-fixer.cache 39 | 40 | # composer 41 | /vendor/ 42 | 43 | # PhpStorm / IDEA 44 | .idea 45 | # NetBeans 46 | nbproject 47 | 48 | # temp 49 | .temp 50 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | in([ 5 | __DIR__ . '/src', 6 | ]) 7 | 8 | ->exclude([ 9 | 10 | ]) 11 | ; 12 | 13 | // do not enable self_accessor as it breaks pimcore models relying on get_called_class() 14 | return (new PhpCsFixer\Config) 15 | ->setRules([ 16 | '@PSR1' => true, 17 | '@PSR2' => true, 18 | 'array_syntax' => ['syntax' => 'short'], 19 | 20 | 'header_comment' => [ 21 | 'comment_type' => 'PHPDoc', 22 | 'header' => 23 | 'This source file is available under the terms of the' . PHP_EOL . 24 | 'Pimcore Open Core License (POCL)' . PHP_EOL . 25 | 'Full copyright and license information is available in' . PHP_EOL . 26 | 'LICENSE.md which is distributed with this source code.' . PHP_EOL . 27 | PHP_EOL . 28 | ' @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)' . PHP_EOL . 29 | ' @license Pimcore Open Core License (POCL)' 30 | ], 31 | 32 | // keep aligned = and => operators as they are: do not force aligning, but do not remove it 33 | 'binary_operator_spaces' => ['operators' => ['=' => null, '=>' => null]], 34 | 35 | 'blank_line_before_statement' => ['statements' => ['return']], 36 | 'encoding' => true, 37 | 'function_typehint_space' => true, 38 | 'single_line_comment_style' => ['comment_types' => ['hash']], 39 | 'lowercase_cast' => true, 40 | 'magic_constant_casing' => true, 41 | 'method_argument_space' => ['on_multiline' => 'ignore'], 42 | 'class_attributes_separation' => ['elements' => ['method' => 'one']], 43 | 'native_function_casing' => true, 44 | 'no_blank_lines_after_class_opening' => true, 45 | 'no_blank_lines_after_phpdoc' => true, 46 | 'no_empty_comment' => true, 47 | 'no_empty_phpdoc' => true, 48 | 'no_empty_statement' => true, 49 | 'no_extra_blank_lines' => true, 50 | 'no_leading_import_slash' => true, 51 | 'no_leading_namespace_whitespace' => true, 52 | 'no_short_bool_cast' => true, 53 | 'no_spaces_around_offset' => true, 54 | 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], 55 | 'no_unneeded_control_parentheses' => true, 56 | 'no_unused_imports' => true, 57 | 'no_whitespace_before_comma_in_array' => true, 58 | 'no_whitespace_in_blank_line' => true, 59 | 'object_operator_without_whitespace' => true, 60 | 'ordered_imports' => true, 61 | 'phpdoc_indent' => true, 62 | 'phpdoc_no_useless_inheritdoc' => true, 63 | 'phpdoc_scalar' => true, 64 | 'phpdoc_separation' => true, 65 | 'phpdoc_single_line_var_spacing' => true, 66 | 'return_type_declaration' => true, 67 | 'short_scalar_cast' => true, 68 | 'single_blank_line_before_namespace' => true, 69 | 'single_quote' => true, 70 | 'space_after_semicolon' => true, 71 | 'standardize_not_equals' => true, 72 | 'ternary_operator_spaces' => true, 73 | 'whitespace_after_comma_in_array' => true, 74 | ]) 75 | ->setFinder($finder); 76 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | Copyright (C) Pimcore GmbH (http://www.pimcore.com) 3 | 4 | This software is available under the terms of the 5 | following Pimcore Open Core License (POCL) 6 | 7 | 8 | **PIMCORE OPEN CORE LICENSE AGREEMENT (POCL)** 9 | 10 | **Last Update: April 2025** 11 | 12 | This Open Core License Agreement ("**Agreement**" or “**POCL**”), effective as of the day of the first installation or use by Customer (the "**Effective Date**"), is by and between Pimcore GmbH, Söllheimer Straße 16, AT-5020 Salzburg, Republic of Austria (hereinafter "**Licensor**" or “**Pimcore**”) and the user of the Software, as defined herein, (hereinafter "**Licensee**" or "**Customer**"). Licensor and Licensee may be referred to herein collectively as the "**Parties**" or individually as a "**Party**." 13 | 14 | **WHEREAS** Licensor desires to license out certain Pimcore Software (“**Software**“). 15 | 16 | **WHEREAS** (a) Software for which the source code is publicly available but which is not licensed out as open source software is "**Open Core Software**" and 17 | (b) Software for which the source code is not publicly available is "**Proprietary Software**", 18 | both covered by this Agreement. 19 | 20 | **WHEREAS** the exact products that are available under this Agreement are defined in the additional contractual documents or by inclusion of, or referral to, this Agreement within the source code or within the source code repositories; if not provided for otherwise, a software element is Proprietary Software. 21 | 22 | **WHEREAS** the Software is protected by copyright world- wide; and 23 | 24 | **WHEREAS** Licensee desires to obtain a license to use the Software for its internal business purposes, subject to the terms and conditions of this Agreement. 25 | 26 | **NOW, THEREFORE**, in consideration of the mutual covenants, terms, and conditions set forth herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Parties agree as follows. 27 | 28 | ### 1. LICENSE 29 | 1.1 PLEASE READ THIS PIMCORE SOFTWARE LICENSE AGREEMENT CAREFULLY AS IT CONSTITUTES A LEGALLY BINDING AGREEMENT. BY INSTALLING OR USING THE SOFTWARE, YOU ACCEPT AND AGREE TO ALL TERMS AND CONDITIONS OF THIS AGREEMENT, AND CONFIRM THAT YOUR STATEMENT – IF APPLICABLE – ON THE RELEVANT GLOBAL REVENUE IS CORRECT AND COMPLETE. IF YOU REPRESENT A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE FULL LEGAL AUTHORITY TO ENTER INTO THIS AGREEMENT TO BIND THAT LEGAL ENTITY. IF YOU DO NOT AGREE TO THESE TERMS AND CONDITIONS, YOU MAY NOT INSTALL OR USE THE SOFTWARE. 30 | 31 | 1.2 Pimcore grants the Customer a non-exclusive, non-transferable, non-sublicensable, geographically unlimited right, limited in time to the term of the Agreement, to use the Software and to customize, modify or adapt it for its own purposes. Unless if required by Pimcore for compliance with applicable laws or any order of a governmental authority, the Customer is not obliged to share these modifications, adaptations, and customizations (“**Derivatives**”) with Pimcore or anyone else. 32 | 33 | 1.2.1 Solution Development and Production Use (Open Core Software) 34 | 35 | “**Production Use**” means the usage of a software for development of solutions and productions within a business operation. 36 | 37 | a) An organization with total global revenue not exceeding €5 million (€5M) or equivalent amount in other currency annually (“**Threshold**”) may qualify for a free license for Production Use of the Open Core Software, provided such organization is not a part, subsidiary, affiliate, or shell company to another organization, entity, or company group whose total combined revenue exceeds the Threshold. Eligibility must be self-certified by the Customer when starting the use of the Open Core Software and is subject to periodic review and audit by Pimcore. If at any time the Customer’s revenue exceeds the Threshold, a paid commercial license will be required for continued Production Use of the software. The Customer is obliged to inform Pimcore about relevant changes in revenues. Pimcore is entitled to charge license fees retroactively from the date on which Customer exceeded the Threshold. 38 | 39 | b) Non-profit and educational organizations are eligible for a free license for Production Use of the Open Core Software, subject to Pimcore’s non-profit criteria. 40 | 41 | Pimcore shall decide at its own reasonable discretion whether (a) the Threshold is exceeded or (b) the requirements for non-profit or educational usage are met. Legal recourse is excluded with regard to such decision of Pimcore. 42 | 43 | 1.2.2 Non-Production Use and Transition to Production Use (Open Core Software) 44 | 45 | For non-production purposes, such as demonstrations, designing of prototypes, proofs of concept, and sales presentations (such and comparable usages of a software “**Non-Production Use**”), the Pimcore Developer License (PDLA) must be purchased. 46 | 47 | If the Customer or a Partner or any other third person acting on the Customer’s behalf initiates development of a solution with the intention or foreseeable or actual effect of deploying it into production, such use from its beginning shall be deemed Production Use of the Open Core Software for which the Threshold applies from the outset. Individual transition periods to Production Use may be agreed between Pimcore and Customer in writing. 48 | 49 | Pimcore reserves the right to audit, verify and enforce compliance with these terms, including restricting or terminating access to the Open Core Software. 50 | 51 | 1.2.3 The use of Proprietary Software is never free of charge. Sect. 1.2.1 and 1.2.2 do not apply to Proprietary Software. 52 | 53 | 1.3 Restrictions on Use 54 | 55 | 1.3.1 The Customer may not offer the Software as a hosted or managed service by granting third parties access to a significant part of its features or functions. Additionally, the Customer may not fork, modify, or redistribute the Software, or any Derivative, in a manner that results in a competing or functionally comparable product that is offered as a free or commercial alternative to Pimcore’s official offerings. 56 | 57 | 1.3.2 The Customer shall also refrain from incorporating the Software, or any Derivative, into a commercial product or service offering materially deriving its economic value from the Software, even if it is not directly exposed or obvious. 58 | 59 | 1.3.3 The Customer is also prohibited from representing, implying, or otherwise suggesting that its use, distribution, or customization of the Software is endorsed, certified, or supported by Pimcore, unless such authorization has been explicitly granted in writing. 60 | 61 | 1.3.4 The Customer may only use the Software for its own enterprise. The Customer may not use the Software simultaneously in more instances than Customer has acquired usage licences for. The Customer is only permitted to copy the Software to the extent that this is necessary for the intended use, including the correction of errors. The creation of a backup copy is permitted if it is necessary to secure the contractual use. 62 | 63 | 1.3.5 The Customer must not, at any time, (i) rent, lease, lend, sell, license, assign, distribute, publish, transfer, or otherwise make available the Software; (ii) reverse engineer, disassemble, decompile, decode, adapt, or otherwise attempt to derive or gain access to source code of the Proprietary Software, in whole or in part; (iii) use the Software in any manner or for any purpose that infringes, misappropriate, or otherwise wireless any intellectual property ride or other ride of any person, or that violates any applicable law. 64 | 65 | 1.4 If the Customer violates any of the provisions Sect. 1.2 and 1.3, all rights of usage granted under the POCL shall immediately become invalid and shall automatically revert to Pimcore. In this case, the Customer must immediately and completely cease using the Software, delete all copies of the Software installed on its systems and delete any backup copies made or hand them over to Pimcore. In addition, Pimcore reserves the right to take all legal steps. 66 | 67 | 1.5 Sect. 1.4 applies accordingly if a Derivative of the Customer infringe upon patents. 68 | 69 | 1.6 The parties may agree on expanded usage rights, arrangements for enterprise customers, and special OEM provisions separately. 70 | 71 | 1.7 Upon request, the Customer shall enable Pimcore to verify the proper use of the Software, in particular whether the Customer is using the Software as agreed. For this purpose, the Customer shall provide Pimcore with information, grant access to relevant documents and records and enable an audit of the hardware and software environment by Pimcore or an auditing company named by Pimcore and acceptable to the Customer. Pimcore may carry out the audit on the Customer's premises during the Customer's regular business hours or have it carried out by third parties bound to secrecy. Pimcore shall ensure that the Customer's business operations are disturbed as little as possible by the on-site audit. If the inspection reveals a licence violation by the Customer that is not merely minimal, the Customer shall bear the costs of the inspection, otherwise Pimcore shall bear them. Pimcore reserves all other rights. 72 | 73 | 1.8 Licensee acknowledges that, as between Licensee and Licensor, Licensor owns all right, title, and interest, including all intellectual property rights, in and to the Software and, with respect to third-party products, the applicable third-party licensors own all right, title and interest, including all intellectual property rights, in and to the third-party products. 74 | 75 | 1.9 Licensor reserves all rights not expressly granted to Licensee in this Agreement. Except for the limited rights and licenses expressly granted under this Agreement, nothing in this Agreement grants, by implication, waiver, estoppel, or otherwise, to Licensee or any third party any intellectual property rights or other right, title, or interest in or to the Software. 76 | 77 | ### 2. CONTRIBUTIONS OF DERIVATIVES 78 | 2.1 If the Customer wishes to contribute to the Software or to distribute a Derivative, both must be made in accordance with the Pimcore Contributors License Agreement (“PCLA”), available at . The PCLA stipulates the terms under which intellectual contributions are managed, ensuring that all parties' rights are protected. Acceptance of the PCLA is mandatory for all contributors and can be reviewed on the source-code repository. Contributions without adherence to the PCLA will not be accepted. 79 | 80 | 2.2 Any contribution to the Software by a Derivative must be clearly documented, in order to maintain transparency and integrity of the source code. 81 | 82 | 2.3. Any Derivative distributed must prominently be specified as “Derivative”, comply with the terms of the POCL, include copyright notices, and be licensed as a whole under the terms of the POCL, with the proviso that the recipient (licensee) of the out-licensed Derivative gets the role of the “Customer” regarding rights and obligations. Upon distribution of any Derivative, recipient must be provided with a copy of this POCL. 83 | 84 | ### 3. COLLATERAL OBLIGATIONS OF THE CUSTOMER 85 | 86 | 3.1 The Customer shall not manipulate, in particular modify, move, remove, suppress, switch off or circumvent licence keys and technical protection mechanisms in the Software, e. g. directly, or through the use of intermediaries, white-labelling, or segmentation of services designed to avoid licensing obligations. 87 | 88 | 3.2 The Customer shall not alter or obfuscate any of the Pimcore's licensing, copyright, or other proprietary notices within the Software. Any use of Pimcore’s trademarks must comply with applicable laws. 89 | 90 | 3.3 The Customer shall not modify, relocate, disable, or bypass any functionalities associated with the Pimcore Store. 91 | 92 | 3.4 The Customer shall not (a) use GPLv3-licensed Pimcore software alongside POCL licensed Software, and shall not (b) revert from POCL to GPLv3, to protect the Customer’s rights in Derivatives. 93 | 94 | 3.5 The Customer must ensure that the access data to the user accounts is not passed on to unauthorised third parties and is protected against unauthorised access by third parties. The authorised users shall be instructed accordingly. The Customer shall inform Pimcore immediately if there is a suspicion of misuse of the Software. 95 | 96 | 3.6 If Customer infringes upon one of the provisions set up by Sect. 3.1 through 3.5, Sect. 1.4 sentence 1 applies accordingly. 97 | 98 | ### 4. CONFIDENTIALITY 99 | 100 | From time to time during the Term, either Party may disclose or make available to the other Party information about its business affairs, products, confidential intellectual property, trade secrets, third-party confidential information, and other sensitive or proprietary information, whether orally or in written, electronic, or other form or media, and whether or not marked, designated or otherwise identified as "confidential" (collectively, "**Confidential Information**"). Confidential Information does not include information that, at the time of disclosure is: (a) in the public domain; (b) known to the receiving Party at the time of disclosure; (c) rightfully obtained by the receiving Party on a non-confidential basis from a third party; or (d) independently developed by the receiving Party. The receiving Party shall not disclose the disclosing Party's Confidential Information to any person or entity, except to the receiving Party's employees who have a need to know the Confidential Information for the receiving Party to exercise its rights or perform its obligations hereunder. Notwithstanding the foregoing, each Party may disclose Confidential Information to the limited extent required (i) in order to comply with the order of a court or other governmental body, or as otherwise necessary to comply with applicable law, provided that the Party making the disclosure pursuant to the order shall first have given written notice to the other Party and made a reasonable effort to obtain a protective order; or (ii) to establish a Party's rights under this Agreement, including to make required court filings. On the expiration or termination of this Agreement, the receiving Party shall promptly return to the disclosing Party all copies, whether in written, electronic, or other form or media, of the disclosing Party's Confidential Information, or destroy all such copies and certify in writing to the disclosing Party that such Confidential Information has been destroyed. Each Party's obligations of non­disclosure with regard to Confidential Information are effective as of the Effective Date and will expire five years from the date first disclosed to the receiving Party; provided, however, with respect to any Confidential Information that constitutes a trade secret (as determined under applicable law), such obligations of non-disclosure will survive the termination or expiration of this Agreement for as long as such Confidential Information remains subject to trade secret protection under applicable law. 101 | 102 | ### 5. LIMITED WARRANTY AND WARRANTY DISCLAIMER 103 | 104 | Pimcore warrants that, at the time of delivery, the Software does not contain any virus or other malicious code that would cause the Software to become inoperable or incapable of being used in accordance with its documentation. The warranties set forth herein do not apply and become null and void if Licensee breaches any material provision of this Agreement or any instrument related hereto, or if Licensee, or any person provided access to the Software by Licensee whether or not in violation of this Agreement: (i) installs or uses the Software on or in connection with any hardware or software not specified in the documentation or expressly authorized by Licensor in writing; (ii) illicitly modifies or damages the Software; or (iii) misuses the Software, including any use of the Software other than as specified in the documentation or expressly authorized by Licensor in writing. If any Software fails to comply with the warranty set forth hereinbefore, and such failure is not excluded from warranty pursuant to this provision, Licensor shall, subject to Licensee's promptly notifying Licensor in writing of such failure, at its sole option, either: (i) repair or replace the Software, provided that Licensee provides Licensor with all information Licensor reasonably requests to resolve the reported failure, including sufficient information to enable the Licensor to recreate such failure; or (ii) refund the fees paid for such Software, subject to Licensee's ceasing all use of and, if requested by Licensor, returning to Licensor all copies of the Software. If Licensor repairs or replaces the Software, the warranty will continue to run from the Effective Date and not from Licensee's receipt of the repair or replacement. The remedies set forth in this Section 5 are Licensee's sole remedies and Licensor's sole liability under the limited warranty set forth in this Section 5. 105 | 106 | EXCEPT FOR THE LIMITED WARRANTY SET FORTH IN THIS SECTION 5, THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND LICENSOR HEREBY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, AND ALL WARRANTIES ARISING FROM COURSE OF DEALING, USAGE, OR TRADE PRACTICE. LICENSOR MAKES NO WARRANTY OF ANY KIND THAT THE SOFTWARE AND DOCUMENTATION, OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF, WILL MEET LICENSEE'S OR ANY OTHER PERSON'S REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, ACHIEVE ANY INTENDED RESULT, BE COMPATIBLE OR WORK WITH ANY SOFTWARE, SYSTEM OR OTHER SERVICES, OR BE SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE, OR ERROR FREE. 107 | 108 | ### 6. DEFECTS 109 | 110 | 6.1 The Customer is obliged to notify Pimcore of any defect or error in the Software immediately after its occurrence. 111 | 112 | 6.2 Before reporting any defect or error, the Customer must carry out an analysis of the system environment as far as possible to ensure that the defect or error is not due to system components that are not covered by this Agreement. 113 | 114 | 6.3 The Customer shall immediately install or carry out updates or other troubleshooting measures provided by Pimcore. 115 | 116 | 6.4 Violations of the obligations to co-operate may result in additional costs for Pimcore. The Customer must reimburse Pimcore for such costs, unless it is not responsible for them. 117 | 118 | ### 7. LIMITATION OF LIABILITY 119 | 120 | IN NO EVENT WILL LICENSOR BE LIABLE UNDER OR IN CONNECTION WITH THIS AGREEMENT UNDER ANY LEGAL OR EQUITABLE THEORY, INCLUDING BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, AND OTHERWISE, FOR ANY: (a) CONSEQUENTIAL, INCIDENTAL, INDIRECT, EXEMPLARY, SPECIAL, ENHANCED, OR PUNITIVE DAMAGES; (b) INCREASED COSTS, DIMINUTION IN VALUE OR LOST BUSINESS, PRODUCTION, REVENUES, OR PROFITS; (c) LOSS OF GOODWILL OR REPUTATION; (d) USE, INABILITY TO USE, LOSS, INTERRUPTION, DELAY OR RECOVERY OF ANY DATA, OR BREACH OF DATA OR SYSTEM SECURITY; OR (e) COST OF REPLACEMENT GOODS OR SERVICES, IN EACH CASE REGARDLESS OF WHETHER LICENSOR WAS ADVISED OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES OR SUCH LOSSES OR DAMAGES WERE OTHERWISE FORESEEABLE. 121 | 122 | IN NO EVENT WILL LICENSOR'S AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS AGREEMENT UNDER ANY LEGAL OR EQUITABLE THEORY, INCLUDING BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, AND OTHERWISE EXCEED THE TOTAL AMOUNTS PAID TO LICENSOR UNDER THIS AGREEMENT IN THE TWELVE (12) MONTH PERIOD PRECEDING THE EVENT GIVING RISE TO THE CLAIM. 123 | 124 | ### 8. INDEMNIFICATION 125 | 126 | The Customer shall indemnify Pimcore and its affiliates, officers, directors, employees, agents, and assigns, from and against all claims, losses, damages, liabilities, costs, and expenses (including reasonable attorney’s fees and costs) against Pimcore arising out of or relating to the Customer’s use of the Software or Derivatives. 127 | 128 | ### 9. TERMINATION 129 | 130 | Term and termination will be regulated separately. If Customer uses the Software in violation of this Agreement or otherwise violates the use rights or prohibitions contained in this Agreement, Customer’s License shall automatically terminate. Upon termination of this Agreement, the Customer shall uninstall the Software, including all copies, and delete any remaining Software residues from its IT system. The Customer must destroy any backup copies made. At Pimcore's request, the Customer must confirm that it has fulfilled these obligations. 131 | 132 | ### 10. REMUNERATION 133 | 134 | The remuneration for the use of the software shall be agreed separately. 135 | 136 | ### 11. MISCELLANEOUS 137 | 138 | 11.1 The Software may automatically collect and transmit non-personal statistical data related to its installation and use, including but not limited to the number of records in the database, installed modules, system configuration, and usage metrics ("Usage Data"). Such data is collected solely for the purposes of product improvement, support, and analytics. Licensee agrees not to interfere with the collection and transmission of Usage Data. 139 | 140 | 11.2 Licensee may not assign or transfer any of its rights or delegate any of its obligations hereunder, in each case whether voluntarily, involuntarily, by operation of law or otherwise, without the prior written consent of Licensor. Any purported assignment, transfer, or delegation in violation of this Section is null and void. No assignment, transfer, or delegation will relieve the assigning or delegating Party of any of its obligations hereunder. This Agreement is binding upon and inures to the benefit of the Parties hereto and their respective permitted successors and assigns. 141 | 142 | 11.3 Each Party acknowledges and agrees that a breach or threatened breach by such Party of any of its contractual obligations may cause the other Party irreparable harm for which monetary damages would not be an adequate remedy and agrees that, in the event of such breach or threatened breach, the other Party will be entitled to equitable relief, including a restraining order, an injunction, specific performance, and any other relief that may be available from any court, without any requirement to post a bond or other security, or to prove actual damages or that monetary damages are not an adequate remedy. Such remedies are not exclusive and are in addition to all other remedies that may be available at law, in equity, or otherwise. 143 | 144 | 11.4 No amendment to or modification of this Agreement is effective unless it is in writing and signed by an authorized representative of each Party. No waiver by any Party of any of the provisions hereof will be effective unless explicitly set forth in writing and signed by the Party so waiving. Except as otherwise set forth in this Agreement, (i) no failure to exercise, or delay in exercising, any rights, remedy, power, or privilege arising from this Agreement will operate or be construed as a waiver thereof, and (ii) no single or partial exercise of any right, remedy, power, or privilege hereunder will preclude any other or further exercise thereof or the exercise of any other right, remedy, power, or privilege. 145 | 146 | 11.5 If any provision of this Agreement is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability will not affect any other term or provision of this Agreement or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon such determination that any term or other provision is invalid, illegal, or unenforceable, the Parties hereto shall negotiate in good faith to modify this Agreement so as to effect the original intent of the Parties as closely as possible in a mutually acceptable manner in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. 147 | 148 | 11.6 In all relevant respects that are not regulated by this Agreement, the following documents shall apply, as far as applicable: 149 | 150 | - Pimcore Terms & Conditions, available at [] 151 | - Pimcore Privacy Statement (PPS) 152 | - Pimcore Data Processing Agreement (PDPA) 153 | - Pimcore PaaS Terms & Conditions 154 | 155 | 11.7 Specifications originating from the Customer regarding the service content and legal elements, such as GTC or contractual clauses, do not apply. 156 | 157 | 11.8 Support, maintenance, and other services remain subject to separate agreements. 158 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pimcore Project Skeleton 2 | 3 | This skeleton should be used by experienced Pimcore developers for starting a new project from the ground up. 4 | If you are new to Pimcore, it's better to start with our demo package, listed below 😉 5 | 6 | ## Getting started 7 | ```bash 8 | COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton my-project 9 | cd ./my-project 10 | ./vendor/bin/pimcore-install 11 | ``` 12 | 13 | - Point your virtual host to `my-project/public` 14 | - [Only for Apache] Create `my-project/public/.htaccess` according to https://pimcore.com/docs/platform/Pimcore/Installation_and_Upgrade/System_Setup_and_Hosting/Apache_Configuration/ 15 | - Open https://your-host/admin in your browser 16 | - Done! 😎 17 | 18 | ## Docker 19 | 20 | You can also use Docker to set up a new Pimcore Installation. 21 | You don't need to have a PHP environment with composer installed. 22 | 23 | ### Prerequisites 24 | 25 | * Your user must be allowed to run docker commands (directly or via sudo). 26 | * You must have docker compose installed. 27 | * Your user must be allowed to change file permissions (directly or via sudo). 28 | 29 | ### Follow these steps 30 | 1. Initialize the skeleton project using the `pimcore/pimcore` image 31 | ``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.3-latest composer create-project pimcore/skeleton my-project`` 32 | 33 | 2. Go to your new project 34 | `cd my-project/` 35 | 36 | 3. Part of the new project is a docker compose file 37 | * Run `sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml` to set the correct user id and group id. 38 | * Start the needed services with `docker compose up -d` 39 | 40 | 4. Install pimcore and initialize the DB 41 | `docker compose exec php vendor/bin/pimcore-install` 42 | * When asked for admin user and password: Choose freely 43 | * This can take a while, up to 20 minutes 44 | * If you select to install the SimpleBackendSearchBundle please make sure to add the `pimcore_search_backend_message` to your `.docker/supervisord.conf` file inside value for 'command' like `pimcore_maintenance` already is. 45 | 46 | 5. Run codeception tests: 47 | * `docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/` 48 | * `docker compose run --rm test-php vendor/bin/pimcore-install -n` 49 | * `docker compose run --rm test-php vendor/bin/codecept run -vv` 50 | 51 | 6. :heavy_check_mark: DONE - You can now visit your pimcore instance: 52 | * The frontend: 53 | * The admin interface, using the credentials you have chosen above: 54 | 55 | 56 | ## Pimcore Platform Version 57 | By default, Pimcore Platform Version is added as a dependency which ensures installation of compatible and in combination 58 | with each other tested versions of additional Pimcore modules. More information about the Platform Version can be found in the 59 | [Platform Version docs](https://github.com/pimcore/platform-version). 60 | 61 | It might be necessary to update a specific Pimcore module to a version that is not included in the Platform Version. 62 | In that case, you need to remove the `platform-version` dependency from your `composer.json` and update the module to 63 | the desired version. 64 | Be aware that this might lead to a theoretically compatible but untested combination of Pimcore modules. 65 | 66 | ## Other demo/skeleton packages 67 | - [Pimcore Basic Demo](https://github.com/pimcore/demo) 68 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | If you think that you have found a security issue, 6 | don’t use the bug tracker and don’t publish it publicly. 7 | Instead, all security issues must be reported via a private vulnerability report. 8 | 9 | Please follow the [instructions](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) to submit a private report. 10 | 11 | 12 | ## Resolving Process 13 | Every submitted security issue is handled with top priority by following these steps: 14 | 15 | 1. Confirm the vulnerability 16 | 2. Determine the severity 17 | 3. Contact reporter 18 | 4. Work on a patch 19 | 5. Get a CVE identification number (may be done by the reporter or a security service provider) 20 | 6. Patch reviewing 21 | 7. Tagging a new release for supported versions 22 | 8. Publish security announcement -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | ['all' => true], 5 | ]; 6 | -------------------------------------------------------------------------------- /config/config.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: 'local/' } 3 | 4 | 5 | pimcore: 6 | 7 | # IMPORTANT Notice! 8 | # Following there are only some examples listed, for a full list of possible options, please run the following command: 9 | # ./bin/console debug:config pimcore 10 | # you can also filter them by path, eg. 11 | # ./bin/console debug:config pimcore assets 12 | # or even more specific: 13 | # ./bin/console debug:config pimcore assets.image 14 | 15 | 16 | #### TRANSLATIONS 17 | # translations: 18 | # case_insensitive: true 19 | 20 | #### FEATURE FLAGS 21 | # flags: 22 | # zend_date: true 23 | 24 | #### CLASS OVERRIDES EXAMPLES 25 | # models: 26 | # class_overrides: 27 | # 'Pimcore\Model\DataObject\News': 'App\Model\DataObject\News' 28 | # 'Pimcore\Model\DataObject\News\Listing': 'App\Model\DataObject\News\Listing' 29 | # 'Pimcore\Model\DataObject\Folder': 'App\Model\DataObject\Folder' 30 | # 'Pimcore\Model\Asset\Folder': 'App\Model\Asset\Folder' 31 | # 'Pimcore\Model\Asset\Image': 'App\Model\Asset\Image' 32 | # 'Pimcore\Model\Document\Page': 'App\Model\Document\Page' 33 | # 'Pimcore\Model\Document\Link': 'App\Model\Document\Link' 34 | # 'Pimcore\Model\Document\Listing': 'App\Model\Document\Listing' 35 | 36 | 37 | #### CUSTOM DOCUMENT EDITABLES 38 | # documents: 39 | # allow_trailing_slash: 'yes' 40 | # generate_preview: false 41 | # tags: 42 | # map: 43 | # markdown: \App\Model\Document\Tag\Markdown 44 | 45 | 46 | #### CUSTOM OBJECT DATA TYPES 47 | # objects: 48 | # class_definitions: 49 | # data: 50 | # map: 51 | # myDataType: \App\Model\DataObject\Data\MyDataType 52 | 53 | 54 | #### ASSET CUSTOM SETTINGS 55 | # assets: 56 | # icc_rgb_profile: '' 57 | # icc_cmyk_profile: '' 58 | # versions: 59 | # use_hardlinks: false 60 | # image: 61 | # low_quality_image_preview: 62 | # enabled: false 63 | # generator: imagick 64 | # thumbnails: 65 | # webp_auto_support: false 66 | 67 | 68 | #### SYSTEM SETTINGS 69 | 70 | # general: 71 | # timezone: Europe/Berlin 72 | # path_variable: '' 73 | # instance_identifier: '' 74 | # full_page_cache: 75 | # enabled: false 76 | # lifetime: null 77 | # exclude_cookie: '' 78 | # exclude_patterns: '' 79 | # httpclient: 80 | # adapter: Socket # use 'Proxy' for custom proxy configuration 81 | # proxy_host: '' 82 | # proxy_port: '' 83 | # proxy_user: '' 84 | # proxy_pass: '' 85 | # email: 86 | # sender: 87 | # name: 'Pimcore Demo' 88 | # email: demo@pimcore.com 89 | # return: 90 | # name: '' 91 | # email: '' 92 | 93 | # applicationlog: 94 | # mail_notification: 95 | # send_log_summary: false 96 | # filter_priority: null 97 | # mail_receiver: '' 98 | # archive_treshold: '30' 99 | # archive_alternative_database: '' 100 | 101 | #### SYMFONY OVERRIDES 102 | framework: 103 | # WHEN RUNNING PIMCORE AND OTHER APPLICATIONS ON SAME DOMAIN, SET SESSION COOKIE NAME TO PROVIDE COLLISION 104 | # session: 105 | # name: "PIMCORE_SESSION_ID" 106 | 107 | #### DEFINE LOCATION OF MANIFEST WHEN WORKING WITH SYMFONY ENCORE 108 | # assets: 109 | # json_manifest_path: '%kernel.project_dir%/public/build/manifest.json' 110 | 111 | #### USE CUSTOM CACHE POOL 112 | # cache: 113 | # pools: 114 | # pimcore.cache.pool: 115 | # public: true 116 | # default_lifetime: 31536000 # 1 year 117 | # adapter: cache.adapter.redis_tag_aware 118 | # provider: 'redis://localhost' # Redis DNS, see: https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection 119 | 120 | #### USE SESSION HANDLER CONFIGURED IN php.ini 121 | # session: 122 | # handler_id: null 123 | 124 | #### SYMFONY MAILER TRANSPORTS 125 | # mailer: 126 | # transports: 127 | # main: smtp://user:pass@smtp.example.com:port 128 | # pimcore_newsletter: smtp://user:pass@smtp.example.com:port 129 | 130 | # pimcore_newsletter: 131 | # default_url_prefix: 'https://my-host.com' # default prefix for your static assets 132 | # use_specific: false # set true to use the following options for newsletter delivery 133 | # sender: 134 | # name: '' 135 | # email: '' 136 | # return: 137 | # name: '' 138 | # email: '' 139 | 140 | -------------------------------------------------------------------------------- /config/installer.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | # default configuration for services in *this* file 3 | _defaults: 4 | # automatically injects dependencies in your services 5 | autowire: true 6 | # automatically registers your services as commands, event subscribers, etc. 7 | autoconfigure: true 8 | # this means you cannot fetch services directly from the container via $container->get() 9 | # if you need to do this, you can override this setting on individual services 10 | public: false 11 | 12 | # --------------------------------------------------------- 13 | # Event Subscribers 14 | # --------------------------------------------------------- 15 | App\EventSubscriber\BundleSetupSubscriber: ~ -------------------------------------------------------------------------------- /config/local/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/skeleton/f24936e40ba9693a066b119599258c1558b2b6c7/config/local/.gitkeep -------------------------------------------------------------------------------- /config/packages/dev/config.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: ../../config.yaml } 3 | -------------------------------------------------------------------------------- /config/packages/prod/config.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: ../../config.yaml } 3 | -------------------------------------------------------------------------------- /config/packages/security.yaml: -------------------------------------------------------------------------------- 1 | security: 2 | enable_authenticator_manager: true 3 | 4 | providers: 5 | pimcore_admin: 6 | id: Pimcore\Security\User\UserProvider 7 | 8 | firewalls: 9 | dev: 10 | pattern: ^/(_(profiler|wdt)|css|images|js)/ 11 | security: false 12 | 13 | # Pimcore WebDAV HTTP basic // DO NOT CHANGE! 14 | pimcore_webdav: 15 | pattern: ^/asset/webdav 16 | provider: pimcore_admin 17 | http_basic: ~ 18 | 19 | # Pimcore Admin Bundle firewall 20 | pimcore_admin: '%pimcore_admin_bundle.firewall_settings%' 21 | 22 | access_control: 23 | # Pimcore admin ACl // DO NOT CHANGE! 24 | - { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS } 25 | - { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } 26 | - { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER } 27 | - { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } 28 | - { path: ^/admin/login$, roles: PUBLIC_ACCESS } 29 | - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } 30 | - { path: ^/admin, roles: ROLE_PIMCORE_USER } 31 | - { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER } 32 | 33 | role_hierarchy: 34 | # Pimcore admin // DO NOT CHANGE! 35 | ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER] 36 | -------------------------------------------------------------------------------- /config/packages/test/config.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: ../dev/config.yaml } 3 | 4 | doctrine: 5 | dbal: 6 | connections: 7 | default: 8 | url: '%pimcore_test.db.dsn%' 9 | host: ~ 10 | port: ~ 11 | dbname: ~ 12 | user: ~ 13 | password: ~ 14 | 15 | parameters: 16 | pimcore_test.db.dsn: '%env(PIMCORE_TEST_DB_DSN)%' 17 | env(PIMCORE_TEST_DB_DSN): ~ 18 | -------------------------------------------------------------------------------- /config/pimcore/constants.example.php: -------------------------------------------------------------------------------- 1 | General -> Additional $PATH variable 7 | # but in general it's a good idea to have your programs in your $PATH environment variable (system wide) 8 | 9 | #pimcore_executable_composer: php /opt/vendor/bin/composer.phar 10 | #pimcore_executable_html2text: /usr/local/html2text/bin/html2text 11 | #pimcore_executable_soffice: /opt/libreoffice/bin/soffice 12 | #pimcore_executable_gs: /opt/ghostscript/bin/gs 13 | #pimcore_executable_pdftotext: /opt/tools/pdftotext 14 | #pimcore_executable_xvfb-run: /opt/tools/xvfb-run 15 | #pimcore_executable_pngcrush: /opt/tools/pngcrush 16 | #pimcore_executable_zopflipng: /opt/tools/zopflipng 17 | #pimcore_executable_pngout: /opt/tools/pngout 18 | #pimcore_executable_advpng: /opt/tools/advpng 19 | #pimcore_executable_cjpeg: /opt/tools/cjpeg 20 | #pimcore_executable_jpegoptim: /opt/tools/jpegoptim 21 | #pimcore_executable_php: /usr/local/custom-php/bin/php 22 | #pimcore_executable_nice: /opt/tools/nice 23 | #pimcore_executable_nohup: /opt/tools/nohup 24 | #pimcore_executable_ffmpeg: /opt/tools/ffmpeg 25 | #pimcore_executable_exiftool: /opt/tools/exiftool 26 | #pimcore_executable_wkhtmltoimage: /usr/local/bin/wkhtmltoimage 27 | #pimcore_executable_timeout: /usr/bin/timeout 28 | #pimcore_executable_facedetect: /usr/bin/facedetect 29 | # graphviz 30 | #pimcore_executable_dot: /usr/bin/dot 31 | 32 | services: 33 | # default configuration for services in *this* file 34 | _defaults: 35 | # automatically injects dependencies in your services 36 | autowire: true 37 | # automatically registers your services as commands, event subscribers, etc. 38 | autoconfigure: true 39 | # this means you cannot fetch services directly from the container via $container->get() 40 | # if you need to do this, you can override this setting on individual services 41 | public: false 42 | # 43 | # CONTROLLERS 44 | # 45 | 46 | # auto-register all controllers as services 47 | App\Controller\: 48 | resource: '../src/Controller' 49 | public: true 50 | tags: [ 'controller.service_arguments' ] 51 | 52 | 53 | # 54 | # COMMANDS 55 | # 56 | 57 | # auto-register all commands as services 58 | App\Command\: 59 | resource: '../src/Command/*' 60 | tags: [ 'console.command' ] 61 | 62 | 63 | 64 | # Example custom templating helper 65 | # App\Templating\Helper\Example: 66 | # # templating helpers need to be public as they 67 | # # are fetched from the container on demand 68 | # public: true 69 | # tags: 70 | # - { name: templating.helper, alias: fooBar } 71 | 72 | # Example event listener for objects 73 | # App\EventListener\TestListener: 74 | # tags: 75 | # - { name: kernel.event_listener, event: pimcore.dataobject.preUpdate, method: onObjectPreUpdate } 76 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | redis: 3 | image: redis:alpine 4 | command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] 5 | 6 | rabbitmq: 7 | image: rabbitmq:alpine 8 | volumes: 9 | - pimcore-rabbitmq:/var/lib/rabbitmq/ 10 | 11 | db: 12 | image: mariadb:10.11 13 | working_dir: /application 14 | command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_520_ci, --innodb-file-per-table=1 ] 15 | volumes: 16 | - pimcore-database:/var/lib/mysql 17 | environment: 18 | - MYSQL_ROOT_PASSWORD=ROOT 19 | - MYSQL_DATABASE=pimcore 20 | - MYSQL_USER=pimcore 21 | - MYSQL_PASSWORD=pimcore 22 | healthcheck: 23 | # The service is considered healthy when: 24 | # - connection to pimcore db can be established, and 25 | # - we can run a simple SQL query. 26 | test: [ "CMD-SHELL", "mysql -h db -u$$MYSQL_USER -p$$MYSQL_PASSWORD $$MYSQL_DATABASE -e 'SHOW TABLES;'" ] 27 | interval: 10s 28 | retries: 6 29 | start_period: 1m 30 | timeout: 3s 31 | 32 | nginx: 33 | image: nginx:stable-alpine 34 | ports: 35 | - "80:80" 36 | volumes: 37 | - .:/var/www/html:ro 38 | - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro 39 | depends_on: 40 | - php 41 | 42 | php: 43 | #user: '1000:1000' # set to your uid:gid 44 | image: pimcore/pimcore:php8.3-debug-latest 45 | environment: 46 | COMPOSER_HOME: /var/www/html 47 | PHP_IDE_CONFIG: serverName=localhost 48 | # Feed installer configuration via ENV variables. 49 | # See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics 50 | PIMCORE_INSTALL_MYSQL_USERNAME: pimcore 51 | PIMCORE_INSTALL_MYSQL_PASSWORD: pimcore 52 | PIMCORE_INSTALL_MYSQL_PORT: 3306 53 | PIMCORE_INSTALL_MYSQL_HOST_SOCKET: db 54 | PIMCORE_INSTALL_MYSQL_DATABASE: pimcore 55 | depends_on: 56 | db: 57 | condition: service_healthy 58 | volumes: 59 | - .:/var/www/html 60 | - ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro 61 | 62 | supervisord: 63 | #user: '1000:1000' # set to your uid:gid 64 | image: pimcore/pimcore:php8.3-supervisord-latest 65 | depends_on: 66 | rabbitmq: 67 | condition: service_started 68 | db: 69 | condition: service_healthy 70 | volumes: 71 | - .:/var/www/html 72 | - ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro 73 | - ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro 74 | 75 | # The following two services are used for testing. 76 | # We restrict these services to the test profile only, so we don't spin them up with every `docker compose up`. 77 | # See: https://docs.docker.com/compose/profiles/ 78 | test-db: 79 | profiles: [ 'test' ] 80 | extends: db 81 | volumes: 82 | - pimcore-test-database:/var/lib/mysql 83 | 84 | test-php: 85 | profiles: [ 'test' ] 86 | extends: php 87 | environment: 88 | APP_ENV: test 89 | PIMCORE_TEST_DB_DSN: ${PIMCORE_TEST_DB_DSN:-mysql://pimcore:pimcore@test-db/pimcore} 90 | PIMCORE_INSTALL_ADMIN_USERNAME: pimcore 91 | PIMCORE_INSTALL_ADMIN_PASSWORD: pimcore 92 | PIMCORE_INSTALL_MYSQL_HOST_SOCKET: test-db 93 | depends_on: 94 | test-db: 95 | condition: service_healthy 96 | volumes: 97 | - pimcore-test-var:/var/www/html/var 98 | - pimcore-test-public-var:/var/www/html/public/var 99 | 100 | volumes: 101 | pimcore-database: 102 | pimcore-rabbitmq: 103 | pimcore-test-database: 104 | pimcore-test-var: 105 | pimcore-test-public-var: 106 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | render('default/default.html.twig'); 25 | } 26 | 27 | /** 28 | * Forwards the request to admin login 29 | */ 30 | public function loginAction(): Response 31 | { 32 | return $this->forward(LoginController::class.'::loginCheckAction'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Controller/Web2printController.php: -------------------------------------------------------------------------------- 1 | $this->document 26 | ]; 27 | 28 | foreach ($request->attributes as $key => $value) { 29 | $paramsBag[$key] = $value; 30 | } 31 | 32 | $paramsBag = array_merge($request->request->all(), $request->query->all(), $paramsBag); 33 | 34 | if ($this->document->getProperty('hide-layout')) { 35 | return $this->render('web2print/default_no_layout.html.twig', $paramsBag); 36 | } else { 37 | return $this->render('web2print/default.html.twig', $paramsBag); 38 | } 39 | } 40 | 41 | /** 42 | * @throws \Exception 43 | */ 44 | public function containerAction(Request $request): Response 45 | { 46 | $paramsBag = [ 47 | 'document' => $this->document 48 | ]; 49 | 50 | foreach ($request->attributes as $key => $value) { 51 | $paramsBag[$key] = $value; 52 | } 53 | 54 | $allChildren = []; 55 | 56 | //prepare children for include 57 | foreach ($this->document->getAllChildren() as $child) { 58 | if ($child instanceof Hardlink) { 59 | $child = Hardlink\Service::wrap($child); 60 | } 61 | 62 | $child->setProperty('hide-layout', 'bool', true, false, true); 63 | 64 | $allChildren[] = $child; 65 | } 66 | 67 | $paramsBag['allChildren'] = $allChildren; 68 | 69 | return $this->render('web2print/container.html.twig', $paramsBag); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/EventSubscriber/BundleSetupSubscriber.php: -------------------------------------------------------------------------------- 1 | [ 29 | ['bundleSetup'], 30 | ], 31 | ]; 32 | } 33 | 34 | public function bundleSetup(BundleSetupEvent $event): void 35 | { 36 | // add required PimcoreAdminBundle 37 | if (class_exists(PimcoreAdminBundle::class)) { 38 | $event->addRequiredBundle( 39 | 'PimcoreAdminBundle', 40 | PimcoreAdminBundle::class, 41 | true 42 | ); 43 | } 44 | if (class_exists(PimcoreQuillBundle::class)) { 45 | $event->addRequiredBundle( 46 | 'PimcoreQuillBundle', 47 | PimcoreQuillBundle::class, 48 | true 49 | ); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | addBundle(new PimcoreAdminBundle(), 60); 30 | } 31 | if (class_exists(PimcoreQuillBundle::class)) { 32 | $collection->addBundle(new PimcoreQuillBundle()); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /symfony.lock: -------------------------------------------------------------------------------- 1 | { 2 | "codeception/codeception": { 3 | "version": "99999", 4 | "recipe": { 5 | "repo": "github.com/symfony/recipes-contrib" 6 | } 7 | }, 8 | "doctrine/annotations": { 9 | "version": "99999", 10 | "recipe": { 11 | "repo": "github.com/symfony/recipes" 12 | } 13 | }, 14 | "doctrine/doctrine-bundle": { 15 | "version": "99999", 16 | "recipe": { 17 | "repo": "github.com/symfony/recipes" 18 | } 19 | }, 20 | "doctrine/doctrine-migrations-bundle": { 21 | "version": "99999", 22 | "recipe": { 23 | "repo": "github.com/symfony/recipes" 24 | } 25 | }, 26 | "friendsofsymfony/jsrouting-bundle": { 27 | "version": "99999", 28 | "recipe": { 29 | "repo": "github.com/symfony/recipes-contrib" 30 | } 31 | }, 32 | "knplabs/knp-paginator-bundle": { 33 | "version": "99999" 34 | }, 35 | "league/flysystem-bundle": { 36 | "version": "99999", 37 | "recipe": { 38 | "repo": "github.com/symfony/recipes" 39 | } 40 | }, 41 | "phpunit/phpunit": { 42 | "version": "99999", 43 | "recipe": { 44 | "repo": "github.com/symfony/recipes" 45 | } 46 | }, 47 | "pimcore/pimcore": { 48 | "version": "99999" 49 | }, 50 | "presta/sitemap-bundle": { 51 | "version": "99999" 52 | }, 53 | "scheb/2fa-bundle": { 54 | "version": "99999", 55 | "recipe": { 56 | "repo": "github.com/symfony/recipes" 57 | } 58 | }, 59 | "symfony-cmf/routing-bundle": { 60 | "version": "99999" 61 | }, 62 | "symfony/console": { 63 | "version": "99999", 64 | "recipe": { 65 | "repo": "github.com/symfony/recipes" 66 | } 67 | }, 68 | "symfony/debug-bundle": { 69 | "version": "99999", 70 | "recipe": { 71 | "repo": "github.com/symfony/recipes" 72 | } 73 | }, 74 | "symfony/flex": { 75 | "version": "99999", 76 | "recipe": { 77 | "repo": "github.com/symfony/recipes" 78 | } 79 | }, 80 | "symfony/framework-bundle": { 81 | "version": "99999", 82 | "recipe": { 83 | "repo": "github.com/symfony/recipes" 84 | } 85 | }, 86 | "symfony/lock": { 87 | "version": "99999", 88 | "recipe": { 89 | "repo": "github.com/symfony/recipes" 90 | } 91 | }, 92 | "symfony/mailer": { 93 | "version": "99999", 94 | "recipe": { 95 | "repo": "github.com/symfony/recipes" 96 | } 97 | }, 98 | "symfony/messenger": { 99 | "version": "99999", 100 | "recipe": { 101 | "repo": "github.com/symfony/recipes" 102 | } 103 | }, 104 | "symfony/monolog-bundle": { 105 | "version": "99999", 106 | "recipe": { 107 | "repo": "github.com/symfony/recipes" 108 | } 109 | }, 110 | "symfony/routing": { 111 | "version": "99999", 112 | "recipe": { 113 | "repo": "github.com/symfony/recipes" 114 | } 115 | }, 116 | "symfony/security-bundle": { 117 | "version": "99999", 118 | "recipe": { 119 | "repo": "github.com/symfony/recipes" 120 | } 121 | }, 122 | "symfony/translation": { 123 | "version": "99999", 124 | "recipe": { 125 | "repo": "github.com/symfony/recipes" 126 | } 127 | }, 128 | "symfony/twig-bundle": { 129 | "version": "99999", 130 | "recipe": { 131 | "repo": "github.com/symfony/recipes" 132 | } 133 | }, 134 | "symfony/uid": { 135 | "version": "99999", 136 | "recipe": { 137 | "repo": "github.com/symfony/recipes" 138 | } 139 | }, 140 | "symfony/validator": { 141 | "version": "99999", 142 | "recipe": { 143 | "repo": "github.com/symfony/recipes" 144 | } 145 | }, 146 | "symfony/web-profiler-bundle": { 147 | "version": "99999", 148 | "recipe": { 149 | "repo": "github.com/symfony/recipes" 150 | } 151 | }, 152 | "symfony/webpack-encore-bundle": { 153 | "version": "99999", 154 | "recipe": { 155 | "repo": "github.com/symfony/recipes" 156 | } 157 | }, 158 | "symfony/workflow": { 159 | "version": "99999", 160 | "recipe": { 161 | "repo": "github.com/symfony/recipes" 162 | } 163 | }, 164 | "twig/extra-bundle": { 165 | "version": "99999" 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /templates/default/default.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example 6 | 7 | 8 | 9 | 10 | 101 | 102 | 103 |
104 | 108 | 109 | {% if editmode %} 110 | 114 | 115 |
116 |

Where can I edit some pages?

117 |

118 | Well, it seems that you're using the professional distribution of pimcore which doesn't include any 119 | templates / themes or contents, it's designed to start a project from scratch. If you need a jump start 120 | please consider using our sample data / boilerplate package which includes everything you need to get started. 121 |

122 |
123 | {% endif %} 124 |
125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /templates/web2print/container.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'web2print/layout.html.twig' %} 2 | 3 | {% block content %} 4 | 5 | {% for child in allChildren %} 6 | 7 | {{ pimcore_inc(child) }} 8 | 9 | {% endfor %} 10 | 11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /templates/web2print/default.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'web2print/layout.html.twig' %} 2 | 3 | {% block content %} 4 | 5 | {{ include('web2print/default_no_layout.html.twig') }} 6 | 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /templates/web2print/default_no_layout.html.twig: -------------------------------------------------------------------------------- 1 | {% block content %} 2 | 3 | 4 |
5 | 6 |
7 | 8 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /templates/web2print/layout.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 | 21 | 43 | 44 | 45 | {% if printermarks is defined and printermarks == true %} 46 | 47 | {% endif %} 48 | 49 | 50 | 51 | 52 |
53 | {{ block('content') }} 54 |
55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /tests/Functional.suite.yml: -------------------------------------------------------------------------------- 1 | suite_namespace: App\Tests\Functional 2 | bootstrap: bootstrap.php 3 | -------------------------------------------------------------------------------- /tests/Functional/Command/CliCommandTest.php: -------------------------------------------------------------------------------- 1 | cmd = new CommandTester($application->find('list')); 29 | } 30 | 31 | public function testPimcoreCommandsAppearInListing(): void 32 | { 33 | $this->cmd->execute([]); 34 | 35 | self::assertStringContainsString('pimcore:', $this->cmd->getDisplay()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/Functional/bootstrap.php: -------------------------------------------------------------------------------- 1 | twig = $this->createMock(Environment::class); 31 | 32 | $container = new Container(); 33 | $container->set('twig', $this->twig); 34 | $container->set('pimcore.templating', new TwigDefaultDelegatingEngine($this->twig, new Config())); 35 | 36 | $this->controller = new DefaultController(); 37 | $this->controller->setContainer($container); 38 | } 39 | 40 | public function testDefaultAction() 41 | { 42 | $this->twig->method('render')->willReturnMap( 43 | // Simulate rendering of default template. 44 | [ 45 | ['default/default.html.twig', [], 'At pimcore we love writing tests! ❤️TDD!'] 46 | ], 47 | ); 48 | 49 | $response = $this->controller->defaultAction($this->createMock(Request::class)); 50 | 51 | self::assertEquals(200, $response->getStatusCode()); 52 | self::assertStringContainsStringIgnoringCase('pimcore', $response->getContent()); 53 | self::assertStringContainsStringIgnoringCase('❤', $response->getContent()); 54 | self::assertStringContainsStringIgnoringCase('tests', $response->getContent()); 55 | self::assertStringNotContainsStringIgnoringCase('bugs', $response->getContent()); 56 | self::assertStringNotContainsStringIgnoringCase('hacks', $response->getContent()); 57 | self::assertStringNotContainsStringIgnoringCase('💩', $response->getContent()); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/Unit/ReadmeTest.php: -------------------------------------------------------------------------------- 1 | readme = file_get_contents(self::README_PATH); 19 | } 20 | 21 | public function testReadmeIsWrittenWithLove(): void 22 | { 23 | self::assertStringContainsString('😎', $this->readme); 24 | self::assertStringContainsString('pimcore', $this->readme); 25 | } 26 | 27 | public function testReadmeContainsInstructionsForExecutingTests(): void 28 | { 29 | self::assertStringContainsString('codecept run', $this->readme); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/_output/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | 'test', 'PIMCORE_SKIP_DOTENV_FILE' => true] as $name => $value) { 10 | putenv("{$name}={$value}"); 11 | $_ENV[$name] = $_SERVER[$name] = $value; 12 | } 13 | require_once PIMCORE_PROJECT_ROOT . '/vendor/autoload.php'; 14 | 15 | \Pimcore\Bootstrap::setProjectRoot(); 16 | \Pimcore\Bootstrap::bootstrap(); 17 | -------------------------------------------------------------------------------- /translations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pimcore/skeleton/f24936e40ba9693a066b119599258c1558b2b6c7/translations/.gitkeep -------------------------------------------------------------------------------- /var/config/needs-install.lock: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /var/config/web-to-print/web_to_print.yaml: -------------------------------------------------------------------------------- 1 | pimcore: 2 | documents: 3 | web_to_print: 4 | enableInDefaultView: false 5 | generalTool: pdfreactor 6 | generalDocumentSaveMode: default 7 | pdfreactorProtocol: https 8 | pdfreactorServer: cloud.pdfreactor.com 9 | pdfreactorServerPort: '443' 10 | pdfreactorBaseUrl: 'http://my.domain.com' 11 | pdfreactorApiKey: '' 12 | pdfreactorLicence: '' 13 | pdfreactorEnableLenientHttpsMode: false 14 | pdfreactorEnableDebugMode: false 15 | headlessChromeSettings: '' 16 | --------------------------------------------------------------------------------