generated from Setono/SyliusPluginSkeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
48 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,19 @@ | ||
# Setono Sylius Plugin Skeleton | ||
# Age Verification Plugin for Sylius | ||
|
||
[![Latest Version][ico-version]][link-packagist] | ||
[![Software License][ico-license]](LICENSE) | ||
[![Build Status][ico-github-actions]][link-github-actions] | ||
[![Code Coverage][ico-code-coverage]][link-code-coverage] | ||
[![Mutation testing][ico-infection]][link-infection] | ||
|
||
[Setono](https://setono.com) have made a bunch of [plugins for Sylius](https://github.com/Setono?q=plugin&sort=stargazers), and we have some guidelines | ||
which we try to follow when developing plugins. These guidelines are used in this repository, and it gives you a very | ||
solid base when developing plugins. | ||
|
||
Enjoy! | ||
[ico-version]: https://poser.pugx.org/setono/sylius-age-verification-plugin/v/stable | ||
[ico-license]: https://poser.pugx.org/setono/sylius-age-verification-plugin/license | ||
[ico-github-actions]: https://github.com/Setono/sylius-age-verification-plugin/workflows/build/badge.svg | ||
[ico-code-coverage]: https://codecov.io/gh/Setono/sylius-age-verification-plugin/branch/master/graph/badge.svg | ||
[ico-infection]: https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FSetono%2FSyliusPluginSkeleton%2Fmaster | ||
|
||
## Quickstart | ||
|
||
1. Run | ||
```shell | ||
composer create-project --prefer-source --no-install --remove-vcs setono/sylius-plugin-skeleton:1.12.x-dev ProjectName | ||
``` | ||
or just click the `Use this template` button at the right corner of this repository. | ||
2. Run | ||
```shell | ||
cd ProjectName && composer install | ||
``` | ||
3. From the plugin skeleton root directory, run the following commands: | ||
|
||
```bash | ||
php init | ||
(cd tests/Application && yarn install) | ||
(cd tests/Application && yarn build) | ||
(cd tests/Application && bin/console assets:install) | ||
(cd tests/Application && bin/console doctrine:database:create) | ||
(cd tests/Application && bin/console doctrine:schema:create) | ||
(cd tests/Application && bin/console sylius:fixtures:load -n) | ||
``` | ||
|
||
4. Start your local PHP server: `symfony serve` (see https://symfony.com/doc/current/setup/symfony_server.html for docs) | ||
|
||
To be able to set up a plugin's database, remember to configure you database credentials in `tests/Application/.env` and `tests/Application/.env.test`. | ||
[ico-version]: https://poser.pugx.org/setono/sylius-plugin-skeleton/v/stable | ||
[ico-license]: https://poser.pugx.org/setono/sylius-plugin-skeleton/license | ||
[ico-github-actions]: https://github.com/Setono/SyliusPluginSkeleton/workflows/build/badge.svg | ||
[ico-code-coverage]: https://codecov.io/gh/Setono/SyliusPluginSkeleton/branch/1.12.x/graph/badge.svg | ||
[ico-infection]: https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FSetono%2FSyliusPluginSkeleton%2F1.12.x | ||
[link-packagist]: https://packagist.org/packages/setono/sylius-plugin-skeleton | ||
[link-github-actions]: https://github.com/Setono/SyliusPluginSkeleton/actions | ||
[link-code-coverage]: https://codecov.io/gh/Setono/SyliusPluginSkeleton | ||
[link-infection]: https://dashboard.stryker-mutator.io/reports/github.com/Setono/SyliusPluginSkeleton/1.12.x | ||
[link-packagist]: https://packagist.org/packages/setono/sylius-age-verification-plugin | ||
[link-github-actions]: https://github.com/Setono/sylius-age-verification-plugin/actions | ||
[link-code-coverage]: https://codecov.io/gh/Setono/sylius-age-verification-plugin | ||
[link-infection]: https://dashboard.stryker-mutator.io/reports/github.com/Setono/sylius-age-verification-plugin/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
acme_sylius_example_shop: | ||
resource: "@AcmeSyliusExamplePlugin/Resources/config/routes/shop.yaml" | ||
setono_sylius_age_verification_shop: | ||
resource: "@SetonoSyliusAgeVerificationPlugin/Resources/config/routes/shop.yaml" | ||
prefix: /{_locale} | ||
requirements: | ||
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ | ||
|
||
acme_sylius_example_admin: | ||
resource: "@AcmeSyliusExamplePlugin/Resources/config/routes/admin.yaml" | ||
setono_sylius_age_verification_admin: | ||
resource: "@SetonoSyliusAgeVerificationPlugin/Resources/config/routes/admin.yaml" | ||
prefix: /admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ APP_SECRET=EDITME | |
# Format described at https://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://[email protected]/acme_sylius_example_%kernel.environment%?serverVersion=5.7 | ||
DATABASE_URL=mysql://[email protected]/setono_sylius_age_verification_%kernel.environment%?serverVersion=5.7 | ||
###< doctrine/doctrine-bundle ### | ||
|
||
###> lexik/jwt-authentication-bundle ### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
APP_SECRET='ch4mb3r0f5ecr3ts' | ||
|
||
KERNEL_CLASS='Acme\SyliusExamplePlugin\Tests\Application\Kernel' | ||
KERNEL_CLASS='Setono\SyliusAgeVerificationPlugin\Tests\Application\Kernel' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
tests/Application/config/routes/setono_sylius_age_verification.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setono_sylius_age_verification: | ||
resource: "@SetonoSyliusAgeVerificationPlugin/Resources/config/routes.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
tests/DependencyInjection/AcmeSyliusExampleExtensionTest.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.