├── .babelrc ├── .env ├── .env.test ├── .github └── ISSUE_TEMPLATE │ ├── bug-report---.md │ ├── documentation-issue---.md │ └── feature-request--.md ├── .gitignore ├── .php_cs.dist ├── .travis.yml ├── Capfile ├── Gemfile ├── LICENSE ├── Makefile.dist ├── Makefile.install.dist ├── Makefile.test.dist ├── Makefile.validation.dist ├── README.md ├── assets ├── backend │ ├── img │ │ ├── admin-logo.svg │ │ ├── avatar.png │ │ └── logo.png │ ├── js │ │ ├── app-date-time-picker.js │ │ ├── app-images-preview.js │ │ ├── app.js │ │ └── sylius-compound-form-errors.js │ ├── scss │ │ └── main.scss │ └── webpack.config.js ├── common │ ├── js │ │ ├── app.js │ │ ├── shim-polyfill.js │ │ └── shim-semantic-ui.js │ └── scss │ │ ├── _ui.scss │ │ └── style.scss ├── config-builder.js └── frontend │ ├── img │ └── logo.png │ ├── js │ ├── app.js │ └── shim-lightbox.js │ ├── scss │ └── main.scss │ └── webpack.config.js ├── behat.yml.dist ├── bin └── console ├── composer.json ├── composer.lock ├── config ├── bootstrap.php ├── bundles.php ├── grids │ └── backend │ │ ├── admin_user.yaml │ │ └── customer.yaml ├── packages │ ├── api_platform.yaml │ ├── assets.yaml │ ├── dev │ │ ├── debug.yaml │ │ ├── jms_serializer.yaml │ │ ├── monolog.yaml │ │ ├── nelmio_alice.yaml │ │ ├── routing.yaml │ │ ├── swiftmailer.yaml │ │ └── web_profiler.yaml │ ├── doctrine.yaml │ ├── doctrine_migrations.yaml │ ├── eight_points_guzzle.yaml │ ├── fos_oauth_server.yaml │ ├── fos_rest.yaml │ ├── framework.yaml │ ├── jms_serializer.yaml │ ├── liip_imagine.yaml │ ├── nelmio_cors.yaml │ ├── prod │ │ ├── doctrine.yaml │ │ ├── jms_serializer.yaml │ │ ├── monolog.yaml │ │ └── webpack_encore.yaml │ ├── routing.yaml │ ├── security.yaml │ ├── security_checker.yaml │ ├── sonata_block.yaml │ ├── sonata_core.yaml │ ├── stof_doctrine_extensions.yaml │ ├── swiftmailer.yaml │ ├── sylius_customer.yaml │ ├── sylius_fixtures.yaml │ ├── sylius_grid.yaml │ ├── sylius_mailer.yaml │ ├── sylius_resource.yaml │ ├── sylius_user.yaml │ ├── test │ │ ├── fidry_alice_data_fixtures.yaml │ │ ├── framework.yaml │ │ ├── monolog.yaml │ │ ├── nelmio_alice.yaml │ │ ├── routing.yaml │ │ ├── swiftmailer.yaml │ │ ├── translation.yaml │ │ └── web_profiler.yaml │ ├── translation.yaml │ ├── twig.yaml │ ├── twig_extensions.yaml │ ├── validator.yaml │ ├── vich_uploader.yaml │ └── webpack_encore.yaml ├── routes.yaml ├── routes │ ├── annotations.yaml │ ├── api.yaml │ ├── api_platform.yaml │ ├── backend.yaml │ ├── backend │ │ ├── admin_user.yaml │ │ ├── customer.yaml │ │ ├── partial.yaml │ │ ├── partial │ │ │ └── customer.yaml │ │ └── security.yaml │ ├── dev │ │ ├── twig.yaml │ │ └── web_profiler.yaml │ ├── frontend.yaml │ ├── frontend │ │ ├── account.yaml │ │ ├── partial.yaml │ │ └── security.yaml │ └── liip_imagine.yaml ├── services.yaml ├── services │ ├── _main.yaml │ ├── command.yaml │ ├── context.yaml │ ├── dashboard.yaml │ ├── fixtures.yaml │ ├── fixtures_factories.yaml │ ├── form.yaml │ ├── installer.yaml │ ├── listener.yaml │ ├── menu.yaml │ └── validator.yaml ├── services_test.yaml ├── services_test │ ├── contexts.yaml │ ├── contexts │ │ ├── cli.yaml │ │ ├── hook.yaml │ │ ├── setup.yaml │ │ ├── transform.yaml │ │ └── ui.yaml │ ├── elements.yaml │ ├── pages.yaml │ └── pages │ │ ├── backend.yaml │ │ ├── backend │ │ ├── administrator.yaml │ │ ├── customer.yaml │ │ └── dashboard.yaml │ │ └── frontend.yaml ├── suites.yaml └── suites │ ├── cli │ ├── installer.yaml │ └── makefile.yaml │ └── ui │ ├── account │ ├── customer.yaml │ ├── login.yaml │ └── registration.yaml │ ├── admin │ └── dashboard.yaml │ ├── customer │ └── managing_customers.yaml │ └── user │ └── managing_administrators.yaml ├── docs ├── .gitignore ├── README.md ├── _exts │ ├── LICENSE │ ├── sensio │ │ ├── __init__.py │ │ └── sphinx │ │ │ ├── __init__.py │ │ │ ├── configurationblock.py │ │ │ ├── php.py │ │ │ ├── phpcode.py │ │ │ └── refinclude.py │ └── setup.py ├── _images │ ├── doc_logo.png │ ├── doctrine.png │ ├── github_banner.png │ ├── logo.png │ ├── symfonyfs.png │ └── twig.png ├── _themes │ └── sylius_rtd_theme │ │ ├── __init__.py │ │ ├── breadcrumbs.html │ │ ├── footer.html │ │ ├── layout.html │ │ ├── layout_old.html │ │ ├── search.html │ │ ├── searchbox.html │ │ ├── static │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── sylius-custom.css │ │ │ ├── sylius.css │ │ │ └── theme.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── img │ │ │ └── swan.png │ │ └── js │ │ │ └── theme.js │ │ ├── theme.conf │ │ └── versions.html ├── book │ ├── architecture │ │ ├── architecture.rst │ │ ├── fixtures.rst │ │ ├── index.rst │ │ └── map.rst.inc │ ├── index.rst │ ├── map.rst.inc │ └── user │ │ ├── admins.rst │ │ ├── customers.rst │ │ ├── index.rst │ │ └── map.rst.inc ├── conf.py ├── cookbook │ ├── bdd │ │ ├── behat │ │ │ ├── basic-usage.rst │ │ │ ├── how-to-add-new-context.rst │ │ │ ├── how-to-add-new-page.rst │ │ │ ├── how-to-change-behat-application-base-url.rst │ │ │ ├── how-to-define-new-suite.rst │ │ │ ├── how-to-use-transformers.rst │ │ │ ├── index.rst │ │ │ └── map.rst.inc │ │ ├── map.rst.inc │ │ └── phpspec │ │ │ ├── how-to-configure-phpspec-with-code-coverage.rst │ │ │ ├── how-to-design-entities-with-phpspec.rst │ │ │ ├── how-to-design-services-with-phpspec.rst │ │ │ ├── how-to-disable-phpspec-code-coverage.rst │ │ │ ├── index.rst │ │ │ └── map.rst.inc │ ├── dashboard │ │ ├── basic-example.rst │ │ ├── index.rst │ │ └── map.rst.inc │ ├── deployment │ │ ├── capistrano.rst │ │ └── map.rst.inc │ ├── entities │ │ ├── configure-backend-menu.rst │ │ ├── configure-your-routes.rst │ │ ├── first-resource.rst │ │ ├── manage-your-entity.rst │ │ └── map.rst.inc │ ├── fixtures │ │ ├── factory.rst │ │ ├── fixture.rst │ │ ├── load.rst │ │ ├── map.rst.inc │ │ └── suite.rst │ ├── index.rst │ └── map.rst.inc ├── deployment │ ├── index.rst │ └── map.rst.inc ├── index.rst └── requirements.txt ├── etc ├── bash │ ├── application.sh │ └── common.lib.sh ├── build │ └── .gitignore ├── capistrano │ ├── deploy.rb │ └── deploy │ │ ├── production.rb │ │ └── staging.rb └── travis │ ├── run-suite │ └── suites │ ├── application │ ├── assets │ │ ├── behat-javascript.yml │ │ └── old-behat.yml │ ├── before_install.sh │ ├── before_script.sh │ ├── install.sh │ ├── is_suitable.sh │ ├── script.sh │ └── script │ │ ├── test-behat-with-cli │ │ ├── test-behat-with-javascript │ │ ├── test-behat-without-javascript │ │ ├── test-doctrine-migrations │ │ ├── test-fixtures │ │ ├── test-infection │ │ ├── test-installer │ │ ├── test-phpspec │ │ ├── test-phpstan │ │ ├── test-phpunit │ │ ├── test-prod-requirements │ │ ├── test-psalm │ │ ├── validate-composer │ │ ├── validate-composer-security │ │ ├── validate-doctrine-schema │ │ ├── validate-twig │ │ ├── validate-yaml-files │ │ └── validate-yarn-packages │ ├── common │ ├── after_failure.sh │ ├── assets │ │ └── opcache.php.ini │ ├── before_install.sh │ └── install.sh │ └── docs │ ├── install.sh │ ├── is_suitable.sh │ └── script.sh ├── features ├── account │ ├── customer_account │ │ ├── changing_password.feature │ │ ├── changing_password_validation.feature │ │ ├── customer_profile_validation.feature │ │ └── editing_customer_profile.feature │ ├── registering.feature │ ├── registering_validation.feature │ ├── resetting_password.feature │ ├── resetting_password_validation.feature │ ├── signing_in.feature │ └── signing_in_validation.feature ├── admin │ └── dashboard.feature ├── installer │ └── install_command.feature ├── makefile │ ├── make_docs_build.feature │ ├── make_install.feature │ ├── make_lint.feature │ ├── make_start.feature │ ├── make_stop.feature │ └── make_test.feature └── user │ ├── managing_administrators │ ├── adding_administrator.feature │ ├── adding_avatar_to_administrator.feature │ ├── browsing_administrator.feature │ ├── deleting_administrators.feature │ ├── deleting_multiple_administrators.feature │ └── editing_administrator.feature │ └── managing_customers │ ├── browsing_customers.feature │ └── editing_customer.feature ├── gulpfile.babel.js ├── infection.json.dist ├── package.json ├── phpspec.yml.dist ├── phpstan.neon ├── phpunit.xml.dist ├── psalm.xml ├── public ├── .htaccess ├── apple-touch-icon.png ├── config.php ├── favicon.ico ├── index.php └── robots.txt ├── spec └── App │ ├── Collector │ └── AppCollectorSpec.php │ ├── Context │ └── CustomerContextSpec.php │ ├── Dashboard │ ├── DashboardStatisticsProviderSpec.php │ └── Statistics │ │ └── CustomerStatisticSpec.php │ ├── Entity │ ├── Customer │ │ └── CustomerSpec.php │ ├── OAuth │ │ └── ClientManagerSpec.php │ └── User │ │ ├── AdminAvatarSpec.php │ │ ├── AdminUserSpec.php │ │ └── AppUserSpec.php │ ├── EventListener │ ├── CanonicalizerListenerSpec.php │ ├── DefaultUsernameORMListenerSpec.php │ ├── PasswordUpdaterListenerSpec.php │ └── UserRegistrationListenerSpec.php │ ├── Form │ ├── EventSubscriber │ │ ├── AddUserFormSubscriberSpec.php │ │ └── CustomerRegistrationFormSubscriberSpec.php │ └── Extension │ │ ├── CustomerTypeExtensionSpec.php │ │ └── DateTypeExtensionSpec.php │ └── Validator │ └── Initializer │ └── CustomerInitializerSpec.php ├── src ├── .htaccess ├── Collector │ └── AppCollector.php ├── Command │ ├── Helper │ │ ├── CommandsRunner.php │ │ ├── DirectoryChecker.php │ │ └── ProgressBarCreator.php │ ├── Installer │ │ ├── CommandExecutor.php │ │ ├── InstallAssetsCommand.php │ │ ├── InstallCommand.php │ │ ├── InstallDatabaseCommand.php │ │ ├── InstallSampleDataCommand.php │ │ └── SetupCommand.php │ └── OauthServer │ │ └── CreateClientCommand.php ├── Context │ └── CustomerContext.php ├── Controller │ ├── .gitignore │ └── DashboardController.php ├── Dashboard │ ├── DashboardStatisticsProvider.php │ └── Statistics │ │ ├── CustomerStatistic.php │ │ └── StatisticInterface.php ├── DependencyInjection │ ├── AppExtension.php │ ├── Compiler │ │ └── ServicesPass.php │ └── Configuration.php ├── Entity │ ├── .gitignore │ ├── Customer │ │ ├── Customer.php │ │ └── CustomerInterface.php │ ├── IdentifiableTrait.php │ ├── Media │ │ ├── File.php │ │ └── FileInterface.php │ ├── OAuth │ │ ├── AccessToken.php │ │ ├── AuthCode.php │ │ ├── Client.php │ │ ├── ClientManager.php │ │ └── RefreshToken.php │ └── User │ │ ├── AdminAvatar.php │ │ ├── AdminAvatarInterface.php │ │ ├── AdminUser.php │ │ ├── AdminUserInterface.php │ │ ├── AppUser.php │ │ └── AppUserInterface.php ├── EventListener │ ├── CanonicalizerListener.php │ ├── DefaultUsernameORMListener.php │ ├── PasswordUpdaterListener.php │ └── UserRegistrationListener.php ├── Fixture │ ├── AbstractResourceFixture.php │ ├── AdminUserFixture.php │ ├── ApiClientFixture.php │ ├── AppUserFixture.php │ ├── Factory │ │ ├── AbstractExampleFactory.php │ │ ├── AdminUserExampleFactory.php │ │ ├── ApiClientExampleFactory.php │ │ ├── AppUserExampleFactory.php │ │ └── ExampleFactoryInterface.php │ └── OptionsResolver │ │ └── LazyOption.php ├── Form │ ├── EventSubscriber │ │ ├── AddUserFormSubscriber.php │ │ └── CustomerRegistrationFormSubscriber.php │ ├── Extension │ │ ├── CustomerTypeExtension.php │ │ └── DateTypeExtension.php │ └── Type │ │ ├── Customer │ │ ├── CustomerRegistrationType.php │ │ └── CustomerSimpleRegistrationType.php │ │ ├── DatePickerType.php │ │ ├── DateTimePickerType.php │ │ └── User │ │ ├── AdminAvatarType.php │ │ ├── AdminUserType.php │ │ ├── AppUserRegistrationType.php │ │ └── AppUserType.php ├── Formatter │ └── StringInflector.php ├── Installer │ ├── Checker │ │ └── CommandDirectoryChecker.php │ └── Provider │ │ ├── DatabaseSetupCommandsProvider.php │ │ └── DatabaseSetupCommandsProviderInterface.php ├── Kernel.php ├── Menu │ ├── AccountMenuBuilder.php │ └── AdminMenuBuilder.php ├── Migrations │ ├── .gitignore │ ├── Version20190416102143.php │ └── Version20191231140333.php ├── Repository │ ├── .gitignore │ ├── CustomerRepository.php │ └── UserRepository.php ├── Resources │ └── config │ │ ├── validation.yml │ │ └── validation │ │ └── customer.yml └── Validator │ └── Initializer │ └── CustomerInitializer.php ├── symfony.lock ├── templates ├── backend │ ├── _search.html.twig │ ├── _security.html.twig │ ├── admin_user │ │ ├── _avatar_image.html.twig │ │ └── _form.html.twig │ ├── crud │ │ ├── create.html.twig │ │ ├── create │ │ │ ├── _breadcrumb.html.twig │ │ │ ├── _content.html.twig │ │ │ └── _header.html.twig │ │ ├── index.html.twig │ │ ├── index │ │ │ ├── _breadcrumb.html.twig │ │ │ ├── _content.html.twig │ │ │ └── _header.html.twig │ │ ├── update.html.twig │ │ └── update │ │ │ ├── _breadcrumb.html.twig │ │ │ ├── _content.html.twig │ │ │ └── _header.html.twig │ ├── customer │ │ └── _form.html.twig │ ├── dashboard │ │ ├── _customers.html.twig │ │ ├── _menu.html.twig │ │ ├── _statistics.html.twig │ │ └── statistics │ │ │ └── _amount_of_customers.html.twig │ ├── form │ │ └── theme.html.twig │ ├── index.html.twig │ ├── layout.html.twig │ ├── macro │ │ ├── breadcrumb.html.twig │ │ ├── pagination.html.twig │ │ └── sorting.html.twig │ └── security │ │ └── login.html.twig ├── bundles │ └── SyliusUiBundle │ │ └── Form │ │ └── theme.html.twig ├── data_collector │ └── app.html.twig ├── emails │ ├── contactRequest.html.twig │ ├── passwordReset.html.twig │ ├── userRegistration.html.twig │ └── verification.html.twig └── frontend │ ├── _flashes.html.twig │ ├── _footer.html.twig │ ├── _header.html.twig │ ├── _menu.html.twig │ ├── account │ ├── changePassword.html.twig │ ├── dashboard.html.twig │ ├── layout.html.twig │ ├── requestPasswordReset.html.twig │ ├── resetPassword.html.twig │ └── updateProfile.html.twig │ ├── form │ └── theme.html.twig │ ├── homepage │ └── index.html.twig │ ├── layout.html.twig │ ├── login │ ├── _form.html.twig │ ├── _header.html.twig │ └── _register.html.twig │ ├── macro │ ├── buttons.html.twig │ └── pagination.html.twig │ ├── menu │ └── simple.html.twig │ ├── register │ ├── _form.html.twig │ └── _header.html.twig │ └── security │ ├── login.html.twig │ └── register.html.twig ├── tests ├── .gitignore ├── Behat │ ├── Behaviour │ │ └── Toggles.php │ ├── Context │ │ ├── Cli │ │ │ ├── CommandContext.php │ │ │ ├── DefaultContext.php │ │ │ ├── InstallerContext.php │ │ │ └── MakefileContext.php │ │ ├── Hook │ │ │ └── DoctrineORMContext.php │ │ ├── Setup │ │ │ ├── AdminSecurityContext.php │ │ │ ├── AdminUserContext.php │ │ │ ├── AppSecurityContext.php │ │ │ ├── CustomerContext.php │ │ │ └── UserContext.php │ │ ├── Transform │ │ │ ├── AdminUserContext.php │ │ │ ├── CustomerContext.php │ │ │ ├── SharedStorageContext.php │ │ │ └── UserContext.php │ │ └── Ui │ │ │ ├── Backend │ │ │ ├── DashboardContext.php │ │ │ ├── ManagingAdministratorsContext.php │ │ │ ├── ManagingCustomersContext.php │ │ │ └── NotificationContext.php │ │ │ ├── EmailContext.php │ │ │ └── Frontend │ │ │ ├── AccountContext.php │ │ │ ├── HomepageContext.php │ │ │ ├── LoginContext.php │ │ │ └── RegistrationContext.php │ ├── Element │ │ └── Backend │ │ │ └── TopBarElement.php │ ├── Exception │ │ └── NotificationExpectationMismatchException.php │ ├── NotificationType.php │ ├── Page │ │ ├── Backend │ │ │ ├── Administrator │ │ │ │ ├── CreatePage.php │ │ │ │ ├── IndexPage.php │ │ │ │ └── UpdatePage.php │ │ │ ├── Crud │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ │ ├── Customer │ │ │ │ ├── IndexPage.php │ │ │ │ └── UpdatePage.php │ │ │ └── DashboardPage.php │ │ └── Frontend │ │ │ ├── Account │ │ │ ├── ChangePasswordPage.php │ │ │ ├── DashboardPage.php │ │ │ ├── LoginPage.php │ │ │ ├── ProfileUpdatePage.php │ │ │ ├── RegisterPage.php │ │ │ ├── RequestPasswordResetPage.php │ │ │ ├── ResetPasswordPage.php │ │ │ └── VerificationPage.php │ │ │ └── HomePage.php │ └── Service │ │ ├── Accessor │ │ ├── NotificationAccessor.php │ │ ├── NotificationAccessorInterface.php │ │ ├── TableAccessor.php │ │ └── TableAccessorInterface.php │ │ ├── EmailChecker.php │ │ ├── EmailCheckerInterface.php │ │ ├── NotificationChecker.php │ │ ├── NotificationCheckerInterface.php │ │ ├── Resolver │ │ ├── CurrentPageResolver.php │ │ └── CurrentPageResolverInterface.php │ │ ├── SecurityService.php │ │ ├── SecurityServiceInterface.php │ │ ├── Setter │ │ ├── CookieSetter.php │ │ └── CookieSetterInterface.php │ │ ├── SharedSecurityService.php │ │ ├── SharedSecurityServiceInterface.php │ │ ├── SharedStorage.php │ │ └── SharedStorageInterface.php ├── Controller │ ├── AuthorizedHeaderTrait.php │ ├── Customer │ │ ├── LoginApiTest.php │ │ └── RefreshTokenApiTest.php │ └── JsonApiTestCase.php ├── DataFixtures │ └── ORM │ │ └── authentication │ │ └── api_user.yml ├── Resources │ └── troll.jpg └── Responses │ └── Expected │ ├── authentication │ └── new_access_token.json │ └── error │ └── not_found_response.json ├── translations ├── .gitignore ├── flashes.fr.yml ├── messages.en.yml └── messages.fr.yml ├── var ├── .gitkeep └── SymfonyRequirements.php ├── webpack.config.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { 4 | "targets": { 5 | "browsers": [ 6 | "last 2 versions", 7 | "Firefox ESR", 8 | "IE >= 9", 9 | "Android >= 4.0", 10 | "iOS >= 7" 11 | ] 12 | }, 13 | "modules": false, 14 | "exclude": [ 15 | "transform-async-to-generator", 16 | "transform-regenerator" 17 | ], 18 | "useBuiltIns": false 19 | }] 20 | ], 21 | "exclude": "node_modules/**" 22 | } 23 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629 2 | 3 | KERNEL_CLASS='App\Kernel' 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report---.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Bug Report \U0001F41B" 3 | about: Report a problem or error 4 | 5 | --- 6 | 7 | 8 | **ApiCore version affected**: 1.x.y 9 | 10 | **Description** 11 | 12 | 13 | **Steps to reproduce** 14 | 15 | 16 | **Possible Solution** 17 | 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-issue---.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Documentation Issue \U0001F4D6" 3 | about: Report missing or bugged documentation 4 | 5 | --- 6 | 7 | **ApiCore docs version**: 1.x / latest 8 | 9 | **Description** 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request--.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request ✅ 3 | about: Suggest an idea for a feature or improvement 4 | 5 | --- 6 | 7 | **Describe the proposed solution** 8 | 9 | 10 | **Describe alternatives you've considered** 11 | 12 | 13 | **Additional context** 14 | 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /app/config/parameters.yml 2 | /build/ 3 | /phpunit.xml 4 | /var/* 5 | !var/.gitkeep 6 | /vendor/ 7 | 8 | /public/assets 9 | /public/bundles 10 | /public/css 11 | /public/js 12 | /public/media 13 | 14 | **/node_modules/* 15 | 16 | .idea 17 | *.DS_Store 18 | 19 | /etc/build/* 20 | !/etc/build/.gitignore 21 | 22 | /behat.yml 23 | /phpspec.yml 24 | 25 | /Makefile* 26 | /!Makefile*.dist 27 | 28 | ###> symfony/framework-bundle ### 29 | /.env.*.local 30 | /.env.local 31 | /.env.local.php 32 | /public/bundles/ 33 | /public/media/* 34 | /var/ 35 | /vendor/ 36 | ###< symfony/framework-bundle ### 37 | ###> phpunit/phpunit ### 38 | /phpunit.xml 39 | ###< phpunit/phpunit ### 40 | ###> friendsofphp/php-cs-fixer ### 41 | /.php_cs 42 | /.php_cs.cache 43 | ###< friendsofphp/php-cs-fixer ### 44 | 45 | ###> infection/infection ### 46 | infection-log.txt 47 | coverage/* 48 | ###< infection/infection ### 49 | 50 | ###> symfony/webpack-encore-bundle ### 51 | /node_modules/ 52 | /public/build/ 53 | npm-debug.log 54 | yarn-error.log 55 | ###< symfony/webpack-encore-bundle ### 56 | 57 | ###> liip/imagine-bundle ### 58 | /public/media/cache/ 59 | ###< liip/imagine-bundle ### 60 | -------------------------------------------------------------------------------- /.php_cs.dist: -------------------------------------------------------------------------------- 1 | setRules([ 5 | '@Symfony' => true, 6 | 'array_syntax' => ['syntax' => 'short'], 7 | ]) 8 | ; 9 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'capistrano' 4 | gem 'capistrano-symfony' 5 | gem 'capistrano-composer' 6 | gem 'capistrano-file-permissions', :git => 'https://github.com/capistrano/file-permissions', :ref => '0122fe4' 7 | gem 'ed25519' 8 | gem 'bcrypt_pbkdf' 9 | gem 'ed25519' 10 | gem 'bcrypt_pbkdf' 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-2019 Monofony 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Makefile.dist: -------------------------------------------------------------------------------- 1 | include Makefile.install.dist 2 | include Makefile.test.dist 3 | include Makefile.validation.dist 4 | 5 | docs-build-default: 6 | cd docs && sphinx-build -b html . build -a 7 | 8 | install-default: composer-install app-install fixtures-load yarn-install yarn-build 9 | 10 | start-default: 11 | symfony server:start --no-tls ${ARGS} 12 | 13 | stop-default: 14 | symfony server:stop 15 | 16 | test-default: validate-all test-all 17 | 18 | lint-default: 19 | vendor/bin/php-cs-fixer fix src 20 | 21 | %: %-default 22 | @ true 23 | -------------------------------------------------------------------------------- /Makefile.install.dist: -------------------------------------------------------------------------------- 1 | composer-install-default: 2 | composer install --no-interaction 3 | 4 | app-install-default: 5 | bin/console app:install -n 6 | 7 | fixtures-load-default: 8 | bin/console sylius:fixtures:load default --no-interaction 9 | 10 | yarn-install-default: 11 | yarn install 12 | 13 | yarn-build-default: 14 | yarn encore production 15 | 16 | %: %-default 17 | @ true 18 | -------------------------------------------------------------------------------- /Makefile.validation.dist: -------------------------------------------------------------------------------- 1 | validate-all: validate-composer validate-security validate-doctrine-schema validate-twig validate-yaml-files 2 | 3 | validate-composer: 4 | composer validate --strict 5 | 6 | validate-doctrine-schema: 7 | bin/console doctrine:schema:validate 8 | 9 | validate-security: 10 | vendor/bin/security-checker security:check 11 | 12 | validate-twig: 13 | bin/console lint:twig templates 14 | 15 | validate-yaml-files: 16 | bin/console lint:yaml config --parse-tags 17 | -------------------------------------------------------------------------------- /assets/backend/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/assets/backend/img/avatar.png -------------------------------------------------------------------------------- /assets/backend/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/assets/backend/img/logo.png -------------------------------------------------------------------------------- /assets/backend/js/app-images-preview.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery'; 2 | 3 | const displayUploadedImage = function displayUploadedImage(input) { 4 | if (input.files && input.files[0]) { 5 | const reader = new FileReader(); 6 | 7 | reader.onload = (event) => { 8 | const image = $(input).parent().siblings('.image'); 9 | 10 | if (image.length > 0) { 11 | image.attr('src', event.target.result); 12 | } else { 13 | const img = $(''); 14 | img.attr('src', event.target.result); 15 | $(input).parent().before(img); 16 | } 17 | }; 18 | 19 | reader.readAsDataURL(input.files[0]); 20 | } 21 | }; 22 | 23 | $.fn.extend({ 24 | previewUploadedImage(root) { 25 | $(root).on('change', 'input[type="file"]', function() { 26 | displayUploadedImage(this); 27 | }); 28 | }, 29 | }); 30 | -------------------------------------------------------------------------------- /assets/backend/js/app.js: -------------------------------------------------------------------------------- 1 | import '../../common/js/app'; 2 | 3 | import 'semantic-ui-calendar/dist/calendar'; 4 | 5 | import './app-date-time-picker'; 6 | import './app-images-preview'; 7 | import './sylius-compound-form-errors'; 8 | 9 | import '../scss/main.scss'; 10 | 11 | $(document).ready(function () { 12 | $(document).previewUploadedImage('#sylius_admin_user_avatar'); 13 | $('.sylius-autocomplete').autoComplete(); 14 | $('.sylius-tabular-form').addTabErrors(); 15 | $('.ui.accordion').addAccordionErrors(); 16 | $('#sylius_customer_createUser').change(function () { 17 | $('#user-form').toggle(); 18 | }); 19 | 20 | $('.app-date-picker').datePicker(); 21 | $('.app-date-time-picker').dateTimePicker(); 22 | }); 23 | -------------------------------------------------------------------------------- /assets/backend/scss/main.scss: -------------------------------------------------------------------------------- 1 | @import "../../common/scss/style"; 2 | -------------------------------------------------------------------------------- /assets/backend/webpack.config.js: -------------------------------------------------------------------------------- 1 | var build = require('../config-builder'); 2 | 3 | module.exports = build('backend'); 4 | -------------------------------------------------------------------------------- /assets/common/js/app.js: -------------------------------------------------------------------------------- 1 | import './shim-polyfill'; 2 | import './shim-semantic-ui'; 3 | 4 | import 'semantic-ui-css/components/accordion'; 5 | import '../../../vendor/sylius/ui-bundle/Resources/private/js/app'; 6 | import '../../../vendor/sylius/ui-bundle/Resources/private/js/sylius-auto-complete'; 7 | -------------------------------------------------------------------------------- /assets/common/js/shim-polyfill.js: -------------------------------------------------------------------------------- 1 | import 'babel-polyfill'; 2 | -------------------------------------------------------------------------------- /assets/common/js/shim-semantic-ui.js: -------------------------------------------------------------------------------- 1 | import 'semantic-ui-css/components/accordion'; 2 | import 'semantic-ui-css/components/api'; 3 | import 'semantic-ui-css/components/calendar'; 4 | import 'semantic-ui-css/components/checkbox'; 5 | import 'semantic-ui-css/components/dimmer'; 6 | import 'semantic-ui-css/components/dropdown'; 7 | import 'semantic-ui-css/components/embed'; 8 | import 'semantic-ui-css/components/form'; 9 | import 'semantic-ui-css/components/modal'; 10 | import 'semantic-ui-css/components/nag'; 11 | import 'semantic-ui-css/components/popup'; 12 | import 'semantic-ui-css/components/progress'; 13 | import 'semantic-ui-css/components/range'; 14 | import 'semantic-ui-css/components/rating'; 15 | import 'semantic-ui-css/components/search'; 16 | import 'semantic-ui-css/components/shape'; 17 | import 'semantic-ui-css/components/sidebar'; 18 | import 'semantic-ui-css/components/site'; 19 | import 'semantic-ui-css/components/slider'; 20 | import 'semantic-ui-css/components/state'; 21 | import 'semantic-ui-css/components/sticky'; 22 | import 'semantic-ui-css/components/tab'; 23 | import 'semantic-ui-css/components/toast'; 24 | import 'semantic-ui-css/components/transition'; 25 | import 'semantic-ui-css/components/visibility'; 26 | -------------------------------------------------------------------------------- /assets/common/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "../../../vendor/sylius/ui-bundle/Resources/private/sass/main"; 2 | @import "ui"; 3 | -------------------------------------------------------------------------------- /assets/frontend/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/assets/frontend/img/logo.png -------------------------------------------------------------------------------- /assets/frontend/js/app.js: -------------------------------------------------------------------------------- 1 | import '../../common/js/app'; 2 | import '../scss/main.scss'; 3 | 4 | 5 | $(document).ready(function () { 6 | $('.sylius-autocomplete').autoComplete(); 7 | }); 8 | -------------------------------------------------------------------------------- /assets/frontend/js/shim-lightbox.js: -------------------------------------------------------------------------------- 1 | import lightbox from 'lightbox2'; 2 | 3 | window.lightbox = lightbox; 4 | -------------------------------------------------------------------------------- /assets/frontend/scss/main.scss: -------------------------------------------------------------------------------- 1 | @import "../../common/scss/style"; 2 | -------------------------------------------------------------------------------- /assets/frontend/webpack.config.js: -------------------------------------------------------------------------------- 1 | var build = require('../config-builder'); 2 | 3 | module.exports = build('frontend'); 4 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(['--env', '-e'], null, true)) { 19 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 20 | } 21 | 22 | if ($input->hasParameterOption('--no-debug', true)) { 23 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 24 | } 25 | 26 | require dirname(__DIR__).'/config/bootstrap.php'; 27 | 28 | if ($_SERVER['APP_DEBUG']) { 29 | umask(0000); 30 | 31 | if (class_exists(Debug::class)) { 32 | Debug::enable(); 33 | } 34 | } 35 | 36 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 37 | $application = new Application($kernel); 38 | $application->run($input); 39 | -------------------------------------------------------------------------------- /config/bootstrap.php: -------------------------------------------------------------------------------- 1 | =1.2) 9 | if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { 10 | $_SERVER += $env; 11 | $_ENV += $env; 12 | } elseif (!class_exists(Dotenv::class)) { 13 | throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); 14 | } else { 15 | // load all the .env files 16 | (new Dotenv(true))->loadEnv(dirname(__DIR__).'/.env'); 17 | } 18 | 19 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; 20 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; 21 | $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; 22 | -------------------------------------------------------------------------------- /config/packages/api_platform.yaml: -------------------------------------------------------------------------------- 1 | api_platform: 2 | version: !php/const App\Kernel::VERSION 3 | mapping: 4 | paths: ['%kernel.project_dir%/src/Entity'] 5 | patch_formats: 6 | json: ['application/merge-patch+json'] 7 | swagger: 8 | versions: [3] 9 | -------------------------------------------------------------------------------- /config/packages/assets.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | assets: 3 | json_manifest_path: '%kernel.project_dir%/public/assets/backend/manifest.json' 4 | packages: 5 | backend: 6 | json_manifest_path: '%kernel.project_dir%/public/assets/backend/manifest.json' 7 | frontend: 8 | json_manifest_path: '%kernel.project_dir%/public/assets/frontend/manifest.json' 9 | -------------------------------------------------------------------------------- /config/packages/dev/debug.yaml: -------------------------------------------------------------------------------- 1 | debug: 2 | # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. 3 | # See the "server:dump" command to start a new server. 4 | dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" 5 | -------------------------------------------------------------------------------- /config/packages/dev/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | json: 4 | options: 5 | - JSON_PRETTY_PRINT 6 | - JSON_UNESCAPED_SLASHES 7 | - JSON_PRESERVE_ZERO_FRACTION 8 | -------------------------------------------------------------------------------- /config/packages/dev/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | # uncomment to get logging in your browser 9 | # you may have to allow bigger header sizes in your Web server configuration 10 | #firephp: 11 | # type: firephp 12 | # level: info 13 | #chromephp: 14 | # type: chromephp 15 | # level: info 16 | console: 17 | type: console 18 | process_psr_3_messages: false 19 | channels: ["!event", "!doctrine", "!console"] 20 | -------------------------------------------------------------------------------- /config/packages/dev/nelmio_alice.yaml: -------------------------------------------------------------------------------- 1 | nelmio_alice: 2 | functions_blacklist: 3 | - 'current' 4 | -------------------------------------------------------------------------------- /config/packages/dev/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/dev/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | # See https://symfony.com/doc/current/email/dev_environment.html 2 | swiftmailer: 3 | # send all emails to a specific address 4 | #delivery_addresses: ['me@example.com'] 5 | -------------------------------------------------------------------------------- /config/packages/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: true 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { only_exceptions: false } 7 | -------------------------------------------------------------------------------- /config/packages/doctrine.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | # Adds a fallback DATABASE_URL if the env var is not set. 3 | # This allows you to run cache:warmup even if your 4 | # environment variables are not available yet. 5 | # You should not need to change this value. 6 | env(DATABASE_URL): '' 7 | 8 | doctrine: 9 | dbal: 10 | # configure these for your database server 11 | driver: 'pdo_mysql' 12 | server_version: '5.6' 13 | charset: utf8 14 | default_table_options: 15 | charset: utf8 16 | collate: utf8_unicode_ci 17 | 18 | url: '%env(resolve:DATABASE_URL)%' 19 | 20 | orm: 21 | auto_generate_proxy_classes: '%kernel.debug%' 22 | naming_strategy: doctrine.orm.naming_strategy.underscore 23 | auto_mapping: true 24 | mappings: 25 | App: 26 | is_bundle: false 27 | type: annotation 28 | dir: '%kernel.project_dir%/src/Entity' 29 | prefix: 'App\Entity' 30 | alias: App 31 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | dir_name: '%kernel.project_dir%/src/Migrations' 3 | namespace: App\Migrations 4 | -------------------------------------------------------------------------------- /config/packages/eight_points_guzzle.yaml: -------------------------------------------------------------------------------- 1 | eight_points_guzzle: 2 | clients: 3 | my_client: 4 | # Write here the host where to do requests 5 | # base_url: "http://target.url" 6 | 7 | options: 8 | timeout: 30 9 | 10 | # Configure headers. 11 | # More info: http://docs.guzzlephp.org/en/stable/request-options.html#headers 12 | headers: 13 | User-Agent: "EightpointsGuzzleBundle/7.0" 14 | 15 | # Find plugins here: 16 | # https://github.com/8p/EightPointsGuzzleBundle#known-and-supported-plugins 17 | plugin: ~ 18 | -------------------------------------------------------------------------------- /config/packages/fos_oauth_server.yaml: -------------------------------------------------------------------------------- 1 | fos_oauth_server: 2 | db_driver: orm 3 | client_class: App\Entity\OAuth\Client 4 | access_token_class: App\Entity\OAuth\AccessToken 5 | refresh_token_class: App\Entity\OAuth\RefreshToken 6 | auth_code_class: App\Entity\OAuth\AuthCode 7 | service: 8 | user_provider: sylius.app_user_provider.email_or_name_based 9 | client_manager: App\Entity\OAuth\ClientManager 10 | -------------------------------------------------------------------------------- /config/packages/fos_rest.yaml: -------------------------------------------------------------------------------- 1 | fos_rest: 2 | exception: true 3 | view: 4 | formats: 5 | json: true 6 | xml: true 7 | empty_content: 204 8 | format_listener: 9 | rules: 10 | - { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } 11 | - { path: '^/', stop: true } 12 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | locale: fr_FR 3 | secret: '%env(resolve:APP_SECRET)%' 4 | 5 | framework: 6 | #esi: ~ 7 | translator: { fallbacks: ["%locale%"] } 8 | secret: "%secret%" 9 | form: ~ 10 | csrf_protection: ~ 11 | validation: { enable_annotations: true } 12 | #serializer: { enable_annotations: true } 13 | templating: 14 | engines: ['twig'] 15 | default_locale: "%locale%" 16 | trusted_hosts: ~ 17 | session: 18 | # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id 19 | handler_id: ~ 20 | fragments: ~ 21 | http_method_override: true 22 | php_errors: 23 | log: true 24 | -------------------------------------------------------------------------------- /config/packages/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | xml: 4 | format_output: '%kernel.debug%' 5 | # metadata: 6 | # auto_detection: false 7 | # directories: 8 | # any-name: 9 | # namespace_prefix: "My\\FooBundle" 10 | # path: "@MyFooBundle/Resources/config/serializer" 11 | # another-name: 12 | # namespace_prefix: "My\\BarBundle" 13 | # path: "@MyBarBundle/Resources/config/serializer" 14 | -------------------------------------------------------------------------------- /config/packages/liip_imagine.yaml: -------------------------------------------------------------------------------- 1 | # See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html 2 | liip_imagine: 3 | # valid drivers options include "gd" or "gmagick" or "imagick" 4 | driver: "gd" 5 | loaders: 6 | default: 7 | filesystem: 8 | locator: filesystem_insecure 9 | data_root: 10 | - '%kernel.project_dir%/public' 11 | filter_sets: 12 | # @see http://symfony.com/doc/current/bundles/LiipImagineBundle/filters.html 13 | cache: ~ 14 | default: 15 | quality: 100 16 | filters: 17 | auto_rotate: ~ 18 | relative_resize: { scale: 1 } 19 | app_backend_admin_user_avatar_thumbnail: 20 | filters: 21 | thumbnail: { size: [50, 50], mode: outbound } 22 | -------------------------------------------------------------------------------- /config/packages/nelmio_cors.yaml: -------------------------------------------------------------------------------- 1 | nelmio_cors: 2 | defaults: 3 | origin_regex: true 4 | allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] 5 | allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] 6 | allow_headers: ['Content-Type', 'Authorization'] 7 | expose_headers: ['Link'] 8 | max_age: 3600 9 | paths: 10 | '^/': null 11 | -------------------------------------------------------------------------------- /config/packages/prod/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | orm: 3 | metadata_cache_driver: 4 | type: service 5 | id: doctrine.system_cache_provider 6 | query_cache_driver: 7 | type: service 8 | id: doctrine.system_cache_provider 9 | result_cache_driver: 10 | type: service 11 | id: doctrine.result_cache_provider 12 | 13 | services: 14 | doctrine.result_cache_provider: 15 | class: Symfony\Component\Cache\DoctrineProvider 16 | public: false 17 | arguments: 18 | - '@doctrine.result_cache_pool' 19 | doctrine.system_cache_provider: 20 | class: Symfony\Component\Cache\DoctrineProvider 21 | public: false 22 | arguments: 23 | - '@doctrine.system_cache_pool' 24 | 25 | framework: 26 | cache: 27 | pools: 28 | doctrine.result_cache_pool: 29 | adapter: cache.app 30 | doctrine.system_cache_pool: 31 | adapter: cache.system 32 | -------------------------------------------------------------------------------- /config/packages/prod/jms_serializer.yaml: -------------------------------------------------------------------------------- 1 | jms_serializer: 2 | visitors: 3 | json: 4 | options: 5 | - JSON_UNESCAPED_SLASHES 6 | - JSON_PRESERVE_ZERO_FRACTION 7 | -------------------------------------------------------------------------------- /config/packages/prod/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_404s: 8 | # regex: exclude all 404 errors from the logs 9 | - ^/ 10 | nested: 11 | type: stream 12 | path: "%kernel.logs_dir%/%kernel.environment%.log" 13 | level: debug 14 | console: 15 | type: console 16 | process_psr_3_messages: false 17 | channels: ["!event", "!doctrine"] 18 | -------------------------------------------------------------------------------- /config/packages/prod/webpack_encore.yaml: -------------------------------------------------------------------------------- 1 | #webpack_encore: 2 | # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) 3 | # Available in version 1.2 4 | #cache: true 5 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: ~ 4 | -------------------------------------------------------------------------------- /config/packages/security_checker.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | SensioLabs\Security\SecurityChecker: ~ 7 | 8 | SensioLabs\Security\Command\SecurityCheckerCommand: ~ 9 | -------------------------------------------------------------------------------- /config/packages/sonata_block.yaml: -------------------------------------------------------------------------------- 1 | sonata_block: 2 | blocks: 3 | sonata.block.service.template: 4 | settings: 5 | customer: ~ 6 | form: ~ 7 | resource: ~ 8 | resources: ~ 9 | -------------------------------------------------------------------------------- /config/packages/sonata_core.yaml: -------------------------------------------------------------------------------- 1 | sonata_core: 2 | form: 3 | mapping: 4 | enabled: false 5 | -------------------------------------------------------------------------------- /config/packages/stof_doctrine_extensions.yaml: -------------------------------------------------------------------------------- 1 | # Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html 2 | # See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/ 3 | stof_doctrine_extensions: 4 | default_locale: "%locale%" 5 | orm: 6 | default: 7 | tree: true 8 | sluggable: true 9 | timestampable: true 10 | softdeleteable: false 11 | sortable: true 12 | -------------------------------------------------------------------------------- /config/packages/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | 2 | swiftmailer: 3 | url: '%env(MAILER_URL)%' 4 | spool: { type: 'memory' } 5 | -------------------------------------------------------------------------------- /config/packages/sylius_customer.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@SyliusCustomerBundle/Resources/config/app/config.yml" } 3 | 4 | sylius_customer: 5 | resources: 6 | customer: 7 | classes: 8 | model: App\Entity\Customer\Customer 9 | repository: App\Repository\CustomerRepository 10 | -------------------------------------------------------------------------------- /config/packages/sylius_mailer.yaml: -------------------------------------------------------------------------------- 1 | sylius_mailer: 2 | sender: 3 | name: '%email_name%' 4 | address: '%email_sender%' 5 | emails: 6 | contact_request: 7 | subject: app.emails.contact_request.subject 8 | template: emails/contactRequest.html.twig 9 | user_registration: 10 | subject: app.emails.user_registration.subject 11 | template: emails/userRegistration.html.twig 12 | reset_password_token: 13 | subject: app.emails.user.password_reset.subject 14 | template: emails/passwordReset.html.twig 15 | verification_token: 16 | subject: app.emails.user.verification_token.subject 17 | template: emails/verification.html.twig 18 | 19 | -------------------------------------------------------------------------------- /config/packages/sylius_resource.yaml: -------------------------------------------------------------------------------- 1 | sylius_resource: 2 | resources: ~ 3 | -------------------------------------------------------------------------------- /config/packages/sylius_user.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@SyliusUserBundle/Resources/config/app/config.yml" } 3 | 4 | security: 5 | encoders: 6 | argon2i: argon2id 7 | 8 | sylius_user: 9 | resources: 10 | app: 11 | user: 12 | classes: 13 | model: App\Entity\User\AppUser 14 | repository: App\Repository\UserRepository 15 | form: App\Form\Type\User\AppUserType 16 | admin: 17 | user: 18 | classes: 19 | model: App\Entity\User\AdminUser 20 | repository: Sylius\Bundle\UserBundle\Doctrine\ORM\UserRepository 21 | form: App\Form\Type\User\AdminUserType 22 | admin_oauth: 23 | user: 24 | classes: 25 | model: Sylius\Component\User\Model\UserOAuth 26 | interface: Sylius\Component\User\Model\UserOAuthInterface 27 | controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController 28 | -------------------------------------------------------------------------------- /config/packages/test/fidry_alice_data_fixtures.yaml: -------------------------------------------------------------------------------- 1 | fidry_alice_data_fixtures: 2 | default_purge_mode: no_purge 3 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | locale: en_US 3 | 4 | framework: 5 | test: ~ 6 | session: 7 | storage_id: session.storage.mock_file 8 | -------------------------------------------------------------------------------- /config/packages/test/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | -------------------------------------------------------------------------------- /config/packages/test/nelmio_alice.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: ../dev/nelmio_alice.yaml } 3 | -------------------------------------------------------------------------------- /config/packages/test/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: true 4 | -------------------------------------------------------------------------------- /config/packages/test/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | disable_delivery: true 3 | logging: true 4 | spool: 5 | type: file 6 | path: "%kernel.cache_dir%/spool" 7 | -------------------------------------------------------------------------------- /config/packages/test/translation.yaml: -------------------------------------------------------------------------------- 1 | parameters: 2 | locale: en_US 3 | 4 | framework: 5 | default_locale: '%locale%' 6 | translator: 7 | paths: 8 | - '%kernel.project_dir%/translations' 9 | fallbacks: 10 | - '%locale%' 11 | -------------------------------------------------------------------------------- /config/packages/test/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler: 2 | toolbar: false 3 | intercept_redirects: false 4 | 5 | framework: 6 | profiler: { collect: false } 7 | -------------------------------------------------------------------------------- /config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: '%locale%' 3 | translator: 4 | default_path: '%kernel.project_dir%/translations' 5 | fallbacks: 6 | - '%locale%' 7 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | debug: "%kernel.debug%" 3 | strict_variables: "%kernel.debug%" 4 | globals: 5 | app_name_meta: 6 | version: !php/const App\Kernel::VERSION 7 | -------------------------------------------------------------------------------- /config/packages/twig_extensions.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | public: false 4 | autowire: true 5 | autoconfigure: true 6 | 7 | # Uncomment any lines below to activate that Twig extension 8 | Twig\Extensions\ArrayExtension: ~ 9 | #Twig\Extensions\DateExtension: ~ 10 | Twig\Extensions\IntlExtension: ~ 11 | Twig\Extensions\TextExtension: ~ 12 | -------------------------------------------------------------------------------- /config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | email_validation_mode: html5 4 | -------------------------------------------------------------------------------- /config/packages/vich_uploader.yaml: -------------------------------------------------------------------------------- 1 | vich_uploader: 2 | db_driver: orm 3 | 4 | mappings: 5 | admin_avatar: 6 | uri_prefix: /media/avatar 7 | upload_destination: '%kernel.project_dir%/public/media/avatar' 8 | namer: Vich\UploaderBundle\Naming\OrignameNamer 9 | -------------------------------------------------------------------------------- /config/packages/webpack_encore.yaml: -------------------------------------------------------------------------------- 1 | webpack_encore: 2 | # The path where Encore is building the assets. 3 | # This should match Encore.setOutputPath() in webpack.config.js. 4 | output_path: '%kernel.project_dir%/public/build' 5 | # If multiple builds are defined (as shown below), you can disable the default build: 6 | # output_path: false 7 | 8 | # if using Encore.enableIntegrityHashes() specify the crossorigin attribute value (default: false, or use 'anonymous' or 'use-credentials') 9 | # crossorigin: 'anonymous' 10 | 11 | # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes). 12 | # To enable caching for the production environment, creating a webpack_encore.yaml in the config/packages/prod directory with this value set to true 13 | # Available in version 1.2 14 | #cache: false 15 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | app_backend: 2 | resource: "routes/backend.yaml" 3 | prefix: admin 4 | 5 | app_frontend: 6 | resource: "routes/frontend.yaml" 7 | 8 | app_api: 9 | resource: "routes/api.yaml" 10 | prefix: /api 11 | defaults: 12 | _format: json 13 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | controllers: 2 | resource: ../../src/Controller/ 3 | type: annotation 4 | -------------------------------------------------------------------------------- /config/routes/api.yaml: -------------------------------------------------------------------------------- 1 | #app_api_your_respource: 2 | # resource: "api/your_resource.yaml" 3 | 4 | fos_oauth_server_token: 5 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" 6 | 7 | fos_oauth_server_authorize: 8 | resource: "@FOSOAuthServerBundle/Resources/config/routing/authorize.xml" 9 | -------------------------------------------------------------------------------- /config/routes/api_platform.yaml: -------------------------------------------------------------------------------- 1 | api_platform: 2 | resource: . 3 | type: api_platform 4 | prefix: /api 5 | -------------------------------------------------------------------------------- /config/routes/backend.yaml: -------------------------------------------------------------------------------- 1 | app_backend_dashboard: 2 | path: / 3 | defaults: 4 | _controller: App\Controller\DashboardController:indexAction 5 | template: 'backend/index.html.twig' 6 | 7 | app_backend_partial: 8 | resource: "backend/partial.yaml" 9 | prefix: /_partial 10 | 11 | sylius_backend_admin_user: 12 | resource: "backend/admin_user.yaml" 13 | 14 | sylius_backend_customer: 15 | resource: "backend/customer.yaml" 16 | 17 | sylius_backend_security: 18 | resource: "backend/security.yaml" 19 | -------------------------------------------------------------------------------- /config/routes/backend/admin_user.yaml: -------------------------------------------------------------------------------- 1 | sylius_backend_admin_user: 2 | resource: | 3 | alias: sylius.admin_user 4 | section: backend 5 | path: users 6 | except: ['show'] 7 | redirect: index 8 | grid: sylius_backend_admin_user 9 | vars: 10 | all: 11 | subheader: sylius.ui.manage_users_able_to_access_administration_panel 12 | templates: 13 | form: backend/admin_user/_form.html.twig 14 | index: 15 | icon: lock 16 | templates: backend/crud 17 | type: sylius.resource 18 | -------------------------------------------------------------------------------- /config/routes/backend/customer.yaml: -------------------------------------------------------------------------------- 1 | sylius_backend_customer: 2 | resource: | 3 | section: backend 4 | alias: sylius.customer 5 | templates: 'backend/crud' 6 | grid: sylius_backend_customer 7 | redirect: index 8 | vars: 9 | all: 10 | subheader: sylius.ui.manage_your_customers 11 | templates: 12 | form: backend/customer/_form.html.twig 13 | index: 14 | icon: users 15 | type: sylius.resource -------------------------------------------------------------------------------- /config/routes/backend/partial.yaml: -------------------------------------------------------------------------------- 1 | sylius_backend_partial_customer: 2 | resource: partial/customer.yaml 3 | prefix: /customers 4 | -------------------------------------------------------------------------------- /config/routes/backend/partial/customer.yaml: -------------------------------------------------------------------------------- 1 | sylius_backend_partial_customer_latest: 2 | path: /latest/{count} 3 | methods: [GET] 4 | defaults: 5 | _controller: sylius.controller.customer::indexAction 6 | _sylius: 7 | repository: 8 | method: findLatest 9 | arguments: ['!!int $count'] 10 | template: $template 11 | -------------------------------------------------------------------------------- /config/routes/backend/security.yaml: -------------------------------------------------------------------------------- 1 | sylius_backend_login: 2 | path: /login 3 | defaults: 4 | _controller: sylius.controller.security:loginAction 5 | _sylius: 6 | template: backend/security/login.html.twig 7 | permission: true 8 | 9 | sylius_backend_login_check: 10 | path: /login-check 11 | defaults: 12 | _controller: sylius.controller.security:checkAction 13 | 14 | sylius_backend_logout: 15 | path: /logout 16 | -------------------------------------------------------------------------------- /config/routes/dev/twig.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@TwigBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /config/routes/dev/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | web_profiler_wdt: 2 | resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' 3 | prefix: /_wdt 4 | 5 | web_profiler_profiler: 6 | resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' 7 | prefix: /_profiler 8 | -------------------------------------------------------------------------------- /config/routes/frontend.yaml: -------------------------------------------------------------------------------- 1 | app_frontend_homepage: 2 | path: / 3 | defaults: 4 | _controller: FrameworkBundle:Template:template 5 | template: 'frontend/homepage/index.html.twig' 6 | 7 | app_account: 8 | resource: "frontend/account.yaml" 9 | prefix: "mon-compte" 10 | 11 | sylius_security: 12 | resource: "frontend/security.yaml" 13 | 14 | app_frontend_partial: 15 | resource: "frontend/partial.yaml" 16 | prefix: "/_partial" 17 | -------------------------------------------------------------------------------- /config/routes/frontend/partial.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/config/routes/frontend/partial.yaml -------------------------------------------------------------------------------- /config/routes/liip_imagine.yaml: -------------------------------------------------------------------------------- 1 | _liip_imagine: 2 | resource: "@LiipImagineBundle/Resources/config/routing.yaml" 3 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: services/_main.yaml } 3 | - { resource: services/command.yaml } 4 | - { resource: services/context.yaml } 5 | - { resource: services/dashboard.yaml } 6 | - { resource: services/fixtures.yaml } 7 | - { resource: services/fixtures_factories.yaml } 8 | - { resource: services/form.yaml } 9 | - { resource: services/installer.yaml } 10 | - { resource: services/listener.yaml } 11 | - { resource: services/menu.yaml } 12 | - { resource: services/validator.yaml } 13 | 14 | -------------------------------------------------------------------------------- /config/services/command.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | command_handlers: 7 | namespace: App\Command\ 8 | resource: '../../src/Command/*' 9 | 10 | App\Command\Installer\InstallCommand: 11 | arguments: 12 | $cacheDir: '%kernel.cache_dir%' 13 | 14 | App\Command\Installer\InstallDatabaseCommand: 15 | arguments: 16 | $environment: '%kernel.environment%' 17 | 18 | App\Command\Installer\InstallAssetsCommand: 19 | arguments: 20 | $publicDir: '%kernel.project_dir%/public' 21 | $environment: '%kernel.environment%' 22 | 23 | App\Command\Installer\InstallSampleDataCommand: 24 | arguments: 25 | $publicDir: '%kernel.project_dir%/public' 26 | $environment: '%kernel.environment%' 27 | -------------------------------------------------------------------------------- /config/services/context.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | app.context.customer: 12 | class: App\Context\CustomerContext 13 | arguments: 14 | - "@security.token_storage" 15 | - "@security.authorization_checker" 16 | public: true 17 | -------------------------------------------------------------------------------- /config/services/dashboard.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | App\Dashboard\DashboardStatisticsProvider: 7 | arguments: [!tagged_iterator { tag: app.dashboard_statistic }] 8 | -------------------------------------------------------------------------------- /config/services/fixtures.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | App\Fixture\AdminUserFixture: 7 | arguments: 8 | $exampleFactory: '@App\Fixture\Factory\AdminUserExampleFactory' 9 | 10 | App\Fixture\AppUserFixture: 11 | arguments: 12 | $exampleFactory: '@App\Fixture\Factory\AppUserExampleFactory' 13 | 14 | App\Fixture\ApiClientFixture: 15 | arguments: 16 | $exampleFactory: '@App\Fixture\Factory\ApiClientExampleFactory' 17 | -------------------------------------------------------------------------------- /config/services/fixtures_factories.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Fixture\Factory\: 3 | resource: '../../src/Fixture/Factory/*' 4 | autowire: true 5 | public: true 6 | -------------------------------------------------------------------------------- /config/services/installer.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | App\Installer\Checker\CommandDirectoryChecker: 12 | public: true 13 | arguments: 14 | - "@filesystem" 15 | 16 | App\Installer\Provider\DatabaseSetupCommandsProvider: 17 | public: true 18 | arguments: 19 | - "@doctrine" 20 | 21 | App\Installer\Provider\DatabaseSetupCommandsProviderInterface: '@App\Installer\Provider\DatabaseSetupCommandsProvider' 22 | -------------------------------------------------------------------------------- /config/services/listener.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | 5 | App\EventListener\CanonicalizerListener: 6 | tags: 7 | - { name: doctrine.event_listener, event: prePersist } 8 | - { name: doctrine.event_listener, event: preUpdate } 9 | 10 | App\EventListener\DefaultUsernameORMListener: 11 | tags: 12 | - { name: doctrine.event_listener, event: onFlush } 13 | 14 | App\EventListener\UserRegistrationListener: 15 | tags: 16 | - { name: kernel.event_listener, event: sylius.customer.post_register, method: handleUserVerification } 17 | -------------------------------------------------------------------------------- /config/services/menu.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | 5 | App\Menu\AdminMenuBuilder: 6 | tags: 7 | - { name: knp_menu.menu_builder, method: createMenu, alias: app.admin.main } # The alias is what is used to retrieve the menu 8 | 9 | App\Menu\AccountMenuBuilder: 10 | tags: 11 | - { name: knp_menu.menu_builder, method: createMenu, alias: app.account } # The alias is what is used to retrieve the menu 12 | -------------------------------------------------------------------------------- /config/services/validator.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | sylius.validator.customer_initializer: 12 | class: App\Validator\Initializer\CustomerInitializer 13 | arguments: 14 | - "@sylius.canonicalizer" 15 | tags: 16 | - { name: validator.initializer } -------------------------------------------------------------------------------- /config/services_test/contexts.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: contexts/cli.yaml } 3 | - { resource: contexts/hook.yaml } 4 | - { resource: contexts/setup.yaml } 5 | - { resource: contexts/transform.yaml } 6 | - { resource: contexts/ui.yaml } 7 | -------------------------------------------------------------------------------- /config/services_test/contexts/cli.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Tests\Behat\Context\Cli\: 3 | resource: '../../../tests/Behat/Context/Cli/*' 4 | autowire: true 5 | public: true 6 | -------------------------------------------------------------------------------- /config/services_test/contexts/hook.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | App\Tests\Behat\Context\Hook\: 12 | resource: '../../../tests/Behat/Context/Hook/*' 13 | autowire: true 14 | public: true 15 | -------------------------------------------------------------------------------- /config/services_test/contexts/setup.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | _defaults: 12 | public: true 13 | autowire: true 14 | 15 | App\Tests\Behat\Context\Setup\: 16 | resource: '../../../tests/Behat/Context/Setup/*' 17 | autowire: true 18 | public: true 19 | 20 | App\Tests\Behat\Context\Setup\AdminSecurityContext: 21 | arguments: 22 | $securityService: "@app.behat.admin_security" 23 | 24 | App\Tests\Behat\Context\Setup\AppSecurityContext: 25 | arguments: 26 | $securityService: "@app.behat.app_security" 27 | -------------------------------------------------------------------------------- /config/services_test/contexts/transform.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | _defaults: 12 | public: true 13 | autowire: true 14 | 15 | App\Tests\Behat\Context\Transform\: 16 | resource: '../../../tests/Behat/Context/Transform/*' 17 | autowire: true 18 | public: true 19 | -------------------------------------------------------------------------------- /config/services_test/contexts/ui.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | _defaults: 12 | public: true 13 | autowire: true 14 | 15 | App\Tests\Behat\Context\Ui\: 16 | resource: '../../../tests/Behat/Context/Ui/*' 17 | autowire: true 18 | public: true 19 | -------------------------------------------------------------------------------- /config/services_test/elements.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | app.behat.element: 3 | class: FriendsOfBehat\PageObjectExtension\Element\Element 4 | abstract: true 5 | public: false 6 | arguments: 7 | $session: '@behat.mink.default_session' 8 | $minkParameters: '@behat.mink.parameters' 9 | 10 | App\Tests\Behat\Element\: 11 | resource: '../../tests/Behat/Element/*' 12 | parent: app.behat.element 13 | public: false 14 | -------------------------------------------------------------------------------- /config/services_test/pages.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: pages/backend.yaml } 3 | - { resource: pages/frontend.yaml } 4 | 5 | # Learn more about services, parameters and containers at 6 | # http://symfony.com/doc/current/book/service_container.html 7 | parameters: 8 | # parameter_name: value 9 | 10 | services: 11 | # service_name: 12 | # class: App\Directory\ClassName 13 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 14 | 15 | app.behat.page: 16 | class: FriendsOfBehat\PageObjectExtension\Page\Page 17 | abstract: true 18 | public: false 19 | arguments: 20 | - "@behat.mink.default_session" 21 | - "@behat.mink.parameters" 22 | 23 | app.behat.symfony_page: 24 | class: FriendsOfBehat\PageObjectExtension\Page\SymfonyPage 25 | parent: app.behat.page 26 | abstract: true 27 | public: false 28 | arguments: 29 | - "@router" -------------------------------------------------------------------------------- /config/services_test/pages/backend/administrator.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | App\Tests\Behat\Page\Backend\Administrator\CreatePage: 12 | parent: app.behat.page.backend.crud.create 13 | public: false 14 | arguments: ["sylius_backend_admin_user_create"] 15 | 16 | App\Tests\Behat\Page\Backend\Administrator\IndexPage: 17 | parent: app.behat.page.backend.crud.index 18 | public: false 19 | arguments: ["sylius_backend_admin_user_index"] 20 | 21 | App\Tests\Behat\Page\Backend\Administrator\UpdatePage: 22 | parent: app.behat.page.backend.crud.update 23 | public: false 24 | arguments: ["sylius_backend_admin_user_update"] 25 | -------------------------------------------------------------------------------- /config/services_test/pages/backend/customer.yaml: -------------------------------------------------------------------------------- 1 | # Learn more about services, parameters and containers at 2 | # http://symfony.com/doc/current/book/service_container.html 3 | parameters: 4 | # parameter_name: value 5 | 6 | services: 7 | # service_name: 8 | # class: App\Directory\ClassName 9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] 10 | 11 | App\Tests\Behat\Page\Backend\Customer\IndexPage: 12 | parent: app.behat.page.backend.crud.index 13 | public: false 14 | arguments: ["sylius_backend_customer_index"] 15 | 16 | App\Tests\Behat\Page\Backend\Customer\UpdatePage: 17 | parent: app.behat.page.backend.crud.update 18 | public: false 19 | arguments: ["sylius_backend_customer_update"] 20 | -------------------------------------------------------------------------------- /config/services_test/pages/backend/dashboard.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Tests\Behat\Page\Backend\DashboardPage: 3 | parent: app.behat.symfony_page 4 | public: false 5 | autowire: true 6 | -------------------------------------------------------------------------------- /config/services_test/pages/frontend.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | App\Tests\Behat\Page\Frontend\: 3 | resource: '../../../tests/Behat/Page/Frontend/*' 4 | parent: app.behat.symfony_page 5 | public: false 6 | -------------------------------------------------------------------------------- /config/suites.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - suites/cli/installer.yaml 3 | - suites/cli/makefile.yaml 4 | 5 | - suites/ui/account/customer.yaml 6 | - suites/ui/account/login.yaml 7 | - suites/ui/account/registration.yaml 8 | - suites/ui/admin/dashboard.yaml 9 | - suites/ui/customer/managing_customers.yaml 10 | - suites/ui/user/managing_administrators.yaml 11 | -------------------------------------------------------------------------------- /config/suites/cli/installer.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | cli_installer: 4 | contexts: 5 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 6 | 7 | - App\Tests\Behat\Context\Cli\CommandContext 8 | - App\Tests\Behat\Context\Cli\InstallerContext 9 | filters: 10 | tags: "@installer && @cli" 11 | -------------------------------------------------------------------------------- /config/suites/cli/makefile.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | cli_makefile: 4 | contexts: 5 | - App\Tests\Behat\Context\Cli\MakefileContext 6 | filters: 7 | tags: "@makefile && @cli" 8 | -------------------------------------------------------------------------------- /config/suites/ui/account/customer.yaml: -------------------------------------------------------------------------------- 1 | # This file is part of the Sylius package. 2 | # (c) Paweł Jędrzejewski 3 | 4 | default: 5 | suites: 6 | ui_customer_account: 7 | contexts: 8 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 9 | 10 | - App\Tests\Behat\Context\Transform\CustomerContext 11 | - App\Tests\Behat\Context\Transform\SharedStorageContext 12 | 13 | - App\Tests\Behat\Context\Setup\CustomerContext 14 | - App\Tests\Behat\Context\Setup\AppSecurityContext 15 | - App\Tests\Behat\Context\Setup\UserContext 16 | 17 | - App\Tests\Behat\Context\Ui\Frontend\AccountContext 18 | filters: 19 | tags: "@customer_account && @ui" 20 | -------------------------------------------------------------------------------- /config/suites/ui/account/login.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | ui_customer_login: 4 | contexts: 5 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 6 | 7 | - App\Tests\Behat\Context\Transform\UserContext 8 | 9 | - App\Tests\Behat\Context\Setup\UserContext 10 | 11 | - App\Tests\Behat\Context\Ui\EmailContext 12 | - App\Tests\Behat\Context\Ui\Frontend\LoginContext 13 | filters: 14 | tags: "@customer_login && @ui" 15 | -------------------------------------------------------------------------------- /config/suites/ui/account/registration.yaml: -------------------------------------------------------------------------------- 1 | # This file is part of the Sylius package. 2 | # (c) Paweł Jędrzejewski 3 | 4 | default: 5 | suites: 6 | ui_customer_registration: 7 | contexts: 8 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 9 | # - sylius.behat.context.hook.email_spool 10 | 11 | - App\Tests\Behat\Context\Transform\SharedStorageContext 12 | - App\Tests\Behat\Context\Transform\CustomerContext 13 | 14 | - App\Tests\Behat\Context\Setup\CustomerContext 15 | # - app.behat.context.setup.shop_security 16 | - App\Tests\Behat\Context\Setup\UserContext 17 | 18 | - App\Tests\Behat\Context\Ui\EmailContext 19 | - App\Tests\Behat\Context\Ui\Frontend\RegistrationContext 20 | filters: 21 | tags: "@customer_registration && @ui" 22 | -------------------------------------------------------------------------------- /config/suites/ui/admin/dashboard.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | ui_dashboard: 4 | contexts: 5 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 6 | 7 | - App\Tests\Behat\Context\Setup\CustomerContext 8 | - App\Tests\Behat\Context\Setup\AdminSecurityContext 9 | 10 | - App\Tests\Behat\Context\Ui\Backend\DashboardContext 11 | filters: 12 | tags: "@admin_dashboard && @ui" 13 | -------------------------------------------------------------------------------- /config/suites/ui/customer/managing_customers.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | ui_managing_customers: 4 | contexts: 5 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 6 | 7 | - App\Tests\Behat\Context\Setup\CustomerContext 8 | - App\Tests\Behat\Context\Setup\AdminSecurityContext 9 | 10 | - App\Tests\Behat\Context\Transform\CustomerContext 11 | - App\Tests\Behat\Context\Transform\SharedStorageContext 12 | 13 | - App\Tests\Behat\Context\Ui\Backend\ManagingCustomersContext 14 | - App\Tests\Behat\Context\Ui\Backend\NotificationContext 15 | filters: 16 | tags: "@managing_customers && @ui" 17 | -------------------------------------------------------------------------------- /config/suites/ui/user/managing_administrators.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | ui_managing_administrators: 4 | contexts: 5 | - App\Tests\Behat\Context\Hook\DoctrineORMContext 6 | 7 | - App\Tests\Behat\Context\Setup\AdminSecurityContext 8 | - App\Tests\Behat\Context\Setup\AdminUserContext 9 | 10 | - App\Tests\Behat\Context\Transform\AdminUserContext 11 | - App\Tests\Behat\Context\Transform\SharedStorageContext 12 | 13 | - App\Tests\Behat\Context\Ui\Backend\ManagingAdministratorsContext 14 | - App\Tests\Behat\Context\Ui\Backend\NotificationContext 15 | filters: 16 | tags: "@managing_administrators && @ui" 17 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | _exts/sensio/__init__.pyc 3 | *.pyc 4 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Monofony Documentation 2 | ====================== 3 | 4 | This directory contains documentation for Monofony. 5 | 6 | This documentation is inspired by [Sylius documentation](http://docs.sylius.org). 7 | 8 | Build 9 | ----- 10 | 11 | In order to build the documentation: 12 | * [Install `pip`, Python package manager](https://pip.pypa.io/en/stable/installing/) 13 | 14 | * Download the documentation requirements: 15 | 16 | `$ pip install -r requirements.txt` 17 | 18 | This makes sure that the version of Sphinx you'll get is >=1.4.2! 19 | 20 | * Install [Sphinx](http://www.sphinx-doc.org/en/stable/) 21 | 22 | `$ pip install Sphinx` 23 | 24 | * In the `docs` directory run `$ sphinx-build -b html . build` and view the generated HTML files in the `build` directory. 25 | 26 | * If you want to update the complete structure use `-a` build option in order to rebuild the entire documentation 27 | -------------------------------------------------------------------------------- /docs/_exts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2013 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /docs/_exts/sensio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_exts/sensio/__init__.py -------------------------------------------------------------------------------- /docs/_exts/sensio/sphinx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_exts/sensio/sphinx/__init__.py -------------------------------------------------------------------------------- /docs/_exts/setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from setuptools import setup, find_packages 4 | 5 | setup( 6 | name = 'sphinx-php', 7 | version = '1.0', 8 | author = 'Fabien Potencier', 9 | author_email = 'fabien@symfony.com', 10 | description = 'Sphinx Extensions for PHP and Symfony', 11 | license = 'MIT', 12 | packages = find_packages(), 13 | install_requires = ['Sphinx>=0.6'], 14 | ) 15 | -------------------------------------------------------------------------------- /docs/_images/doc_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/doc_logo.png -------------------------------------------------------------------------------- /docs/_images/doctrine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/doctrine.png -------------------------------------------------------------------------------- /docs/_images/github_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/github_banner.png -------------------------------------------------------------------------------- /docs/_images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/logo.png -------------------------------------------------------------------------------- /docs/_images/symfonyfs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/symfonyfs.png -------------------------------------------------------------------------------- /docs/_images/twig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_images/twig.png -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/__init__.py: -------------------------------------------------------------------------------- 1 | """Sphinx ReadTheDocs theme. 2 | 3 | From https://github.com/ryan-roemer/sphinx-bootstrap-theme. 4 | 5 | """ 6 | import os 7 | 8 | VERSION = (0, 1, 5) 9 | 10 | __version__ = ".".join(str(v) for v in VERSION) 11 | __version_full__ = __version__ 12 | 13 | 14 | def get_html_theme_path(): 15 | """Return list of HTML theme paths.""" 16 | cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) 17 | return cur_dir 18 | -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/breadcrumbs.html: -------------------------------------------------------------------------------- 1 |
2 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/searchbox.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/css/sylius.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content-wrap { 2 | background-image: url("../img/swan.png"); 3 | background-position: -20px bottom; 4 | background-size: 20% auto; 5 | background-repeat: no-repeat; 6 | } 7 | 8 | .wy-menu-vertical li.current a:hover { 9 | color: #fff; 10 | background: #222; 11 | } 12 | .wy-menu-vertical li.current a { 13 | color: #999; 14 | background-color: #222; 15 | border-right: 0; 16 | } 17 | .wy-menu-vertical li.current > a { 18 | color: #fff; 19 | background-color: #1abb9c; 20 | border-top: 0; 21 | border-bottom: 0; 22 | } 23 | .wy-menu-vertical li.current > a:hover { 24 | color: #fff; 25 | background-color: #1abb9c; 26 | border-top: 0; 27 | border-bottom: 0; 28 | } 29 | .wy-side-nav-logo { 30 | padding: 20px; 31 | background-color: #fff; 32 | text-align: center; 33 | } 34 | .wy-side-nav-search { 35 | margin-bottom: 30px; 36 | } 37 | .wy-side-nav-search input[type=text] { 38 | border-color: #eee; 39 | } 40 | .wy-menu-vertical li.toctree-l2.current > a { 41 | background-color: #333; 42 | } 43 | .wy-menu-vertical li.toctree-l2.current > a:hover { 44 | background-color: #333; 45 | } 46 | -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_themes/sylius_rtd_theme/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_themes/sylius_rtd_theme/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/static/img/swan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/docs/_themes/sylius_rtd_theme/static/img/swan.png -------------------------------------------------------------------------------- /docs/_themes/sylius_rtd_theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = css/theme.css 4 | 5 | [options] 6 | typekit_id = hiw1hhg 7 | analytics_id = 8 | sticky_navigation = False 9 | -------------------------------------------------------------------------------- /docs/book/architecture/index.rst: -------------------------------------------------------------------------------- 1 | Architecture 2 | ============ 3 | 4 | .. note:: 5 | 6 | This section is based on the great `Sylius documentation `_. 7 | 8 | Before we dive separately into every Monofony concept, you need to have an overview of how our main application is structured. 9 | In this chapter we will sketch this architecture and our basic, cornerstone concepts, but also some supportive approaches, 10 | that you need to notice. 11 | 12 | .. toctree:: 13 | :hidden: 14 | 15 | architecture 16 | fixtures 17 | 18 | .. include:: /book/architecture/map.rst.inc 19 | -------------------------------------------------------------------------------- /docs/book/architecture/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/book/architecture/architecture` 2 | * :doc:`/book/architecture/fixtures` 3 | -------------------------------------------------------------------------------- /docs/book/index.rst: -------------------------------------------------------------------------------- 1 | The Book 2 | ======== 3 | 4 | Here you will find all the concepts used in Monofony. 5 | The Books helps to understand how Monofony works. 6 | 7 | Architecture 8 | ------------ 9 | 10 | The key to understanding principles of Sylius internal organization. Here you will learn about the Resource layer, 11 | state machines, events and general non e-commerce concepts adopted in the platform, like E-mails or Fixtures. 12 | 13 | .. toctree:: 14 | :hidden: 15 | 16 | architecture/index 17 | 18 | .. include:: /book/architecture/map.rst.inc 19 | 20 | Users 21 | ----- 22 | 23 | This chapter will tell you more about the way Sylius handles users, customers and admins. 24 | 25 | .. toctree:: 26 | :hidden: 27 | 28 | user/index 29 | 30 | .. include:: /book/user/map.rst.inc 31 | -------------------------------------------------------------------------------- /docs/book/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/book/architecture/index` 2 | * :doc:`/book/architecture/fixtures` 3 | * :doc:`/book/user/index` 4 | * :doc:`/book/user/admins` 5 | * :doc:`/book/user/customers` 6 | -------------------------------------------------------------------------------- /docs/book/user/index.rst: -------------------------------------------------------------------------------- 1 | Users 2 | ===== 3 | 4 | Before we dive separately into every Monofony concept, you need to have an overview of how our main application is structured. 5 | In this chapter we will sketch this architecture and our basic, cornerstone concepts, but also some supportive approaches, 6 | that you need to notice. 7 | 8 | .. toctree:: 9 | :hidden: 10 | 11 | admins 12 | customers 13 | 14 | .. include:: /book/user/map.rst.inc 15 | -------------------------------------------------------------------------------- /docs/book/user/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/book/user/admins` 2 | * :doc:`/book/user/customers` 3 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import sys, os 3 | from sphinx.highlighting import lexers 4 | from pygments.lexers.web import PhpLexer 5 | 6 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig', 'sensio.sphinx.configurationblock'] 7 | source_suffix = '.rst' 8 | master_doc = 'index' 9 | project = 'Monofony' 10 | copyright = u'2017, Monofony' 11 | version = '' 12 | release = '' 13 | exclude_patterns = ['_includes/*.rst'] 14 | html_theme = 'sylius_rtd_theme' 15 | html_theme_path = ["_themes"] 16 | htmlhelp_basename = 'Syliusdoc' 17 | man_pages = [ 18 | ('index', 'sylius', u'Sylius Documentation', 19 | [u'Monofony'], 1) 20 | ] 21 | sys.path.append(os.path.abspath('_exts')) 22 | lexers['php'] = PhpLexer(startinline=True) 23 | lexers['php-annotations'] = PhpLexer(startinline=True) 24 | rst_epilog = """ 25 | """ 26 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/behat/how-to-add-new-context.rst: -------------------------------------------------------------------------------- 1 | How to add a new context? 2 | ========================= 3 | 4 | Thanks to symfony autowiring, most of your contexts are ready to use. 5 | 6 | But if you need to manually route an argument, it is needed to add a service in to one of a following files ``cli.yaml``/``hook.yaml``/``setup.yaml``/``transform.yaml``/``ui.yaml`` in ``config/services_test/contexts/`` folder: 7 | 8 | .. code-block:: yaml 9 | 10 | App\Tests\Behat\Context\CONTEXT_CATEGORY\CONTEXT_NAME: 11 | arguments: 12 | $specificArgument: App\SpecificArgument 13 | 14 | Then you can use it in your suite configuration: 15 | 16 | .. code-block:: yaml 17 | 18 | default: 19 | suites: 20 | SUITE_NAME: 21 | contexts: 22 | - 'App\Tests\Behat\Context\CONTEXT_CATEGORY\CONTEXT_NAME' 23 | filters: 24 | tags: "@SUITE_TAG" 25 | 26 | .. note:: 27 | 28 | The context categories are usually one of ``cli``, ``hook``, ``setup``, ``transform``, ``ui`` and, as you can guess, they are corresponded to files name mentioned above. 29 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/behat/how-to-change-behat-application-base-url.rst: -------------------------------------------------------------------------------- 1 | How to change Behat application base url 2 | ---------------------------------------- 3 | 4 | By default Behat uses ``http://localhost:8080/`` as your application base url. If your one is different, 5 | you need to create ``behat.yml`` files that will overwrite it with your custom url: 6 | 7 | .. code-block:: yaml 8 | 9 | # behat.yml 10 | 11 | imports: ["behat.yml.dist"] 12 | 13 | default: 14 | extensions: 15 | Behat\MinkExtension: 16 | base_url: http://my.custom.url 17 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/behat/how-to-define-new-suite.rst: -------------------------------------------------------------------------------- 1 | How to define a new suite? 2 | ========================== 3 | 4 | To define a new suite it is needed to create a suite configuration file in a one of ``cli``/``ui`` directory inside ``config/suites``. 5 | Then register that file in ``config/suites.yaml``. 6 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/behat/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/bdd/behat/basic-usage` 2 | * :doc:`/cookbook/bdd/behat/how-to-add-new-context` 3 | * :doc:`/cookbook/bdd/behat/how-to-add-new-page` 4 | * :doc:`/cookbook/bdd/behat/how-to-define-new-suite` 5 | * :doc:`/cookbook/bdd/behat/how-to-use-transformers` 6 | * :doc:`/cookbook/bdd/behat/how-to-change-behat-application-base-url` 7 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/bdd/phpspec/index` 2 | * :doc:`/cookbook/bdd/behat/index` 3 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/phpspec/how-to-configure-phpspec-with-code-coverage.rst: -------------------------------------------------------------------------------- 1 | How to configure phpspec with code coverage 2 | =========================================== 3 | 4 | By default, phpspec on Monofony is configured with code coverage which needs xdebug or phpdbg installed. 5 | Thus you have two options: 6 | * install xdebug 7 | * install phpdbg (easier and faster) 8 | 9 | 10 | .. note:: 11 | 12 | But if you don't need that feature, :doc:`disable code coverage `. 13 | 14 | 15 | Install phpdbg 16 | -------------- 17 | 18 | .. code-block:: bash 19 | 20 | $ # on linux 21 | $ sudo apt-get install php7.2-phpdbg 22 | $ 23 | $ # on max 24 | $ brew install php72-phpdbg 25 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/phpspec/how-to-disable-phpspec-code-coverage.rst: -------------------------------------------------------------------------------- 1 | How to disable phpspec code coverage 2 | ==================================== 3 | 4 | .. code-block:: bash 5 | 6 | $ cp phpspec.yml.dist phpspec 7 | 8 | And just comment the content 9 | 10 | .. code-block:: yaml 11 | 12 | # extensions: 13 | # LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~ 14 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/phpspec/index.rst: -------------------------------------------------------------------------------- 1 | How to use Phpspec to design your code 2 | -------------------------------------- 3 | 4 | .. toctree:: 5 | :hidden: 6 | 7 | how-to-configure-phpspec-with-code-coverage 8 | how-to-disable-phpspec-code-coverage 9 | how-to-design-entities-with-phpspec 10 | how-to-design-services-with-phpspec 11 | 12 | .. include:: /cookbook/bdd/phpspec/map.rst.inc 13 | 14 | Learn more 15 | ---------- 16 | 17 | .. note:: 18 | 19 | To learn more, read the `Phpspec documentation `_. 20 | -------------------------------------------------------------------------------- /docs/cookbook/bdd/phpspec/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/bdd/phpspec/how-to-configure-phpspec-with-code-coverage` 2 | * :doc:`/cookbook/bdd/phpspec/how-to-disable-phpspec-code-coverage` 3 | * :doc:`/cookbook/bdd/phpspec/how-to-design-entities-with-phpspec` 4 | * :doc:`/cookbook/bdd/phpspec/how-to-design-services-with-phpspec` 5 | -------------------------------------------------------------------------------- /docs/cookbook/dashboard/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/dashboard/index` 2 | * :doc:`/cookbook/dashboard/basic-example` 3 | -------------------------------------------------------------------------------- /docs/cookbook/deployment/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/deployment/capistrano` 2 | -------------------------------------------------------------------------------- /docs/cookbook/entities/configure-backend-menu.rst: -------------------------------------------------------------------------------- 1 | How to configure backend menu 2 | ============================= 3 | 4 | To configure backend menu for your entity, you have to edit `src/Menu/AdminMenuBuilder.php`. 5 | 6 | .. code-block:: php 7 | 8 | // src/Menu/AdminMenuBuilder.php 9 | 10 | public function createMenu(RequestStack $requestStack) 11 | { 12 | // add method ... 13 | $this->addContentSubMenu($menu); 14 | // rest of the code 15 | 16 | return $menu; 17 | } 18 | 19 | /** 20 | * @param ItemInterface $menu 21 | * 22 | * @return ItemInterface 23 | */ 24 | private function addContentSubMenu(ItemInterface $menu) 25 | { 26 | $customer = $menu 27 | ->addChild('content') 28 | ->setLabel('sylius.ui.content') 29 | ; 30 | $customer->addChild('backend_article', ['route' => 'app_backend_article_index']) 31 | ->setLabel('app.ui.articles') 32 | ->setLabelAttribute('icon', 'newspaper'); 33 | return $customer; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /docs/cookbook/entities/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/entities/first-resource` 2 | * :doc:`/cookbook/entities/manage-your-entity` 3 | * :doc:`/cookbook/entities/configure-your-routes` 4 | * :doc:`/cookbook/entities/configure-backend-menu` 5 | -------------------------------------------------------------------------------- /docs/cookbook/fixtures/load.rst: -------------------------------------------------------------------------------- 1 | How to load your data fixtures 2 | ============================== 3 | 4 | You can load all your data fixtures using this command. 5 | 6 | .. code-block:: bash 7 | 8 | $ bin/console sylius:fixtures:load 9 | -------------------------------------------------------------------------------- /docs/cookbook/fixtures/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/fixtures/factory` 2 | * :doc:`/cookbook/fixtures/fixture` 3 | * :doc:`/cookbook/fixtures/suite` 4 | * :doc:`/cookbook/fixtures/load` 5 | -------------------------------------------------------------------------------- /docs/cookbook/fixtures/suite.rst: -------------------------------------------------------------------------------- 1 | How to use it on your suite 2 | =========================== 3 | 4 | .. code-block:: yaml 5 | 6 | # config/packages/sylius_fixtures.yaml 7 | 8 | sylius_fixtures: 9 | suites: 10 | default: 11 | listeners: 12 | orm_purger: ~ 13 | logger: ~ 14 | 15 | fixtures: 16 | [...] 17 | 18 | article: 19 | options: 20 | random: 10 21 | custom: 22 | - 23 | title: "Awesome article" 24 | 25 | it will generates 10 random articles and one custom with title ``Awesome article``. 26 | -------------------------------------------------------------------------------- /docs/cookbook/index.rst: -------------------------------------------------------------------------------- 1 | The Cookbook 2 | ============ 3 | 4 | Entities 5 | -------- 6 | 7 | .. toctree:: 8 | :hidden: 9 | 10 | entities/first-resource 11 | entities/manage-your-entity 12 | entities/configure-your-routes 13 | entities/configure-backend-menu 14 | 15 | .. include:: /cookbook/entities/map.rst.inc 16 | 17 | 18 | Fixtures 19 | -------- 20 | 21 | .. toctree:: 22 | :hidden: 23 | 24 | fixtures/factory 25 | fixtures/fixture 26 | fixtures/suite 27 | fixtures/load 28 | 29 | .. include:: /cookbook/fixtures/map.rst.inc 30 | 31 | BDD 32 | --- 33 | 34 | .. toctree:: 35 | :hidden: 36 | 37 | bdd/phpspec/index 38 | bdd/behat/index 39 | 40 | .. include:: /cookbook/bdd/map.rst.inc 41 | 42 | 43 | Deployment 44 | ---------- 45 | 46 | .. toctree:: 47 | :hidden: 48 | 49 | deployment/capistrano 50 | 51 | .. include:: /cookbook/deployment/map.rst.inc 52 | 53 | Dashboard 54 | --------- 55 | 56 | .. toctree:: 57 | :hidden: 58 | 59 | dashboard/index 60 | dashboard/basic-example 61 | 62 | .. include:: /cookbook/dashboard/map.rst.inc 63 | -------------------------------------------------------------------------------- /docs/cookbook/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/cookbook/index` 2 | -------------------------------------------------------------------------------- /docs/deployment/index.rst: -------------------------------------------------------------------------------- 1 | Deployment 2 | ========== 3 | 4 | Authorized keys API 5 | ------------------- 6 | 7 | Adding ssh authorized keys for server on your local computer 8 | 9 | .. code-block:: bash 10 | 11 | $ cat ~/.ssh/id_rsa.pub | ssh mobizel@XXX.XXX.XX.XX "cat - >> ~/.ssh/authorized_keys" 12 | 13 | and enter the correct password for username "mobizel" on server 14 | 15 | Deploy the staging environment 16 | ------------------------------ 17 | 18 | .. code-block:: bash 19 | 20 | $ bundle exec "cap staging deploy" 21 | 22 | Deploy the production environment 23 | --------------------------------- 24 | 25 | .. code-block:: bash 26 | 27 | $ bundle exec "cap production deploy" -------------------------------------------------------------------------------- /docs/deployment/map.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/deployment/index` 2 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx>=1.4,<2.0 2 | requests[security] 3 | -------------------------------------------------------------------------------- /etc/bash/application.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Source nvm.sh to make the node command available 4 | run_command "source ~/.nvm/nvm.sh" 5 | -------------------------------------------------------------------------------- /etc/build/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/etc/build/.gitignore -------------------------------------------------------------------------------- /etc/travis/run-suite: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | code=0 5 | 6 | common_step_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/suites/common/$1.sh" 7 | if [ -f "${common_step_script}" ]; then 8 | /usr/bin/env bash "${common_step_script}" || code=$? 9 | fi 10 | 11 | IFS=' ' read -r -a suites <<< "$2" 12 | for suite in "${suites[@]}"; do 13 | suite_step_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/suites/${suite}/$1.sh" 14 | if [ -f "${suite_step_script}" ]; then 15 | suite_step_is_suitable_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/suites/${suite}/is_suitable.sh" 16 | if [ -f "${suite_step_is_suitable_script}" ]; then 17 | /usr/bin/env bash "${suite_step_is_suitable_script}" || continue 18 | fi 19 | 20 | /usr/bin/env bash "${suite_step_script}" || code=$? 21 | fi 22 | done 23 | 24 | exit ${code} 25 | -------------------------------------------------------------------------------- /etc/travis/suites/application/assets/behat-javascript.yml: -------------------------------------------------------------------------------- 1 | imports: ["behat.yml.dist"] 2 | 3 | default: 4 | extensions: 5 | Behat\MinkExtension: 6 | javascript_session: chromium 7 | sessions: 8 | chromium: 9 | selenium2: 10 | browser: chrome 11 | capabilities: 12 | browserName: chrome 13 | browser: chrome 14 | version: "" 15 | chrome: 16 | binary: "/usr/bin/chromium-browser" 17 | switches: 18 | - "start-fullscreen" 19 | - "start-maximized" 20 | - "no-sandbox" 21 | -------------------------------------------------------------------------------- /etc/travis/suites/application/assets/old-behat.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - etc/behat/profiles.yml 3 | - etc/behat/suites.yml 4 | -------------------------------------------------------------------------------- /etc/travis/suites/application/before_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh" 5 | 6 | print_header "Activating memcached extension" "AppName" 7 | run_command "echo \"extension = memcached.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini" || exit $? 8 | 9 | print_header "Updating Composer" "AppName" 10 | run_command "composer self-update --preview" 11 | 12 | # Download and configure Symfony webserver 13 | print_header "Downloading Symfony CLI" "Sylius" 14 | if [ ! -f $APP_NAME_CACHE_DIR/symfony ]; then 15 | run_command "wget https://get.symfony.com/cli/installer -O - | bash" 16 | run_command "mv ~/.symfony/bin/symfony $APP_NAME_CACHE_DIR" 17 | fi 18 | run_command "$APP_NAME_CACHE_DIR/symfony version" 19 | -------------------------------------------------------------------------------- /etc/travis/suites/application/before_script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh" 5 | 6 | print_header "Setting the application up" "AppName" 7 | run_command "APP_DEBUG=1 bin/console doctrine:database:create -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database 8 | run_command "APP_DEBUG=1 APP_ENV=dev bin/console cache:warmup -vvv" || exit $? # For PHPStan 9 | run_command "bin/console cache:warmup -vvv" || exit $? # For tests 10 | run_command "bin/console doctrine:migrations:migrate --no-interaction -vvv" || exit $? 11 | 12 | print_header "Setting the web assets up" "AppName" 13 | run_command "bin/console assets:install public -vvv" || exit $? 14 | run_command "yarn install && yarn run encore production" || exit $? 15 | -------------------------------------------------------------------------------- /etc/travis/suites/application/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/application.sh" 5 | 6 | print_header "Installing dependencies" "AppName" 7 | run_command "composer install --no-interaction --prefer-dist" || exit $? 8 | -------------------------------------------------------------------------------- /etc/travis/suites/application/is_suitable.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then 6 | exit 0 # Always execute full suite on branch builds 7 | fi 8 | 9 | if [ $(git diff --name-only HEAD origin/master | grep -c -v -e ^docs -e ^CHANGELOG.md -e ^CONTRIBUTING.md -e ^LICENSE -e ^PULL_REQUEST_TEMPLATE.md -e ^README.md -e ^UPGRADE.md) -eq 0 ]; then 10 | print_header "Skipped suite" "Application" 11 | print_warning "No other changes than those in docs/* were found" 12 | exit 1 13 | fi 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | code=0 6 | commands=( 7 | validate-composer 8 | validate-composer-security 9 | validate-doctrine-schema 10 | validate-twig 11 | validate-yaml-files 12 | test-phpspec 13 | test-phpstan 14 | test-psalm 15 | test-phpunit 16 | test-installer 17 | test-fixtures 18 | test-infection 19 | test-behat-without-javascript 20 | test-behat-with-javascript 21 | test-behat-with-cli 22 | test-doctrine-migrations 23 | test-prod-requirements 24 | ) 25 | 26 | for command in ${commands[@]}; do 27 | "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/script/${command}" || code=$? 28 | done 29 | 30 | exit ${code} 31 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-behat-with-cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | run_behat() { 6 | local code=0 7 | 8 | print_header "Testing (Behat - CLI commands, regular scenarios; @cli && ~@todo)" "AppName" 9 | run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"@cli && ~@todo\"" || code=$? 10 | if [[ ${code} = 1 ]]; then 11 | run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"@cli && ~@todo\" --rerun" ; code=$? 12 | fi 13 | 14 | return ${code} 15 | } 16 | 17 | run_behat 18 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-behat-without-javascript: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | run_behat() { 6 | local code=0 7 | 8 | print_header "Testing (Behat - brand new, regular scenarios; ~@javascript && ~@todo && ~@cli)" "AppName" 9 | run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"~@javascript && ~@todo && ~@cli\"" || code=$? 10 | if [[ ${code} = 1 ]]; then 11 | run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"~@javascript && ~@todo && ~@cli\" --rerun" ; code=$? 12 | fi 13 | 14 | return ${code} 15 | } 16 | 17 | run_behat 18 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-doctrine-migrations: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | code=0 6 | 7 | print_header "Testing (Doctrine Migrations)" "AppName" 8 | run_command "bin/console doctrine:migrations:migrate first --no-interaction" || code=$? 9 | run_command "bin/console doctrine:migrations:migrate latest --no-interaction" || code=$? 10 | 11 | exit ${code} 12 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-fixtures: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing (Fixtures)" "AppName" 6 | retry_run_command "bin/console sylius:fixtures:load default --no-interaction" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-infection: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | 6 | if [[ "${CI}" == "" ]]; then 7 | INFECTION_FILTER=""; 8 | else 9 | git remote set-branches --add origin $TRAVIS_BRANCH; 10 | git fetch; 11 | CHANGED_FILES=$(git diff origin/$TRAVIS_BRANCH --diff-filter=AM --name-only | grep src/ | paste -sd "," -); 12 | 13 | if [[ "${CHANGED_FILES}" == "" ]]; then 14 | CHANGED_FILES=nothing; 15 | fi 16 | 17 | INFECTION_FILTER="--filter=${CHANGED_FILES} --ignore-msi-with-no-mutations"; 18 | 19 | echo "CHANGED_FILES=$CHANGED_FILES"; 20 | fi 21 | 22 | INFECTION_FLAGS='--threads=4 --min-msi=30 --min-covered-msi=75' 23 | 24 | print_header "Testing (Infection)" "AppName" 25 | run_command "phpdbg -qrr vendor/bin/infection $INFECTION_FLAGS $INFECTION_FILTER" 26 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-installer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing (Installer)" "AppName" 6 | run_command "bin/console app:install --no-interaction -vvv" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-phpspec: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing (Phpspec)" "AppName" 6 | run_command "phpdbg -qrr vendor/bin/phpspec run --no-interaction -f dot" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-phpstan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | prepare_phpstan_for_test() { 6 | run_command "bin/console cache:clear --no-warmup --env=dev" 7 | run_command "bin/console cache:warmup --env=dev" 8 | } 9 | 10 | print_header "Testing (PHPStan)" "AppName" 11 | prepare_phpstan_for_test 12 | run_command "vendor/bin/phpstan analyse -c phpstan.neon -l 1 src" 13 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing (Phpunit)" "AppName" 6 | run_command "vendor/bin/phpunit" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-prod-requirements: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing prod requirements (Composer)" "Sylius" 6 | run_command "APP_ENV=prod composer install --no-dev --no-interaction --prefer-dist" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/test-psalm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Testing (Psalm)" "AppName" 6 | run_command "vendor/bin/psalm --show-info=false" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-composer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Validating (Composer)" "AppName" 6 | run_command "composer validate --strict" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-composer-security: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Validating (Composer package security)" "AppName" 6 | run_command "vendor/bin/security-checker security:check" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-doctrine-schema: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Validating (Doctrine schema)" "AppName" 6 | run_command "bin/console doctrine:schema:validate -vvv" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-twig: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Validating (Twig templates)" "AppName" 6 | run_command "bin/console lint:twig templates" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-yaml-files: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | 5 | print_header "Validating (Yaml files)" "AppName" 6 | run_command "bin/console lint:yaml config --parse-tags" 7 | -------------------------------------------------------------------------------- /etc/travis/suites/application/script/validate-yarn-packages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" 4 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/application.sh" 5 | 6 | print_header "Validating (Yarn packages)" "AppName" 7 | run_command "yarn check" 8 | -------------------------------------------------------------------------------- /etc/travis/suites/common/after_failure.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | print_header "Uploading logs" "AppName" 6 | run_command "vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"${APP_NAME_BUILD_DIR}/*.log\"" 7 | 8 | print_header "Uploading screenshots" "AppName" 9 | run_command "IMGUR_API_KEY=4907fcd89e761c6b07eeb8292d5a9b2a vendor/lakion/mink-debug-extension/travis/tools/upload-screenshots \"${APP_NAME_BUILD_DIR}/*.png\"" 10 | -------------------------------------------------------------------------------- /etc/travis/suites/common/assets/opcache.php.ini: -------------------------------------------------------------------------------- 1 | ; May help to speed up our test suites 2 | [opcache] 3 | opcache.enable = 1 4 | opcache.enable_cli = 1 5 | 6 | opcache.memory_consumption = 256 7 | opcache.max_accelerated_files = 32531 8 | opcache.interned_strings_buffer = 8 9 | opcache.validate_timestamps = 0 10 | opcache.save_comments = 1 11 | opcache.fast_shutdown = 0 ; switching on causes "zend_mm_heap corrupted" errors 12 | -------------------------------------------------------------------------------- /etc/travis/suites/common/before_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | print_header "Customizing the environment" "AppName" 6 | run_command "git fetch origin master:refs/remotes/origin/master" || exit $? # Make origin/master available for is_suitable steps 7 | run_command "phpenv config-rm xdebug.ini" # Disable XDebug 8 | run_command "echo \"memory_limit=4096M\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini" || exit $? # Increase memory limit to 4GB 9 | run_command "mkdir -p \"${APP_NAME_CACHE_DIR}\"" || exit $? # Create AppName cache directory 10 | -------------------------------------------------------------------------------- /etc/travis/suites/common/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | print_header "Activate Opcache extension" "AppName" 6 | run_command "phpenv config-add \"$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/assets/opcache.php.ini\"" || exit $? 7 | -------------------------------------------------------------------------------- /etc/travis/suites/docs/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 5 | 6 | print_header "Installing" "Sphinx" 7 | run_command "pip install -q --user -r docs/requirements.txt" 8 | -------------------------------------------------------------------------------- /etc/travis/suites/docs/is_suitable.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then 6 | exit 0 # Always execute full suite on branch builds 7 | fi 8 | 9 | if [ $(git diff --name-only HEAD origin/master | grep -c -e ^docs) -eq 0 ]; then 10 | print_header "Skipped suite" "Docs" 11 | print_warning "No changes detected in docs/*" 12 | exit 1 13 | fi 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /etc/travis/suites/docs/script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../bash/common.lib.sh" 4 | 5 | code=0 6 | 7 | print_header "Building" "Documentation" 8 | run_command "sphinx-build -nWT -b linkcheck docs docs/build" || code=$? 9 | # Flags used here 10 | # -n Run in nit-picky mode. Currently, this generates warnings for all missing references. 11 | # -W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1. 12 | # -T Displays the full stack trace if an unhandled exception occurs. 13 | # -b Linkcheck builder checks for broken links. 14 | 15 | if [[ ${code} != 0 ]]; then 16 | print_warning "Build failed, rerunning to show all the warnings and errors" 17 | run_command "sphinx-build -n -b html docs docs/build" 18 | fi 19 | 20 | exit ${code} 21 | -------------------------------------------------------------------------------- /features/account/customer_account/changing_password.feature: -------------------------------------------------------------------------------- 1 | @customer_account 2 | Feature: Changing a customer password 3 | In order to enhance the security of my account 4 | As a Customer 5 | I want to be able to change my password 6 | 7 | Background: 8 | Given there is a user "francis@underwood.com" identified by "whitehouse" 9 | And I am logged in as "francis@underwood.com" 10 | 11 | @ui 12 | Scenario: Changing my password 13 | When I want to change my password 14 | And I change password from "whitehouse" to "blackhouse" 15 | And I save my changes 16 | Then I should be notified that my password has been successfully changed 17 | -------------------------------------------------------------------------------- /features/account/customer_account/editing_customer_profile.feature: -------------------------------------------------------------------------------- 1 | @customer_account 2 | Feature: Editing a customer profile 3 | In order to manage my personal information 4 | As a Customer 5 | I want to be able to edit my name and email 6 | 7 | Background: 8 | Given there is a user "francis@underwood.com" identified by "whitehouse" 9 | And I am logged in as "francis@underwood.com" 10 | 11 | @ui 12 | Scenario: Changing my email 13 | When I want to modify my profile 14 | And I specify the customer email as "frank@underwood.com" 15 | And I save my changes 16 | Then I should be notified that it has been successfully edited 17 | And my email should be "frank@underwood.com" 18 | -------------------------------------------------------------------------------- /features/account/registering.feature: -------------------------------------------------------------------------------- 1 | @customer_registration 2 | Feature: Account registration 3 | In order to make future contributions 4 | As a Visitor 5 | I need to be able to create an account in the website 6 | 7 | @ui 8 | Scenario: Registering a new account with minimum information 9 | When I want to register a new account 10 | And I specify the first name as "Saul" 11 | And I specify the last name as "Goodman" 12 | And I specify the email as "goodman@gmail.com" 13 | And I specify the password as "heisenberg" 14 | And I confirm this password 15 | And I register this account 16 | Then I should be notified that new account has been successfully created 17 | But I should not be logged in 18 | 19 | @ui @email 20 | Scenario: Receiving an email to verify your email validity after registration 21 | When I register with email "ghastly@bespoke.com" and password "suitsarelife" 22 | Then I should be notified that new account has been successfully created 23 | And an email to verify your email validity should have been sent to "ghastly@bespoke.com" 24 | -------------------------------------------------------------------------------- /features/account/resetting_password.feature: -------------------------------------------------------------------------------- 1 | @customer_login 2 | Feature: Resetting a password 3 | In order to login to my account when I forgot my password 4 | As a Visitor 5 | I need to be able to reset my password 6 | 7 | Background: 8 | Given there is a user "goodman@example.com" identified by "heisenberg" 9 | 10 | @ui @email @todo 11 | Scenario: Resetting an account password 12 | When I want to reset password 13 | And I specify the email as "goodman@example.com" 14 | And I reset it 15 | Then I should be notified that email with reset instruction has been sent 16 | And the email with reset token should be sent to "goodman@example.com" 17 | 18 | @ui @email 19 | Scenario: Changing my account password with token I received 20 | Given I have already received a resetting password email 21 | When I follow link on my email to reset my password 22 | And I specify my new password as "newp@ssw0rd" 23 | And I confirm my new password as "newp@ssw0rd" 24 | And I reset it 25 | Then I should be notified that my password has been successfully reset 26 | -------------------------------------------------------------------------------- /features/account/signing_in.feature: -------------------------------------------------------------------------------- 1 | @customer_login 2 | Feature: Signing in to the website 3 | In order to view my account 4 | As a Visitor 5 | I want to be able to log in to the website 6 | 7 | Background: 8 | Given there is a user "ted@example.com" identified by "bear" 9 | 10 | @ui 11 | Scenario: Sign in with email and password 12 | When I want to log in 13 | And I specify the username as "ted@example.com" 14 | And I specify the password as "bear" 15 | And I log in 16 | Then I should be logged in 17 | -------------------------------------------------------------------------------- /features/admin/dashboard.feature: -------------------------------------------------------------------------------- 1 | @admin_dashboard 2 | Feature: Statistics dashboard 3 | In order to have an overview of my database 4 | As an Administrator 5 | I want to see overall statistics on my admin dashboard 6 | 7 | Background: 8 | Given I am logged in as an administrator 9 | 10 | @ui 11 | Scenario: Seeing statistics 12 | Given there are 9 customers 13 | When I open administration dashboard 14 | Then I should see 9 new customers 15 | 16 | @ui 17 | Scenario: Seeing recent customers 18 | Given there are 4 customers 19 | When I open administration dashboard 20 | Then I should see 4 new customers in the list 21 | -------------------------------------------------------------------------------- /features/installer/install_command.feature: -------------------------------------------------------------------------------- 1 | @installer @cli 2 | Feature: Install feature 3 | In order to install AppName via CLI 4 | As a Developer 5 | I want to run an installation command 6 | 7 | Scenario: Registering administrator account 8 | Given I provide full administrator data 9 | When I run Install setup command 10 | Then I should see output "Administrator account successfully registered." 11 | 12 | Scenario: Trying to register administrator account without email 13 | Given I do not provide an email 14 | When I run Install setup command 15 | Then I should see output "E-mail: This value should not be blank." 16 | 17 | Scenario: Trying to register administrator account with an incorrect email 18 | Given I do not provide a correct email 19 | When I run Install setup command 20 | Then I should see output "E-mail: This value is not a valid email address." 21 | 22 | -------------------------------------------------------------------------------- /features/makefile/make_docs_build.feature: -------------------------------------------------------------------------------- 1 | @makefile @cli 2 | Feature: Using make docs build command 3 | In order to build application docs 4 | As a developer 5 | I want to use make docs build command 6 | 7 | Scenario: Using make docs build command 8 | Given I use default makefile commands 9 | Then the command make "docs-build" should exist 10 | And it should execute "sphinx-build" 11 | 12 | Scenario: Overriding make docs build command 13 | When I override makefile "docs-build" command with "echo 'test'" and "make docs-build-default" 14 | Then the command make "docs-build" should exist 15 | And it should execute "echo 'test'" 16 | And it should execute "make docs-build-default" 17 | But it should not execute "sphinx-build" 18 | -------------------------------------------------------------------------------- /features/makefile/make_install.feature: -------------------------------------------------------------------------------- 1 | @makefile @cli 2 | Feature: Using make install command 3 | In order to install application 4 | As a developer 5 | I want to use make install command 6 | 7 | Scenario: Using make install command 8 | Given I use default makefile commands 9 | Then the command make install should exist 10 | And it should execute "composer install" 11 | And it should execute "app:install" 12 | And it should execute "fixtures:load" 13 | And it should execute "yarn install" 14 | And it should execute "yarn encore production" 15 | 16 | Scenario: Overriding make install command 17 | When I override makefile install command with "echo 'test'" and "make install-default" 18 | Then the command make install should exist 19 | And it should execute "echo 'test'" 20 | And it should execute "make install-default" 21 | But it should not execute "composer install" 22 | -------------------------------------------------------------------------------- /features/makefile/make_lint.feature: -------------------------------------------------------------------------------- 1 | @makefile @cli 2 | Feature: Using make lint command 3 | In order to fix coding standards 4 | As a developer 5 | I want to use make lint command 6 | 7 | Scenario: Using make lint command 8 | Given I use default makefile commands 9 | Then the command make lint should exist 10 | And it should execute "php-cs-fixer" 11 | 12 | Scenario: Overriding make start command 13 | When I override makefile lint command with "echo 'test'" and "make lint-default" 14 | Then the command make lint should exist 15 | And it should execute "echo 'test'" 16 | And it should execute "make lint-default" 17 | But it should not execute "php-cs-fixer" 18 | -------------------------------------------------------------------------------- /features/makefile/make_start.feature: -------------------------------------------------------------------------------- 1 | @makefile @cli 2 | Feature: Using make start command 3 | In order to start server 4 | As a developer 5 | I want to use make start command 6 | 7 | Scenario: Using make start command 8 | Given I use default makefile commands 9 | Then the command make start should exist 10 | And it should execute "server:start" 11 | 12 | Scenario: Overriding make start command 13 | When I override makefile start command with "echo 'test'" and "make start-default" 14 | Then the command make start should exist 15 | And it should execute "echo 'test'" 16 | And it should execute "make start-default" 17 | But it should not execute "server:start" 18 | -------------------------------------------------------------------------------- /features/makefile/make_stop.feature: -------------------------------------------------------------------------------- 1 | @makefile @cli 2 | Feature: Using make stop command 3 | In order to stop server 4 | As a developer 5 | I want to use make stop command 6 | 7 | Scenario: Using make stop command 8 | Given I use default makefile commands 9 | Then the command make stop should exist 10 | And it should execute "server:stop" 11 | 12 | Scenario: Overriding make stop command 13 | When I override makefile stop command with "echo 'test'" and "make stop-default" 14 | Then the command make stop should exist 15 | And it should execute "echo 'test'" 16 | And it should execute "make stop-default" 17 | But it should not execute "server:stop" 18 | -------------------------------------------------------------------------------- /features/user/managing_administrators/adding_avatar_to_administrator.feature: -------------------------------------------------------------------------------- 1 | @managing_administrators 2 | Feature: Adding an avatar to an administrator 3 | In order to visually identify the account 4 | As an Administrator 5 | I want to add an avatar to an administrator account 6 | 7 | Background: 8 | Given I am logged in as an administrator 9 | 10 | @ui 11 | Scenario: Adding an avatar to administrator account 12 | Given I am editing my details 13 | When I upload the "troll.jpg" image as my avatar 14 | Then I should see the "troll.jpg" image as my avatar 15 | And I should see the "troll.jpg" avatar image in the top bar next to my name 16 | -------------------------------------------------------------------------------- /features/user/managing_administrators/browsing_administrator.feature: -------------------------------------------------------------------------------- 1 | @managing_administrators 2 | Feature: Browsing administrators 3 | In order to see all administrators in the store 4 | As an Administrator 5 | I want to browse administrators 6 | 7 | Background: 8 | Given there is an administrator "mr.banana@example.com" 9 | And there is also an administrator "ted@example.com" 10 | And I am logged in as "ted@example.com" administrator 11 | 12 | @ui 13 | Scenario: Browsing administrators in store 14 | When I want to browse administrators 15 | Then there should be 2 administrators in the list 16 | And I should see the administrator "mr.banana@example.com" in the list 17 | -------------------------------------------------------------------------------- /features/user/managing_administrators/deleting_multiple_administrators.feature: -------------------------------------------------------------------------------- 1 | @managing_administrators 2 | Feature: Deleting multiple administrators 3 | In order to get rid of deprecated administrators in an efficient way 4 | As an Administrator 5 | I want to be able to delete multiple administrator accounts at once 6 | 7 | Background: 8 | Given there is an administrator "banana@example.com" 9 | And there is also an administrator "orange@example.com" 10 | And there is also an administrator "watermelon@example.com" 11 | And I am logged in as "watermelon@example.com" administrator 12 | 13 | @ui @javascript 14 | Scenario: Deleting multiple administrators at once 15 | Given I browse administrators 16 | And I check the "banana@example.com" administrator 17 | And I check also the "orange@example.com" administrator 18 | And I delete them 19 | Then I should be notified that they have been successfully deleted 20 | And I should see a single administrator in the list 21 | And I should see the administrator "watermelon@example.com" in the list 22 | -------------------------------------------------------------------------------- /features/user/managing_customers/browsing_customers.feature: -------------------------------------------------------------------------------- 1 | @managing_customers 2 | Feature: Browsing customers 3 | In order to see all customers in the store 4 | As an Administrator 5 | I want to browse customers 6 | 7 | Background: 8 | Given there is a customer "f.baggins@example.com" 9 | And there is also a customer "mr.banana@example.com" 10 | And there is also a customer "l.skywalker@example.com" 11 | And I am logged in as an administrator 12 | 13 | @ui 14 | Scenario: Browsing customers in store 15 | When I want to see all customers in store 16 | Then I should see 3 customers in the list 17 | And I should see the customer "mr.banana@example.com" in the list 18 | -------------------------------------------------------------------------------- /infection.json.dist: -------------------------------------------------------------------------------- 1 | { 2 | "timeout": 10, 3 | "source": { 4 | "directories": [ 5 | "src" 6 | ], 7 | "excludes": [ 8 | "Command", 9 | "Controller", 10 | "DependencyInjection", 11 | "Formatter", 12 | "Menu", 13 | "Migrations", 14 | "Fixture", 15 | "Form/Type", 16 | "Kernel.php" 17 | ] 18 | }, 19 | "logs": { 20 | "text": "infection-log.txt" 21 | }, 22 | "mutators": { 23 | "@default": true, 24 | "IdenticalEqual": false, 25 | "NotIdenticalNotEqual": false 26 | }, 27 | "testFramework":"phpspec" 28 | } 29 | -------------------------------------------------------------------------------- /phpspec.yml.dist: -------------------------------------------------------------------------------- 1 | extensions: 2 | LeanPHP\PhpSpec\CodeCoverage\CodeCoverageExtension: ~ 3 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | Disallow: 6 | -------------------------------------------------------------------------------- /spec/App/Collector/AppCollectorSpec.php: -------------------------------------------------------------------------------- 1 | shouldHaveType(AppCollector::class); 16 | } 17 | 18 | function it_is_a_data_collector(): void 19 | { 20 | $this->shouldHaveType(DataCollector::class); 21 | } 22 | 23 | function it_can_get_version(): void 24 | { 25 | $this->getVersion()->shouldReturn(Kernel::VERSION); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /spec/App/Entity/User/AdminAvatarSpec.php: -------------------------------------------------------------------------------- 1 | shouldHaveType(AdminAvatar::class); 14 | } 15 | 16 | function it_is_a_file(): void 17 | { 18 | $this->shouldHaveType(File::class); 19 | } 20 | 21 | function it_has_no_file_by_default(): void 22 | { 23 | $this->getFile()->shouldReturn(null); 24 | } 25 | 26 | function its_file_is_mutable(\SplFileInfo $file): void 27 | { 28 | $this->setFile($file); 29 | 30 | $this->getFile()->shouldReturn($file); 31 | } 32 | 33 | function it_has_no_path_by_defaut(): void 34 | { 35 | $this->getPath()->shouldReturn(null); 36 | } 37 | 38 | function its_path_is_mutable(): void 39 | { 40 | $this->setPath('avatar.png'); 41 | 42 | $this->getPath()->shouldReturn('avatar.png'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /spec/App/Form/Extension/CustomerTypeExtensionSpec.php: -------------------------------------------------------------------------------- 1 | shouldHaveType(AbstractTypeExtension::class); 17 | } 18 | 19 | function it_extends_customer_type() 20 | { 21 | $this::getExtendedTypes()->shouldReturn([CustomerType::class]); 22 | } 23 | 24 | function it_adds_user_form_subscriber(FormBuilderInterface $builder) 25 | { 26 | $builder->addEventSubscriber(new AddUserFormSubscriber(AppUserType::class))->shouldBeCalled(); 27 | 28 | $this->buildForm($builder, []); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spec/App/Form/Extension/DateTypeExtensionSpec.php: -------------------------------------------------------------------------------- 1 | shouldHaveType(AbstractTypeExtension::class); 16 | } 17 | 18 | function it_extends_date_type() 19 | { 20 | $this::getExtendedTypes()->shouldReturn([DateType::class]); 21 | } 22 | 23 | function it_configures_options(OptionsResolver $resolver) 24 | { 25 | $resolver->setDefaults([ 26 | 'widget' => 'single_text', 27 | 'html5' => false, 28 | 'format' => 'dd/MM/yyyy', 29 | ])->shouldBeCalled(); 30 | 31 | $this->configureOptions($resolver); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /src/Command/Helper/DirectoryChecker.php: -------------------------------------------------------------------------------- 1 | commandDirectoryChecker = $commandDirectoryChecker; 27 | } 28 | 29 | public function ensureDirectoryExistsAndIsWritable(string $directory, OutputInterface $output, string $commandName): void 30 | { 31 | $checker = $this->commandDirectoryChecker; 32 | $checker->setCommandName($commandName); 33 | 34 | $checker->ensureDirectoryExists($directory, $output); 35 | $checker->ensureDirectoryIsWritable($directory, $output); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Command/Helper/ProgressBarCreator.php: -------------------------------------------------------------------------------- 1 | setBarCharacter(''); 25 | $progress->setEmptyBarCharacter(' '); 26 | $progress->setProgressCharacter(''); 27 | 28 | $progress->start($length); 29 | 30 | return $progress; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Controller/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/src/Controller/.gitignore -------------------------------------------------------------------------------- /src/Dashboard/DashboardStatisticsProvider.php: -------------------------------------------------------------------------------- 1 | statistics = $statistics; 27 | } 28 | 29 | public function getStatistics(): array 30 | { 31 | $statistics = []; 32 | foreach ($this->statistics as $statistic) { 33 | Assert::implementsInterface($statistic, StatisticInterface::class, sprintf('Class %s must implement %s', get_class($statistic), StatisticInterface::class)); 34 | $statistics[] = $statistic->generate(); 35 | } 36 | 37 | return $statistics; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Dashboard/Statistics/CustomerStatistic.php: -------------------------------------------------------------------------------- 1 | customerRepository = $customerRepository; 19 | $this->engine = $engine; 20 | } 21 | 22 | public function generate(): string 23 | { 24 | $amountCustomers = $this->customerRepository->countCustomers(); 25 | 26 | return $this->engine->render('backend/dashboard/statistics/_amount_of_customers.html.twig', [ 27 | 'amountOfCustomers' => $amountCustomers, 28 | ]); 29 | } 30 | 31 | public static function getDefaultPriority(): int 32 | { 33 | return -1; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Dashboard/Statistics/StatisticInterface.php: -------------------------------------------------------------------------------- 1 | root('app'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Entity/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/src/Entity/.gitignore -------------------------------------------------------------------------------- /src/Entity/Customer/CustomerInterface.php: -------------------------------------------------------------------------------- 1 | id; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Entity/Media/FileInterface.php: -------------------------------------------------------------------------------- 1 | getRandomId(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Entity/OAuth/ClientManager.php: -------------------------------------------------------------------------------- 1 | findClientBy(['randomId' => $publicId]); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Entity/OAuth/RefreshToken.php: -------------------------------------------------------------------------------- 1 | children() 33 | ->scalarNode('email')->cannotBeEmpty()->end() 34 | ->booleanNode('enabled')->end() 35 | ->scalarNode('password')->cannotBeEmpty()->end() 36 | ->scalarNode('first_name')->cannotBeEmpty()->end() 37 | ->scalarNode('last_name')->cannotBeEmpty()->end() 38 | ; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Fixture/ApiClientFixture.php: -------------------------------------------------------------------------------- 1 | children() 33 | ->scalarNode('random_id')->cannotBeEmpty()->end() 34 | ->scalarNode('secret')->cannotBeEmpty()->end() 35 | ->arrayNode('allowed_grant_types')->scalarPrototype()->cannotBeEmpty()->defaultValue([])->end() 36 | ; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Fixture/AppUserFixture.php: -------------------------------------------------------------------------------- 1 | children() 33 | ->scalarNode('email')->cannotBeEmpty()->end() 34 | ->booleanNode('enabled')->end() 35 | ->scalarNode('password')->cannotBeEmpty()->end() 36 | ->scalarNode('first_name')->cannotBeEmpty()->end() 37 | ->scalarNode('last_name')->cannotBeEmpty()->end() 38 | ->scalarNode('customer')->cannotBeEmpty()->end() 39 | ; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Fixture/Factory/AbstractExampleFactory.php: -------------------------------------------------------------------------------- 1 | addEventSubscriber(new AddUserFormSubscriber(AppUserType::class)); 28 | } 29 | 30 | /** 31 | * {@inheritdoc} 32 | */ 33 | public static function getExtendedTypes(): iterable 34 | { 35 | return [CustomerType::class]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Form/Extension/DateTypeExtension.php: -------------------------------------------------------------------------------- 1 | setDefaults([ 27 | 'widget' => 'single_text', 28 | 'html5' => false, 29 | 'format' => 'dd/MM/yyyy', 30 | ]); 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public static function getExtendedTypes(): iterable 37 | { 38 | return [DateType::class]; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Form/Type/DatePickerType.php: -------------------------------------------------------------------------------- 1 | setDefaults([ 36 | 'widget' => 'single_text', 37 | 'format' => 'dd/MM/yyyy', 38 | ]); 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function getBlockPrefix() 45 | { 46 | return 'app_date_picker'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Form/Type/DateTimePickerType.php: -------------------------------------------------------------------------------- 1 | setDefaults([ 36 | 'widget' => 'single_text', 37 | 'format' => 'dd/MM/yyyy H:i', 38 | ]); 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function getBlockPrefix() 45 | { 46 | return 'app_date_time_picker'; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Form/Type/User/AppUserType.php: -------------------------------------------------------------------------------- 1 | remove('username') 28 | ->remove('email'); 29 | } 30 | 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function getBlockPrefix() 35 | { 36 | return 'sylius_app_user'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Formatter/StringInflector.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('o') 23 | ->select('COUNT(o.id)') 24 | ->getQuery() 25 | ->getSingleScalarResult(); 26 | } 27 | 28 | public function findLatest(int $count): array 29 | { 30 | return $this->createQueryBuilder('o') 31 | ->addSelect('user') 32 | ->leftJoin('o.user', 'user') 33 | ->addOrderBy('o.createdAt', 'DESC') 34 | ->setMaxResults($count) 35 | ->getQuery() 36 | ->getResult(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Repository/UserRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('o') 26 | ->innerJoin('o.customer', 'customer') 27 | ->andWhere('customer.emailCanonical = :email') 28 | ->setParameter('email', $email) 29 | ->getQuery() 30 | ->getOneOrNullResult() 31 | ; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Resources/config/validation.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: validation/customer.yml } 3 | -------------------------------------------------------------------------------- /src/Resources/config/validation/customer.yml: -------------------------------------------------------------------------------- 1 | Sylius\Component\Customer\Model\Customer: 2 | constraints: 3 | - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: 4 | fields: email 5 | groups: [sylius] 6 | 7 | -------------------------------------------------------------------------------- /templates/backend/_search.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /templates/backend/_security.html.twig: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /templates/backend/admin_user/_avatar_image.html.twig: -------------------------------------------------------------------------------- 1 | {% if app.user.avatar is not empty and app.user.avatar.path is not empty %} 2 | {% set path = vich_uploader_asset(app.user.avatar, 'file')|imagine_filter('app_backend_admin_user_avatar_thumbnail') %} 3 | {% else %} 4 | {% set path = '//placehold.it/50x50' %} 5 | {% endif %} 6 | 7 | 8 | -------------------------------------------------------------------------------- /templates/backend/admin_user/_form.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_errors(form) }} 3 |
4 |
5 |

{{ 'sylius.ui.general_info'|trans }}

6 |
7 | {{ form_row(form.username) }} 8 | {{ form_row(form.email) }} 9 |
10 |
11 |
12 | {{ form_row(form.plainPassword) }} 13 | {{ form_row(form.enabled) }} 14 |
15 |
16 |
17 |
18 |

{{ 'sylius.ui.additional_information'|trans }}

19 |
20 | {{ form_row(form.firstName) }} 21 | {{ form_row(form.lastName) }} 22 |
23 | {{ form_row(form.avatar) }} 24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /templates/backend/crud/create.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'backend/layout.html.twig' %} 2 | 3 | {% set header = configuration.vars.header|default(metadata.applicationName~'.ui.new_'~metadata.name) %} 4 | 5 | {% block title %}{{ parent() }} {{ header|trans }}{% endblock %} 6 | 7 | {% form_theme form 'backend/form/theme.html.twig' %} 8 | 9 | {% block content %} 10 | {% include 'backend/crud/create/_header.html.twig' %} 11 | {% include 'backend/crud/create/_content.html.twig' %} 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /templates/backend/crud/create/_breadcrumb.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'backend/macro/breadcrumb.html.twig' as breadcrumb %} 2 | 3 | {% set breadcrumbs = [ 4 | { label: 'sylius.ui.administration'|trans, url: path('app_backend_dashboard') }, 5 | { label: (metadata.applicationName~'.ui.'~metadata.pluralName)|trans, url: path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({})) }, 6 | { label: 'sylius.ui.new'|trans } 7 | ] 8 | %} 9 | 10 | {{ breadcrumb.crumble(breadcrumbs) }} 11 | -------------------------------------------------------------------------------- /templates/backend/crud/create/_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_start(form, {'action': path(configuration.vars.route.name|default(configuration.getRouteName('create')), configuration.vars.route.parameters|default({})), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }} 3 | {% if configuration.vars.templates.form is defined %} 4 | {% include configuration.vars.templates.form %} 5 | {% else %} 6 | {{ form_widget(form) }} 7 | {% endif %} 8 | 9 | {% include '@SyliusUi/Form/Buttons/_create.html.twig' with {'paths': {'cancel': path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({}))}} %} 10 | 11 | {{ form_row(form._token) }} 12 | {{ form_end(form, {'render_rest': false}) }} 13 |
-------------------------------------------------------------------------------- /templates/backend/crud/create/_header.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'SyliusUiBundle:Macro:headers.html.twig' as headers %} 2 | 3 |
4 |
5 | {{ headers.default(header|trans, configuration.vars.icon|default('plus'), configuration.vars.subheader|default(null)|trans) }} 6 | 7 | {% include configuration.vars.templates.breadcrumb|default('backend/crud/create/_breadcrumb.html.twig') %} 8 |
9 |
10 | {% include configuration.vars.templates.toolbar|default('backend/crud/_toolbar.html.twig') ignore missing %} 11 |
12 |
13 | -------------------------------------------------------------------------------- /templates/backend/crud/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'backend/layout.html.twig' %} 2 | 3 | {% set definition = resources.definition %} 4 | {% set data = resources.data %} 5 | 6 | {% set header = configuration.vars.header|default(metadata.applicationName~'.ui.'~metadata.pluralName) %} 7 | 8 | {% block title %}{{ parent() }} {{ header|trans }}{% endblock %} 9 | 10 | {% block content %} 11 | {% include 'backend/crud/index/_header.html.twig' %} 12 | {% include 'backend/crud/index/_content.html.twig' %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/backend/crud/index/_breadcrumb.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'backend/macro/breadcrumb.html.twig' as breadcrumb %} 2 | 3 | {% set breadcrumbs = [ 4 | { label: 'sylius.ui.administration'|trans, url: path('app_backend_dashboard') }, 5 | { label: (metadata.applicationName~'.ui.'~metadata.pluralName)|trans }, 6 | ] 7 | %} 8 | 9 | {{ breadcrumb.crumble(breadcrumbs) }} 10 | -------------------------------------------------------------------------------- /templates/backend/crud/index/_content.html.twig: -------------------------------------------------------------------------------- 1 | {{ sylius_grid_render(resources, '@SyliusUi/Grid/_default.html.twig') }} -------------------------------------------------------------------------------- /templates/backend/crud/index/_header.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'SyliusUiBundle:Macro:headers.html.twig' as headers %} 2 | 3 |
4 |
5 | {{ headers.default(header|trans, configuration.vars.icon|default('list'), configuration.vars.subheader|default(null)|trans) }} 6 | 7 | {% include configuration.vars.templates.breadcrumb|default('backend/crud/index/_breadcrumb.html.twig') %} 8 |
9 |
10 |
11 | {% if definition.actionGroups.main is defined and definition.getActions('main')|length > 0 %} 12 | {% for action in definition.getActions('main') %} 13 | {{ sylius_grid_render_action(resources, action, null) }} 14 | {% endfor %} 15 | {% endif %} 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /templates/backend/crud/update.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'backend/layout.html.twig' %} 2 | 3 | {% import 'SyliusUiBundle:Macro:buttons.html.twig' as buttons %} 4 | 5 | {% set header = configuration.vars.header|default(metadata.applicationName~'.ui.edit_'~metadata.name) %} 6 | 7 | {% block title %}{{ parent() }} {{ header|trans }}{% endblock %} 8 | 9 | {% form_theme form 'backend/form/theme.html.twig' %} 10 | 11 | {% block content %} 12 | {% include 'backend/crud/update/_header.html.twig' %} 13 | {% include 'backend/crud/update/_content.html.twig' %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /templates/backend/crud/update/_breadcrumb.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'backend/macro/breadcrumb.html.twig' as breadcrumb %} 2 | 3 | {% set breadcrumbs = [ 4 | { label: 'sylius.ui.administration'|trans, url: path('app_backend_dashboard') }, 5 | { label: (metadata.applicationName~'.ui.'~metadata.pluralName)|trans, url: path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({})) }, 6 | { label: resource.code|default(resource.id)}, 7 | { label: 'sylius.ui.edit'|trans } 8 | ] 9 | %} 10 | 11 | {{ breadcrumb.crumble(breadcrumbs) }} 12 | -------------------------------------------------------------------------------- /templates/backend/crud/update/_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_start(form, {'action': path(configuration.getRouteName('update'), configuration.vars.route.parameters|default({ 'id': resource.id })), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }} 3 | 4 | {% if configuration.vars.templates.form is defined %} 5 | {% include configuration.vars.templates.form %} 6 | {% else %} 7 | {{ form_widget(form) }} 8 | {% endif %} 9 | {% include '@SyliusUi/Form/Buttons/_update.html.twig' with {'paths': {'cancel': path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({}))}} %} 10 | {{ form_row(form._token) }} 11 | {{ form_end(form, {'render_rest': false}) }} 12 |
13 | -------------------------------------------------------------------------------- /templates/backend/crud/update/_header.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'SyliusUiBundle:Macro:headers.html.twig' as headers %} 2 | 3 |
4 |
5 | {{ headers.default(header|trans, configuration.vars.icon|default('pencil'), configuration.vars.subheader|default(null)|trans) }} 6 | 7 | {% include configuration.vars.templates.breadcrumb|default('backend/crud/update/_breadcrumb.html.twig') %} 8 |
9 |
10 | {% include configuration.vars.templates.toolbar|default('backend/crud/_toolbar.html.twig') ignore missing %} 11 |
12 |
13 | -------------------------------------------------------------------------------- /templates/backend/dashboard/_menu.html.twig: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /templates/backend/dashboard/_statistics.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {% for statistic in statistics %} 3 | {{ statistic | raw }} 4 | {% endfor %} 5 |
6 | -------------------------------------------------------------------------------- /templates/backend/dashboard/statistics/_amount_of_customers.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | {{ amountOfCustomers }} 6 |
7 |
8 | {{ 'sylius.ui.customers'|trans }} 9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /templates/backend/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'backend/layout.html.twig' %} 2 | 3 | {% import 'SyliusUiBundle:Macro:headers.html.twig' as headers %} 4 | 5 | {% block title %}{{ parent() }}{{ 'sylius.ui.dashboard'|trans }}{% endblock %} 6 | 7 | {% block content %} 8 | {{ headers.default('sylius.ui.dashboard'|trans, 'home', 'app.ui.overview_of_your_website'|trans) }} 9 | 10 | {% include 'backend/dashboard/_statistics.html.twig' %} 11 | {% include 'backend/dashboard/_menu.html.twig' %} 12 | 13 |
14 |
15 | {{ render(url('sylius_backend_partial_customer_latest', {'count': 5, 'template': 'backend/dashboard/_customers.html.twig'})) }} 16 |
17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /templates/backend/macro/breadcrumb.html.twig: -------------------------------------------------------------------------------- 1 | {% macro crumble(crumbs = {}) %} 2 | 17 | {% endmacro %} 18 | -------------------------------------------------------------------------------- /templates/backend/security/login.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '@SyliusUi/Layout/centered.html.twig' %} 2 | 3 | {% block title %}AppName | {{ 'sylius.ui.administration_panel_login'|trans }}{% endblock %} 4 | 5 | {% block stylesheets %} 6 | {% include '@SyliusUi/_stylesheets.html.twig' with {'path': 'assets/backend/app.css'} %} 7 | {% endblock %} 8 | 9 | {% block content %} 10 | {% include '@SyliusUi/Security/_login.html.twig' with {'action': path('sylius_backend_login_check'), 'paths': {'logo': 'assets/backend/img/logo.png'}} %} 11 | {% endblock %} 12 | 13 | {% block javascripts %} 14 | {% include '@SyliusUi/_javascripts.html.twig' with {'path': 'assets/backend/app.js'} %} 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /templates/emails/contactRequest.html.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | Contact request 3 | {% endblock %} 4 | 5 | {% block body %} 6 | {% autoescape %} 7 | Message from: {{ data.email }} 8 |
9 | Content: 10 |
11 | "{{ data.message|nl2br }}" 12 | {% endautoescape %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/emails/passwordReset.html.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | Password reset 3 | {% endblock %} 4 | 5 | {% block body %} 6 | {% set url = url('app_frontend_password_reset', { 'token': user.passwordResetToken}) %} 7 | {% autoescape %} 8 |

Hello {{ user.username }}

9 | 10 | To reset your password - please visit {{ url|raw }} 11 |

12 | Regards, the Team. 13 | {% endautoescape %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /templates/emails/userRegistration.html.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | User registration 3 | {% endblock %} 4 | 5 | {% block body %} 6 | {% autoescape %} 7 | Welcome to our website! 8 |

9 | You have just been registered. 10 |
11 | Thank you {{ user.username }}. 12 | {% endautoescape %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/emails/verification.html.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | Email address verification 3 | {% endblock %} 4 | 5 | {% block body %} 6 | {% set url = url('sylius_frontend_user_verification', { 'token': user.emailVerificationToken}) %} 7 | {% autoescape %} 8 | To verify your email address - please visit {{ url|raw }} 9 | {% endautoescape %} 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /templates/frontend/_flashes.html.twig: -------------------------------------------------------------------------------- 1 | {% include '@SyliusUi/_flashes.html.twig' %} -------------------------------------------------------------------------------- /templates/frontend/_header.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Sylius logo 5 |
6 |
7 |
8 |
9 |
10 |
11 |
-------------------------------------------------------------------------------- /templates/frontend/_menu.html.twig: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /templates/frontend/account/layout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'frontend/layout.html.twig' %} 2 | 3 | {% block content %} 4 | {% block breadcrumb %} 5 | {% endblock %} 6 | 7 |
8 |
9 | {{ knp_menu_render('app.account', {'template': 'frontend/menu/simple.html.twig'}) }} 10 |
11 |
12 | {% block subcontent %} 13 | {% endblock %} 14 |
15 |
16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /templates/frontend/homepage/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'frontend/layout.html.twig' %} 2 | 3 | {% block content %} 4 | 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /templates/frontend/login/_form.html.twig: -------------------------------------------------------------------------------- 1 | {% import '@SyliusUi/Macro/messages.html.twig' as messages %} 2 | 3 | {% if last_error %} 4 | {{ messages.error(last_error.messageKey|trans(last_error.messageData, 'security')) }} 5 | {% endif %} 6 | 7 | {{ form_row(form._username) }} 8 | {{ form_row(form._password) }} 9 | {{ form_row(form._remember_me) }} 10 | -------------------------------------------------------------------------------- /templates/frontend/login/_header.html.twig: -------------------------------------------------------------------------------- 1 |

2 | 3 |
4 | {{ 'sylius.ui.customer_login'|trans }} 5 |
{{ 'sylius.ui.access_your_store_account_or_create_a_new_one'|trans }}
6 |
7 |

8 | -------------------------------------------------------------------------------- /templates/frontend/login/_register.html.twig: -------------------------------------------------------------------------------- 1 |

{{ 'sylius.ui.new_customers'|trans }}

2 | 3 | 4 | {{ 'sylius.ui.create_an_account'|trans }} 5 | 6 | -------------------------------------------------------------------------------- /templates/frontend/macro/pagination.html.twig: -------------------------------------------------------------------------------- 1 | {% macro render(paginator, options) %} 2 | {% if paginator.haveToPaginate %} 3 |
4 |
5 | {{ pagerfanta(paginator, 'foundation_translated', options|default({})) }} 6 |
7 |
8 | {% endif %} 9 | {% endmacro %} -------------------------------------------------------------------------------- /templates/frontend/menu/simple.html.twig: -------------------------------------------------------------------------------- 1 | {% extends '@SyliusUi/Menu/simple.html.twig' %} 2 | -------------------------------------------------------------------------------- /templates/frontend/register/_form.html.twig: -------------------------------------------------------------------------------- 1 |

{{ 'sylius.ui.personal_information'|trans }}

2 |
3 | {{ form_row(form.firstName) }} 4 | {{ form_row(form.lastName) }} 5 |
6 | {{ form_row(form.email) }} 7 | {{ form_row(form.phoneNumber) }} 8 |

{{ 'sylius.ui.account_credentials'|trans }}

9 | {{ form_row(form.user.plainPassword.first) }} 10 | {{ form_row(form.user.plainPassword.second) }} 11 | -------------------------------------------------------------------------------- /templates/frontend/register/_header.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |

6 | 7 |
8 | {{ 'sylius.ui.register_in_the_store'|trans }} 9 |
{{ 'sylius.ui.create_a_new_customer_account'|trans }}
10 |
11 |

12 |
13 | 16 |
17 | -------------------------------------------------------------------------------- /templates/frontend/security/register.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'frontend/layout.html.twig' %} 2 | 3 | {% form_theme form 'frontend/form/theme.html.twig' %} 4 | 5 | {% block content %} 6 | {% include 'frontend/register/_header.html.twig' %} 7 | 8 | {{ sonata_block_render_event('sylius.shop.register.after_content_header') }} 9 | 10 |
11 | {{ sonata_block_render_event('sylius.shop.register.before_form') }} 12 | 13 | {{ form_start(form, {'action': path('app_frontend_register'), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }} 14 | {% include 'frontend/register/_form.html.twig' %} 15 | 16 | {{ sonata_block_render_event('sylius.shop.register.form', {'form': form}) }} 17 | 18 | 21 | {{ form_row(form._token) }} 22 | {{ form_end(form, {'render_rest': false}) }} 23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/tests/.gitignore -------------------------------------------------------------------------------- /tests/Behat/Context/Cli/CommandContext.php: -------------------------------------------------------------------------------- 1 | getTester()->getStatusCode(), 0); 24 | } 25 | 26 | /** 27 | * @Then I should see output :text 28 | */ 29 | public function iShouldSeeOutput($text): void 30 | { 31 | Assert::contains($this->getTester()->getDisplay(), $text); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Behat/Context/Transform/AdminUserContext.php: -------------------------------------------------------------------------------- 1 | sharedStorage = $sharedStorage; 28 | } 29 | 30 | /** 31 | * @Transform /^(I|my)$/ 32 | */ 33 | public function getLoggedAdminUser(): ?AdminUserInterface 34 | { 35 | return $this->sharedStorage->get('administrator'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/Behat/Context/Transform/UserContext.php: -------------------------------------------------------------------------------- 1 | sharedStorage = $sharedStorage; 32 | } 33 | 34 | /** 35 | * @Transform /^(I|my|he|his|she|her|"this user")$/ 36 | */ 37 | public function getLoggedUser() 38 | { 39 | return $this->sharedStorage->get('user'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Behat/Context/Ui/Frontend/HomepageContext.php: -------------------------------------------------------------------------------- 1 | homePage = $homePage; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Behat/Element/Backend/TopBarElement.php: -------------------------------------------------------------------------------- 1 | getAvatarImagePath(), $avatarPath) !== false; 23 | } 24 | 25 | public function hasDefaultAvatarInMainBar(): bool 26 | { 27 | return strpos($this->getAvatarImagePath(), '//placehold.it/50x50') !== false; 28 | } 29 | 30 | private function getAvatarImagePath(): string 31 | { 32 | $image = $this->getDocument()->find('css', 'img.ui.avatar.image'); 33 | 34 | if (null === $image) { 35 | return ''; 36 | } 37 | 38 | return $image->getAttribute('src'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/Behat/Exception/NotificationExpectationMismatchException.php: -------------------------------------------------------------------------------- 1 | getTableAccessor(); 27 | $table = $this->getElement('table'); 28 | 29 | $row = $tableAccessor->getRowWithFields($table, ['email' => $customer->getEmail()]); 30 | 31 | return $tableAccessor->getFieldFromRow($table, $row, 'enabled')->getText(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/Behat/Page/Frontend/Account/VerificationPage.php: -------------------------------------------------------------------------------- 1 | tryToOpen(['token' => $token]); 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getRouteName(): string 29 | { 30 | return 'sylius_frontend_user_verification'; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/Behat/Page/Frontend/HomePage.php: -------------------------------------------------------------------------------- 1 | getElement('logout_button')->click(); 29 | } 30 | 31 | public function hasLogoutButton(): bool 32 | { 33 | return $this->hasElement('logout_button'); 34 | } 35 | 36 | /** 37 | * {@inheritdoc} 38 | */ 39 | protected function getDefinedElements(): array 40 | { 41 | return array_merge(parent::getDefinedElements(), [ 42 | 'logout_button' => '.app-logout-button', 43 | ]); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/Behat/Service/Accessor/NotificationAccessorInterface.php: -------------------------------------------------------------------------------- 1 | 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', 21 | 'CONTENT_TYPE' => 'application/json', 22 | ]; 23 | 24 | /** @var array */ 25 | private static $authorizedHeaderWithAccept = [ 26 | 'HTTP_Authorization' => 'Bearer SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ', 27 | 'ACCEPT' => 'application/json', 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /tests/Controller/JsonApiTestCase.php: -------------------------------------------------------------------------------- 1 | dataFixturesPath = __DIR__ . '/../DataFixtures/ORM'; 25 | $this->expectedResponsesPath = __DIR__ . '/../Responses/Expected'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/DataFixtures/ORM/authentication/api_user.yml: -------------------------------------------------------------------------------- 1 | App\Entity\OAuth\Client: 2 | oauth: 3 | randomId: client_id 4 | secret: secret 5 | allowedGrantTypes: [password, access_token, refresh_token] 6 | 7 | App\Entity\OAuth\AccessToken: 8 | oauth_access_token: 9 | client: "@oauth" 10 | user: "@user" 11 | token: SampleTokenNjZkNjY2MDEwMTAzMDkxMGE0OTlhYzU3NzYyMTE0ZGQ3ODcyMDAwM2EwMDZjNDI5NDlhMDdlMQ 12 | 13 | App\Entity\OAuth\RefreshToken: 14 | oauth_refresh_token: 15 | client: "@oauth" 16 | user: "@user" 17 | token: SampleRefreshTokenODllODY4ZTQyOThlNWIyMjA1ZDhmZjE1ZDYyMGMwOTUxOWM2NGFmNGRjNjQ2NDBhMDVlNGZjMmQ0YzgyNDM2Ng 18 | 19 | App\Entity\User\AppUser: 20 | user: 21 | plainPassword: sylius 22 | roles: [ROLE_USER] 23 | enabled: true 24 | customer: "@customer" 25 | username: sylius 26 | 27 | App\Entity\Customer\Customer: 28 | customer: 29 | email: api@sylius.com 30 | firstName: Sam 31 | lastName: Identifie 32 | 33 | -------------------------------------------------------------------------------- /tests/Resources/troll.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/tests/Resources/troll.jpg -------------------------------------------------------------------------------- /tests/Responses/Expected/authentication/new_access_token.json: -------------------------------------------------------------------------------- 1 | { 2 | "access_token": @string@, 3 | "expires_in": 3600, 4 | "token_type": "bearer", 5 | "scope": null, 6 | "refresh_token": @string@ 7 | } 8 | -------------------------------------------------------------------------------- /tests/Responses/Expected/error/not_found_response.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 404, 3 | "message": @string@ 4 | } 5 | -------------------------------------------------------------------------------- /translations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/translations/.gitignore -------------------------------------------------------------------------------- /translations/flashes.fr.yml: -------------------------------------------------------------------------------- 1 | app: 2 | address: 3 | create: L'adresse a bien été créée. 4 | update: L'adresse a bien été mise à jour. 5 | delete: L'adresse a bien été supprimée. 6 | sylius: 7 | admin_user: 8 | create: L'administrateur a bien été créé. 9 | update: L'administrateur a bien été mis à jour. 10 | delete: L'administrateur a bien été supprimé. 11 | user: 12 | change_password: Votre mot de passe a été mis à jour avec succès ! 13 | customer: 14 | create: Le client a bien été créé. 15 | update: Le client a bien été mis à jour. 16 | delete: Le client a bien été supprimé. 17 | update_profile: Votre profil a bien été mis à jour. 18 | register: 'Merci pour votre inscription, vous allez recevoir un mail pour vérifier votre compte.' -------------------------------------------------------------------------------- /translations/messages.en.yml: -------------------------------------------------------------------------------- 1 | app: 2 | ui: 3 | avatar: Avatar 4 | create_user: Create an user 5 | forgotten_password: Forgotten password 6 | legal_notices: Legal notices 7 | overview_of_your_website: Overview of you website 8 | search_customers: Search customers 9 | validate: Validate 10 | view_website: View website 11 | sylius: 12 | ui: ~ 13 | -------------------------------------------------------------------------------- /translations/messages.fr.yml: -------------------------------------------------------------------------------- 1 | app: 2 | ui: 3 | avatar: Avatar 4 | create_user: Créer un utilisateur 5 | forgotten_password: Mot de passe oublié 6 | legal_notices: Mentions légales 7 | overview_of_your_website: Aperçu de votre site web 8 | search_customers: Chercher des clients 9 | validate: Valider 10 | view_website: Voir le site 11 | sylius: 12 | ui: ~ 13 | -------------------------------------------------------------------------------- /var/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monofony/SymfonyStarter/8e0cfc3924c669fabc1a016319bb86ae6774330c/var/.gitkeep -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var backendConfig = require('./assets/backend/webpack.config'); 2 | var frontendConfig = require('./assets/frontend/webpack.config'); 3 | 4 | module.exports = [backendConfig, frontendConfig]; 5 | --------------------------------------------------------------------------------