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

Bump master demo to Sylius 1.14-dev #291

Merged
merged 10 commits into from
May 14, 2024
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
26 changes: 15 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0]
symfony: [^6.0]
node: [16.x]
mysql: [5.7]
php: ["8.1"]
symfony: ["^6.4"]
node: ["20.x"]
mysql: ["8.0"]

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius_test?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4

-
name: Setup PHP
Expand All @@ -44,7 +44,7 @@ jobs:

-
name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "${{ matrix.node }}"

Expand Down Expand Up @@ -90,11 +90,11 @@ jobs:
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

-
name: Cache Composer
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
Expand All @@ -108,11 +108,11 @@ jobs:
-
name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

-
name: Cache Yarn
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
Expand Down Expand Up @@ -155,14 +155,18 @@ jobs:
name: Validate database schema
run: bin/console doctrine:schema:validate --skip-sync -vvv

-
name: Install Behat driver
run: vendor/bin/bdi detect drivers

-
name: Run Behat
run: |
vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@todo && ~@cli"

-
name: Upload Behat logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/behat.yml
/phpspec.yml

/drivers/

/bin/*
!/bin/console
###> phpunit/phpunit ###
Expand Down
34 changes: 13 additions & 21 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ default:

extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
Robertfausk\Behat\PantherExtension: ~

FriendsOfBehat\MinkDebugExtension:
directory: etc/build
Expand All @@ -20,35 +21,26 @@ default:
files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/"
base_url: "https://127.0.0.1:8080/"
default_session: symfony
javascript_session: chrome_headless
javascript_session: panther
sessions:
symfony:
symfony: ~
chrome_headless:
chromedriver:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome:
selenium2:
browser: chrome
capabilities:
browserName: chrome
browser: chrome
version: ""
marionette: null # https://github.com/Behat/MinkExtension/pull/311
chrome:
switches:
- "start-fullscreen"
- "start-maximized"
- "no-sandbox"
extra_capabilities:
panther:
panther:
manager_options:
connection_timeout_in_ms: 5000
request_timeout_in_ms: 120000
chromedriver_arguments:
- --log-path=etc/build/chromedriver.log
- --verbose
capabilities:
acceptSslCerts: true
acceptInsecureCerts: true
unexpectedAlertBehaviour: accept
goog:chromeOptions:
w3c: false # https://github.com/Sylius/Sylius/issues/10561
firefox:
selenium2:
browser: firefox
show_auto: false

FriendsOfBehat\SymfonyExtension: ~
Expand Down
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@
}
],
"require": {
"php": "^8.0",
"sylius/sylius": "1.13.x-dev as 1.12.4",
"symfony/flex": "^1.7",
"sylius/invoicing-plugin": "~0.24",
"sylius/refund-plugin": "^1.3",
"php": "^8.1",
"sylius/sylius": "1.14.x-dev as 1.13.99",
"symfony/flex": "^2.4",
"sylius/invoicing-plugin": "~0.25",
"sylius/refund-plugin": "^1.5",
"bugsnag/bugsnag-symfony": "^1.7",
"sylius/paypal-plugin": "^1.5",
"symfony/dotenv": "^6.0"
"sylius/paypal-plugin": "^1.6"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"behat/behat": "^3.14",
"dbrekelmans/bdi": "^1.3",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"doctrine/data-fixtures": "^1.4",
Expand All @@ -45,16 +44,17 @@
"lakion/mink-debug-extension": "^2.0",
"lchrusciel/api-test-case": "^5.0",
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.5",
"robertfausk/behat-panther-extension": "^1.1",
"stripe/stripe-php": "^6.43",
"sylius-labs/coding-standard": "^4.2",
"symfony/browser-kit": "^6.0",
"symfony/debug-bundle": "^6.0",
"symfony/intl": "^6.0",
"symfony/web-profiler-bundle": "^6.0"
"sylius-labs/coding-standard": "^4.3",
"symfony/browser-kit": "^6.4",
"symfony/debug-bundle": "^6.4",
"symfony/dotenv": "^6.4",
"symfony/intl": "^6.4",
"symfony/web-profiler-bundle": "^6.4"
},
"conflict": {
"slam/php-cs-fixer-extensions": "^1.19.2",
"bugsnag/bugsnag-symfony": "1.14.0"
},
"minimum-stability": "dev",
Expand Down Expand Up @@ -94,7 +94,7 @@
"extra": {
"symfony": {
"allow-contrib": true,
"require": "^6.0"
"require": "^6.4"
}
}
}
15 changes: 9 additions & 6 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ security:
id: sylius.shop_user_provider.email_or_name_based
sylius_api_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based

password_hashers:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
Expand Down Expand Up @@ -45,7 +44,7 @@ security:
stateless: true
entry_point: jwt
json_login:
check_path: "%sylius.security.new_api_admin_route%/authentication-token"
check_path: "%sylius.security.new_api_admin_route%/administrators/token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
Expand All @@ -58,7 +57,7 @@ security:
stateless: true
entry_point: jwt
json_login:
check_path: "%sylius.security.new_api_shop_route%/authentication-token"
check_path: "%sylius.security.new_api_shop_route%/customers/token"
username_path: email
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
Expand Down Expand Up @@ -93,6 +92,10 @@ security:
target: sylius_shop_homepage
invalidate_session: false

image_resolver:
pattern: ^/media/cache/resolve
security: false

dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
Expand All @@ -114,9 +117,9 @@ security:
- { path: "%sylius.security.admin_regex%", role: ROLE_ADMINISTRATION_ACCESS }
- { path: "%sylius.security.shop_regex%/account", role: ROLE_USER }

- { path: "%sylius.security.new_api_admin_route%/reset-password-requests", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/administrators/reset-password", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_regex%/.*", role: ROLE_API_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/authentication-token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_admin_route%/administrators/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_user_account_regex%/.*", role: ROLE_USER }
- { path: "%sylius.security.new_api_shop_route%/authentication-token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_shop_route%/customers/token", role: PUBLIC_ACCESS }
- { path: "%sylius.security.new_api_shop_regex%/.*", role: PUBLIC_ACCESS }
2 changes: 1 addition & 1 deletion features/filtering_orders_by_products.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: Filtering orders by products
And I should see an order with "#0000001" number
And I should see an order with "#0000003" number

@ui @javascript
@ui @mink:chromedriver
Scenario: Filtering orders by multiple products
When I browse orders
And I filter by products "Galaxy T-Shirt" and "Space Dress"
Expand Down
8 changes: 4 additions & 4 deletions features/filtering_orders_by_variants.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Feature: Filtering orders by variants
And the store ships everywhere for Free
And the store allows paying Offline
And the store has a product "Galaxy Shirt" with code "cosmic-tee"
And this product has "Nebula Top" variant priced at "$25"
And this product also has "Neutron Sleeveless" variant priced at "$20"
And this product has "Nebula Top" variant priced at "$25.00"
And this product also has "Neutron Sleeveless" variant priced at "$20.00"
And the store has a product "Space Dress" with code "cosmic-dress"
And this product has "Sundress" variant priced at "$40"
And this product has "Sundress" variant priced at "$40.00"
And there is a customer "[email protected]" that placed an order "#0000001"
And the customer bought a single "Nebula Top" variant of product "Galaxy Shirt"
And the customer also bought a "Neutron Sleeveless" variant of product "Galaxy Shirt"
Expand Down Expand Up @@ -42,7 +42,7 @@ Feature: Filtering orders by variants
And I should see an order with "#0000001" number
And I should see an order with "#0000002" number

@ui @javascript
@ui @mink:chromedriver
Scenario: Filtering orders by multiple variants of different products
When I browse orders
And I filter by variants "Neutron Sleeveless" and "Sundress"
Expand Down
67 changes: 6 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,13 @@
{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"chart.js": "^3.7.1",
"jquery": "^3.5.0",
"jquery.dirtyforms": "^2.0.0",
"lightbox2": "^2.9.0",
"semantic-ui-css": "^2.2.0",
"slick-carousel": "^1.8.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/preset-env": "^7.18.10",
"@babel/register": "^7.0.0",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-inject": "^4.0.4",
"@rollup/plugin-node-resolve": "^13.3.0",
"@semantic-ui-react/css-patch": "^1.1.2",
"@symfony/webpack-encore": "^3.1.0",
"babel-plugin-fast-async": "^6.1.2",
"babel-plugin-module-resolver": "^4.1.0",
"dedent": "^0.7.0",
"eslint": "^8.23.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-babel-module": "^5.3.1",
"eslint-plugin-import": "^2.26.0",
"fast-async": "^6.3.8",
"gulp": "^4.0.2",
"gulp-chug": "^0.5.1",
"gulp-concat": "^2.6.1",
"gulp-debug": "^4.0.0",
"gulp-if": "^3.0.0",
"gulp-livereload": "^4.0.2",
"gulp-order": "^1.2.0",
"gulp-sass": "^5.1.0",
"gulp-sourcemaps": "^3.0.0",
"gulp-uglifycss": "^1.1.0",
"merge-stream": "^2.0.0",
"rollup": "^2.79.0",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.54.8",
"sass-loader": "^13.0.0",
"upath": "^2.0.1",
"yargs": "^17.5.1"
},
"engines": {
"node": "^14 || ^16 || ^18"
},
"engineStrict": true,
"license": "MIT",
"scripts": {
"watch": "encore dev --watch",
"build": "encore dev",
"build:prod": "encore production",
"gulp": "gulp build",
"postinstall": "semantic-ui-css-patch",
"lint": "yarn lint:js",
"lint:js": "eslint gulpfile.babel.js src/Sylius/Bundle/AdminBundle/gulpfile.babel.js src/Sylius/Bundle/ShopBundle/gulpfile.babel.js src/Sylius/Bundle/UiBundle/Resources/private/js src/Sylius/Bundle/AdminBundle/Resources/private/js src/Sylius/Bundle/ShopBundle/Resources/private/js",
"postinstall": "semantic-ui-css-patch"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Sylius/Sylius.git"
"watch": "encore dev --watch"
},
"author": "Paweł Jędrzejewski",
"license": "MIT"
"devDependencies": {
"@sylius-ui/frontend": "^1.0"
}
}
Loading