Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable schema validate after Payum update #20

Merged
merged 4 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ jobs:
run: |
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"

# Because the sylius-standard has a soft constraint
- name: Make sure to install the required version of Sylius
working-directory: ./sylius
run: |
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"

- name: Setup some requirements
working-directory: ./sylius
run: |
Expand Down
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := help
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=1.10
SYLIUS_VERSION=1.10.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
Expand Down Expand Up @@ -62,19 +62,21 @@ ${APP_DIR}/node_modules: yarn.install
application: .php-version php.ini ${APP_DIR} setup_application ${APP_DIR}/docker-compose.yaml

${APP_DIR}:
(${COMPOSER} create-project --no-interaction --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard="${SYLIUS_VERSION}" ${APP_DIR})
(${COMPOSER} create-project --no-interaction --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard="~${SYLIUS_VERSION}" ${APP_DIR})

setup_application:
rm -f ${APP_DIR}/yarn.lock
(cd ${APP_DIR} && ${COMPOSER} config repositories.plugin '{"type": "path", "url": "../../"}')
(cd ${APP_DIR} && ${COMPOSER} config extra.symfony.allow-contrib true)
(cd ${APP_DIR} && ${COMPOSER} config minimum-stability dev)
(cd ${APP_DIR} && ${COMPOSER} require --no-scripts --no-progress --no-install --no-update monsieurbiz/${PLUGIN_NAME}="*@dev")
$(MAKE) apply_dist
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/sylius="~${SYLIUS_VERSION}") # Make sure to install the required version of sylius because the sylius-standard has a soft constraint
$(MAKE) ${APP_DIR}/.php-version
$(MAKE) ${APP_DIR}/php.ini
cd ${APP_DIR} && ${COMPOSER} install --no-interaction
cd ${APP_DIR} && ${COMPOSER} symfony:recipes:install --no-interaction
(cd ${APP_DIR} && ${COMPOSER} install --no-interaction)
$(MAKE) apply_dist
(cd ${APP_DIR} && ${COMPOSER} require --no-progress monsieurbiz/${PLUGIN_NAME}="*@dev")
rm -rf ${APP_DIR}/var/cache


${APP_DIR}/docker-compose.yaml:
rm -f ${APP_DIR}/docker-compose.yml
Expand Down Expand Up @@ -133,7 +135,7 @@ test.yaml: ## Lint the symfony Yaml files
${CONSOLE} lint:yaml ../../recipes ../../src/Resources/config

test.schema: ## Validate MySQL Schema
${CONSOLE} doctrine:schema:validate || true
${CONSOLE} doctrine:schema:validate

test.twig: ## Validate Twig templates
${CONSOLE} lint:twig --no-debug templates/ ../../src/Resources/views/
Expand Down Expand Up @@ -184,6 +186,11 @@ docker.logs: ## Logs the docker containers
cd ${APP_DIR} && ${COMPOSE} logs -f
.PHONY: docker.logs

docker.dc: ARGS=ps
docker.dc: ## Run docker-compose command. Use ARGS="" to pass parameters to docker-compose.
cd ${APP_DIR} && ${COMPOSE} ${ARGS}
.PHONY: docker.dc

server.start: ## Run the local webserver using Symfony
${SYMFONY} local:server:start -d

Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"symfony/web-profiler-bundle": "^4.4",
"phpmd/phpmd": "@stable"
},
"conflict": {
"doctrine/dbal": "^3"
},
"prefer-stable": true,
"autoload": {
"psr-4": {
Expand Down