add marketplace

This commit is contained in:
2024-01-25 12:54:01 +01:00
parent 86174db2e4
commit 56690a6867
1613 changed files with 115322 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
{
"presets": [
["env", {
"targets": {
"node": "6"
},
"useBuiltIns": true
}]
],
"plugins": [
["transform-object-rest-spread", {
"useBuiltIns": true
}]
]
}
@@ -0,0 +1,40 @@
server {
root /var/www/tests/Application/public;
location / {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
# Comment the next line and uncomment the next to enable dynamic resolution (incompatible with Kubernetes)
fastcgi_pass php:9000;
#resolver 127.0.0.11;
#set $upstream_host php;
#fastcgi_pass $upstream_host:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
# When you are using symlinks to link the document root to the
# current version of your application, you should pass the real
# application path instead of the path to the symlink to PHP
# FPM.
# Otherwise, PHP's OPcache may not properly detect changes to
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/index.php/some-path
# Remove the internal directive to allow URIs like this
internal;
}
# return 404 for all other php files not matching the front controller
# this prevents access to other php files you don't want to be accessible.
location ~ \.php$ {
return 404;
}
client_max_body_size 6m;
}
@@ -0,0 +1,18 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- node "$@"
fi
if [ "$1" = 'node' ] || [ "$1" = 'yarn' ]; then
yarn install
>&2 echo "Waiting for PHP to be ready..."
until nc -z "$PHP_HOST" "$PHP_PORT"; do
sleep 1
done
fi
exec "$@"
@@ -0,0 +1,43 @@
#!/bin/sh
set -e
pluginDirectory='/var/www';
pluginApplicationDirectory='/var/www/tests/Application';
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php-fpm "$@"
fi
if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
mkdir -p var/cache var/log public/media/image
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var public
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var public
if [ "$APP_ENV" != 'prod' ]; then
composer install --prefer-dist --no-progress --no-interaction;
cd $pluginDirectory && composer install --prefer-dist --no-progress --no-interaction;
cd $pluginApplicationDirectory;
fi
echo "Waiting for db to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
cd $pluginApplicationDirectory;
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(php bin/console dbal:run-sql "SELECT 1" 2>&1); do
if [ $? -eq 255 ]; then
# If the Doctrine command exits with 255, an unrecoverable error occurred
ATTEMPTS_LEFT_TO_REACH_DATABASE=0
break
fi
sleep 1
ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1))
echo "Still waiting for db to be ready... Or maybe the db is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left"
done
php bin/console doctrine:database:create --if-not-exists;
php bin/console doctrine:schema:update -f;
fi
exec docker-php-entrypoint "$@"
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
export SCRIPT_NAME=/ping
export SCRIPT_FILENAME=/ping
export REQUEST_METHOD=GET
if cgi-fcgi -bind -connect 127.0.0.1:9000; then
exit 0
fi
exit 1
+16
View File
@@ -0,0 +1,16 @@
apc.enable_cli = 1
date.timezone = UTC
opcache.enable_cli = 1
session.auto_start = Off
short_open_tag = Off
# http://symfony.com/doc/current/performance.html
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
realpath_cache_size = 4096K
realpath_cache_ttl = 600
memory_limit = 2G
post_max_size = 6M
upload_max_filesize = 5M
+15
View File
@@ -0,0 +1,15 @@
apc.enable_cli = 1
date.timezone = UTC
opcache.enable_cli = 1
session.auto_start = Off
short_open_tag = Off
# http://symfony.com/doc/current/performance.html
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
realpath_cache_size = 4096K
realpath_cache_ttl = 600
post_max_size = 6M
upload_max_filesize = 5M
+32
View File
@@ -0,0 +1,32 @@
**/*.log
**/*.md
**/*.php~
**/._*
**/.dockerignore
**/.DS_Store
**/.git/
**/.gitattributes
**/.github
**/.gitignore
**/.gitkeep
**/.gitmodules
**/.idea
**/Dockerfile
**/Thumbs.db
**/docker-compose*.yaml
**/docker-compose*.yml
.editorconfig
.php_cs.cache
.travis.yml
composer.phar
docker/mysql/data/
etc/build/*
node_modules/
var/*
vendor/
public/assets/
public/build/
public/bundles/
public/css/
public/js/
public/media/
+46
View File
@@ -0,0 +1,46 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_DEBUG=1
APP_SECRET=EDITME
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/open_marketplace_%kernel.environment%?serverVersion=5.7
###< doctrine/doctrine-bundle ###
###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
JWT_PASSPHRASE=acme_plugin_development
###< lexik/jwt-authentication-bundle ###
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
MESSENGER_TRANSPORT_DSN=sync://
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###
LOGO_DIRECTORY=media/image/logo/
VENDOR_PRODUCTS_LIMITS=9,18,27
DEFAULT_VENDOR_PRODUCTS_LIMIT=9
MESSAGES_FILE_UPLOAD_DIRECTORY=uploads/message_files
# Vendor commission settings
DEFAULT_VENDOR_COMMISSION=10
DEFAULT_VENDOR_COMMISSION_TYPE=gross
View File
+46
View File
@@ -0,0 +1,46 @@
# This file is a "template" of which env vars needs to be defined in your configuration or in an .env file
# Set variables here that may be different on each deployment target of the app, e.g. development, staging, production.
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_DEBUG=1
APP_SECRET=EDITME
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/open_marketplace_%kernel.environment%?serverVersion=5.7
###< doctrine/doctrine-bundle ###
###> lexik/jwt-authentication-bundle ###
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private-test.pem
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public-test.pem
JWT_PASSPHRASE=acme_plugin_development
###< lexik/jwt-authentication-bundle ###
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
#MAILER_URL=smtp://localhost
###< symfony/swiftmailer-bundle ###
###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
MESSENGER_TRANSPORT_DSN=sync://
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###
LOGO_DIRECTORY=media/image/logo/
VENDOR_PRODUCTS_LIMITS=9,18,27
DEFAULT_VENDOR_PRODUCTS_LIMIT=9
MESSAGES_FILE_UPLOAD_DIRECTORY=uploads/message_files
DEFAULT_VENDOR_COMMISSION=5
DEFAULT_VENDOR_COMMISSION_TYPE=net
+20
View File
@@ -0,0 +1,20 @@
module.exports = {
extends: 'airbnb-base',
env: {
node: true,
},
rules: {
'object-shorthand': ['error', 'always', {
avoidQuotes: true,
avoidExplicitReturnArrows: true,
}],
'function-paren-newline': ['error', 'consistent'],
'max-len': ['warn', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
},
};
+1
View File
@@ -0,0 +1 @@
* @BitBagCommerce
+193
View File
@@ -0,0 +1,193 @@
name: Build
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request: ~
release:
types: [created]
# schedule:
# -
# cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-20.04
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
strategy:
fail-fast: false
matrix:
php: ["8.0"]
symfony: ["^5.2"]
sylius: ["^1.11.12"]
node: ["14.x"]
mysql: ["8.0"]
env:
APP_ENV: test
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
extensions: intl
tools: symfony
coverage: none
-
name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node }}"
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
-
name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
-
name: Install certificates
run: symfony server:ca:install
-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
-
name: Run webserver
run: (symfony server:start --port=8080 --dir=public --daemon)
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Restrict Sylius version
if: matrix.sylius != ''
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
-
name: Install PHP dependencies
run: composer install --no-interaction
-
name: Run ECS
run: vendor/bin/ecs check src spec tests
-
name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
-
name: Cache Yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
-
name: Install JS dependencies
run: yarn install
-
name: Prepare test application database
run: |
(bin/console doctrine:database:create -vvv)
(bin/console doctrine:schema:create -vvv)
-
name: Prepare test application assets
run: |
(bin/console assets:install public -vvv)
(yarn encore prod)
-
name: Prepare test application cache
run: (bin/console cache:warmup -vvv)
-
name: Load fixtures in test application
run: (bin/fixtures)
-
name: Validate composer.json
run: composer validate --ansi --strict
-
name: Validate database schema
run: (bin/console doctrine:schema:validate)
-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/
-
name: Run PHPSpec
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
-
name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore
-
name: Failed build Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') }}
env:
SLACK_CHANNEL: ${{ secrets.FAILED_BUILD_SLACK_CHANNEL }}
SLACK_COLOR: ${{ job.status }}
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_MESSAGE: ':x:'
SLACK_TITLE: Failed build on ${{ github.event.repository.name }} repository
SLACK_USERNAME: ${{ secrets.FAILED_BUILD_SLACK_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.FAILED_BUILD_SLACK_WEBHOOK }}
+39
View File
@@ -0,0 +1,39 @@
/vendor/
/node_modules/
/composer.lock
/etc/build/*
!/etc/build/.gitignore
/tests/Application/yarn.lock
/tests/Application/public/uploads
/.phpunit.result.cache
/behat.yml
/phpspec.yml
/phpunit.xml
.idea/
/public/assets
/public/build
/public/css
/public/js
/public/media/*
!/public/media/image/
/public/media/image/*
!/public/media/image/.gitignore
/node_modules
###> symfony/framework-bundle ###
.env.*.local
.env.local
.env.local.php
/public/bundles
/public/uploads/message_files
/var/
###< symfony/framework-bundle ###
###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###
@@ -0,0 +1,22 @@
<?php
/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* You can find more information about us on https://bitbag.io and write us
* an email on hello@bitbag.io.
*/
declare(strict_types=1);
namespace %namespace%;
%imports%
final class %name% extends ObjectBehavior
{
public function it_is_initializable(): void
{
$this->shouldHaveType(%subject_class%::class);
}
}
+57
View File
@@ -0,0 +1,57 @@
# Project Code of Conduct
Our project is dedicated to providing a welcoming and inclusive environment for all contributors, regardless of background or identity.
We believe that diversity and inclusivity are critical to the success of any open source project, and we are committed to creating a safe
and respectful space for collaboration.
As contributors and maintainers of this project, we pledge to uphold the following values:
## 1. Respect and Empathy
We value all contributors and their ideas, and we are committed to treating everyone with respect and empathy. We will listen actively and
communicate constructively, using welcoming and inclusive language.
## 2. Openness and Collaboration
We welcome and encourage participation from everyone, regardless of their background or level of experience. We believe that open collaboration
is key to the success of our project, and we are committed to creating an environment where everyone can contribute.
## 3. Inclusivity and Diversity
We value diversity and believe that it is essential to building a strong and vibrant community. We are committed to creating an inclusive
environment where everyone feels welcome and can participate, regardless of their race, gender, sexual orientation, religion, or any other
personal characteristic.
## 4. Safety and Security
We are committed to creating a safe and secure environment for all contributors. We will not tolerate harassment, discrimination, or any other
form of abusive behavior, and we will take appropriate action to address any such behavior.
## 5. Accountability and Responsibility
We hold ourselves and our community members accountable for upholding these values. We will take responsibility for our actions and strive to make
amends for any harm we may cause. We will also hold others accountable for their actions, and we will support those who are harmed by any unacceptable
behavior.
## 6. Continuous Improvement
We are committed to continuous improvement and will actively seek feedback from our community members. We will use this feedback to improve our
project and create a better environment for everyone.
### Enforcement
Any violations of this code of conduct may be reported to the project maintainers at hello@bitbag.io. All complaints will be reviewed and
investigated promptly and fairly. The project team reserves the right to remove, edit, or reject comments, commits, code, wiki edits, issues, and
other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that
they deem inappropriate, threatening, offensive, or harmful.
### Attribution
This Code of Conduct is adapted from the Contributor Covenant (https://www.contributor-covenant.org/), version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
### Conclusion
We believe that following these values will help us create a positive and inclusive community that welcomes and encourages contributions from everyone.
We thank all contributors for their support and commitment to these values.
+155
View File
@@ -0,0 +1,155 @@
<!-- omit in toc -->
# Contributing to Open Marketplace
First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues
<!-- omit in toc -->
## Table of Contents
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Styleguide](#styleguide)
- [Communication](#communication)
## I Have a Question
> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/BitBagCommerce/OpenMarketplace/blob/master/README.md).
Before you ask a question, it is best to search for existing [Issues](https://github.com/BitBagCommerce/OpenMarketplace/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
If you then still feel the need to ask a question and need clarification, we recommend the following:
- Open an [Issue](https://github.com/BitBagCommerce/OpenMarketplace/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
We will then take care of the issue as soon as possible.
<!--
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
- IRC
- Slack
- Gitter
- Stack Overflow tag
- Blog
- FAQ
- Roadmap
- E-Mail List
- Forum
-->
## I Want To Contribute
> ### Legal Notice <!-- omit in toc -->
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
### Reporting Bugs
<!-- omit in toc -->
#### Before Submitting a Bug Report
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/BitBagCommerce/OpenMarketplace/blob/master/README.md). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/BitBagCommerce/OpenMarketplaceissues?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <>.
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://github.com/BitBagCommerce/OpenMarketplace/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Once it's filed:
- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Open Marketplace, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
<!-- omit in toc -->
#### Before Submitting an Enhancement
- Make sure that you are using the latest version.
- Read the [documentation](https://github.com/BitBagCommerce/OpenMarketplace/blob/master/README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/BitBagCommerce/OpenMarketplace/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://github.com/BitBagCommerce/OpenMarketplace/issues).
- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
- **Explain why this enhancement would be useful** to most Open Marketplace users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Your First Code Contribution
Thank you for your interest in contributing! These guidelines will help you get started with making your first contribution. We value and appreciate your input, so thank you in advance for taking the time to contribute to our project.
#### Getting Started
To begin, please make sure you have reviewed all documents related to contributing and our code of conduct.
Once you're ready to contribute, follow these steps:
1. **Fork the repository:** Start by creating your own fork of the project repository. This will allow you to work on your changes without affecting the main project.
2. **Clone the repository:** Clone the forked repository to your local machine using `git clone https://github.com/your-username/repository.git`.
3. **Create a new branch:** Create a new branch for your contribution. This helps keep your changes organized and makes it easier to merge them later. You can create a branch using `git checkout -b branch-name`.
4. **Make your changes:** Now it's time to make your contribution! Whether it's fixing a bug, adding a new feature, or improving documentation, your contribution is valuable. Feel free to explore the codebase and make your changes accordingly.
5. **Test your changes:** Before submitting your contribution, make sure to test your changes locally to ensure they work as intended. This includes running any necessary tests and checking for any potential issues.
6. **Commit and push:** Once you're satisfied with your changes, commit them using `git commit -m "Your commit message"`. Then, push the changes to your forked repository with `git push origin branch-name`.
7. **Submit a pull request:** Finally, head over to the original repository on GitHub and submit a pull request. In your pull request, provide a clear and descriptive explanation of the changes you've made. This will help the project maintainers review and merge your contribution more efficiently.
## Styleguide
We adhere to a specific set of code style and guidelines to maintain consistency across the project. Please ensure that your contributions follow these guidelines to streamline the review process. You can find the guidelines in the [project's documentation](https://github.com/BitBagCommerce/OpenMarketplace/STYLEGUIDE.md).
## Communication
If you have any questions or need assistance while making your contribution, feel free to reach out to us. You can use GitHub issues, our Slack channel, or any other communication methods mentioned in the project documentation. We're here to help you have a smooth and successful experience contributing to our project.
Once again, thank you for your interest in contributing to our project. We greatly appreciate your time and effort. Together, we can make the project even better!
Happy contributing!
+178
View File
@@ -0,0 +1,178 @@
# the different stages of this Dockerfile are meant to be built into separate images
# https://docs.docker.com/compose/compose-file/#target
ARG PHP_VERSION=8.1
ARG NODE_VERSION=14.17.3
ARG NGINX_VERSION=1.21
ARG ALPINE_VERSION=3.15
ARG NODE_ALPINE_VERSION=3.14
ARG COMPOSER_VERSION=2.4
ARG PHP_EXTENSION_INSTALLER_VERSION=latest
FROM composer:${COMPOSER_VERSION} AS composer
FROM mlocati/php-extension-installer:${PHP_EXTENSION_INSTALLER_VERSION} AS php_extension_installer
FROM php:${PHP_VERSION}-fpm-alpine${ALPINE_VERSION} AS base
# persistent / runtime deps
RUN apk add --no-cache \
acl \
file \
gettext \
unzip \
;
COPY --from=php_extension_installer /usr/bin/install-php-extensions /usr/local/bin/
# default PHP image extensions
# ctype curl date dom fileinfo filter ftp hash iconv json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar
# posix readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter zlib
RUN install-php-extensions apcu exif gd intl pdo_mysql opcache zip
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY docker/php/prod/php.ini $PHP_INI_DIR/php.ini
COPY docker/php/prod/opcache.ini $PHP_INI_DIR/conf.d/opcache.ini
# copy file required by opcache preloading
COPY config/preload.php /srv/open_marketplace/config/preload.php
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN set -eux; \
composer clear-cache
ENV PATH="${PATH}:/root/.composer/vendor/bin"
WORKDIR /srv/open_marketplace
# build for production
ENV APP_ENV=prod
# prevent the reinstallation of vendors at every changes in the source code
COPY composer.* ./
RUN set -eux; \
composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress --no-dev; \
composer clear-cache
# copy only specifically what we need
COPY .env .env.prod ./
COPY assets assets/
COPY bin bin/
COPY config config/
COPY public public/
COPY src src/
COPY templates templates/
COPY translations translations/
RUN set -eux; \
mkdir -p var/cache var/log; \
composer dump-autoload --classmap-authoritative; \
APP_SECRET='' composer run-script post-install-cmd; \
chmod +x bin/console; sync; \
bin/console sylius:install:assets --no-interaction; \
bin/console sylius:theme:assets:install public --no-interaction
VOLUME /srv/open_marketplace/var
VOLUME /srv/open_marketplace/public/media
COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["php-fpm"]
FROM node:${NODE_VERSION}-alpine${NODE_ALPINE_VERSION} AS open_marketplace_node
WORKDIR /srv/open_marketplace
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
g++ \
gcc \
make \
;
# prevent the reinstallation of vendors at every changes in the source code
COPY package.json yarn.* ./
RUN set -eux; \
yarn install; \
yarn cache clean
COPY --from=base /srv/open_marketplace/vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/private/
COPY --from=base /srv/open_marketplace/vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private/
COPY --from=base /srv/open_marketplace/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private/
COPY --from=base /srv/open_marketplace/assets ./assets
COPY --from=base /srv/open_marketplace/vendor/bitbag/wishlist-plugin/webpack.config.js vendor/bitbag/wishlist-plugin/webpack.config.js
COPY --from=base /srv/open_marketplace/vendor/bitbag/cms-plugin/webpack.config.js vendor/bitbag/cms-plugin/webpack.config.js
COPY --from=base /srv/open_marketplace/vendor/bitbag/wishlist-plugin/src/Resources/assets vendor/bitbag/wishlist-plugin/src/Resources/assets
COPY --from=base /srv/open_marketplace/vendor/bitbag/cms-plugin/src/Resources/assets vendor/bitbag/cms-plugin/src/Resources/assets
COPY webpack.config.js ./
RUN yarn prod
COPY docker/node/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["yarn", "prod"]
FROM base AS open_marketplace_php_prod
COPY --from=open_marketplace_node /srv/open_marketplace/public/build public/build
FROM nginx:${NGINX_VERSION}-alpine AS open_marketplace_nginx
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/
WORKDIR /srv/open_marketplace
COPY --from=base /srv/open_marketplace/public public/
COPY --from=open_marketplace_node /srv/open_marketplace/public public/
FROM open_marketplace_php_prod AS open_marketplace_php_dev
COPY docker/php/dev/php.ini $PHP_INI_DIR/php.ini
COPY docker/php/dev/opcache.ini $PHP_INI_DIR/conf.d/opcache.ini
WORKDIR /srv/open_marketplace
ENV APP_ENV=dev
COPY .env.test ./
RUN set -eux; \
composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress; \
composer clear-cache
FROM open_marketplace_php_prod AS open_marketplace_cron
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
apk-cron \
;
COPY docker/cron/crontab /etc/crontabs/root
COPY docker/cron/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
CMD ["crond", "-f"]
FROM open_marketplace_php_prod AS open_marketplace_migrations_prod
RUN apk add --no-cache wget
COPY docker/migrations/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
ENTRYPOINT ["docker-entrypoint"]
FROM open_marketplace_php_dev AS open_marketplace_migrations_dev
RUN apk add --no-cache wget
COPY docker/migrations/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
RUN composer dump-autoload --classmap-authoritative
ENTRYPOINT ["docker-entrypoint"]
+92
View File
@@ -0,0 +1,92 @@
<p align="center">
<a href="https://bitbag.io/" target="_blank">
<img src="doc/images/open-marketplace-logo.png" />
</a>
</p>
<p>
<a href="https://github.com/BitBagCommerce/OpenMarketplace/actions">
<img src="https://img.shields.io/github/actions/workflow/status/BitBagCommerce/OpenMarketplace/build.yml?branch=master" alt="Build">
</a>
<a href="https://join.slack.com/t/openmarketplacegroup/shared_invite/zt-1ks2kfsqe-w_J2uqgTMNEAYQS0xa8Q8Q">
<img src="https://img.shields.io/badge/chat-on%20slack-e51670.svg" alt="Chat">
</a>
<a href="https://bitbag.io/contact-us">
<img src="https://img.shields.io/badge/support-contact%20author-blue" alt="Contact">
</a>
</p>
Official website: http://open-marketplace.io </br>
Demo: http://demo.open-marketplace.io
BitBag OpenMarketplace is the first open-source marketplace platform. The solution is based on Sylius, Symfony and Semantic UI meaning it is fully compatible with each. The platform is highly customizable project made using full-stack BDD with Behat and PHPSpec.
Like what we do? Give us a star! ⭐
Looking for a professional team to build a MVM for your business on top of open-source? [Contact us!](https://bitbag.io/contact-us)
---
<p align="center">
<a href="https://bitbag.io/" target="_blank">
<img src="doc/images/overview.png" />
</a>
</p>
# Table of Contents
* [Overview](#overview)
* [Customization](#customization)
* [Contribution](#contribution)
* [Support](#we-are-here-to-help)
* [About us](#about-bitbag)
* [License](#license)
* [Authors](#Authors)
* [Contact](#contact)
# Overview
- [Installation](./doc/installation.md)
- [Vendor profile](./doc/vendor-profile.md)
- [Conversations](./doc/conversations.md)
- [Product Listing](./doc/product_listings.md)
- [Shipment](./doc/manage_shipping_methods.md)
- [Order Process](./doc/order_process.md)
- [Order management](./doc/manage_orders.md)
- [Clients](./doc/manage_clients.md)
- [Product Reviews](./doc/manage_product_reviews.md)
- [Customization](./doc/how_to_customize.md)
- [API](./doc/api.md)
## Customization
Our project is highly customizable, [here](./doc/how_to_customize.md) is our guide on how to do it.
## Contribution
Every contribution is meaningful, kudos to everyone who helped us with developing this project! Issues and PRs are welcomed.
## We are here to help
This **open-source project was developed to help the Sylius community**. If you have any additional questions, would like help with installing or configuring the plugin, or need any assistance with your Sylius project - let us know! For community support, join the official [OpenMarketplace Community Slack](https://join.slack.com/t/openmarketplacegroup/shared_invite/zt-1vejiwrbn-XZkLwRH5L0s4L9~qfkcP~g).
If you want to participate in the development, you can do it by submitting [pull requests](https://github.com/BitBagCommerce/OpenMarketplace/pulls) or reporting [issues](https://github.com/BitBagCommerce/OpenMarketplace/issues).
## About BitBag
BitBag is a Software House working on digital commerce projects on top of best open-source technologies, such as Sylius, Shopware, Pimcore, Symfony and Vue Storefront. We work with worldwide companies who see eCommerce as an important factor of their strategy.
If you think we could help your business within the above-mentioned technology stack, contact us directly. We could be the right people to do the job. Fill the form on [this site](https://bitbag.io/contact-us/) or send us an e-mail at hello@bitbag.io.
## License
This project's source code is completely free and released under the terms of the MIT license.
## Authors
See the full list of contributors [here](https://github.com/BitBagCommerce/OpenMarketplace/contributors).
## Contact
You can contact us using the contact form on [our website](https://bitbag.io/contact-us/) or send us an e-mail to hello@bitbag.io with your question(s). We are also active on the [community Slack](https://join.slack.com/t/openmarketplacegroup/shared_invite/zt-1ij1t41wx-HfAR6~URm3OAcqm0jc423Q).
[![](https://bitbag.io/wp-content/uploads/2021/08/badges-bitbag.png)](https://bitbag.io/contact-us/)
+77
View File
@@ -0,0 +1,77 @@
# OpenMarketplace - Style Guide
## Introduction
Thank you for taking the time to contribute to this project! We appreciate everyone who puts in the effort to better this project.
This style guide serves as a reference for developers contributing to the OpenMarketplace project. Consistent coding styles and guidelines are essential for
maintainability and readability of the codebase. Please adhere to the guidelines outlined in this document when making contributions.
## Table of Contents
- [General Guidelines](#general-guidelines)
- [Naming Conventions](#naming-conventions)
- [Code Formatting](#code-formatting)
- [Documentation](#documentation)
- [Testing](#testing)
- [Version Control](#version-control)
- [Dependencies](#dependencies)
## General Guidelines
- Write clean, readable, and maintainable code.
- Follow the principle of DRY (Don't Repeat Yourself).
- Aim for code simplicity and avoid unnecessary complexity.
- Strive for consistent and meaningful variable and function names.
- Keep lines of code within a reasonable length (80-120 characters).
- Use comments to explain complex logic or non-obvious code sections.
## Naming Conventions
- Use descriptive and meaningful names for variables, functions, classes, and files.
- Follow the standard naming conventions for the programming language used in the project.
- Prefer clarity over brevity in naming. Avoid overly abbreviated or cryptic names.
- Follow [PSR-12 rules](https://www.php-fig.org/psr/psr-12/) when contributing the project.
## Code Formatting
- Use consistent indentation (spaces or tabs) throughout the codebase.
- Configure your code editor to use a standardized indentation size (e.g., 4 spaces).
- Use a consistent line-ending style (e.g., Unix style: LF).
- Remove trailing whitespace at the end of lines.
- Maintain a consistent code style within each file and across the entire codebase.
## Documentation
- Document code to provide clarity and understanding.
- Use clear and concise comments to explain the purpose and functionality of code blocks.
## Testing
- Write unit tests for all significant functionality.
- Ensure that the tests cover a wide range of input cases, including edge cases and error conditions.
- Follow the project's established testing framework and conventions.
- Maintain a high test coverage to ensure code stability and reliability.
## Version Control
- Follow Git best practices, such as using descriptive commit messages, creating meaningful branch names, and regularly pulling changes from the main branch.
- Avoid committing large binary files or sensitive information to the repository.
- Use proper branching strategies, such as feature branches or Git flow, to organize and manage development.
## Dependencies
- Clearly define and document project dependencies, including libraries, frameworks, and external tools.
- Specify dependency versions to ensure consistent behavior across different environments.
- Regularly update and review dependencies to ensure security and compatibility.
## Conclusion
Adhering to this style guide will ensure a consistent and well-maintained codebase for the OpenMarketplace project. Consistency in coding styles, naming conventions,
code formatting, documentation, testing, version control, and dependency management will contribute to better collaboration among developers and make the project more
maintainable and readable.
Remember to review and update this style guide periodically as the project evolves. By following these guidelines, we can create high-quality code and foster a positive
development environment.
Thank you for your contributions to the OpenMarketplace project!
+122
View File
@@ -0,0 +1,122 @@
# UPGRADE FROM `v1.3.X` TO `v1.4.0`
First step is upgrading Sylius with composer
- `composer require sylius/sylius:~1.4.0`
### Test application database
#### Migrations
If you provide migrations with your plugin, take a look at following changes:
* Change base `AbstractMigration` namespace to `Doctrine\Migrations\AbstractMigration`
* Add `: void` return types to both `up` and `down` functions
#### Schema update
If you don't use migrations, just run `(cd tests/Application && bin/console doctrine:schema:update --force)` to update the test application's database schema.
### Dotenv
* `composer require symfony/dotenv:^4.2 --dev`
* Follow [Symfony dotenv update guide](https://symfony.com/doc/current/configuration/dot-env-changes.html) to incorporate required changes in `.env` files structure. Remember - they should be done on `tests/Application/` level! Optionally, you can take a look at [corresponding PR](https://github.com/Sylius/PluginSkeleton/pull/156/) introducing these changes in **PluginSkeleton** (this PR also includes changes with Behat - see below)
Don't forget to clear the cache (`tests/Application/bin/console cache:clear`) to be 100% everything is loaded properly.
### Test application kernel
The kernel of the test application needs to be replaced with this [file](https://github.com/Sylius/PluginSkeleton/blob/1.4/tests/Application/Kernel.php).
The location of the kernel is: `tests/Application/Kernel.php` (replace the content with the content of the file above).
The container cleanup method is removed in the new version and keeping it will cause problems with for example the `TagAwareAdapter` which will call `commit()` on its pool from its destructor. If its pool is `TraceableAdapter` with pool `ArrayAdapter`, then the pool property of `TraceableAdapter` will be nullified before the destructor is executed and cause an error.
---
### Behat
If you're using Behat and want to be up-to-date with our configuration
* Update required extensions with `composer require friends-of-behat/symfony-extension:^2.0 friends-of-behat/page-object-extension:^0.3 --dev`
* Remove extensions that are not needed yet with `composer remove friends-of-behat/context-service-extension friends-of-behat/cross-container-extension friends-of-behat/service-container-extension --dev`
* Update your `behat.yml` - look at the diff [here](https://github.com/Sylius/Sylius-Standard/pull/322/files#diff-7bde54db60a6e933518d8b61b929edce)
* Add `SymfonyExtensionBundle` to your `tests/Application/config/bundles.php`:
```php
return [
//...
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
];
```
* If you use our Travis CI configuration, follow [these changes](https://github.com/Sylius/PluginSkeleton/pull/156/files#diff-354f30a63fb0907d4ad57269548329e3) introduced in `.travis.yml` file
* Create `tests/Application/config/services_test.yaml` file with the following code and add these your own Behat services as well:
```yaml
imports:
- { resource: "../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
```
* Remove all `__symfony__` prefixes in your Behat services
* Remove all `<tag name="fob.context_service" />` tags from your Behat services
* Make your Behat services public by default with `<defaults public="true" />`
* Change `contexts_services ` in your suite definitions to `contexts`
* Take a look at [SymfonyExtension UPGRADE guide](https://github.com/FriendsOfBehat/SymfonyExtension/blob/master/UPGRADE-2.0.md) if you have any more problems
### Phpstan
* Fix the container XML path parameter in the `phpstan.neon` file as done [here](https://github.com/Sylius/PluginSkeleton/commit/37fa614dbbcf8eb31b89eaf202b4bd4d89a5c7b3)
# UPGRADE FROM `v1.2.X` TO `v1.4.0`
Firstly, check out the [PluginSkeleton 1.3 upgrade guide](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.3.md) to update Sylius version step by step.
To upgrade to Sylius 1.4 follow instructions from [the previous section](https://github.com/Sylius/PluginSkeleton/blob/1.4/UPGRADE-1.4.md#upgrade-from-v13x-to-v140) with following changes:
### Doctrine migrations
* Change namespaces of copied migrations to `Sylius\Migrations`
### Dotenv
* These changes are not required, but can be done as well, if you've changed application directory structure in `1.2.x` to `1.3` update
### Behat
* Add `\FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle()` to your bundles lists in `tests/Application/AppKernel.php` (preferably only in `test` environment)
* Import Sylius Behat services in `tests/Application/config/config_test.yml` and your own Behat services as well:
```yaml
imports:
- { resource: "../../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml" }
```
* Specify test application's kernel path in `behat.yml`:
```yaml
FriendsOfBehat\SymfonyExtension:
kernel:
class: AppKernel
path: tests/Application/app/AppKernel.php
```
# UPGRADE FROM `v1.2.X` TO `v1.3.0`
## Application
* Run `composer require sylius/sylius:~1.3.0 --no-update`
* Add the following code in your `behat.yml(.dist)` file:
```yaml
default:
extensions:
FriendsOfBehat\SymfonyExtension:
env_file: ~
```
* Incorporate changes from the following files into plugin's test application:
* [`tests/Application/package.json`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/package.json) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-726e1353c14df7d91379c0dea6b30eef))
* [`tests/Application/.babelrc`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.babelrc) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-a2527d9d8ad55460b2272274762c9386))
* [`tests/Application/.eslintrc.js`](https://github.com/Sylius/PluginSkeleton/blob/1.3/tests/Application/.eslintrc.js) ([see diff](https://github.com/Sylius/PluginSkeleton/pull/134/files#diff-396c8c412b119deaa7dd84ae28ae04ca))
* Update PHP and JS dependencies by running `composer update` and `(cd tests/Application && yarn upgrade)`
* Clear cache by running `(cd tests/Application && bin/console cache:clear)`
* Install assets by `(cd tests/Application && bin/console assets:install web)` and `(cd tests/Application && yarn build)`
* optionally, remove the build for PHP 7.1. in `.travis.yml`
+5
View File
@@ -0,0 +1,5 @@
import 'sylius/bundle/AdminBundle/Resources/private/entry';
import './scss/main.scss'
import './js'
@@ -0,0 +1,61 @@
$base-box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.04);
$base-border-radius: 8px;
$base-color: #339ae8;
.toolbar-brand {
background-color: #000;
border-radius: 8px;
color: #fff;
padding:10px;
margin-top: 10px;
margin-bottom: 10px;
}
.toolbar-brand:hover {
background-color: #454545;
color: #fff;
}
.stats .ui.basic.active.button {
color: $base-color !important;
}
a {
color: #339ae8;
}
.ui.primary.button {
background-color: $base-color;
}
#sidebar.ui.sidebar.vertical.menu .item.active {
font-weight: inherit !important;
background: $base-color !important;
border-radius: 0px 99px 99px 0px !important;
}
.ui.primary.button:hover, .ui.primary.button:focus {
background-color: #42a3ee;
}
.sylius-grid-table-wrapper .ui.sortable.table thead th.sorted {
color: $base-color;
}
.ui.styled.accordion {
box-shadow: $base-box-shadow;
border-radius: $base-border-radius;
}
.ui.segment, .ui.attached.segment {
box-shadow: $base-box-shadow;
border-radius: $base-border-radius;
}
.ui.form .field > input:focus, .ui.form .field > textarea:focus {
border-color: rgba(66, 154, 232, 0.4);
}
.ui.toggle.checkbox input:checked ~ .box:before, .ui.toggle.checkbox input:checked ~ label:before, .ui.toggle.checkbox input:focus:checked ~ .box:before, .ui.toggle.checkbox input:focus:checked ~ label:before {
background-color: $base-color !important;
}
.ui.teal.labels .label, .ui.teal.label {
background-color: $base-color !important;
border-color: $base-color !important;
color: #FFFFFF !important;
}
.ui.header .circular.icon {
color: $base-color;
background: rgba(51, 154, 232, 0.1);
}
.ui.button.teal {
background-color: $base-color !important;
}
+5
View File
@@ -0,0 +1,5 @@
import 'sylius/bundle/ShopBundle/Resources/private/entry';
import './scss/main.scss'
import './js'
@@ -0,0 +1,31 @@
.send-for-verification {
background: white;
border: none;
padding: 0.7857142rem 1.14285714rem !important;
width: 100%;
text-align: left;
}
.send-for-verification:hover {
background: rgba(34,36,38,.1);
}
.send-for-verification i{
margin-right: 0.78rem;
}
.require_confirmation_button {
background: white;
border: none;
padding: 0.7857142rem 1.14285714rem !important;
width: 100%;
text-align: left;
}
.require_confirmation_button:hover {
background: rgba(34,36,38,.1);
}
.MVM_Button i{
margin-right: 0.78rem;
}
@@ -0,0 +1,15 @@
.product-review-dropdown {
button {
&.item {
background: white;
border: none;
padding: 0.7857142rem 1.14285714rem !important;
width: 100%;
text-align: left;
&:hover {
background: rgba(34,36,38,.1);
}
}
}
}
@@ -0,0 +1,12 @@
@media (max-width: 767px) {
#sylius-addresses, #sylius-default-address {
.ui.vertical.buttons {
flex-direction: row;
}
.ui.vertical .button.icon.labeled.ui {
height: 100%;
display: flex;
align-items: center;
}
}
}
@@ -0,0 +1,99 @@
.attributes-group {
border: 1px solid rgba(34, 36, 38, 0.1);
&:not(:last-child) {
border-bottom: 0;
}
&:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
&:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
}
.attributes-header {
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(0, 0, 0, 0.03);
padding: 0.5em 1.8em;
border-bottom: 1px solid rgba(34, 36, 38, 0.1);
.ui.basic.red.button {
box-shadow: none !important;
&:hover {
background: rgba(255, 0, 0, 0.1) !important;
}
}
}
.attributes-list {
padding: 1.4em 1.8em;
}
.attribute-row {
flex-wrap: wrap;
margin: 10px 0;
@media (min-width: 1152px) {
display: flex;
}
}
.attribute-label {
align-self: center;
width: 200px;
margin-right: 20px;
padding-top: 5px;
padding-bottom: 5px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
i {
width: 20px;
text-align: left;
}
}
.attribute-input {
flex-grow: 1;
}
.attribute-input, .attribute-input div:not(.checkbox) {
display: flex;
flex-grow: 1;
align-items: center;
}
.attribute-input *:not(:last-child) {
margin-right: 5px;
}
.attribute-input *:not(:first-child) {
margin-left: 5px;
}
.attribute-input textarea {
height: 6em !important;
min-height: 6em !important;
}
.attribute-action > * {
margin: 4px 0 !important;
@media (min-width: 1152px) {
margin: 0 0 0 10px !important;
}
}
.attribute-error {
width: 100%;
text-align: center;
}
@@ -0,0 +1,15 @@
.ui.stripe.segment.error-container {
padding: 5em 0;
a.button {
margin-top: 12px;
}
}
.error-section {
margin: 3em 0;
}
.ui.error-page.image {
display: inline-block;
}
@@ -0,0 +1,56 @@
@import "./attributes/attributes";
@import "Vendor/product_listing/product_listing_dropdown";
@import "Vendor/product_review/dropdown";
@import "./wishlist_button/index";
@import "./vendor_page/vendor_banner";
@import "./address_book/address_book";
@import "./menu/horizontal_menu";
@import "./error_pages/error_pages";
$base-box-shadow: 1px 1px 16px rgba(0, 0, 0, 0.04);
$base-border: 1px solid rgba(34, 36, 38, 0.1);
$base-border-radius: 8px;
$base-color: #339ae8;
body.pushable .pusher {
background-color: #fbfbfb;
}
.ui.cards > .card, .ui.card, .ui.segment, .ui.vertical.menu {
box-shadow: $base-box-shadow ;
border-radius: $base-border-radius;
}
.ui.segment {
border: 1px solid rgba(123,126,130, 0.15);
}
.ui.label.teal {
background-color: #0ab727 !important;
}
.ui.label.blue {
background-color: #28afff !important;
}
@media (max-width: 767px) {
.ui.table:not(.unstackable) {
thead {
display: table-header-group;
}
tbody {
display: table-row-group!important;
}
tr {
display: table-row!important;
}
tr > td, tr > th {
display: table-cell!important;
}
tr > td:not(:first-of-type), tr > th:not(:first-of-type) {
border-left: $base-border!important;
}
}
}
@@ -0,0 +1,5 @@
.bb-flex-taxon-menu{
display: flex;
flex-wrap: wrap;
justify-content: center;
}
@@ -0,0 +1,95 @@
.vendor-banner{
width: 100%;
min-width: 230px;
float: left;
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
text-align: center;
}
.vendor-banner img {
width: 100%;
max-height: 240px;
object-fit: cover;
}
.img-container {
display: inline-block;
position: relative;
width: 100%;
}
.vendor-positioning{
max-height: 80%;
position: absolute;
top: 0;
left: 0;
margin-top: 4rem;
margin-left: 2.5rem;
background-color: white;
color: black;
padding: 4px;
padding-right: 28px;
font-size: 17px;
line-height: 18px;
border: 1px solid #E0E0E0;
}
.vendor-content {
display: flex;
align-items: center;
justify-content: center;
margin: 1rem
}
.vendor-content h2 {
margin-top: 0;
}
.vendor-positioning p {
margin-bottom: 1rem;
}
.vendor-logo {
display: flex;
align-items: center;
justify-content: center;
width: 3rem;
margin: 1%;
}
.vendor-logo img {
width: 100%;
height: 100%;
margin-right: 0.5rem;
}
@media (max-width: 767px) {
.img-container {
display: inline-block;
position: relative;
}
.vendor-positioning {
width: 100%;
max-height: 60%;
max-width: 100%;
position: relative;
font-size: 17px;
left: 0;
bottom: 0;
padding: 0;
line-height: 0;
}
}
.reviews-count {
display: flex;
align-content: center;
align-items: baseline;
justify-content: flex-start;
margin-left: 14px;
}
.reviews-count p {
margin-left: 0.5rem;
font-size: 1.25rem;
color: grey;
}
@@ -0,0 +1,46 @@
$breakpoint-sm: 576px !default;
.bb-wishlist-button > span > .icon{
@media screen and (min-width: $breakpoint-sm) {
position: absolute;
left: 0;
top: 0;
height: 100%;
text-align: center;
width: 2.57142857em;
background-color: rgba(0, 0, 0, 0.05);
}
}
.bb-wishlist-button > span > i.icon.heart:before{
@media screen and (min-width: $breakpoint-sm) {
position: absolute;
display: block;
width: 100%;
top: 50%;
text-align: center;
transform: translateY(-50%);
}
}
.bb-wishlist-button.ui.labeled.icon.button{
@media screen and (max-width: $breakpoint-sm) {
display: flex !important;
justify-content: center;
padding-left: unset !important;
padding-right: unset !important;
width: 20%;
}
}
.bb-wishlist-button > span > i.heart{
@media screen and (max-width: $breakpoint-sm) {
margin: unset !important;
}
}
.bb-wishlist-button > span.text{
@media screen and (max-width: $breakpoint-sm) {
display: none !important;
}
}
+42
View File
@@ -0,0 +1,42 @@
imports:
- tests/Behat/Resources/suites.yml
default:
extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
FriendsOfBehat\MinkDebugExtension:
directory: etc/build
clean_start: false
screenshot: true
Behat\MinkExtension:
files_path: "%paths.base%/tests/Behat/Resources/fixtures/"
base_url: "https://127.0.0.1:8080/"
default_session: symfony
javascript_session: chrome
sessions:
symfony:
symfony: ~
chrome_headless:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
selenium2:
browser: chrome
firefox:
selenium2:
browser: firefox
show_auto: false
FriendsOfBehat\SymfonyExtension:
bootstrap: config/bootstrap.php
kernel:
class: App\Kernel
FriendsOfBehat\VariadicExtension: ~
FriendsOfBehat\SuiteSettingsExtension:
paths:
- "features"
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
clear
rm -Rf var/cache/*
APP_ENV=${APP_ENV} APP_DEBUG=${APP_DEBUG} bin/console cache:clear
if [[ $? -ne 0 ]];
then
exit $?;
fi
APP_ENV=${APP_ENV} APP_DEBUG=${APP_DEBUG} bin/console doctrine:database:create --if-not-exists
APP_ENV=${APP_ENV} APP_DEBUG=${APP_DEBUG} bin/console doctrine:schema:update --force --dump-sql
if [[ $? -ne 0 ]];
then
exit $?;
fi
APP_ENV=${APP_ENV} APP_DEBUG=${APP_DEBUG} bin/console doctrine:schema:validate
if [[ $? -ne 0 ]];
then
exit $?;
fi
vendor/bin/ecs check spec src tests
if [[ $? -ne 0 ]];
then
exit $?;
fi
vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/
if [[ $? -ne 0 ]];
then
exit $?;
fi
vendor/bin/phpspec run
if [[ $? -ne 0 ]];
then
exit $?;
fi
bin/console doctrine:schema:update --force --dump-sql --env=test
if [[ $? -ne 0 ]];
then
exit $?;
fi
vendor/bin/phpunit --colors=always
if [[ $? -ne 0 ]];
then
exit $?;
fi
vendor/bin/behat
exit $?;
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
set_time_limit(0);
require dirname(__DIR__).'/vendor/autoload.php';
if (!class_exists(Application::class)) {
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}
$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}
if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}
require dirname(__DIR__).'/config/bootstrap.php';
if ($_SERVER['APP_DEBUG']) {
umask(0000);
if (class_exists(Debug::class)) {
Debug::enable();
}
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
@@ -0,0 +1,45 @@
<?php
const NODE_MODULES_FOLDER_NAME = 'node_modules';
const PATH_TO_NODE_MODULES = 'tests' . DIRECTORY_SEPARATOR . 'Application' . DIRECTORY_SEPARATOR . 'node_modules';
/* cannot use `file_exists` or `stat` as gives false on symlinks if target path does not exist yet */
if (@lstat(NODE_MODULES_FOLDER_NAME))
{
if (is_link(NODE_MODULES_FOLDER_NAME) || is_dir(NODE_MODULES_FOLDER_NAME)) {
echo '> `' . NODE_MODULES_FOLDER_NAME . '` already exists as a link or folder, keeping existing as may be intentional.' . PHP_EOL;
exit(0);
} else {
echo '> Invalid symlink `' . NODE_MODULES_FOLDER_NAME . '` detected, recreating...' . PHP_EOL;
if (!@unlink(NODE_MODULES_FOLDER_NAME)) {
echo '> Could not delete file `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL;
exit(1);
}
}
}
/* try to create the symlink using PHP internals... */
$success = @symlink(PATH_TO_NODE_MODULES, NODE_MODULES_FOLDER_NAME);
/* if case it has failed, but OS is Windows... */
if (!$success && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
/* ...then try a different approach which does not require elevated permissions and folder to exist */
echo '> This system is running Windows, creation of links requires elevated privileges,' . PHP_EOL;
echo '> and target path to exist. Fallback to NTFS Junction:' . PHP_EOL;
exec(sprintf('mklink /J %s %s 2> NUL', NODE_MODULES_FOLDER_NAME, PATH_TO_NODE_MODULES), $output, $returnCode);
$success = $returnCode === 0;
if (!$success) {
echo '> Failed o create the required symlink' . PHP_EOL;
exit(2);
}
}
$path = @readlink(NODE_MODULES_FOLDER_NAME);
/* check if link points to the intended directory */
if ($path && realpath($path) === realpath(PATH_TO_NODE_MODULES)) {
echo '> Successfully created the symlink.' . PHP_EOL;
exit(0);
}
echo '> Failed to create the symlink to `' . NODE_MODULES_FOLDER_NAME . '`.' . PHP_EOL;
exit(3);
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
BLUE='\033[1;33m'
NO_COLOR='\033[0m' # No Color
FILE=var/fixtures/images.zip
if [ ! -f "$FILE" ]; then
printf "\n${BLUE}Fetching fixture images from BitBag server...${NO_COLOR}\n\n"
mkdir -p var/fixtures
wget -O var/fixtures/images.zip https://demo.open-marketplace.io/images-compressed.zip?v=20230517 -q --show-progress
fi
DIR=var/fixtures/images
if [ ! -d "$DIR" ]; then
printf "\n${BLUE}Unpacking ZIP${NO_COLOR}\n\n"
mkdir -p var/fixtures/images
unzip var/fixtures/images.zip -d var/fixtures/images > /dev/null 2>&1
fi
printf "\n${BLUE}Reloading fixtures${NO_COLOR}\n\n"
bin/console sylius:fixtures:load -n open_marketplace
+85
View File
@@ -0,0 +1,85 @@
{
"name": "bitbag/open-marketplace",
"type": "project",
"description": "BitBag Multi-Vendor Marketplace Universe",
"license": "MIT",
"require": {
"php": "^8.0",
"bitbag/cms-plugin": "^3.2",
"bitbag/wishlist-plugin": "^3.0",
"doctrine/annotations": "^1.14",
"php-http/message-factory": "^1.1",
"ramsey/uuid-doctrine": "^1.8",
"sylius/sylius": "^1.11.12",
"symfony/dotenv": "^4.4 || ^5.2",
"symfony/flex": "^1.11",
"symfony/webpack-encore-bundle": "^1.15"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"bitbag/coding-standard": "^v2.0.0",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"lchrusciel/api-test-case": "^5.2",
"nelmio/alice": "^3.10",
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"symfony/browser-kit": "^4.4 || ^5.2",
"symfony/debug-bundle": "^4.4 || ^5.2",
"symfony/intl": "^4.4 || ^5.2",
"symfony/web-profiler-bundle": "^4.4 || ^5.2",
"phpstan/extension-installer": "^1.0",
"stripe/stripe-php": "^6.43",
"sylius-labs/coding-standard": "^4.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"allow-plugins": {
"symfony/thanks": false,
"dealerdirect/phpcodesniffer-composer-installer": false,
"phpstan/extension-installer": false,
"symfony/flex": true
}
},
"autoload": {
"psr-4": {
"BitBag\\OpenMarketplace\\": "src/",
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\BitBag\\OpenMarketplace\\": ["tests/"],
"Sylius\\Tests\\Api\\": ["vendor/sylius/sylius/tests/Api/"]
},
"classmap": [
"src/Kernel.php"
]
},
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
$_SERVER += $env;
$_ENV += $env;
} elseif (!class_exists(Dotenv::class)) {
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else {
// load all the .env files
(new Dotenv(true))->loadEnv(dirname(__DIR__).'/.env');
}
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';
+65
View File
@@ -0,0 +1,65 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true],
Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true],
Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
Sylius\Bundle\LocaleBundle\SyliusLocaleBundle::class => ['all' => true],
Sylius\Bundle\ProductBundle\SyliusProductBundle::class => ['all' => true],
Sylius\Bundle\ChannelBundle\SyliusChannelBundle::class => ['all' => true],
Sylius\Bundle\AttributeBundle\SyliusAttributeBundle::class => ['all' => true],
Sylius\Bundle\TaxationBundle\SyliusTaxationBundle::class => ['all' => true],
Sylius\Bundle\ShippingBundle\SyliusShippingBundle::class => ['all' => true],
Sylius\Bundle\PaymentBundle\SyliusPaymentBundle::class => ['all' => true],
Sylius\Bundle\MailerBundle\SyliusMailerBundle::class => ['all' => true],
Sylius\Bundle\PromotionBundle\SyliusPromotionBundle::class => ['all' => true],
Sylius\Bundle\AddressingBundle\SyliusAddressingBundle::class => ['all' => true],
Sylius\Bundle\InventoryBundle\SyliusInventoryBundle::class => ['all' => true],
Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle::class => ['all' => true],
Sylius\Bundle\UserBundle\SyliusUserBundle::class => ['all' => true],
Sylius\Bundle\CustomerBundle\SyliusCustomerBundle::class => ['all' => true],
Sylius\Bundle\UiBundle\SyliusUiBundle::class => ['all' => true],
Sylius\Bundle\ReviewBundle\SyliusReviewBundle::class => ['all' => true],
Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true],
Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true],
Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true],
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true],
BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
BitBag\SyliusCmsPlugin\BitBagSyliusCmsPlugin::class => ['all' => true],
BitBag\SyliusWishlistPlugin\BitBagSyliusWishlistPlugin::class => ['all' => true],
];
View File
@@ -0,0 +1,30 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIrIQxXEW1GYsCAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECHhFnhqxP5H4BIIEyKDi67AJtZch
OKB/BXfhuBzI1SuUqg0zmFUYHHD2h1rsYrN5whcj4NgqBdNCNv7lXOgug5Rcu3jB
VV7Up6bkHSLwAguApyY1cbdt3iM9dhWw4mSUt7FUaq3dVWzFNdCV6hSSDsMUA2+M
Dvu4EXBvoeBbniU89qoyHSvSEC40Y17lOvafeUO2km8CGs+Wd++KB65c4HAibvdN
9q1H++BYYddyoGplybSTojp4Lxho8pRqG300g/ztO36PvKUYmRIm4/83tpejLdde
UFHBk0wDUcj/G3jsUj+azt13WyeekIEMvnwJx96gXOvXrnsovDzrsmKWCMvR4co1
R27m9uhiUI5tWYj43g0GnNE0+qsMP64USQZSUQfUPVL8E1XG6qgjkGYkUXxNs2Rh
nqGO61MN+bNxdcdyeUpskGC+uI6RbwaWY/+8EDkgFdwp4mKZiYrucowL9JwJCAfq
nU6vRBcuj682kNFxyJpyWuPZdUr7iBrQ2OG+AkVrrSiydrOLt40TisRf84diB3pM
y++y/asTNpN2NsyoO/wvTbWCs1//0ckgtCAtRXe2BMJ0k6dzVMZ4m6iLuDwlYhjh
nsK/e/UgBUsT3jqw+RS1fs0LcuiHN4HnK1njt/w0kOg8mo4LHisXTg2IAHudsq2v
c9pKvbqHW0bRKk/Z93nCxGWH/OswWrAXlT3tNvaUpq577SB7NSrKmX7vFELwxA0X
eYzmc7+dUNHC+nlBakQJZF2ovloK22dtGBGEzpAPT7gkOBvxU4LJyb998WKNx2PI
W6ta/fFn/jfFU8KhQMvgePVBKsQNEVrGxEZGFOggFgbIfXvsJvfmGB/6JUj8IRoj
vjjrzFcBwL7Ri5gXMRvYs4kUs7EKVJ1vJOHLTdwWEQ1NkXKhJtu1+BT5L1d3o+u2
cpZuZqYgPCiXY+WKMyrzFtcc4es0+rDnkC00hfNJFs2btTHXxSAdzU86lrSz7Vmc
voD7x3vZ/LjNkVlOMXasPBO8qhUnsTOXcsC5/Y4xtZZuXUnS6bBP2QDlUkNLrvLF
v0VsPun5MDxjihvfwY3B+/6vhzlgYqVTAiLksbCnc3hdoarjMJlQMI7XOsu6CHG9
dKaNF4H/rJyEAUaDpdCpgCuDv2iUkQTpgfAKGB7PqU571/voMGz4TAlbfgXABb9K
s1mGg+jj7yTvhmeo5Z0Yw22gDcA62QQn7TQ5VS+kqsXIfg5BLRmwHqvXNOddQdEh
xvVeeI68LLlGyJ0/xRBwT3+A3oVE8hUaJV9iYsHGluQhNkbQYDtNlAhjT+nMO/WN
gd02ve+YdHimGF9ouz3YboX4WRO9BMUzXZMLKnbm5QiI8fO5m77rYo4CfTe3Idxn
AOLtbaF7iivJSBOqTa2+xz+yX97tZUcPYsRgEQgKQohw6wgC/FcI5uU7uIRRB4PS
xQpkXlTTB91nNkb6pS/t9ahbgPxk4sFkhRDO3gyiaMbY8XyulWRiB1sp3E6vum2u
t20WDP55/Gk5ww8l2jBe80euiJnfYbUhlo0j7KKOBMQG3tGI08GxwOPIX4WTTpnh
6TU0g/UDxmpWAzn3jTcVtkO8oDmoE6b2IUBE48NYZsScsbcSKsJfk/3zsOC0QIWj
oeBf+AvdHs5P6YRaqQMnSA==
-----END ENCRYPTED PRIVATE KEY-----
+30
View File
@@ -0,0 +1,30 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIrIQxXEW1GYsCAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECHhFnhqxP5H4BIIEyKDi67AJtZch
OKB/BXfhuBzI1SuUqg0zmFUYHHD2h1rsYrN5whcj4NgqBdNCNv7lXOgug5Rcu3jB
VV7Up6bkHSLwAguApyY1cbdt3iM9dhWw4mSUt7FUaq3dVWzFNdCV6hSSDsMUA2+M
Dvu4EXBvoeBbniU89qoyHSvSEC40Y17lOvafeUO2km8CGs+Wd++KB65c4HAibvdN
9q1H++BYYddyoGplybSTojp4Lxho8pRqG300g/ztO36PvKUYmRIm4/83tpejLdde
UFHBk0wDUcj/G3jsUj+azt13WyeekIEMvnwJx96gXOvXrnsovDzrsmKWCMvR4co1
R27m9uhiUI5tWYj43g0GnNE0+qsMP64USQZSUQfUPVL8E1XG6qgjkGYkUXxNs2Rh
nqGO61MN+bNxdcdyeUpskGC+uI6RbwaWY/+8EDkgFdwp4mKZiYrucowL9JwJCAfq
nU6vRBcuj682kNFxyJpyWuPZdUr7iBrQ2OG+AkVrrSiydrOLt40TisRf84diB3pM
y++y/asTNpN2NsyoO/wvTbWCs1//0ckgtCAtRXe2BMJ0k6dzVMZ4m6iLuDwlYhjh
nsK/e/UgBUsT3jqw+RS1fs0LcuiHN4HnK1njt/w0kOg8mo4LHisXTg2IAHudsq2v
c9pKvbqHW0bRKk/Z93nCxGWH/OswWrAXlT3tNvaUpq577SB7NSrKmX7vFELwxA0X
eYzmc7+dUNHC+nlBakQJZF2ovloK22dtGBGEzpAPT7gkOBvxU4LJyb998WKNx2PI
W6ta/fFn/jfFU8KhQMvgePVBKsQNEVrGxEZGFOggFgbIfXvsJvfmGB/6JUj8IRoj
vjjrzFcBwL7Ri5gXMRvYs4kUs7EKVJ1vJOHLTdwWEQ1NkXKhJtu1+BT5L1d3o+u2
cpZuZqYgPCiXY+WKMyrzFtcc4es0+rDnkC00hfNJFs2btTHXxSAdzU86lrSz7Vmc
voD7x3vZ/LjNkVlOMXasPBO8qhUnsTOXcsC5/Y4xtZZuXUnS6bBP2QDlUkNLrvLF
v0VsPun5MDxjihvfwY3B+/6vhzlgYqVTAiLksbCnc3hdoarjMJlQMI7XOsu6CHG9
dKaNF4H/rJyEAUaDpdCpgCuDv2iUkQTpgfAKGB7PqU571/voMGz4TAlbfgXABb9K
s1mGg+jj7yTvhmeo5Z0Yw22gDcA62QQn7TQ5VS+kqsXIfg5BLRmwHqvXNOddQdEh
xvVeeI68LLlGyJ0/xRBwT3+A3oVE8hUaJV9iYsHGluQhNkbQYDtNlAhjT+nMO/WN
gd02ve+YdHimGF9ouz3YboX4WRO9BMUzXZMLKnbm5QiI8fO5m77rYo4CfTe3Idxn
AOLtbaF7iivJSBOqTa2+xz+yX97tZUcPYsRgEQgKQohw6wgC/FcI5uU7uIRRB4PS
xQpkXlTTB91nNkb6pS/t9ahbgPxk4sFkhRDO3gyiaMbY8XyulWRiB1sp3E6vum2u
t20WDP55/Gk5ww8l2jBe80euiJnfYbUhlo0j7KKOBMQG3tGI08GxwOPIX4WTTpnh
6TU0g/UDxmpWAzn3jTcVtkO8oDmoE6b2IUBE48NYZsScsbcSKsJfk/3zsOC0QIWj
oeBf+AvdHs5P6YRaqQMnSA==
-----END ENCRYPTED PRIVATE KEY-----
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzE6CahgrutMYkFNdv6+M
wG8Hk/2283MDNqMHsTETgJ2zCOMCFkEuikFU6j4Vpn5C+MKZN/On90HqPdUEIn+A
v9yiNbuAdyQt9H77ldok9AWzYxNb0kVwk4EUYqCnnb6BKLM4GT1TIwppV5MvQPHX
Bs3/ujsrhg7Z9OqPORE8J3kLM1+JqxAiljT/vmLSgZfL2J6B6XuQhecMLpTvTFZy
mR96UWj29u8kVwr/KObDlGIuInMN/GIPPdiivggoDk7I13+jmKe88ZNyOytpHIim
FeDEXZK2meqwzErYfo4J13GYBPKaX1JmMKna+ZjmNObL09iHmUa4BXKzgSvAdD6I
NQIDAQAB
-----END PUBLIC KEY-----
+9
View File
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzE6CahgrutMYkFNdv6+M
wG8Hk/2283MDNqMHsTETgJ2zCOMCFkEuikFU6j4Vpn5C+MKZN/On90HqPdUEIn+A
v9yiNbuAdyQt9H77ldok9AWzYxNb0kVwk4EUYqCnnb6BKLM4GT1TIwppV5MvQPHX
Bs3/ujsrhg7Z9OqPORE8J3kLM1+JqxAiljT/vmLSgZfL2J6B6XuQhecMLpTvTFZy
mR96UWj29u8kVwr/KObDlGIuInMN/GIPPdiivggoDk7I13+jmKe88ZNyOytpHIim
FeDEXZK2meqwzErYfo4J13GYBPKaX1JmMKna+ZjmNObL09iHmUa4BXKzgSvAdD6I
NQIDAQAB
-----END PUBLIC KEY-----
@@ -0,0 +1,114 @@
imports:
- { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" }
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/config.yml" }
- { resource: "@BitBagSyliusWishlistPlugin/Resources/config/config.yml" }
- { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }
- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
- { resource: "./../../src/Component/Core/Admin/Resources/config.yaml" }
- { resource: "./../../src/Component/Core/Common/Resources/config.yaml" }
- { resource: "./../../src/Component/Core/Shop/Resources/config.yaml" }
- { resource: "./../../src/Component/Core/Vendor/Resources/config.yaml" }
- { resource: "./../../src/Component/Core/Settlement/Resources/config.yaml" }
- { resource: "./../../src/Component/Messaging/Resources/config.yaml" }
- { resource: "./../../src/Component/Override/Resources/config.yaml" }
parameters:
sylius_core.public_dir: '%kernel.project_dir%/public'
sylius_shop:
product_grid:
include_all_descendants: true
sylius_order:
resources:
order:
classes:
model: BitBag\OpenMarketplace\Component\Order\Entity\Order
controller: BitBag\OpenMarketplace\Component\Core\Common\Controller\Resource\OrderController
repository: BitBag\OpenMarketplace\Component\Order\Repository\OrderRepository
form: Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType\OrderType
order_item:
classes:
model: BitBag\OpenMarketplace\Component\Order\Entity\OrderItem
sylius_product:
resources:
product:
classes:
model: BitBag\OpenMarketplace\Component\Product\Entity\Product
interface: BitBag\OpenMarketplace\Component\Product\Entity\ProductInterface
repository: BitBag\OpenMarketplace\Component\Product\Repository\ProductRepository
product_variant:
classes:
repository: BitBag\OpenMarketplace\Component\Product\Repository\ProductVariantRepository
sylius_user:
resources:
shop:
user:
classes:
model: BitBag\OpenMarketplace\Component\Vendor\Entity\ShopUser
interface: BitBag\OpenMarketplace\Component\Vendor\Entity\ShopUserInterface
sylius_shipping:
resources:
shipment:
classes:
model: BitBag\OpenMarketplace\Component\Order\Entity\Shipment
interface: BitBag\OpenMarketplace\Component\Order\Entity\ShipmentInterface
repository: BitBag\OpenMarketplace\Component\Order\Repository\ShipmentRepository
sylius_payment:
resources:
payment:
classes:
repository: BitBag\OpenMarketplace\Component\Order\Repository\PaymentRepository
sylius_customer:
resources:
customer:
classes:
repository: BitBag\OpenMarketplace\Component\Vendor\Repository\CustomerRepository
sylius_review:
resources:
product:
review:
classes:
repository: BitBag\OpenMarketplace\Component\Product\Repository\ProductReviewRepository
sylius_taxonomy:
resources:
taxon:
classes:
model: Sylius\Component\Core\Model\Taxon
repository: BitBag\OpenMarketplace\Component\Vendor\Repository\TaxonRepository
sylius_channel:
resources:
channel:
classes:
repository: BitBag\OpenMarketplace\Component\Channel\Repository\ChannelRepository
sylius_ui:
events:
sylius.shop.checkout.header:
blocks:
before_header_legacy:
template: "@SyliusUi/Block/_legacySonataEvent.html.twig"
priority: 15
context:
event: sylius.shop.checkout.address.before_header # Intentionally using "address" event for backwards compatibility
header:
template: "@SyliusShop/Checkout/_header.html.twig"
priority: 10
after_header_legacy:
template: "@SyliusUi/Block/_legacySonataEvent.html.twig"
priority: 5
context:
event: sylius.shop.checkout.address.after_header # Intentionally using "address" event for backwards compatibility
@@ -0,0 +1,15 @@
api_platform:
mapping:
paths:
- '%kernel.project_dir%/vendor/sylius/sylius/src/Sylius/Bundle/ApiBundle/Resources/config/api_resources'
- '%kernel.project_dir%/config/api_platform'
- '%kernel.project_dir%/src/Component/Core/Api/Resources/api_resources'
- '%kernel.project_dir%/src/Component/Messaging/Entity'
- '%kernel.project_dir%/src/Component/Order/Entity'
- '%kernel.project_dir%/src/Component/Product/Entity'
- '%kernel.project_dir%/src/Component/ProductListing/Entity'
- '%kernel.project_dir%/src/Component/Vendor/Entity'
patch_formats:
json: ['application/merge-patch+json']
swagger:
versions: [3]
@@ -0,0 +1,15 @@
framework:
assets:
packages:
shop:
json_manifest_path: '%kernel.project_dir%/public/build/shop/manifest.json'
admin:
json_manifest_path: '%kernel.project_dir%/public/build/admin/manifest.json'
cms_shop:
json_manifest_path: '%kernel.project_dir%/public/build/bitbag/cms/shop/manifest.json'
cms_admin:
json_manifest_path: '%kernel.project_dir%/public/build/bitbag/cms/admin/manifest.json'
wishlist_shop:
json_manifest_path: '%kernel.project_dir%/public/build/bitbag/wishlist/shop/manifest.json'
wishlist_admin:
json_manifest_path: '%kernel.project_dir%/public/build/bitbag/wishlist/admin/manifest.json'
@@ -0,0 +1,2 @@
sylius_api:
enabled: true
@@ -0,0 +1,2 @@
framework:
profiler: { only_exceptions: false }
@@ -0,0 +1,12 @@
jms_serializer:
visitors:
json_serialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
json_deserialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
@@ -0,0 +1,9 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
firephp:
type: firephp
level: info
@@ -0,0 +1,3 @@
nelmio_alice:
functions_blacklist:
- 'current'
@@ -0,0 +1,3 @@
framework:
router:
strict_requirements: true
@@ -0,0 +1,2 @@
swiftmailer:
disable_delivery: false
@@ -0,0 +1,3 @@
web_profiler:
toolbar: true
intercept_redirects: false
@@ -0,0 +1,50 @@
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
driver: 'pdo_mysql'
server_version: '5.7'
charset: UTF8
url: '%env(resolve:DATABASE_URL)%'
types:
uuid: 'Ramsey\Uuid\Doctrine\UuidType'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
MessagingComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/Messaging/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\Messaging\Entity'
OrderComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/Order/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\Order\Entity'
ProductComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/Product/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\Product\Entity'
ProductListingComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/ProductListing/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\ProductListing\Entity'
VendorComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/Vendor/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\Vendor\Entity'
SettlementComponent:
is_bundle: false
type: xml
dir: '%kernel.project_dir%/src/Component/Settlement/Resources/doctrine'
prefix: 'BitBag\OpenMarketplace\Component\Settlement\Entity'
@@ -0,0 +1,6 @@
doctrine_migrations:
storage:
table_storage:
table_name: sylius_migrations
migrations_paths:
'App\Migrations': "%kernel.project_dir%/src/Migrations"
@@ -0,0 +1,11 @@
fos_rest:
exception: true
view:
formats:
json: true
xml: true
empty_content: 204
format_listener:
rules:
- { path: '^/api/v1/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
- { path: '^/', stop: true }
@@ -0,0 +1,10 @@
framework:
translator: { fallbacks: ["%locale%"] }
secret: '%env(APP_SECRET)%'
form: true
csrf_protection: true
session:
handler_id: ~
serializer:
mapping:
paths: [ '%kernel.project_dir%/config/serialization', '%kernel.project_dir%/src/Component/Core/Api/Resources/serialization' ]
@@ -0,0 +1,4 @@
jms_serializer:
visitors:
xml_serialization:
format_output: '%kernel.debug%'
@@ -0,0 +1,4 @@
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
@@ -0,0 +1,14 @@
liip_imagine:
resolvers:
default:
web_path:
web_root: "%kernel.project_dir%/public"
cache_prefix: "media/cache"
filter_sets:
open_marketplace_fixture_size:
filters:
thumbnail: { size: [800, 600], mode: outbound }
open_marketplace_vendor_background:
filters:
thumbnail: { size: [1155, 200], mode: outbound }
@@ -0,0 +1,10 @@
monolog:
channels:
- 'settlements_email'
handlers:
settlements_email:
type: stream
level: debug
path: "%kernel.logs_dir%/settlements_email_%kernel.environment%.log"
channels:
- 'settlements_email'
@@ -0,0 +1,36 @@
doctrine:
orm:
entity_managers:
default:
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider
dbal:
types:
uuid: 'Ramsey\Uuid\Doctrine\UuidType'
services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
@@ -0,0 +1,10 @@
jms_serializer:
visitors:
json_serialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
json_deserialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
@@ -0,0 +1,10 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
@@ -0,0 +1,3 @@
framework:
router:
strict_requirements: ~
@@ -0,0 +1,150 @@
parameters:
sylius.security.admin_regex: "^/%sylius_admin.path_name%"
sylius.security.shop_regex: "^/(?!%sylius_admin.path_name%|api/.*|api$|media/.*)[^/]++"
sylius.security.new_api_route: "/api/v2"
sylius.security.new_api_regex: "^%sylius.security.new_api_route%"
sylius.security.new_api_admin_route: "%sylius.security.new_api_route%/admin"
sylius.security.new_api_admin_regex: "^%sylius.security.new_api_admin_route%"
sylius.security.new_api_shop_route: "%sylius.security.new_api_route%/shop"
sylius.security.new_api_shop_regex: "^%sylius.security.new_api_shop_route%"
sylius.security.new_api_user_account_route: "%sylius.security.new_api_shop_route%/account"
sylius.security.new_api_user_account_regex: "^%sylius.security.new_api_user_account_route%"
sylius.security.new_api_user_account_vendor_route: "%sylius.security.new_api_user_account_route%/vendor"
sylius.security.new_api_user_account_vendor_regex: "^%sylius.security.new_api_user_account_vendor_route%"
security:
always_authenticate_before_granting: true
providers:
sylius_admin_user_provider:
id: sylius.admin_user_provider.email_or_name_based
sylius_api_admin_user_provider:
id: sylius.admin_user_provider.email_or_name_based
sylius_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based
encoders:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
admin:
switch_user: true
context: admin
pattern: "%sylius.security.admin_regex%"
provider: sylius_admin_user_provider
form_login:
provider: sylius_admin_user_provider
login_path: sylius_admin_login
check_path: sylius_admin_login_check
failure_path: sylius_admin_login
default_target_path: sylius_admin_dashboard
use_forward: false
use_referer: true
csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_admin_security_token
csrf_token_id: admin_authenticate
remember_me:
secret: "%env(APP_SECRET)%"
path: "/%sylius_admin.path_name%"
name: APP_ADMIN_REMEMBER_ME
lifetime: 31536000
remember_me_parameter: _remember_me
logout:
path: sylius_admin_logout
target: sylius_admin_login
anonymous: true
new_api_admin_user:
pattern: "%sylius.security.new_api_admin_regex%/.*"
provider: sylius_api_admin_user_provider
stateless: true
anonymous: true
json_login:
check_path: "%sylius.security.new_api_admin_route%/authentication-token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
new_api_shop_user:
pattern: "%sylius.security.new_api_shop_regex%/.*"
provider: sylius_api_shop_user_provider
stateless: true
anonymous: true
json_login:
check_path: "%sylius.security.new_api_shop_route%/authentication-token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
shop:
switch_user: { role: ROLE_ALLOWED_TO_SWITCH }
context: shop
pattern: "%sylius.security.shop_regex%"
provider: sylius_shop_user_provider
form_login:
success_handler: sylius.authentication.success_handler
failure_handler: sylius.authentication.failure_handler
provider: sylius_shop_user_provider
login_path: sylius_shop_login
check_path: sylius_shop_login_check
failure_path: sylius_shop_login
default_target_path: sylius_shop_homepage
use_forward: false
use_referer: true
csrf_token_generator: security.csrf.token_manager
csrf_parameter: _csrf_shop_security_token
csrf_token_id: shop_authenticate
remember_me:
secret: "%env(APP_SECRET)%"
name: APP_SHOP_REMEMBER_ME
lifetime: 31536000
remember_me_parameter: _remember_me
logout:
path: sylius_shop_logout
target: sylius_shop_login
invalidate_session: false
success_handler: sylius.handler.shop_user_logout
anonymous: true
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
image_resolver:
pattern: ^/media/cache/resolve
security: false
access_control:
- { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.shop_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.shop_regex%/_partial", role: ROLE_NO_ACCESS }
- { path: "%sylius.security.admin_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.shop_regex%/login", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.shop_regex%/register", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.shop_regex%/verify", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- { path: "%sylius.security.shop_regex%/account/vendor/conversation/create", role: ROLE_USER }
- { path: "%sylius.security.shop_regex%/account/vendor/conversations", role: ROLE_USER }
- { path: "%sylius.security.shop_regex%/account/vendor/register", role: ROLE_USER }
- { path: "%sylius.security.shop_regex%/account/vendor", role: ROLE_VENDOR }
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.new_api_user_account_vendor_regex%/register", role: ROLE_USER }
- { path: "%sylius.security.new_api_user_account_vendor_regex%", role: ROLE_VENDOR }
- { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER }
- { path: "%sylius.security.new_api_shop_route%/authentication-token", role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: "%sylius.security.new_api_shop_regex%/.*", role: IS_AUTHENTICATED_ANONYMOUSLY }
@@ -0,0 +1,10 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
@@ -0,0 +1,2 @@
swiftmailer:
disable_delivery: true
@@ -0,0 +1,4 @@
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions:
default_locale: '%locale%'
@@ -0,0 +1,2 @@
swiftmailer:
url: '%env(MAILER_URL)%'
@@ -0,0 +1,3 @@
sylius_labs_doctrine_migrations_extra:
migrations:
'App\Migrations': ~
@@ -0,0 +1,2 @@
fidry_alice_data_fixtures:
default_purge_mode: no_purge
@@ -0,0 +1,4 @@
framework:
test: ~
session:
storage_id: session.storage.mock_file
@@ -0,0 +1,6 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error
@@ -0,0 +1,2 @@
imports:
- { resource: ../dev/nelmio_alice.yaml }
@@ -0,0 +1,7 @@
security:
encoders:
sha512: sha512
Sylius\Component\User\Model\UserInterface: sha512
sylius_user:
encoder: sha512
@@ -0,0 +1,6 @@
swiftmailer:
disable_delivery: true
logging: true
spool:
type: file
path: "%kernel.cache_dir%/spool"
@@ -0,0 +1,3 @@
sylius_theme:
sources:
test: ~
@@ -0,0 +1,3 @@
services:
Sylius\Component\Core\Generator\ImagePathGeneratorInterface:
class: Sylius\Behat\Service\Generator\UploadedImagePathGenerator
@@ -0,0 +1,6 @@
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }
@@ -0,0 +1,33 @@
doctrine:
orm:
entity_managers:
default:
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider
services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
@@ -0,0 +1,2 @@
fidry_alice_data_fixtures:
default_purge_mode: no_purge
@@ -0,0 +1,3 @@
fos_rest:
exception:
debug: true
@@ -0,0 +1,4 @@
framework:
test: ~
session:
storage_id: session.storage.mock_file
@@ -0,0 +1,6 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: error
@@ -0,0 +1,7 @@
security:
encoders:
sha512: sha512
Sylius\Component\User\Model\UserInterface: sha512
sylius_user:
encoder: sha512
@@ -0,0 +1,6 @@
swiftmailer:
disable_delivery: true
logging: true
spool:
type: file
path: "%kernel.cache_dir%/spool"
@@ -0,0 +1,2 @@
sylius_channel:
debug: true
@@ -0,0 +1,3 @@
sylius_theme:
sources:
test: ~
@@ -0,0 +1,2 @@
imports:
- { resource: "../test/sylius_uploader.yaml" }
@@ -0,0 +1,2 @@
twig:
strict_variables: true
@@ -0,0 +1,2 @@
imports:
- { resource: "../test/web_profiler.yaml" }

Some files were not shown because too many files have changed in this diff Show More