empressia / sylius-userback-plugin
The plugin allows you to inject Userback widget to your Store so your Users can give you a feedback on their experience.
Installs: 67
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.4
- sylius/sylius: ~1.8.0 || ~1.9.0
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- 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
- friendsofsymfony/oauth-server-bundle: ^1.6 || >2.0.0-alpha.0 ^2.0@dev
- lakion/mink-debug-extension: ^2.0.0
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: 0.12.74
- phpstan/phpstan-doctrine: 0.12.31
- phpstan/phpstan-strict-rules: ^0.12.0
- phpstan/phpstan-webmozart-assert: 0.12.12
- phpunit/phpunit: ^9.5
- sensiolabs/security-checker: ^6.0
- symfony/browser-kit: ^4.4 || ^5.2
- symfony/debug-bundle: ^4.4 || ^5.2
- symfony/dotenv: ^4.4 || ^5.2
- symfony/intl: ^4.4 || ^5.2
- symfony/web-profiler-bundle: ^4.4 || ^5.2
- vimeo/psalm: 4.4.1
Conflicts
- api-platform/core: ^2.6
README
Documentation
The plugin allows you to inject Userback widget to your Store so your Users can give you a feedback on their experience.
Installation
-
Add composer dependency:
composer require empressia/sylius-userback-plugin
-
Generate widget on userback.io and copy Access Token (lookup
Userback.access_token
line in generated Widget Code) -
Setup the Access Token environmental variable (you can paste
USERBACK_ACCESS_TOKEN=paste_your_token_here
in your.env.local
file). Leave it blank if you want to disable widget.
Instructions below are valid only if you use default Sylius configuration and layouts. The plugin makes use of
sylius.shop.layout.head
block in default Sylius layout.
- Paste this snippet on top of
config/packages/_sylius.yaml
file:imports: - { resource: "@EmpressiaSyliusUserbackPlugin/Resources/config/sylius_ui.yaml" }
Quality Assurance
Prepare test environment
From the root directory, run the following commands:
cd tests/Application
APP_ENV=test bin/console doctrine:database:create
APP_ENV=test bin/console doctrine:schema:create
APP_ENV=test bin/console sylius:install
To be able to setup a plugin's database, remember to configure you database credentials in tests/Application/.env
and tests/Application/.env.test
.
Running plugin tests
-
PHPUnit
vendor/bin/phpunit
-
Behat (non-JS scenarios)
vendor/bin/behat --strict --tags="~@javascript"
-
Static Analysis
-
Psalm
vendor/bin/psalm
-
PHPStan
vendor/bin/phpstan analyse -c phpstan.neon -l max src/
-