Skip to content

Commit

Permalink
Merge pull request #42 from maximehuran/feature/grid-filter
Browse files Browse the repository at this point in the history
Grid filter with translations
  • Loading branch information
maximehuran authored Nov 22, 2022
2 parents 3b6d12d + 69179da commit 3dd5851
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-

- name: Composer v2
run: sudo composer self-update --2
- name: Update composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand All @@ -72,6 +72,7 @@ jobs:
- name: Setup some requirements
working-directory: ./sylius
run: |
composer config --no-plugins allow-plugins true
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
composer config extra.symfony.allow-contrib true
composer config secure-http false
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ jobs:
restore-keys: composer2-php:${{ matrix.php }}-

- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v2
run: sudo composer self-update --2
- name: Update composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand All @@ -45,4 +44,4 @@ jobs:
- name: Install PHP dependencies
run: composer update --prefer-dist

- uses: symfonycorp/security-checker-action@v2
- uses: symfonycorp/security-checker-action@v3
10 changes: 4 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: '14'
Expand All @@ -36,8 +35,8 @@ jobs:
- name: Install symfony CLI
run: |
curl https://get.symfony.com/cli/installer | bash
echo "${HOME}/.symfony/bin" >> $GITHUB_PATH
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash
sudo apt install symfony-cli
- uses: actions/cache@v1
id: cache-composer
Expand All @@ -47,10 +46,9 @@ jobs:
restore-keys: composer2-php:${{ matrix.php }}-

- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v2
run: sudo composer self-update --2
- name: Update composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ setup_application:
(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} config --no-plugins allow-plugins true)
(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
Expand Down
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,13 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/thanks": true,
"ergebnis/composer-normalize": true,
"symfony/flex": true
}
}
}
9 changes: 8 additions & 1 deletion src/Resources/config/sylius/grid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sylius_grid:
name: doctrine/orm
options:
class: '%monsieurbiz_cms_page.model.page.class%'
repository:
method: createListQueryBuilder
arguments: ["%locale%"]
limits: [25, 50, 100, 200]
fields:
code:
Expand Down Expand Up @@ -38,9 +41,13 @@ sylius_grid:
title:
type: string
label: monsieurbiz_cms_page.ui.form.title
options:
fields: [translation.title]
enabled:
type: boolean
label: monsieurbiz_cms_page.ui.form.enabled
content:
type: boolean
type: string
label: monsieurbiz_cms_page.ui.form.content
options:
fields: [translation.content]

0 comments on commit 3dd5851

Please sign in to comment.