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

Add Sylius 1.14 compatibility #1

Merged
merged 1 commit into from
Jan 22, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
sylius: ["~1.12.0", "~1.13.0"]
php: ['8.1', '8.2', '8.3']
sylius: ["~1.12.0", "~1.13.0", "1.14.0"]

steps:
- name: Setup PHP
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']

env:
COMPOSER_ARGS: --prefer-dist
Expand Down
2 changes: 1 addition & 1 deletion .php-version.dist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.2
8.3
60 changes: 21 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.DEFAULT_GOAL := help
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=1.13.0
SYLIUS_VERSION=1.14.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
export COMPOSE_PROJECT_NAME=sylius_robots_txt_plugin
PLUGIN_NAME=sylius-robots-txt-plugin
COMPOSE=docker-compose
export COMPOSE_PROJECT_NAME=robots-txt
export MIGRATIONS_NAMESPACE=MonsieurBiz\\SyliusRobotsTxtPlugin\\Migrations
export USER_UID=$(shell id -u)
PLUGIN_NAME=sylius-${COMPOSE_PROJECT_NAME}-plugin
COMPOSE=docker compose
YARN=yarn
DOCTRINE_MIGRATIONS_NAMESPACE=MonsieurBiz\SyliusRobotsTxtPlugin\Migrations


###
### DEVELOPMENT
Expand Down Expand Up @@ -78,14 +78,15 @@ setup_application:
$(MAKE) ${APP_DIR}/php.ini
(cd ${APP_DIR} && ${COMPOSER} install --no-interaction)
$(MAKE) apply_dist
(cd ${APP_DIR} && ${COMPOSER} require --no-progress monsieurbiz/${PLUGIN_NAME}="*@dev")
(cd ${APP_DIR} && ${COMPOSER} require --no-progress --no-interaction monsieurbiz/${PLUGIN_NAME}="*@dev")
rm -rf ${APP_DIR}/var/cache
rm -f ${APP_DIR}/public/robots.txt # Remove the default robots.txt file to let our controller render contents


${APP_DIR}/docker-compose.yaml:
rm -f ${APP_DIR}/docker-compose.yml
rm -f ${APP_DIR}/docker-compose.yaml
rm -f ${APP_DIR}/compose.yml # Remove Sylius file about Docker
rm -f ${APP_DIR}/compose.override.dist.yml # Remove Sylius file about Docker
ln -s ../../docker-compose.yaml.dist ${APP_DIR}/docker-compose.yaml
.PHONY: ${APP_DIR}/docker-compose.yaml

Expand All @@ -110,7 +111,7 @@ apply_dist:
### TESTS
### ¯¯¯¯¯

test.all: test.composer test.phpstan test.phpmd test.phpcs test.yaml test.schema test.twig test.container ## Run all tests in once
test.all: test.composer test.phpstan test.phpmd test.phpunit test.phpspec test.phpcs test.yaml test.schema test.twig test.container ## Run all tests in once

test.composer: ## Validate composer.json
${COMPOSER} validate --strict
Expand All @@ -121,6 +122,12 @@ test.phpstan: ## Run PHPStan
test.phpmd: ## Run PHPMD
${COMPOSER} phpmd

test.phpunit: ## Run PHPUnit
${COMPOSER} phpunit

test.phpspec: ## Run PHPSpec
${COMPOSER} phpspec

test.phpcs: ## Run PHP CS Fixer in dry-run
${COMPOSER} run -- phpcs --dry-run -v

Expand All @@ -131,29 +138,13 @@ test.container: ## Lint the symfony container
${CONSOLE} lint:container

test.yaml: ## Lint the symfony Yaml files
${CONSOLE} lint:yaml ../../src/Resources/config
${CONSOLE} lint:yaml ../../src/Resources/config --parse-tags

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

test.twig: ## Validate Twig templates
${CONSOLE} lint:twig --no-debug templates/

###
### MIGRATIONS
### ¯¯¯¯¯¯¯¯¯¯

app.doctrine.migration.diff: ## Create a diff migration file for the Test Application
${CONSOLE} doctrine:migrations:diff --namespace="App\Migrations"
.PHONY: app.doctrine.migration.diff

doctrine.migration.diff: ## Create a diff migration file for the Plugin itself
${CONSOLE} doctrine:migrations:diff --namespace="${DOCTRINE_MIGRATIONS_NAMESPACE}"
.PHONY: doctrine.migration.diff

doctrine.migration.migrate: ## Run migrations
${CONSOLE} doctrine:migration:migrate -n
.PHONY: doctrine.migration.migrate
${CONSOLE} lint:twig --no-debug templates/ ../../src/Resources/views/

###
### SYLIUS
Expand All @@ -178,6 +169,9 @@ sylius.assets: ## Install all assets with symlinks
messenger.setup: ## Setup Messenger transports
${CONSOLE} messenger:setup-transports

doctrine.diff: ## Doctrine diff
${CONSOLE} doctrine:migration:diff --namespace="${MIGRATIONS_NAMESPACE}"

###
### PLATFORM
### ¯¯¯¯¯¯¯¯
Expand Down Expand Up @@ -215,18 +209,6 @@ server.start: ## Run the local webserver using Symfony
server.stop: ## Stop the local webserver
${SYMFONY} local:server:stop

###
### GITHUB CODESPACES
### ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

codespace.hostname: ${APP_DIR}/.env.local ## Init the SYLIUS_FIXTURES_HOSTNAME variable in .env.local
ifdef CODESPACES
echo SYLIUS_FIXTURES_HOSTNAME=${CODESPACE_NAME}-8000.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} >> ${APP_DIR}/.env.local
endif

${APP_DIR}/.env.local:
touch ${APP_DIR}/.env.local

###
### HELP
### ¯¯¯¯
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ Manage your robots.txt from your Sylius admin pannel

## Compatibility

| Sylius Version | PHP Version |
|---|---|
| 1.12 | 8.1 - 8.2 |
| 1.13 | 8.1 - 8.2 |
| Sylius Version | PHP Version |
|----------------|-----------------|
| 1.12 | 8.1 - 8.2 - 8.3 |
| 1.13 | 8.1 - 8.2 - 8.3 |
| 1.14 | 8.1 - 8.2 - 8.3 |

## Installation

Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"license": "MIT",
"require": {
"monsieurbiz/sylius-settings-plugin": "^1.2.0",
"php": "^8.0",
"sylius/sylius": ">=1.12 <1.14"
"php": "^8.1",
"sylius/sylius": ">=1.12 <2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.16",
Expand Down Expand Up @@ -36,9 +36,6 @@
"phpspec": "phpspec run"
},
"extra": {
"branch-alias": {
"dev-master": "0.1-dev"
},
"symfony": {
"docker": false,
"endpoint": ["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master", "flex://defaults"]
Expand Down
Empty file added src/Resources/views/.gitkeep
Empty file.
Loading