├── .browserslistrc
├── .env-app
├── .env-app.test
├── .env-build
├── .eslintignore
├── .eslintrc.yml
├── .gitattributes
├── .gitignore
├── .gitmodules
├── .jscsrc
├── .jshintignore
├── .jshintrc
├── .npmrc
├── .nvmrc
├── .php-version
├── .rsync-exclude-prod
├── .rsync-exclude-test
├── .stylelintignore
├── .stylelintignore-css
├── .stylelintrc-css.yml
├── .stylelintrc.yml
├── 3rd-party-dependencies.md
├── CHANGELOG.md
├── Jenkinsfile
├── LICENSE
├── README.md
├── UPGRADE.md
├── behat.yml.dist
├── bin
└── console
├── composer.json
├── composer.lock
├── config
├── .gitignore
├── bootstrap_test.php
├── config.yml
├── config_behat_test.yml
├── config_cloud.yml
├── config_dev.yml
├── config_prod.yml
├── config_test.yml
├── doctrine.yml
├── robots.txt.dist
├── routing.yml
├── routing_dev.yml
├── security.yml
├── security_dev.yml
└── security_test.yml
├── dev.json
├── dev.lock
├── docker-compose.yml
├── karma.conf.js.dist
├── package-lock.json
├── package.json
├── pdepend.xml.dist
├── php.ini
├── phpunit.xml.dist
├── public
├── .htaccess
├── bundles
│ └── .gitkeep
├── favicon.ico
├── index.php
├── index_dev.php
├── js
│ └── .gitkeep
├── maintenance.html
├── media
│ └── .gitkeep
├── notinstalled.html
├── robots.txt
├── sw.js
└── tracking.php
├── src
├── .htaccess
├── AppKernel.php
└── Entity
│ └── .gitkeep
├── templates
├── base.html.twig
└── bundles
│ └── TwigBundle
│ └── Exception
│ └── error.html.twig
├── translations
└── .gitkeep
├── var
├── cache
│ └── .gitkeep
├── data
│ └── .gitignore
├── logs
│ └── .gitkeep
├── maintenance
│ └── .gitkeep
└── sessions
│ └── .gitkeep
├── web
└── tracking.php
└── webpack.config.js
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > .5% or last 1 firefox version
2 | > .5% or last 1 chrome version
3 | > .5% or last 1 edge version
4 | > .5% or last 1 safari version
5 | > .5% or last 1 iOS version
6 |
--------------------------------------------------------------------------------
/.env-app:
--------------------------------------------------------------------------------
1 | # In all environments, the following files are loaded if they exist,
2 | # the latter taking precedence over the former:
3 | #
4 | # * .env-app contains default values for the environment variables needed by the app
5 | # * .env-app.local uncommitted file with local overrides
6 | # * .env-app.$ORO_ENV committed environment-specific defaults
7 | # * .env-app.$ORO_ENV.local uncommitted environment-specific overrides
8 | #
9 | # Real environment variables have priority over .env-app files.
10 | #
11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR ANY OTHER COMMITTED FILES.
12 | #
13 | # Run "composer dump-env prod" to compile .env-app files for production use
14 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
15 |
16 | ###> symfony config ###
17 | ORO_ENV=prod
18 | ORO_SECRET=ThisTokenIsNotSoSecretChangeIt
19 | ###< symfony config ###
20 |
21 | ###> doctrine config ###
22 | ORO_DB_URL=postgres://oro_db_user:oro_db_pass@127.0.0.1:5432/oro_db?sslmode=disable&charset=utf8&serverVersion=13.7
23 | ORO_DB_DSN=${ORO_DB_URL}
24 | ###< doctrine config ###
25 |
26 | ###> mailer config ###
27 | ORO_MAILER_DSN=native://default
28 | ###> mailer config ###
29 |
30 | ###> search engine config ###
31 | ORO_SEARCH_URL=orm:
32 | ORO_SEARCH_ENGINE_DSN=${ORO_SEARCH_URL}?prefix=oro_search
33 | ORO_WEBSITE_SEARCH_ENGINE_DSN=${ORO_SEARCH_URL}?prefix=oro_website_search
34 | ###< search engine config ###
35 |
36 | ###> session config ###
37 | ORO_SESSION_DSN=native:
38 | # ORO_SESSION_DSN=${ORO_REDIS_URL}/0
39 | ###< session config ###
40 |
41 | ###> websocket config ###
42 | # websocket server DSN example: //0.0.0.0:8080
43 | ORO_WEBSOCKET_SERVER_DSN=
44 | # websocket client frontend DSN example: //*:8080/ws
45 | ORO_WEBSOCKET_FRONTEND_DSN=
46 | # websocket client backend DSN example: tcp://127.0.0.1:8080
47 | ORO_WEBSOCKET_BACKEND_DSN=
48 | ###< websocket config ###
49 |
50 | ###> message queue config ###
51 | ORO_MQ_DSN=dbal:
52 | ###< message queue config ###
53 |
54 | ###> image optimization binaries paths ##
55 | ORO_JPEGOPTIM_BINARY=
56 | ORO_PNGQUANT_BINARY=
57 | ###< image optimization binaries paths ##
58 |
59 | ###> redis cache config ###
60 | # Sentinel DSN example: redis://127.0.0.1:26379?dbindex=1&redis_sentinel=lru_cache_mon
61 | # Cluster DSN example: redis://password@127.0.0.1:6379?host[127.0.0.1:6380]&dbindex=1&cluster=predis`
62 | # To activate Redis for the cache, run `composer set-params redis` and clear the application cache
63 | ORO_REDIS_URL=redis://127.0.0.1:6379
64 | ORO_REDIS_CACHE_DSN=${ORO_REDIS_URL}/1
65 | ORO_REDIS_DOCTRINE_DSN=${ORO_REDIS_URL}/2
66 | ORO_REDIS_LAYOUT_DSN=${ORO_REDIS_URL}/3
67 | ###< redis cache config ###
68 |
69 | ###> tracking data folder config ###
70 | # Specify path to the folder for tracking data
71 | ORO_TRACKING_DATA_FOLDER=
72 | ###< tracking data folder config ###
73 |
74 | ###> maintenance mode config ###
75 | # Specify path for the maintenance lock file in the system
76 | # To activate maintenance mode, run `lexik:maintenance:lock` ORO command
77 | ORO_MAINTENANCE_LOCK_FILE_PATH=%kernel.project_dir%/var/maintenance/maintenance_lock
78 | ###< maintenance mode config ###
79 |
80 | ###> OAuth config ###
81 | # Specify paths to the public and private keys for OAuth
82 | ORO_OAUTH_PUBLIC_KEY_PATH='%kernel.project_dir%/var/oauth_public.key'
83 | ORO_OAUTH_PRIVATE_KEY_PATH='%kernel.project_dir%/var/oauth_private.key'
84 | ###< OAuth config ###
85 |
86 | ###> logging config ###
87 | # Specify path to the log file
88 | ORO_LOG_PATH="%kernel.logs_dir%/%kernel.environment%.log"
89 | ORO_LOG_STACKTRACE_LEVEL="error"
90 | ###< logging config ###
91 |
--------------------------------------------------------------------------------
/.env-app.test:
--------------------------------------------------------------------------------
1 | ORO_DB_URL=postgres://root@127.0.0.1/b2b_crm_dev_test
2 | ORO_DB_DSN=${ORO_DB_URL}
3 | ORO_MAILER_DSN=smtp://127.0.0.1
4 | ORO_WEBSOCKET_SERVER_DSN=
5 | ORO_WEBSOCKET_FRONTEND_DSN=
6 | ORO_WEBSOCKET_BACKEND_DSN=
7 |
--------------------------------------------------------------------------------
/.env-build:
--------------------------------------------------------------------------------
1 | ORO_IMAGE=${ORO_PROJECT}orocommerce-application
2 | ORO_IMAGE_TEST=${ORO_IMAGE}-test
3 | ORO_IMAGE_INIT=${ORO_IMAGE}-init
4 | ORO_IMAGE_INIT_TEST=${ORO_IMAGE}-init-test
5 | ORO_SAMPLE_DATA=y
6 | ORO_CE=yes
7 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/.bin/**
2 | **/node_modules/**
3 | **/api-doc-bundle/**
4 | **/nelmioapidoc/**
5 | **/ThemeDefault*Bundle/**
6 | **/public/lib/**
7 | **/public/*/lib/**
8 | **/public/*/vendors/**
9 | **/Karma/lib/**
10 | **/*.min.js
11 |
--------------------------------------------------------------------------------
/.eslintrc.yml:
--------------------------------------------------------------------------------
1 | extends:
2 | - google
3 | - "plugin:oro/recommended"
4 | - "plugin:no-jquery/deprecated"
5 | parserOptions:
6 | ecmaVersion: 2022
7 | sourceType: module
8 | env:
9 | browser: true
10 | commonjs: true
11 | amd: true
12 | jasmine: true
13 | globals:
14 | Promise: true
15 | plugins:
16 | - 'no-jquery'
17 | rules:
18 | # turn off ES6 code style check
19 | arrow-parens: ['error', 'as-needed']
20 | oro/named-constructor: 'error'
21 |
22 | # customization
23 | indent: ['error', 4, {'SwitchCase': 1}]
24 | max-len:
25 | - 'error'
26 | - code: 120
27 | comments: 160
28 | tabWidth: 4
29 | ignoreComments: true
30 | ignoreTrailingComments: true
31 | ignoreRegExpLiterals: true
32 | ignorePattern: '^\s*const\s.+=\s*require\s*\(|\.extend\(\/\*\*\s+@lends\s.+\*\/\{$'
33 | comma-dangle: ['error', 'never']
34 | eqeqeq: ['error', 'smart']
35 | no-useless-call: 'error'
36 | no-useless-concat: 'error'
37 | no-loop-func: 'error'
38 | no-eval: 'error'
39 | no-undef: 'error'
40 | no-unused-vars:
41 | - 'error'
42 | - ignoreRestSiblings: true
43 | args: 'none'
44 | operator-linebreak:
45 | - 'error'
46 | - 'after'
47 | - overrides:
48 | "?": 'before'
49 | ":": 'before'
50 | new-cap:
51 | - 'error'
52 | - newIsCap: true
53 | properties: false
54 | quote-props:
55 | - 'error'
56 | - 'consistent-as-needed'
57 | - keywords: true
58 | numbers: true
59 | valid-jsdoc: 'off' # has to be turned on in a future
60 | no-useless-escape: 'off' # has to be turned on in a future
61 | require-jsdoc: 'off' # has to be turned on in a future
62 | no-invalid-this: 'off' # has to be turned on in a future
63 | space-infix-ops:
64 | - 'error'
65 | 'no-jquery/no-event-shorthand': 'error'
66 | 'no-jquery/no-trim': 'error'
67 | 'no-jquery/no-sizzle':
68 | - 'error'
69 | - allowPositional: false
70 | allowOther: true
71 | 'no-jquery/no-camel-case': 'error'
72 | 'no-jquery/no-is-function': 'error'
73 | 'no-jquery/no-is-numeric': 'error'
74 | 'no-jquery/no-is-window': 'error'
75 | 'no-jquery/no-now': 'error'
76 | 'no-jquery/no-proxy': 'error'
77 | 'no-jquery/no-type': 'error'
78 | 'no-jquery/no-hold-ready': 'error'
79 | 'no-jquery/no-is-array': 'error'
80 | 'no-jquery/no-node-name': 'error'
81 | 'no-jquery/no-bind': 'error'
82 | 'no-jquery/no-delegate': 'error'
83 | 'no-jquery/no-fx-interval': 'error'
84 | 'no-jquery/no-parse-json': 'error'
85 | 'no-jquery/no-ready-shorthand': 'error'
86 | 'no-jquery/no-unique': 'error'
87 | 'no-jquery/no-context-prop': 'error'
88 | 'no-jquery/no-support': 'error'
89 | 'no-jquery/no-and-self': 'error'
90 | 'no-jquery/no-error-shorthand': 'error'
91 | 'no-jquery/no-load-shorthand': 'error'
92 | 'no-jquery/no-on-ready': 'error'
93 | 'no-jquery/no-size': 'error'
94 | 'no-jquery/no-unload-shorthand': 'error'
95 | 'no-jquery/no-live': 'error'
96 | 'no-jquery/no-sub': 'error'
97 | 'no-jquery/no-selector-prop': 'error'
98 | 'no-jquery/no-box-model': 'error'
99 | 'no-jquery/no-browser': 'error'
100 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | /.env-* text eol=lf
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.settings
2 | /.buildpath
3 | /.project
4 | /.idea
5 | /node_modules
6 | /composer.phar
7 | composer.lock
8 | /behat.yml
9 | /var/*
10 | !var/cache/
11 | /var/cache/*
12 | !var/cache/.gitkeep
13 | !var/logs/
14 | /var/logs/*
15 | !var/logs/.gitkeep
16 | !var/maintenance/
17 | /var/maintenance/*
18 | !var/maintenance/.gitkeep
19 | !var/data/
20 | /var/data/*
21 | !var/data/.gitkeep
22 | !var/sessions/
23 | /var/sessions/*
24 | !var/sessions/.gitkeep
25 | !var/oro-check.php
26 | /build/logs/*
27 | /vendor
28 | /cov
29 | !public/bundles/
30 | /public/bundles/*
31 | !public/bundles/.gitkeep
32 | /public/images
33 | !public/js/
34 | /public/js/*
35 | !public/js/.gitkeep
36 | /public/build
37 | /public/layout-build
38 | /public/media
39 | !public/media/.gitkeep
40 | /public/build.js
41 | /config/parameters.yml
42 | /config/.env
43 | /.env-app.local
44 | /.env-app.local.php
45 | /.env-app.*.local
46 | phpunit.xml
47 | .phpunit.result.cache
48 | /.behat-secrets.yml
49 | *~
50 | bin/*
51 | !bin/console
52 | !bin/dist
53 | /.web-server-pid
54 | /.vagrant
55 | /.php-version
56 | /docker-compose.override.yml
57 | /.build
58 | /.user.ini
59 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/.gitmodules
--------------------------------------------------------------------------------
/.jscsrc:
--------------------------------------------------------------------------------
1 | {
2 | "preset": "google",
3 | "excludeFiles": [
4 | "node_modules/**",
5 | "vendor/**",
6 | "**/public/lib/**",
7 | "**/*.min.js"
8 | ],
9 | "validateIndentation": 4,
10 | "maximumLineLength": {
11 | "value": 120,
12 | "tabSize": 4,
13 | "allowComments": true,
14 | "allowRegex": true
15 | },
16 | "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
17 | "disallowSpaceAfterObjectKeys": true,
18 | "requireSpaceBeforeObjectValues": true,
19 | "validateLineBreaks": "LF",
20 | "validateParameterSeparator": ", "
21 | }
22 |
--------------------------------------------------------------------------------
/.jshintignore:
--------------------------------------------------------------------------------
1 | node_modules/**
2 | vendor/**
3 | **/public/lib/**
4 | **/*.min.js
5 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "bitwise": true,
3 | "curly": true,
4 | "eqeqeq": true,
5 | "forin": true,
6 | "freeze": true,
7 | "immed": true,
8 | "newcap": true,
9 | "noarg": true,
10 | "noempty": true,
11 | "nonew": true,
12 | "undef": true,
13 | "strict": true,
14 | "trailing": true,
15 | "latedef": "nofunc",
16 | "unused": "vars",
17 | "indent": 4,
18 | "maxdepth": 5,
19 | "maxstatements": 35,
20 | "quotmark": "single",
21 | "browser": true,
22 | "white": true,
23 |
24 | "globals": {
25 | "define": false,
26 | "require": false,
27 | "requirejs": false,
28 |
29 | "jasmine": false,
30 | "describe": false,
31 | "beforeEach": false,
32 | "afterEach": false,
33 | "it": false,
34 | "expect": false,
35 | "spyOn": false
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 22
2 |
--------------------------------------------------------------------------------
/.php-version:
--------------------------------------------------------------------------------
1 | 8.4
2 |
--------------------------------------------------------------------------------
/.rsync-exclude-prod:
--------------------------------------------------------------------------------
1 | - .git
2 | - */.git
3 | - */.github
4 | - */.gitignore
5 | - .build
6 | - /node_modules
7 | - vendor/oro/platform/build/node_modules
8 | - [Tt]ests/[Uu]nit/
9 | - [Tt]ests/[Ff]unctional/
10 | - [Tt]ests/[Bb]ehat/
11 | - /public/media/**
12 | - /var/data/**
13 | - /var/logs/**
14 | - /var/cache/**
15 | - /var/sessions/**
16 | + *
17 |
--------------------------------------------------------------------------------
/.rsync-exclude-test:
--------------------------------------------------------------------------------
1 | - .git
2 | - */.git
3 | - */.github
4 | - */.gitignore
5 | - .build
6 | - /node_modules
7 | - vendor/oro/platform/build/node_modules
8 | - /public/media/**
9 | - /var/data/**
10 | - /var/logs/**
11 | - /var/cache/**
12 | - /var/sessions/**
13 | + *
14 |
--------------------------------------------------------------------------------
/.stylelintignore:
--------------------------------------------------------------------------------
1 | **/node_modules/**
2 | **/public/build/**
3 | **/lib/*
4 | **/api-doc-bundle/**
5 | **/commerce-old-themes/**
6 | **/nelmioapidoc/**
7 | **/ThemeDefault*Bundle/**
8 | **/*.min.css
9 | **/Fixtures/**/*.css
10 |
--------------------------------------------------------------------------------
/.stylelintignore-css:
--------------------------------------------------------------------------------
1 | **/node_modules/**
2 | **/vendor/oro/**
3 | **/lib/*
4 | **/api-doc-bundle/**
5 | **/commerce-old-themes/**
6 | **/nelmioapidoc/**
7 | **/ThemeDefault*Bundle/**
8 | **/*.min.css
9 | **/*.min.rtl.css
10 | **/Fixtures/**/*.css
11 |
--------------------------------------------------------------------------------
/.stylelintrc-css.yml:
--------------------------------------------------------------------------------
1 | rules:
2 | annotation-no-unknown: true
3 | at-rule-descriptor-no-unknown: true
4 | at-rule-descriptor-value-no-unknown: true
5 | at-rule-no-deprecated: true
6 | at-rule-no-unknown: true
7 | at-rule-no-vendor-prefix: true
8 | custom-property-no-missing-var-function: true
9 | declaration-block-no-shorthand-property-overrides: true
10 | declaration-property-value-keyword-no-deprecated:
11 | - true
12 | - ignoreKeywords:
13 | - 'break-word'
14 | declaration-property-value-no-unknown:
15 | - true
16 | - propertiesSyntax:
17 | '-ms-grid-row-align': 'flex-start'
18 | font-family-no-duplicate-names: true
19 | font-family-no-missing-generic-family-keyword:
20 | - true
21 | - ignoreFontFamilies:
22 | - 'a'
23 | keyframe-block-no-duplicate-selectors: true
24 | media-feature-name-no-unknown: true
25 | media-feature-name-value-no-unknown: true
26 | media-query-no-invalid: true
27 | named-grid-areas-no-invalid: true
28 | no-invalid-double-slash-comments: true
29 | no-invalid-position-at-import-rule: true
30 | no-irregular-whitespace: true
31 | property-no-unknown: true
32 | selector-anb-no-unmatchable: true
33 | selector-pseudo-class-no-unknown: true
34 | selector-pseudo-element-no-unknown: true
35 | syntax-string-no-invalid: true
36 | media-feature-name-no-vendor-prefix: true
37 | declaration-property-value-disallowed-list:
38 | # Matching all custom properties
39 | /^--.*/:
40 | # Disallow any value starting with a $ - SCSS variable.
41 | - '/^\$.*$/'
42 | selector-no-vendor-prefix:
43 | - true
44 | - ignoreSelectors:
45 | - '::-moz-selection'
46 |
--------------------------------------------------------------------------------
/.stylelintrc.yml:
--------------------------------------------------------------------------------
1 | extends:
2 | - '@oroinc/oro-stylelint-config'
3 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | Please check the release notes at [GitHub](https://github.com/oroinc/orocommerce-application/releases) for the list of new features and changes to the existing features of OroCommerce application.
2 |
3 | The CHANGELOG.md files of the individual packages comprising this application describe significant changes in the code that may affect the upgrade of your customizations.
4 |
5 | You can use the following command to find all CHANGELOG.md files in Oro packages:
6 | ```bash
7 | find -L vendor/oro -maxdepth 2 -type f -name CHANGELOG.md
8 | ```
9 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | pipeline {
2 | environment {
3 | ORO_BASELINE_VERSION = '6.1-latest'
4 | ORO_BEHAT_OPTIONS = '--skip-isolators --tags=@e2esmokeci'
5 | }
6 | agent {
7 | node {
8 | label 'docker1'
9 | }
10 | }
11 | options {
12 | timeout(time: 1, unit: 'HOURS')
13 | buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '150', numToKeepStr: '50'))
14 | disableResume()
15 | timestamps ()
16 | ansiColor('xterm')
17 | }
18 | stages {
19 | stage('Init') {
20 | steps {
21 | script {
22 | try {
23 | retry(5) {
24 | checkout([
25 | $class: 'GitSCM',
26 | branches: [[name: 'master']],
27 | extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: ".build"]],
28 | userRemoteConfigs: [[url: 'https://github.com/oroinc/docker-build.git']]
29 | ])
30 | }
31 | } catch (error) {
32 | error message:"ERROR: Cannot perform git checkout!, Reason: '${error}'"
33 | }
34 | defaultVariables = readProperties(interpolate: true, file: "$WORKSPACE/.build/docker-compose/.env")
35 | readProperties(interpolate: true, defaults: defaultVariables + [ORO_IMAGE_TAG: env.BUILD_TAG.replaceAll("\\%2F", "-").replaceAll('\\.', '').replaceAll('_', '-').toLowerCase()], file: "$WORKSPACE/.env-build").each {key, value -> env[key] = value }
36 | readProperties(interpolate: true, file: "$WORKSPACE/docker-build/docker-compose/.env-ce-yes").each {key, value -> env[key] = value }
37 | dockerLabels = ['--label "org.opencontainers.image.title=OroCommerce Application"', '--label "org.opencontainers.image.description=OroCommerce Application"', '--label "org.opencontainers.image.authors=ORO Inc."', '--label "org.opencontainers.image.vendor=ORO Inc."', "--label \"org.opencontainers.image.revision=${GIT_COMMIT}\"","--label \"org.opencontainers.image.source=${env.GIT_URL}\"", "--label \"org.opencontainers.image.created=${env.BUILD_TIMESTAMP}\"", "--label \"com.oroinc.orocloud.reference=${env.GIT_BRANCH}\"", '--label "com.oroinc.orocloud.composer=composer.json"']
38 | if (env.TAG_NAME) { dockerLabels.add("--label \"org.opencontainers.image.version=${env.TAG_NAME}\"") }
39 |
40 | sh '''
41 | printenv | sort
42 | rm -rf $WORKSPACE/../$BUILD_TAG ||:
43 | cp -rf $WORKSPACE $WORKSPACE/../$BUILD_TAG
44 | docker builder use default
45 | docker builder ls
46 | '''
47 | }
48 | }
49 | }
50 | stage('Build') {
51 | parallel {
52 | stage('Build:prod') {
53 | stages {
54 | stage('Build:prod:source') {
55 | steps {
56 | sh '''COMPOSER_PROCESS_TIMEOUT=600 .build/scripts/composer.sh -b $ORO_BASELINE_VERSION -- '--no-dev install' '''
57 | }
58 | }
59 | stage('Build:prod:image') {
60 | steps {
61 | sh """
62 | docker buildx build --pull --load --rm ${dockerLabels.join(' ')} --build-arg ORO_BASELINE_VERSION -t \${ORO_IMAGE,,}:$ORO_IMAGE_TAG -f ".build/docker/Dockerfile" .
63 | """
64 | }
65 | }
66 | stage('Build:prod:install:de') {
67 | environment {
68 | ORO_LANGUAGE = 'de_DE'
69 | ORO_FORMATTING_CODE = 'de'
70 | }
71 | steps {
72 | sh '''
73 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose down -v
74 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --exit-code-from install --quiet-pull install
75 | rm -rf .build/docker/public_storage
76 | rm -rf .build/docker/private_storage
77 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/public/media/ .build/docker/public_storage
78 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/var/data/ .build/docker/private_storage
79 | ORO_IMAGE_INIT=${ORO_IMAGE_INIT,,}-de DB_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' prod_${EXECUTOR_NUMBER}-db-1) docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose build backup
80 | '''
81 | }
82 | }
83 | stage('Build:prod:install:fr') {
84 | environment {
85 | ORO_LANGUAGE = 'fr_FR'
86 | ORO_FORMATTING_CODE = 'fr'
87 | }
88 | steps {
89 | sh '''
90 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose down -v
91 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --exit-code-from install --quiet-pull install
92 | rm -rf .build/docker/public_storage
93 | rm -rf .build/docker/private_storage
94 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/public/media/ .build/docker/public_storage
95 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/var/data/ .build/docker/private_storage
96 | ORO_IMAGE_INIT=${ORO_IMAGE_INIT,,}-fr DB_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' prod_${EXECUTOR_NUMBER}-db-1) docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose build backup
97 | '''
98 | }
99 | }
100 | stage('Build:prod:install:en') {
101 | steps {
102 | sh '''
103 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose down -v
104 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --quiet-pull --exit-code-from install install
105 | rm -rf .build/docker/public_storage
106 | rm -rf .build/docker/private_storage
107 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/public/media/ .build/docker/public_storage
108 | docker cp prod_${EXECUTOR_NUMBER}-install-1:/var/www/oro/var/data/ .build/docker/private_storage
109 | DB_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' prod_${EXECUTOR_NUMBER}-db-1) docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose build backup
110 | '''
111 | }
112 | }
113 | }
114 | }
115 | stage('Build:test') {
116 | environment {
117 | ORO_TESTS_PATH = 'src'
118 | }
119 | stages {
120 | stage('Build:test:source') {
121 | steps {
122 | dir("$WORKSPACE/../$BUILD_TAG") {
123 | sh '''COMPOSER_PROCESS_TIMEOUT=600 .build/scripts/composer.sh -b $ORO_BASELINE_VERSION '''
124 | // sh '.build/scripts/test_php-cs-fixer.sh -b $ORO_BASELINE_VERSION'
125 | sh '.build/scripts/test_phpcs.sh -b $ORO_BASELINE_VERSION'
126 | sh '.build/scripts/test_phpmd.sh -b $ORO_BASELINE_VERSION'
127 | }
128 | }
129 | }
130 | stage('Build:test:unit') {
131 | steps {
132 | dir("$WORKSPACE/../$BUILD_TAG") {sh '.build/scripts/test_unit.sh -b $ORO_BASELINE_VERSION'}
133 | }
134 | }
135 | stage('Build:test:image') {
136 | steps {
137 | dir("$WORKSPACE/../$BUILD_TAG") {
138 | sh """
139 | docker buildx build --pull --load --rm ${dockerLabels.join(' ')} --label "com.oroinc.orocloud.image_type=test" --build-arg ORO_BASELINE_VERSION -t \${ORO_IMAGE_TEST,,}:$ORO_IMAGE_TAG -f ".build/docker/Dockerfile-test" .
140 | """
141 | }
142 | }
143 | }
144 | stage('Build:test:install') {
145 | steps {
146 | dir("$WORKSPACE/../$BUILD_TAG") {
147 | sh '''
148 | echo "ORO_ENV=test" >> .build/docker-compose/.env
149 | docker compose -p test_${EXECUTOR_NUMBER} --project-directory .build/docker-compose down -v
150 | docker compose -p test_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --quiet-pull --exit-code-from install-test install-test
151 | rm -rf .build/docker/public_storage
152 | rm -rf .build/docker/private_storage
153 | docker cp test_${EXECUTOR_NUMBER}-install-test-1:/var/www/oro/public/media/ .build/docker/public_storage
154 | docker cp test_${EXECUTOR_NUMBER}-install-test-1:/var/www/oro/var/data/ .build/docker/private_storage
155 | DB_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' test_${EXECUTOR_NUMBER}-db-1) docker compose -p test_${EXECUTOR_NUMBER} --project-directory .build/docker-compose build backup-test
156 | '''
157 | }
158 | }
159 | }
160 | stage('Build:test:functional') {
161 | environment {
162 | ORO_FUNCTIONAL_ARGS = ' src'
163 | }
164 | steps {
165 | dir("$WORKSPACE/../$BUILD_TAG") {
166 | sh '''
167 | docker compose -p test_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --quiet-pull --exit-code-from functional functional
168 | '''
169 | }
170 | }
171 | }
172 | }
173 | }
174 | }
175 | }
176 | // stage('Test:Behat') {
177 | // environment {
178 | // ORO_BEHAT_ARGS = ' '
179 | // }
180 | // steps {
181 | // sh '''
182 | // docker compose -p prod_${EXECUTOR_NUMBER} --project-directory .build/docker-compose up --quiet-pull --exit-code-from behat behat
183 | // '''
184 | // }
185 | // }
186 | stage('Push Cloud release tag') {
187 | environment {
188 | ORO_CLOUD_DOCKER_PROJECT = 'harborio.oro.cloud'
189 | ORO_CLOUD_DOCKER_PROJECT_FOLDER = 'public-dev-ci'
190 | ORO_REGISTRY_CREDS = credentials('harborio.oro.cloud')
191 | }
192 | steps {
193 | sh '''
194 | echo $ORO_REGISTRY_CREDS_PSW | docker login -u $ORO_REGISTRY_CREDS_USR --password-stdin $ORO_CLOUD_DOCKER_PROJECT
195 | docker image tag ${ORO_IMAGE,,}:$ORO_IMAGE_TAG $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application:${TAG_NAME,,}
196 | docker image tag ${ORO_IMAGE_INIT,,}:$ORO_IMAGE_TAG $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init:${TAG_NAME,,}
197 | docker image tag ${ORO_IMAGE_INIT,,}:$ORO_IMAGE_TAG $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init-fr:${TAG_NAME,,}
198 | docker image tag ${ORO_IMAGE_INIT,,}:$ORO_IMAGE_TAG $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init-de:${TAG_NAME,,}
199 | docker image push $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application:${TAG_NAME,,}
200 | docker image push $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init:${TAG_NAME,,}
201 | docker image push $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init-fr:${TAG_NAME,,}
202 | docker image push $ORO_CLOUD_DOCKER_PROJECT/$ORO_CLOUD_DOCKER_PROJECT_FOLDER/orocommerce-application-init-de:${TAG_NAME,,}
203 | '''
204 | }
205 | when {
206 | buildingTag()
207 | }
208 | }
209 | stage('Push to CI') {
210 | environment {
211 | KEY_FILE = credentials('jenkins_oro-product-development_iam_gserviceaccount_com')
212 | configuration = 'oro-product-development'
213 | credentials = "--configuration ${configuration}"
214 | }
215 | steps {
216 | sh '''
217 | gcloud config configurations list | grep ^${configuration} -q || gcloud config configurations create ${configuration}
218 | gcloud config configurations activate ${configuration}
219 | gcloud -q ${credentials} auth activate-service-account --key-file "$KEY_FILE" --project ${configuration}
220 | gcloud ${credentials} auth configure-docker
221 | set -x
222 | docker image ls ${ORO_IMAGE}*
223 | docker image push ${ORO_IMAGE,,}:$ORO_IMAGE_TAG
224 | docker image push ${ORO_IMAGE_INIT,,}:$ORO_IMAGE_TAG
225 | docker image push ${ORO_IMAGE_INIT,,}-fr:$ORO_IMAGE_TAG
226 | docker image push ${ORO_IMAGE_INIT,,}-de:$ORO_IMAGE_TAG
227 | docker image push ${ORO_IMAGE_TEST,,}:$ORO_IMAGE_TAG
228 | docker image push ${ORO_IMAGE_INIT_TEST,,}:$ORO_IMAGE_TAG
229 | docker image rm -f ${ORO_IMAGE,,}:$ORO_IMAGE_TAG ||:
230 | docker image rm -f ${ORO_IMAGE,,}-fr:$ORO_IMAGE_TAG ||:
231 | docker image rm -f ${ORO_IMAGE,,}-de:$ORO_IMAGE_TAG ||:
232 | docker image rm -f ${ORO_IMAGE_INIT,,}:$ORO_IMAGE_TAG ||:
233 | docker image rm -f ${ORO_IMAGE_TEST,,}:$ORO_IMAGE_TAG ||:
234 | docker image rm -f ${ORO_IMAGE_INIT_TEST,,}:$ORO_IMAGE_TAG ||:
235 | docker image prune -f
236 | '''
237 | }
238 | when {
239 | environment name: 'PUSH_TO', value: 'us.gcr.io/oro-product-development'
240 | }
241 | }
242 | }
243 | post {
244 | always {
245 | sh '''
246 | rm -rf "logs"
247 | mkdir -p "logs"
248 | cp -rfv "$WORKSPACE/../$BUILD_TAG/var/logs/"* "logs"/ ||:
249 | printenv | grep ^ORO | sort | sed -e 's/=/="/;s/\$/"/' > "logs"/env-config
250 | docker ps -a -f "name=.*_.*-.*" > logs/docker_ps.txt ||:
251 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-.*" | xargs -r -I {} bash -c "docker logs {} > logs/docker_logs_{}.txt 2>&1" ||:
252 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-redis-.*" | xargs -r -I {} bash -c "docker exec -t {} redis-cli info > logs/docker_{}_info.txt 2>&1" ||:
253 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-functional-.*" | xargs -r -I {} bash -c "docker cp {}:/var/www/oro//var/logs/junit logs" ||:
254 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-functional-.*" | xargs -r -I {} bash -c "docker cp {}:/var/www/oro//var/logs/functional logs" ||:
255 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-behat-.*" | xargs -r -I {} bash -c "docker cp {}:/var/www/oro//var/logs/junit logs" ||:
256 | docker ps -a --format '{{.Names}}' -f "name=.*_.*-behat-.*" | xargs -r -I {} bash -c "docker cp {}:/var/www/oro//var/logs/behat logs" ||:
257 | docker compose -p prod_${EXECUTOR_NUMBER} --project-directory $WORKSPACE/.build/docker-compose -f $WORKSPACE/.build/docker-compose/compose-orocommerce-application.yaml down -v ||:
258 | docker compose -p test_${EXECUTOR_NUMBER} --project-directory $WORKSPACE/../$BUILD_TAG/.build/docker-compose -f $WORKSPACE/../$BUILD_TAG/.build/docker-compose/compose-orocommerce-application.yaml down -v ||:
259 | rm -rf $WORKSPACE/../${BUILD_TAG}* ||:
260 | '''
261 | dir("logs") {
262 | archiveArtifacts defaultExcludes: false, allowEmptyArchive: true, artifacts: '**', excludes: '**/*.sql', caseSensitive: false
263 | junit allowEmptyResults: true, testResults: "junit/*.xml"
264 | }
265 | script {
266 | def issuesList = []
267 | discoverReferenceBuild referenceJob: env.JOB_NAME
268 | issuesList.add(scanForIssues([blameDisabled: true, forensicsDisabled: true, tool: checkStyle(name: 'PHP CS Fixer', pattern: 'logs/**/static_analysis/php-cs-fixer*.xml')]))
269 | issuesList.add(scanForIssues([blameDisabled: true, forensicsDisabled: true, tool: phpCodeSniffer(name: 'PHP Code Sniffer', pattern: 'logs/**/static_analysis/phpcs*.xml')]))
270 | issuesList.add(scanForIssues([blameDisabled: true, forensicsDisabled: true, tool: pmdParser(name: 'PHP MD', pattern: 'logs/**/static_analysis/phpmd*.xml')]))
271 | publishIssues issues: issuesList, skipPublishingChecks: true
272 | }
273 | }
274 | }
275 | }
276 |
277 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The Open Software License version 3.0
2 |
3 | Copyright (c) 2024 Oro Inc.
4 |
5 | Full license is at: http://opensource.org/licenses/OSL-3.0
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | OroCommerce Sample Application
2 | ==============================
3 |
4 | What Is Included?
5 | --------------------
6 |
7 | This sample application includes OroCommerce Community Edition.
8 |
9 | Other application distributions:
10 | * orocommerce-enterprise-application - OroCommerce Enterprise Edition
11 | * orocommerce-enterprise-nocrm-application - OroCommerce Enterprise Edition, without CRM modules
12 | * orocommerce-platform-application - OroCommerce Enterprise Edition, with additional marketplace modules
13 |
14 |
15 | * orocommerce-application-de - German-localized version of OroCommerce Community Edition
16 | * orocommerce-enterprise-application-de - German-localized version of OroCommerce Enterprise Edition
17 |
18 |
19 | * platform-application - OroPlatform Community Edition, without eCommerce/CRM/marketplace modules
20 | * crm-application - OroCRM Community Edition, without eCommerce/marketplace modules
21 | * crm-enterprise-application - OroCRM Enterprise Edition, without eCommerce/marketplace modules
22 | * oromarketplace-application - legacy version (4.2 compatible) of OroCommerce Enterprise Edition with additional marketplace modules
23 |
24 | What is OroCommerce?
25 | --------------------
26 |
27 | OroCommerce is an open-source Business to Business Commerce application built with flexibility in mind. It can be customized and extended to fit any B2B commerce needs.
28 | You can find out more about OroCommerce at [www.orocommerce.com](https://www.orocommerce.com/).
29 |
30 | System Requirements
31 | -------------------
32 |
33 | Please see the OroCommerce online documentation for the complete list of [system requirements](https://doc.oroinc.com/backend/setup/system-requirements/).
34 |
35 | Installation
36 | ------------
37 |
38 | Please see the [OroCommerce and OroCRM Community Edition Installation Guide](https://doc.oroinc.com/backend/setup/dev-environment/manual-installation/commerce-ce/) for the detailed installation steps.
39 |
40 | Resources
41 | ---------
42 |
43 | * [OroCommerce Documentation](https://doc.oroinc.com)
44 | * [Contributing](https://doc.oroinc.com/community/contribute/)
45 |
46 | License
47 | -------
48 |
49 | [OSL-3.0](LICENSE) Copyright (c) 2024 Oro Inc.
50 |
--------------------------------------------------------------------------------
/UPGRADE.md:
--------------------------------------------------------------------------------
1 | The upgrade instructions are available at [Oro documentation website](https://doc.oroinc.com/master/backend/setup/upgrade-to-new-version/).
2 |
3 | This file includes only the most important items that should be addressed before attempting to upgrade or during the upgrade of a vanilla Oro application.
4 |
5 | Please also refer to [CHANGELOG.md](CHANGELOG.md) for a list of significant changes in the code that may affect the upgrade of some customizations.
6 |
7 | ### 5.1.0 RC
8 |
9 | Added `.env-app` files support and removed most of the parameters from the config/parameters.yml in favor of environment variables with DSNs. For more details, see [the migration guide](https://doc.oroinc.com/master/backend/setup/dev-environment/env-vars/).
10 |
11 | * The supported PHP version is 8.2
12 | * The supported PostgreSQL version is 15
13 | * The supported NodeJS version is 18
14 | * The supported Redis version is 7
15 | * The supported RabbitMQ version is 3.11
16 | * The supported PHP MongoDB extension version is 1.15
17 | * The supported MongoDB version is 6.0
18 |
19 | Fixed scheduled price lists issue. It is recommended to rebuild CPL's:
20 |
21 | - Run sql query `DELETE FROM oro_price_list_combined; DELETE FROM oro_price_product_combined;`
22 | - Run command `php bin/console oro:price-lists:schedule-recalculate --all`
23 |
24 | ## 5.0.0
25 |
26 | The `oro.email.update_visibilities_for_organization` MQ process can take a long time when updating from the old versions
27 | if the system has many email addresses (in User, Customer user, Lead, Contact, RFP request, Mailbox entities).
28 | During performance tests with 1M of email addresses, this process took approximately 10 minutes.
29 |
30 | It is recommended to add these MQ topics to the `oro.index` queue:
31 |
32 | - `oro.email.recalculate_email_visibility`
33 | - `oro.email.update_visibilities`
34 | - `oro.email.update_visibilities_for_organization`
35 | - `oro.email.update_email_visibilities_for_organization`
36 | - `oro.email.update_email_visibilities_for_organization_chunk`
37 |
38 |
39 | ## 5.0.0-rc
40 |
41 | The supported NodeJS version is 16.0
42 |
43 | ## 5.0.0-alpha.2
44 |
45 | The minimum required PHP version is 8.0.0.
46 |
47 | ## 4.2.1
48 |
49 | - The link at the calendar events search items was changed,
50 | please reindex calendar event items with command
51 | `php bin/console oro:search:reindex --class="Oro\Bundle\CalendarBundle\Entity\CalendarEvent"`
52 |
53 | ## 4.2.0
54 |
55 | The minimum required PHP version is 7.4.14.
56 |
57 | ### Routing
58 |
59 | The regular expressions in `fos_js_routing.routes_to_expose` and `oro_frontend.routes_to_expose` configuration parameters (see `config/config.yml`) have changed.
60 |
61 | ### Directory structure and filesystem changes
62 |
63 | The `var/attachment` and `var/import_export` directories are no longer used for storing files and have been removed from the default directory structure.
64 |
65 | All files from these directories must be moved to the new locations:
66 | - from `var/attachment/protected_mediacache` to `var/data/protected_mediacache`;
67 | - from `var/attachment` to `var/data/attachments`;
68 | - from `var/import_export` to `var/data/importexport`;
69 | - from `var/import_export/files` to `var/data/import_files`;
70 | - from `var/import_export/product_images` to `var/data/import_files`.
71 |
72 | The `public/uploads` directory has been removed.
73 |
74 | The console command `oro:gaufrette:migrate-filestorages` will help to migrate the files to new structure.
75 |
76 | ## 4.1.0
77 |
78 | - The minimum required PHP version is 7.3.13.
79 | - The feature toggle for WEB API was implemented. After upgrade, the API feature will be disabled.
80 | To enable it please follow the documentation [Enabling an API Feature](https://doc.oroinc.com/api/enabling-api-feature/).
81 | - Upgrade PHP before running `composer install` or `composer update`, otherwise composer may download wrong versions of the application packages.
82 |
83 | ## 3.1.0
84 |
85 | The minimum required PHP version is 7.1.26.
86 |
87 | Upgrade PHP before running `composer install` or `composer update`, otherwise composer may download wrong versions of the application packages.
88 |
89 | ## 1.6.0
90 |
91 | * Changed minimum required php version to 7.1
92 | * Relation between Category and Product has been changed in database. Join table has been removed. Please, make sure that you have fresh database backup before updating application.
93 |
94 | ## 1.5.0
95 |
96 | Full product reindexation has to be performed after upgrade!
97 |
98 | ## 1.4.0
99 |
100 | Format of sluggable urls cache was changed, added support of localized slugs. Cache regeneration is required after update.
101 |
102 | ## 1.1.0
103 |
104 | * Minimum required `php` version has changed from **5.7** to **7.0**.
105 | * [Fxpio/composer-asset-plugin](https://github.com/fxpio/composer-asset-plugin) dependency was updated to version **1.3**.
106 | * Composer was updated to version **1.4**; use the following commands:
107 |
108 | ```
109 | composer self-update
110 | composer global require "fxp/composer-asset-plugin"
111 | ```
112 |
113 | * To upgrade OroCommerce from **1.0** to **1.1** use the following command:
114 |
115 | ```bash
116 | php bin/console oro:platform:update --env=prod --force
117 | ```
118 |
--------------------------------------------------------------------------------
/behat.yml.dist:
--------------------------------------------------------------------------------
1 | imports:
2 | - ./vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Resources/config/behat.yml.dist
3 |
4 | default: &default
5 | gherkin:
6 | filters:
7 | tags: ~@not-automated&&~@skip
8 | extensions: &default_extensions
9 | Behat\MinkExtension:
10 | base_url: 'http://dev-commerce-crm.local/'
11 | FriendsOfBehat\SymfonyExtension:
12 | kernel:
13 | debug: false
14 | class: AppKernel
15 | Oro\Bundle\TestFrameworkBundle\Behat\ServiceContainer\OroTestFrameworkExtension:
16 | shared_contexts:
17 | - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\OroMainContext
18 | - Oro\Bundle\TestFrameworkBundle\Tests\Behat\Context\FixturesContext
19 | - Oro\Bundle\ActivityListBundle\Tests\Behat\Context\ActivityContext
20 | - Oro\Bundle\DataGridBundle\Tests\Behat\Context\GridContext
21 | - Oro\Bundle\FormBundle\Tests\Behat\Context\FormContext
22 | - Oro\Bundle\SecurityBundle\Tests\Behat\Context\ACLContext
23 | - Oro\Bundle\SearchBundle\Tests\Behat\Context\SearchContext
24 | - Oro\Bundle\EmailBundle\Tests\Behat\Context\EmailContext
25 | - Oro\Bundle\ImportExportBundle\Tests\Behat\Context\ImportExportContext
26 | - Oro\Bundle\AddressBundle\Tests\Behat\Context\AddressContext
27 | - Oro\Bundle\ApplicationBundle\Tests\Behat\Context\CommerceMainContext
28 | - Oro\Bundle\CustomerBundle\Tests\Behat\Context\CustomerUserContext
29 | - Oro\Bundle\OrderBundle\Tests\Behat\Context\OrderContext
30 | - Oro\Bundle\ShippingBundle\Tests\Behat\Context\SingleCurrencyContext
31 | - Oro\Bundle\ShoppingListBundle\Tests\Behat\Context\ShoppingListContext
32 | - Oro\Bundle\RedirectBundle\Tests\Behat\Context\SlugPrototypesContext
33 |
34 | chromedriver:
35 | <<: *default
36 |
--------------------------------------------------------------------------------
/bin/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | setProdEnvs(['prod', 'behat_test'])
10 | ->bootEnv(dirname(__DIR__).'/.env-app', 'prod', ['test']);
11 | EntityExtendTestInitializer::initialize();
12 |
--------------------------------------------------------------------------------
/config/config.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: parameters.yml, ignore_errors: not_found }
3 | - { resource: security.yml }
4 | - { resource: doctrine.yml }
5 |
6 | parameters:
7 | # Some parameter values are not set from environment variables because Symfony service container build
8 | # depends on them. These parameter values cannot be changed in runtime without the application cache rebuild.
9 |
10 | database_server_version: '13.7'
11 | secret: '%env(ORO_SECRET)%'
12 | database_dsn: '%env(ORO_DB_DSN)%'
13 | mailer_dsn: '%env(ORO_MAILER_DSN)%'
14 | websocket_server_dsn: '%env(ORO_WEBSOCKET_SERVER_DSN)%' # The websocket server will listen on this address and port.
15 | websocket_frontend_dsn: '%env(ORO_WEBSOCKET_FRONTEND_DSN)%' # The host, port and path for the browser to connect to.
16 | websocket_backend_dsn: '%env(ORO_WEBSOCKET_BACKEND_DSN)%' # The host, port and path for the server-side code to connect to.
17 | search_engine_dsn: '%env(ORO_SEARCH_ENGINE_DSN)%'
18 | website_search_engine_dsn: '%env(ORO_WEBSITE_SEARCH_ENGINE_DSN)%'
19 | session_handler_dsn: '%env(ORO_SESSION_DSN)%'
20 | message_queue_transport_dsn: '%env(ORO_MQ_DSN)%'
21 | liip_imagine.jpegoptim.binary: '%env(ORO_JPEGOPTIM_BINARY)%'
22 | liip_imagine.pngquant.binary: '%env(ORO_PNGQUANT_BINARY)%'
23 | tracking_data_folder: '%env(ORO_TRACKING_DATA_FOLDER)%'
24 | maintenance_lock_file_path: '%env(resolve:ORO_MAINTENANCE_LOCK_FILE_PATH)%'
25 | oauth2_public_key: '%env(resolve:ORO_OAUTH_PUBLIC_KEY_PATH)%'
26 | oauth2_private_key: '%env(resolve:ORO_OAUTH_PRIVATE_KEY_PATH)%'
27 | log_path: '%env(resolve:ORO_LOG_PATH)%'
28 | log_stacktrace_level: '%env(resolve:ORO_LOG_STACKTRACE_LEVEL)%' # The minimum log message level for which an exception stacktrace should be logged. To disable the stacktrace logging an empty string or "none" value can be used.
29 |
30 | env(ORO_SECRET): ThisTokenIsNotSoSecretChangeIt
31 | env(ORO_DB_URL): 'postgresql://root@127.0.0.1/b2b_crm_dev'
32 | env(ORO_DB_DSN): '%env(ORO_DB_URL)%'
33 | env(ORO_MAILER_DSN): 'native://default'
34 | env(ORO_SEARCH_URL): 'orm:'
35 | env(ORO_SEARCH_ENGINE_DSN): '%env(ORO_SEARCH_URL)%?prefix=oro_search'
36 | env(ORO_WEBSITE_SEARCH_ENGINE_DSN): '%env(ORO_SEARCH_URL)%?prefix=oro_website_search'
37 | env(ORO_SESSION_DSN): 'native:'
38 | env(ORO_WEBSOCKET_SERVER_DSN): '//0.0.0.0:8080'
39 | env(ORO_WEBSOCKET_FRONTEND_DSN): '//*:8080/ws'
40 | env(ORO_WEBSOCKET_BACKEND_DSN): 'tcp://127.0.0.1:8080'
41 | env(ORO_MQ_DSN): 'dbal:'
42 | env(ORO_JPEGOPTIM_BINARY): ''
43 | env(ORO_PNGQUANT_BINARY): ''
44 | env(ORO_REDIS_URL): 'redis://127.0.0.1:6379'
45 | env(ORO_REDIS_SESSION_DSN): '%env(ORO_REDIS_URL)%/0'
46 | env(ORO_REDIS_CACHE_DSN): '%env(ORO_REDIS_URL)%/1'
47 | env(ORO_REDIS_DOCTRINE_DSN): '%env(ORO_REDIS_URL)%/2'
48 | env(ORO_REDIS_LAYOUT_DSN): '%env(ORO_REDIS_URL)%/3'
49 | env(ORO_TRACKING_DATA_FOLDER): null
50 | env(ORO_MAINTENANCE_LOCK_FILE_PATH): '%kernel.project_dir%/var/maintenance/maintenance_lock'
51 | env(ORO_OAUTH_PUBLIC_KEY_PATH): '%kernel.project_dir%/var/oauth_public.key'
52 | env(ORO_OAUTH_PRIVATE_KEY_PATH): '%kernel.project_dir%/var/oauth_private.key'
53 | env(ORO_LOG_PATH): "%kernel.logs_dir%/%kernel.environment%.log"
54 | env(ORO_LOG_STACKTRACE_LEVEL): 'error'
55 |
56 | framework:
57 | #esi: ~
58 | translator:
59 | paths:
60 | - '%kernel.project_dir%/translations'
61 | fallback: en
62 | secret: "%secret%"
63 | router:
64 | resource: "%kernel.project_dir%/config/routing.yml"
65 | strict_requirements: "%kernel.debug%"
66 | form:
67 | legacy_error_messages: false
68 | csrf_protection: true
69 | validation: { enable_annotations: true }
70 | assets:
71 | version_strategy: 'Oro\Bundle\AssetBundle\VersionStrategy\BuildVersionStrategy'
72 | default_locale: en
73 | session:
74 | # More info about session cookie configuration can be found at
75 | # https://doc.oroinc.com/backend/setup/post-install/cookies-configuration/#back-office-session-cookie
76 | name: BAPID
77 | handler_id: '%session_handler%'
78 | save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
79 | gc_maxlifetime: 7200 #120 minutes
80 | cookie_httponly: true
81 | cookie_secure: 'auto'
82 | fragments:
83 | enabled: false
84 | path: /_fragment # used for controller action in template
85 | serializer:
86 | enabled: true
87 | mailer:
88 | transports:
89 | main: 'oro://system-config?fallback=%mailer_dsn%'
90 | oro_user_email_origin: 'oro://user-email-origin'
91 |
92 | # Twig Configuration
93 | twig:
94 | debug: "%kernel.debug%"
95 | strict_variables: "%kernel.debug%"
96 | globals:
97 | bap:
98 | layout: base.html.twig # default layout across all Oro bundles
99 |
100 | fos_js_routing:
101 | routes_to_expose: ['oro_.*']
102 |
103 | oro_frontend:
104 | routes_to_expose: ['oro_.*']
105 |
106 | stof_doctrine_extensions:
107 | default_locale: en
108 | translation_fallback: true
109 | orm:
110 | default:
111 | translatable: true
112 | tree: true
113 |
114 | oro_translation:
115 | locales: [en, fr]
116 | templating: "@OroUI/Form/translatable.html.twig"
117 |
118 | oro_maintenance:
119 | authorized:
120 | path: 'maintenance|.*\.js' # "maintenance" is only for demo purposes, remove in production!
121 | # ips: ["127.0.0.1"] # Optional. Authorized ip addresses
122 | driver:
123 | options:
124 | file_path: '%maintenance_lock_file_path%'
125 |
126 | #
127 | # ORO Bundles config
128 | #
129 | oro_theme:
130 | active_theme: oro
131 |
132 | oro_layout:
133 | enabled_themes:
134 | - default
135 |
136 | oro_locale:
137 | formatting_code: en
138 | language: en
139 |
140 | oro_attachment:
141 | upload_file_mime_types:
142 | - application/msword
143 | - application/vnd.ms-excel
144 | - application/pdf
145 | - application/zip
146 | - image/gif
147 | - image/jpeg
148 | - image/png
149 | - image/webp
150 | upload_image_mime_types:
151 | - image/gif
152 | - image/jpeg
153 | - image/png
154 | - image/webp
155 |
--------------------------------------------------------------------------------
/config/config_behat_test.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: ./../vendor/**/Tests/Behat/parameters.yml }
3 | - { resource: config_prod.yml }
4 |
--------------------------------------------------------------------------------
/config/config_cloud.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config_prod.yml }
3 |
4 | parameters:
5 | env(ORO_LOG_PATH): "php://stderr"
6 |
7 |
8 | sftp_root_path: '%env(ORO_SFTP_ROOT_PATH)%'
9 | env(ORO_SFTP_ROOT_PATH): '%kernel.project_dir%/var/sftp'
10 |
11 | gaufrette_adapter.public: 'gridfs:%env(ORO_MONGODB_DSN_PUBLIC)%'
12 | gaufrette_adapter.private: 'gridfs:%env(ORO_MONGODB_DSN_PRIVATE)%'
13 | gaufrette_adapter.import_files: 'local:%env(ORO_IMPORT_EXPORT_PATH)%'
14 | env(ORO_IMPORT_EXPORT_PATH): '%kernel.project_dir%/var/data/import_files'
15 |
16 | redis_dsn_cache: '%env(ORO_REDIS_CACHE_DSN)%'
17 | redis_dsn_doctrine: '%env(ORO_REDIS_DOCTRINE_DSN)%'
18 | redis_dsn_layout: '%env(ORO_REDIS_LAYOUT_DSN)%'
19 |
20 | env(APP_RUNTIME): Oro\Bundle\DistributionBundle\Runtime\CloudRuntime
21 |
--------------------------------------------------------------------------------
/config/config_dev.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 | - { resource: security_dev.yml }
4 |
5 | parameters:
6 | main_log_channels: []
7 |
8 | framework:
9 | router: { resource: "%kernel.project_dir%/config/routing_dev.yml" }
10 | profiler: { only_exceptions: false }
11 | ide: phpstorm
12 | # mailer:
13 | # envelope:
14 | # recipients: ['me@example.com']
15 |
16 | web_profiler:
17 | toolbar: true
18 | excluded_ajax_paths: '^/((index(_[\w]+)|app(_[\w]+)?)\.php/)?(_wdt|bundles)'
19 | intercept_redirects: false
20 |
21 | monolog:
22 | handlers:
23 | main:
24 | type: stream
25 | path: "%log_path%"
26 | level: debug
27 | channels: '%main_log_channels%' # The channels configuration only works for top-level handlers
28 |
29 | oro_message_queue:
30 | client:
31 | traceable_producer: true
32 |
--------------------------------------------------------------------------------
/config/config_prod.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 |
4 | parameters:
5 | main_log_channels: []
6 |
7 | framework:
8 | session:
9 | cookie_path: '%web_backend_prefix%'
10 |
11 | oro_frontend:
12 | session:
13 | # More info about storefront session cookie configuration can be found at
14 | # https://doc.oroinc.com/backend/setup/post-install/cookies-configuration/#storefront-session-cookie
15 | name: OROSFID
16 | cookie_path: '/'
17 |
18 | doctrine:
19 | dbal:
20 | logging: true
21 |
22 | monolog:
23 | handlers:
24 | filtered:
25 | type: filter
26 | min_level: info
27 | handler: main
28 | channels: '%main_log_channels%' # The channels configuration only works for top-level handlers
29 | main:
30 | type: fingers_crossed
31 | action_level: error
32 | handler: grouped
33 | buffer_size: 100
34 | excluded_http_codes: [ 404, 405 ]
35 | grouped:
36 | type: group
37 | members: [streamed, deduplicated]
38 |
39 | streamed:
40 | type: stream
41 | path: "%log_path%"
42 | level: debug
43 |
44 | deduplicated:
45 | type: deduplication
46 | handler: symfony_mailer
47 | time: 10
48 | store: "%kernel.logs_dir%/deduplicated.log"
49 |
50 | symfony_mailer:
51 | type: symfony_mailer
52 | email_prototype:
53 | id: oro_logger.monolog.email_factory.error_log_notification
54 | method: createEmail
55 | level: debug
56 | formatter: monolog.formatter.html
57 |
58 |
--------------------------------------------------------------------------------
/config/config_test.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 | - { resource: security_test.yml }
4 |
5 | parameters:
6 | doctrine.dbal.connection_factory.class: 'Oro\Component\Testing\Doctrine\PersistentConnectionFactory'
7 | message_queue_transport_dsn: 'dbal:'
8 | main_log_channels: []
9 |
10 | framework:
11 | test: ~
12 | session:
13 | storage_factory_id: session.storage.factory.mock_file
14 | csrf_protection: true
15 | profiler:
16 | enabled: false
17 | mailer:
18 | transports:
19 | main: 'null://null'
20 | oro_user_email_origin: 'null://null'
21 |
22 | monolog:
23 | handlers:
24 | fingers_crossed:
25 | type: fingers_crossed
26 | action_level: error
27 | handler: nested
28 | excluded_http_codes: [ 404, 405 ]
29 | channels: [ "!event" ]
30 | nested:
31 | type: stream
32 | path: "%log_path%"
33 | level: debug
34 | channels: '%main_log_channels%'
35 |
36 | # configure loose default password requirements for auto-generated test users
37 | oro_user:
38 | settings:
39 | password_min_length:
40 | value: 2
41 | password_lower_case:
42 | value: false
43 | password_upper_case:
44 | value: false
45 | password_numbers:
46 | value: false
47 | password_special_chars:
48 | value: false
49 |
50 | twig:
51 | strict_variables: true
52 | debug: false
53 |
54 | oro_search:
55 | engine_parameters:
56 | force_refresh: true
57 |
58 | oro_api:
59 | settings:
60 | web_api:
61 | value: true
62 |
63 | oro_frontend:
64 | settings:
65 | web_api:
66 | value: true
67 |
68 | oro_message_queue:
69 | client:
70 | redelivery:
71 | delay_time: 1
72 |
--------------------------------------------------------------------------------
/config/doctrine.yml:
--------------------------------------------------------------------------------
1 | doctrine:
2 | orm:
3 | mappings:
4 | App:
5 | is_bundle: false
6 | type: attribute
7 | dir: '%kernel.project_dir%/src/Entity'
8 | prefix: 'App\Entity'
9 | alias: App
10 |
--------------------------------------------------------------------------------
/config/robots.txt.dist:
--------------------------------------------------------------------------------
1 | # www.robotstxt.org/
2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
3 |
4 | User-agent: *
5 |
6 | Disallow: /*/massFrontAction/
7 | Disallow: /*?grid[*
8 | Disallow: /actionwidget/
9 | Disallow: /admin/
10 | Disallow: /ajax/
11 | Disallow: /api/
12 | Disallow: /attachment/
13 | Disallow: /autocomplete/search
14 | Disallow: /contact-us/create
15 | Disallow: /cookies-accepted
16 | Disallow: /customer/
17 | Disallow: /datagrid/
18 | Disallow: /dictionary/
19 | Disallow: /entity-pagination/
20 | Disallow: /entitytotals/
21 | Disallow: /export/
22 | Disallow: /localization/
23 | Disallow: /oauth2-token
24 | Disallow: /payment/callback/
25 | Disallow: /product-unit/
26 | Disallow: /product-variant/
27 | Disallow: /product/images-by-id/
28 | Disallow: /product/names-by-skus
29 | Disallow: /product/search/autocomplete
30 | Disallow: /product/search?search=*
31 | Disallow: /product/set-product-filters-sidebar-state
32 | Disallow: /productprice/
33 | Disallow: /promotion/coupon/ajax/
34 | Disallow: /shoppinglist/matrix-grid-order/
35 | Disallow: /view-switcher/
36 | Disallow: /workflow/
37 | Disallow: /workflowwidget/
38 |
--------------------------------------------------------------------------------
/config/routing.yml:
--------------------------------------------------------------------------------
1 | oro_default:
2 | path: '%web_backend_prefix%/'
3 | defaults:
4 | _controller: Oro\Bundle\DashboardBundle\Controller\DashboardController::viewAction
5 |
6 | oro_auto_routing:
7 | resource: .
8 | type: oro_auto
9 |
10 | oro_expose:
11 | resource: .
12 | type: oro_expose
13 |
--------------------------------------------------------------------------------
/config/routing_dev.yml:
--------------------------------------------------------------------------------
1 | _wdt:
2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
3 | prefix: /_wdt
4 | options:
5 | expose: true
6 |
7 | _profiler:
8 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
9 | prefix: /_profiler
10 | options:
11 | expose: true
12 |
13 | _errors:
14 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
15 | prefix: /_error
16 |
17 | _main:
18 | resource: routing.yml
19 |
--------------------------------------------------------------------------------
/config/security.yml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/config/security.yml
--------------------------------------------------------------------------------
/config/security_dev.yml:
--------------------------------------------------------------------------------
1 | oro_security:
2 | access_control:
3 | - { path: ^/(_wdt|_profiler|_error).*$, roles: PUBLIC_ACCESS, options: { frontend: true } }
4 |
--------------------------------------------------------------------------------
/config/security_test.yml:
--------------------------------------------------------------------------------
1 | security:
2 | access_decision_manager:
3 | strategy: unanimous
4 | firewalls:
5 | main:
6 | pattern: ^%web_backend_prefix%
7 | organization-http-basic:
8 | realm: "Secured REST Area"
9 | provider: oro_user
10 | entry_point: organization_http_basic
11 | http-basic: false
12 | organization-form-login: false
13 | logout: false
14 | organization-remember-me: false
15 |
16 | frontend:
17 | pattern: ^/
18 | organization-http-basic:
19 | realm: "AccountUser REST Area"
20 | provider: commerce_customer_user
21 | context: customer_identity
22 | http-basic: false
23 | organization-form-login: false
24 | logout: false
25 | organization-remember-me: false
26 | anonymous_customer_user: true
27 |
--------------------------------------------------------------------------------
/dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "oro/commerce-crm-application",
3 | "description": "OroCommerce - an open-source Business to Business Commerce application.\\This package contains a sample application.",
4 | "license": "OSL-3.0",
5 | "authors": [
6 | {
7 | "name": "Oro, Inc",
8 | "homepage": "https://oroinc.com/"
9 | }
10 | ],
11 | "autoload": {
12 | "psr-4": {"": "src/"},
13 | "classmap": [
14 | "src/AppKernel.php"
15 | ],
16 | "exclude-from-classmap": [
17 | "**/Tests/"
18 | ]
19 | },
20 | "require": {
21 | "php": "~8.4.0",
22 | "oro/commerce": "6.1.x-dev",
23 | "oro/commerce-authorizenet": "6.1.x-dev",
24 | "oro/platform": "6.1.x-dev",
25 | "oro/platform-serialised-fields": "6.1.x-dev",
26 | "oro/oauth2-server": "6.1.x-dev",
27 | "oro/calendar-bundle": "6.1.x-dev",
28 | "oro/marketing": "6.1.x-dev",
29 | "oro/customer-portal": "6.1.x-dev",
30 | "oro/crm": "6.1.x-dev",
31 | "oro/crm-task-bundle": "6.1.x-dev",
32 | "oro/crm-call-bundle": "6.1.x-dev",
33 | "oro/commerce-crm": "6.1.x-dev",
34 | "oro/crm-dotmailer": "6.1.x-dev",
35 | "oro/crm-zendesk": "6.1.x-dev",
36 | "oro/commerce-infinitepay": "6.1.x-dev",
37 | "oro/google-tag-manager-bundle": "6.1.x-dev",
38 | "oro/mailchimp": "6.1.x-dev",
39 | "oro/cookie-consent": "6.1.x-dev",
40 | "oro/gridfs-config": "6.1.x-dev",
41 | "oro/commerce-demo-checkouts": "6.1.x-dev",
42 | "oro/gen-ai": "6.1.x-dev",
43 | "oro/conversation": "6.1.x-dev",
44 | "oro/storefront-themes": "6.1.x-dev"
45 | },
46 | "require-dev": {
47 | "behat/behat": "~3.18.0",
48 | "behat/gherkin": "~4.11.0",
49 | "behat/mink": "~1.12.0",
50 | "friends-of-behat/mink-extension": "~v2.7.5",
51 | "behat/mink-selenium2-driver": "~1.6.0",
52 | "friends-of-behat/symfony-extension": "~2.6.0",
53 | "nelmio/alice": "~3.14.0",
54 | "theofidry/alice-data-fixtures": "~1.6.0",
55 | "phpunit/phpunit": "~9.5.27",
56 | "squizlabs/php_codesniffer": "~3.10.1",
57 | "phpmd/phpmd": "~2.15.0",
58 | "symfony/phpunit-bridge": "~6.4.0",
59 | "symfony/browser-kit": "~6.4.0",
60 | "symfony/css-selector": "~6.4.0",
61 | "symfony/debug-bundle": "~6.4.0",
62 | "symfony/dom-crawler": "~6.4.0",
63 | "symfony/stopwatch": "~6.4.0",
64 | "symfony/var-dumper": "~6.4.0",
65 | "symfony/var-exporter": "~6.4.0",
66 | "symfony/web-profiler-bundle": "~6.4.0",
67 | "friendsofphp/php-cs-fixer": "~3.57.2",
68 | "oro/twig-inspector": "1.1.*",
69 | "oro/maker": "6.1.x-dev"
70 | },
71 | "config": {
72 | "bin-dir": "bin",
73 | "fxp-asset": {
74 | "enabled": false
75 | },
76 | "allow-plugins": {
77 | "composer/package-versions-deprecated": true,
78 | "symfony/runtime": true,
79 | "symfony/flex": true,
80 | "php-http/discovery": false
81 | }
82 | },
83 | "scripts": {
84 | "post-install-cmd": [
85 | "@set-permissions",
86 | "@install-npm-assets",
87 | "@set-assets-version",
88 | "@execute-post-install-package-scripts",
89 | "@install-assets"
90 | ],
91 | "post-update-cmd": [
92 | "@set-permissions",
93 | "@update-npm-assets",
94 | "@set-assets-version",
95 | "@execute-post-update-package-scripts",
96 | "@install-assets"
97 | ],
98 | "execute-post-install-package-scripts": [
99 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::executePostInstallPackageScripts"
100 | ],
101 | "execute-post-update-package-scripts": [
102 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::executePostUpdatePackageScripts"
103 | ],
104 | "set-permissions": [
105 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::setPermissions"
106 | ],
107 | "install-npm-assets": [
108 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::installAssets"
109 | ],
110 | "update-npm-assets": [
111 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::updateAssets"
112 | ],
113 | "set-assets-version": [
114 | "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::setAssetsVersion"
115 | ],
116 | "set-parameters": [
117 | "Oro\\Bundle\\InstallerBundle\\Composer\\ParametersHandler::set"
118 | ],
119 | "install-assets": [
120 | "console oro:assets:install --no-interaction --no-ansi"
121 | ],
122 | "upgrade:full": [
123 | "@health",
124 | "@platform:update:dry-run",
125 | "@notification:start",
126 | "@global:lock",
127 | "@maintenance:lock",
128 | "@platform:update --skip-search-reindexation",
129 | "@cache",
130 | "@maintenance:unlock",
131 | "@notification:finish"
132 | ],
133 | "upgrade:full:reindex": [
134 | "@health",
135 | "@platform:update:dry-run",
136 | "@notification:start",
137 | "@global:lock",
138 | "@maintenance:lock",
139 | "@platform:update",
140 | "@cache",
141 | "@maintenance:unlock",
142 | "@notification:finish"
143 | ],
144 | "upgrade:rolling": [
145 | "@health",
146 | "@platform:update:dry-run",
147 | "@notification:start",
148 | "@platform:update --skip-search-reindexation",
149 | "@cache",
150 | "@notification:finish"
151 | ],
152 | "upgrade:rolling:reindex": [
153 | "@health",
154 | "@platform:update:dry-run",
155 | "@notification:start",
156 | "@platform:update --skip-search-reindexation",
157 | "@cache",
158 | "@notification:finish"
159 | ],
160 | "upgrade:source": [
161 | "console cache:warmup --no-interaction --no-ansi",
162 | "@health",
163 | "console oro:check-requirements --no-interaction --no-ansi",
164 | "@notification:start",
165 | "console oro:translation:update --all --no-interaction --no-ansi",
166 | "console oro:translation:load --no-interaction --no-ansi",
167 | "console oro:translation:dump --no-interaction --no-ansi",
168 | "console fos:js-routing:dump --no-interaction --no-ansi",
169 | "@notification:finish"
170 | ],
171 | "schema-update": [
172 | "Composer\\Config::disableProcessTimeout",
173 | "console cache:warmup --no-interaction --no-ansi",
174 | "@health",
175 | "console oro:entity-extend:update --dry-run --no-interaction --no-ansi",
176 | "@global:lock",
177 | "@maintenance:lock",
178 | "console oro:entity-extend:update --no-interaction --no-ansi",
179 | "@maintenance:unlock"
180 | ],
181 | "health": [
182 | "console monitor:health doctrine_dbal --no-interaction --no-ansi",
183 | "console monitor:health mail_transport --no-interaction --no-ansi",
184 | "console monitor:health rabbitmq_server --no-interaction --no-ansi",
185 | "console monitor:health elasticsearch --no-interaction --no-ansi",
186 | "console monitor:health redis_cache --no-interaction --no-ansi",
187 | "console monitor:health redis_doctrine_cache --no-interaction --no-ansi",
188 | "console monitor:health redis_session_storage --no-interaction --no-ansi"
189 | ],
190 | "platform:update:dry-run": [
191 | "console oro:platform:update --timeout=0 --no-interaction --no-ansi"
192 | ],
193 | "platform:update": [
194 | "Composer\\Config::disableProcessTimeout",
195 | "console oro:platform:update --timeout=0 --force --no-interaction --no-ansi"
196 | ],
197 | "cache": [
198 | "console cache:clear --no-interaction --no-ansi"
199 | ],
200 | "cache:api": [
201 | "console cache:warmup --no-interaction --no-ansi",
202 | "console oro:api:cache:clear --no-interaction --no-ansi",
203 | "console oro:api:doc:cache:clear --no-interaction --no-ansi"
204 | ],
205 | "cache:translation": [
206 | "console cache:warmup --no-interaction --no-ansi",
207 | "console oro:translation:rebuild-cache --no-interaction --no-ansi"
208 | ],
209 | "global:lock": "touch ${ORO_GLOBAL_LOCK_FILE_PATH:-var/maintenance/global_lock}",
210 | "global:unlock": "rm -f ${ORO_GLOBAL_LOCK_FILE_PATH:-var/maintenance/global_lock}",
211 | "maintenance:lock": [
212 | "console oro:maintenance-notification --message=Maintenance\\ start --subject=At\\ $ORO_APP_URL --no-interaction --no-ansi",
213 | "console oro:maintenance:lock --no-interaction --no-ansi"
214 | ],
215 | "maintenance:unlock": [
216 | "console oro:maintenance:unlock --no-interaction --no-ansi",
217 | "console oro:maintenance-notification --message=Maintenance\\ finish --subject=At\\ $ORO_APP_URL --no-interaction --no-ansi"
218 | ],
219 | "notification:start": [
220 | "console oro:maintenance-notification --message=Deploy\\ start --subject=At\\ $ORO_APP_URL --no-interaction --no-ansi"
221 | ],
222 | "notification:finish": [
223 | "console oro:maintenance-notification --message=Deploy\\ finish --subject=At\\ $ORO_APP_URL --no-interaction --no-ansi"
224 | ]
225 | },
226 | "minimum-stability": "dev",
227 | "prefer-stable": true,
228 | "extra": {
229 | "runtime": {
230 | "dotenv_path": ".env-app",
231 | "env_var_name": "ORO_ENV",
232 | "debug_var_name": "ORO_DEBUG",
233 | "prod_envs": ["prod", "behat_test"]
234 | },
235 | "symfony-web-dir": "public",
236 | "symfony-var-dir": "var",
237 | "symfony-bin-dir": "bin",
238 | "symfony-tests-dir": "tests"
239 | },
240 | "repositories": [
241 | {
242 | "type": "path",
243 | "url": "../../package/*"
244 | },
245 | {
246 | "type": "composer",
247 | "url": "https://packagist.oroinc.com"
248 | }
249 | ]
250 | }
251 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.5'
2 | services:
3 | pgsql:
4 | image: oroinc/pgsql:13.7-1-alpine
5 | ports: ['5432']
6 | labels:
7 | com.symfony.server.service-prefix: ORO_DB
8 | environment:
9 | POSTGRES_USER: oro_db_user
10 | POSTGRES_DB: oro_db
11 | POSTGRES_PASSWORD: oro_db_pass
12 | POSTGRES_ROOT_PASSWORD: oro_db_pass
13 | volumes:
14 | - postgres:/var/lib/postgresql/data
15 | healthcheck:
16 | test: "pg_isready -U$${POSTGRES_USER} -d$${POSTGRES_DB}"
17 | interval: 5s
18 | timeout: 30s
19 | start_period: 40s
20 | restart: on-failure
21 | redis:
22 | image: redis:6-alpine
23 | ports: ["6379"]
24 | labels:
25 | com.symfony.server.service-prefix: ORO_REDIS
26 | mailcatcher:
27 | image: schickling/mailcatcher
28 | ports: ['1025', '1080']
29 | labels:
30 | com.symfony.server.service-prefix: ORO_MAILER
31 | volumes:
32 | postgres: {}
33 |
--------------------------------------------------------------------------------
/karma.conf.js.dist:
--------------------------------------------------------------------------------
1 | /* eslint indent: ["error", 2] */
2 | /* eslint-env node */
3 | const fs = require('fs');
4 | const glob = require('glob');
5 | const path = require('path');
6 | const args = require('minimist')(process.argv.slice(4));
7 |
8 | const appDir = path.resolve('.');
9 | const environment = args.env || 'dev';
10 | const theme = args.theme || 'admin.oro';
11 |
12 | const webpackConfig = (function() {
13 | const OroConfig = require('@oroinc/oro-webpack-config-builder');
14 | OroConfig
15 | .enableLayoutThemes()
16 | .setPublicPath('public/')
17 | .setCachePath('var/cache');
18 |
19 | const {resolve, module, resolveLoader} = OroConfig.getWebpackConfig()({
20 | skipCSS: true,
21 | theme: theme,
22 | symfony: environment
23 | }, {})[0];
24 |
25 | const rules = [...module.rules];
26 | const index = rules.findIndex(rule => rule.loader === 'config-loader');
27 | rules.splice(index, 1, {
28 | ...rules[index],
29 | options: {
30 | ...rules[index].options,
31 | relativeTo: appDir
32 | }
33 | });
34 |
35 | return {
36 | resolve: {
37 | ...resolve,
38 | alias: {
39 | ...resolve.alias,
40 | 'dynamic-imports$':
41 | path.resolve('vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Karma/dynamic-imports.js')
42 | },
43 | modules: [
44 | appDir,
45 | path.resolve('vendor/oro/platform/src/Oro/Bundle/TestFrameworkBundle/Karma'),
46 | ...resolve.modules
47 | ]
48 | },
49 | module: {
50 | ...module,
51 | rules
52 | },
53 | resolveLoader
54 | };
55 | })();
56 |
57 | const specMask = args.mask || 'vendor/oro/**/Tests/JS/**/*Spec.js';
58 | const specFileName = args.spec || `var/cache/${environment}/${theme}/indexSpec.js`;
59 |
60 | if (!args.spec && !(args['skip-indexing'] && fs.existsSync(specFileName))) {
61 | console.log('[%o] Collecting Spec files by mask "%s"...', new Date(), specMask);
62 | const files = glob.sync(specMask, {follow: true});
63 | console.log('[%o] Found %d Spec files', new Date(), files.length);
64 | fs.mkdirSync(path.dirname(specFileName), {recursive: true});
65 | fs.writeFileSync(specFileName, files.map(file => `require('${file}');`).join('\n'));
66 | }
67 | console.log('[%o] Starting Karma for "%s"...', new Date(), specFileName);
68 |
69 | module.exports = function(config) {
70 | config.set({
71 | // base path, that will be used to resolve files and exclude
72 | basePath: '',
73 | baseUrl: '/',
74 |
75 | frameworks: ['jasmine'],
76 |
77 | // list of files / patterns to load in the browser
78 | files: [
79 | specFileName
80 | ],
81 |
82 | // list of files to exclude
83 | exclude: [],
84 |
85 | preprocessors: {
86 | '**/*Spec.js': ['webpack']
87 | },
88 |
89 | // use dots reporter, as travis terminal does not support escaping sequences
90 | // possible values: 'dots', 'progress'
91 | // CLI --reporters progress
92 | reporters: ['progress', /* 'coverage', */ 'junit'],
93 |
94 | junitReporter: {
95 | // will be resolved to basePath (in the same way as files/exclude patterns)
96 | outputDir: 'build/logs',
97 | outputFile: 'karma.xml',
98 | useBrowserName: false
99 | },
100 |
101 | /* coverageReporter: {
102 | type: 'html',
103 | dir: 'build/logs/js-coverage/'
104 | }, */
105 |
106 | // web server port
107 | // CLI --port 9876
108 | port: 9876,
109 |
110 | // enable / disable colors in the output (reporters and logs)
111 | // CLI --colors --no-colors
112 | colors: true,
113 |
114 | // level of logging
115 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
116 | // CLI --log-level debug
117 | logLevel: config.LOG_INFO,
118 |
119 | // enable / disable watching file and executing tests whenever any file changes
120 | // CLI --auto-watch --no-auto-watch
121 | autoWatch: true,
122 |
123 | // Start these browsers, currently available:
124 | // - Chrome
125 | // - ChromeCanary
126 | // - Firefox
127 | // - Opera
128 | // - Safari (only Mac)
129 | // - IE (only Windows)
130 | // CLI --browsers Chrome,Firefox,Safari
131 | // browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome'],
132 | browsers: ['ChromeHeadless'],
133 | // browsers: ['Chrome'],
134 | // browsers: ['Firefox'],
135 |
136 | // If browser does not capture in given timeout [ms], kill it
137 | // CLI --capture-timeout 5000
138 | captureTimeout: 20000,
139 |
140 | // Auto run tests on start (when browsers are captured) and exit
141 | // CLI --single-run --no-single-run
142 | singleRun: false,
143 |
144 | // report which specs are slower than 500ms
145 | // CLI --report-slower-than 500
146 | reportSlowerThan: 500,
147 |
148 | // Concurrency level
149 | // how many browser should be started simultaneous
150 | concurrency: Infinity,
151 |
152 | plugins: [
153 | 'karma-webpack',
154 | 'karma-jasmine',
155 | 'karma-junit-reporter',
156 | 'karma-firefox-launcher',
157 | 'karma-chrome-launcher'
158 | ],
159 |
160 | webpack: {
161 | ...webpackConfig,
162 | devtool: false,
163 | mode: 'none',
164 | optimization: {
165 | moduleIds: 'named'
166 | }
167 | },
168 | webpackMiddleware: {
169 | // turn off webpack bash output when running the tests
170 | noInfo: true,
171 | stats: 'errors-only'
172 | }
173 | });
174 | };
175 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "THE FILE IS GENERATED PROGRAMMATICALLY, ALL MANUAL CHANGES IN DEPENDENCIES SECTION WILL BE LOST",
3 | "homepage": "https://doc.oroinc.com/master/frontend/javascript/composer-js-dependencies/",
4 | "main": "webpack.config.js",
5 | "engines": {
6 | "npm": ">=10.8.3 <11",
7 | "node": ">=v22.9.0 <23"
8 | },
9 | "scripts": {
10 | "webpack": "check-engine && webpack",
11 | "build": "npm run webpack -- --mode=production",
12 | "watch": "npm run webpack -- -w --progress --stats-logging warn --stats-logging-debug sass-loader",
13 | "build-css": "npm run webpack -- --stats-logging warn --stats-logging-debug sass-loader --env skipJS",
14 | "build-js": "npm run webpack -- --stats-logging warn --env skipCSS",
15 | "lint": "echo 'Configure own command on a base of following template `npm run eslint vendor/%name% && npm run stylelint vendor/%name%/**/**.{css,scss}`'",
16 | "lint-oro": "npm run eslint-oro && npm run stylelint-oro",
17 | "eslint": "check-engine && eslint -c .eslintrc.yml --ignore-path .eslintignore",
18 | "eslint-oro": "npm run eslint vendor/oro",
19 | "stylelint": "check-engine && stylelint --config .stylelintrc.yml --ignore-path .stylelintignore",
20 | "stylelint-oro": "npm run stylelint vendor/oro/**/*.{css,scss}",
21 | "test": "npm run test-watch -- --single-run",
22 | "test-watch": "check-engine && karma start karma.conf.js.dist",
23 | "validate-css": "stylelint --config .stylelintrc-css.yml --ignore-path .stylelintignore-css public/build/**/*.css"
24 | },
25 | "dependencies": {
26 | "@babel/runtime": "^7.16.3",
27 | "@codemirror/view": "6.34.2",
28 | "@lezer/generator": "^1.3.0",
29 | "@lezer/lezer": "^1.1.2",
30 | "@oroinc/autobahnjs": "0.8.0",
31 | "@oroinc/backbone.pageable": "1.2.3-oro2",
32 | "@oroinc/bootstrap": "4.3.1-oro2",
33 | "@oroinc/elevatezoom": "3.0.81",
34 | "@oroinc/font-awesome": "4.7.0-oro2",
35 | "@oroinc/jquery-ajax-queue": "0.0.1",
36 | "@oroinc/jquery-creditcardvalidator": "1.1",
37 | "@oroinc/jquery.nicescroll": "3.6.6",
38 | "@oroinc/jquery.uniform": "4.3.*",
39 | "@oroinc/jsplumb": "1.7.*",
40 | "@oroinc/select2": "3.4.1",
41 | "@oroinc/slick-carousel": "1.7.1-oro3",
42 | "asap": "2.0.6",
43 | "autolinker": "4.0.0",
44 | "backbone": "1.4.*",
45 | "backgrid": "0.3.8",
46 | "Base64": "1.1.0",
47 | "bean": "1.0.15",
48 | "codemirror6": "npm:codemirror@^6.0.1",
49 | "colors": "1.4.0",
50 | "core-js": "^3.25.*",
51 | "crypto-js": "4.2.0",
52 | "datepair.js": "0.4.*",
53 | "flotr2": "0.1.0",
54 | "focus-visible": "5.2.0",
55 | "fullcalendar": "3.4.0",
56 | "fuse.js": "6.6.2",
57 | "grapesjs": "0.20.1",
58 | "grapesjs-parser-postcss": "1.0.1",
59 | "grapesjs-plugin-export": "1.0.11",
60 | "html2canvas": "1.4.1",
61 | "jquery": "3.7.*",
62 | "jquery-form": "4.3.0",
63 | "jquery-mousewheel": "3.1.13",
64 | "jquery-ui": "1.13.*",
65 | "jquery-ui-multiselect-widget": "2.0.1",
66 | "jquery-validation": "1.19.5",
67 | "jquery.cookie": "1.4.1",
68 | "jstree": "3.3.12",
69 | "moment": "2.29.*",
70 | "moment-timezone": "0.5.*",
71 | "numeral": "2.0.6",
72 | "overlayscrollbars": "1.13.*",
73 | "popper.js": "1.16.1",
74 | "prismjs": "^1.23.0",
75 | "scriptjs": "2.5.9",
76 | "timepicker": "1.14.0",
77 | "tinymce": "6.8.5",
78 | "underscore": "1.13.*",
79 | "when": "3.7.8",
80 | "xregexp": "^5.1.0"
81 | },
82 | "devDependencies": {
83 | "@oroinc/oro-stylelint-config": "6.1.0-lts001",
84 | "@oroinc/oro-webpack-config-builder": "6.1.0-lts08",
85 | "check-engine": "^1.10.1",
86 | "eslint": "^8.32.0",
87 | "eslint-config-google": "~0.14.0",
88 | "eslint-plugin-oro": "~0.0.3",
89 | "jasmine-core": "~4.5.0",
90 | "jasmine-jquery": "~2.1.1",
91 | "karma": "~6.4.1",
92 | "karma-chrome-launcher": "~3.1.0",
93 | "karma-firefox-launcher": "~2.1.2",
94 | "karma-jasmine": "~5.1.0",
95 | "karma-junit-reporter": "~2.0.1",
96 | "karma-webpack": "~5.0.0"
97 | },
98 | "private": true
99 | }
100 |
--------------------------------------------------------------------------------
/pdepend.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
Sorry for the inconvenience, but we’re performing a maintenance at the moment.
14 |We’ll be back online shortly!
15 | 16 | 17 | -------------------------------------------------------------------------------- /public/media/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/public/media/.gitkeep -------------------------------------------------------------------------------- /public/notinstalled.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Please, follow the installation guidance provided here: https://doc.oroinc.com/backend/setup/installation/
14 | 15 | 16 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | -------------------------------------------------------------------------------- /public/sw.js: -------------------------------------------------------------------------------- 1 | /* global importScripts*/ 2 | importScripts('/bundles/oroui/default/js/service-worker/sw.js'); 3 | -------------------------------------------------------------------------------- /public/tracking.php: -------------------------------------------------------------------------------- 1 | isDebug()) { 22 | ini_set('memory_limit', -1); 23 | ini_set('max_execution_time', 0); 24 | } 25 | 26 | if ('dev' === $this->getEnvironment()) { 27 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 28 | $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 29 | if (class_exists('Oro\TwigInspector\Bundle\OroTwigInspectorBundle')) { 30 | $bundles[] = new Oro\TwigInspector\Bundle\OroTwigInspectorBundle(); 31 | } 32 | } 33 | 34 | if ('test' === $this->getEnvironment()) { 35 | $bundles[] = new Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle(); 36 | $bundles[] = new Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle(); 37 | $bundles[] = new Oro\Bundle\TestFrameworkBundle\OroTestFrameworkBundle(); 38 | $bundles[] = new Oro\Bundle\TestFrameworkCRMBundle\OroTestFrameworkCRMBundle(); 39 | $bundles[] = new Oro\Bundle\FrontendTestFrameworkBundle\OroFrontendTestFrameworkBundle(); 40 | } 41 | 42 | return array_merge(parent::registerBundles(), $bundles); 43 | } 44 | 45 | #[\Override] 46 | public function registerContainerConfiguration(LoaderInterface $loader) 47 | { 48 | $loader->load(function (ContainerBuilder $container) { 49 | $container->setParameter('container.dumper.inline_class_loader', true); 50 | $container->addObjectResource($this); 51 | }); 52 | 53 | $loader->load(__DIR__.'/../config/config_'.$this->getEnvironment().'.yml'); 54 | } 55 | 56 | #[\Override] 57 | public function getCacheDir(): string 58 | { 59 | return dirname(__DIR__).'/var/cache/'.$this->environment; 60 | } 61 | 62 | #[\Override] 63 | public function getLogDir(): string 64 | { 65 | return dirname(__DIR__).'/var/logs'; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Entity/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/src/Entity/.gitkeep -------------------------------------------------------------------------------- /templates/base.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "@OroUI/Default/index.html.twig" %} 2 | 3 | {% block head_script %} 4 | {{ parent() }} 5 | {% endblock %} 6 | 7 | {% block head_style %} 8 | {{ parent() }} 9 | {% endblock %} 10 | 11 | {% block main %} 12 | {{ parent() }} 13 | {{ oro_windows_restore() }} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /templates/bundles/TwigBundle/Exception/error.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '@OroUI/Default/error.html.twig' %} 2 | -------------------------------------------------------------------------------- /translations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/translations/.gitkeep -------------------------------------------------------------------------------- /var/cache/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/var/cache/.gitkeep -------------------------------------------------------------------------------- /var/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /var/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/var/logs/.gitkeep -------------------------------------------------------------------------------- /var/maintenance/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/var/maintenance/.gitkeep -------------------------------------------------------------------------------- /var/sessions/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oroinc/orocommerce-application/8f7f82a1e8781936a51d56a5644fb924c941cbb8/var/sessions/.gitkeep -------------------------------------------------------------------------------- /web/tracking.php: -------------------------------------------------------------------------------- 1 | true, 11 | 'dynamic_tracking_endpoint' => '/tracking/data/create', 12 | 'log_rotate_interval' => 60, 13 | 'piwik_host' => null, 14 | 'piwik_token_auth' => null 15 | ]; 16 | 17 | /** 18 | * Pass request to given URL. 19 | * 20 | * @param string $url 21 | */ 22 | function passDataToUrl($url) 23 | { 24 | // Send visit to new URL 25 | $handle = curl_init(); 26 | curl_setopt($handle, CURLOPT_URL, modifyUrl($url)); 27 | curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1); 28 | curl_exec($handle); 29 | curl_close($handle); 30 | } 31 | 32 | /** 33 | * @param string $url 34 | * 35 | * @return string 36 | */ 37 | function modifyUrl($url) 38 | { 39 | if (strpos($url, 'http') !== 0) { 40 | $schema = 'http'; 41 | if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') { 42 | $schema .= 's'; 43 | } 44 | $url = $schema . '://' . $_SERVER['HTTP_HOST'] . $url; 45 | } 46 | // Pass request data to new URL 47 | $delimiter = strpos($url, '?') === false ? '?' : '&'; 48 | $url .= $delimiter . $_SERVER['QUERY_STRING']; 49 | 50 | // Set visit date time 51 | $url .= '&loggedAt=' . urlencode(getLoggedAt()); 52 | 53 | // Set visit IP address 54 | $url .= '&cip=' . urlencode(getClientIp()); 55 | 56 | if (!empty($_SERVER['HTTP_USER_AGENT'])) { 57 | $url .= '&ua=' . urlencode($_SERVER['HTTP_USER_AGENT']); 58 | } 59 | if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { 60 | $url .= '&lang=' . urlencode($_SERVER['HTTP_ACCEPT_LANGUAGE']); 61 | } 62 | 63 | return $url; 64 | } 65 | 66 | function getClientIp() 67 | { 68 | // Set correct visitor information 69 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 70 | $ip = $_SERVER['HTTP_CLIENT_IP']; 71 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 72 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 73 | } else { 74 | $ip = $_SERVER['REMOTE_ADDR']; 75 | } 76 | 77 | return $ip; 78 | } 79 | 80 | function passDataToApplication($url) 81 | { 82 | $_SERVER['REQUEST_URI'] = modifyUrl($url); 83 | 84 | $_GET['loggedAt'] = getLoggedAt(); 85 | $_GET['cip'] = getClientIp(); 86 | $_GET['ua'] = $_SERVER['HTTP_USER_AGENT']; 87 | 88 | require_once __DIR__ . '/../app/bootstrap.php.cache'; 89 | require_once __DIR__ . '/../app/AppKernel.php'; 90 | $kernel = new AppKernel('prod', false); 91 | $kernel->loadClassCache(); 92 | $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); 93 | 94 | $kernel->handle($request); 95 | } 96 | 97 | /** 98 | * Get log datetime 99 | * 100 | * @return string 101 | */ 102 | function getLoggedAt() 103 | { 104 | $now = new \DateTime('now', new \DateTimeZone('UTC')); 105 | 106 | return $now->format(\DateTime::ISO8601); 107 | } 108 | 109 | // Ensure tracking directory exists and read settings 110 | if (is_dir($trackingFolder)) { 111 | if (is_readable($settingsFile)) { 112 | $settings = unserialize(file_get_contents($settingsFile)); 113 | } 114 | } else { 115 | mkdir($trackingFolder); 116 | } 117 | 118 | // Track visit 119 | if ($settings['dynamic_tracking_enabled']) { 120 | // Pass visit to dynamic tracking endpoint 121 | passDataToApplication($settings['dynamic_tracking_endpoint']); 122 | } else { 123 | // Calculate interval part 124 | $rotateInterval = 60; 125 | $currentPart = 1; 126 | if ($settings['log_rotate_interval'] > 0 && $settings['log_rotate_interval'] < 60) { 127 | $rotateInterval = (int)$settings['log_rotate_interval']; 128 | $passingMinute = (int)(date('i')) + 1; 129 | $currentPart = ceil($passingMinute / $rotateInterval); 130 | } 131 | 132 | // Construct file name 133 | $date = new \DateTime('now', new \DateTimeZone('UTC')); 134 | $fileName = $date->format('Ymd-H') . '-' . $rotateInterval . '-' . $currentPart . '.log'; 135 | 136 | // Add visit to log to file 137 | $rawData = $_GET; 138 | $rawData['loggedAt'] = getLoggedAt(); 139 | $data = json_encode($rawData) . PHP_EOL; 140 | $fh = fopen($trackingFolder . DIRECTORY_SEPARATOR . $fileName, 'a'); 141 | if (flock($fh, LOCK_EX)) { 142 | fwrite($fh, $data); 143 | fflush($fh); 144 | flock($fh, LOCK_UN); 145 | } 146 | fclose($fh); 147 | } 148 | 149 | // Pass tracking request to piwik instance 150 | if ($settings['piwik_host']) { 151 | $piwikTrackingUrl = $settings['piwik_host'] . '/piwik.php'; 152 | if ($settings['piwik_token_auth']) { 153 | $piwikTrackingUrl .= '?token_auth=' . urlencode($settings['piwik_token_auth']); 154 | } 155 | 156 | passDataToUrl($piwikTrackingUrl); 157 | } 158 | 159 | //Disable XSS Auditor 160 | header('X-XSS-Protection: 0'); 161 | //Send 1x1 blank gif 162 | header('Content-Type: image/gif'); 163 | echo base64_decode('R0lGODlhAQABAJAAAP8AAAAAACH5BAUQAAAALAAAAAABAAEAAAICBAEAOw=='); 164 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const OroConfig = require('@oroinc/oro-webpack-config-builder'); 2 | 3 | OroConfig 4 | .enableLayoutThemes() 5 | .setPublicPath('public/') 6 | .setCachePath('var/cache'); 7 | 8 | module.exports = OroConfig.getWebpackConfig(); 9 | --------------------------------------------------------------------------------