diff --git a/src/4.x/upgrading.md b/src/4.x/upgrading.md index b68d5e4..def1415 100644 --- a/src/4.x/upgrading.md +++ b/src/4.x/upgrading.md @@ -229,7 +229,8 @@ After (v4): ``` -The `` component has been completely rewritten. The props `dslQuery` and `limit` are removed. The `value` prop now filters by `sku` (or another field via `field`). `field` defaults to `sku` (not `sku.keyword`). +The `` component has been completely rewritten. The prop `limit` has been removed, The `value` prop now filters by `sku` (or another field via `field`). `field` defaults to `sku` (not `sku.keyword`). +The prop `dslQuery` can be replaced by `filterQueryString`. The format has changed from [Elasticsearch Query DSL](https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl) to [Elasticsearch Query string query](https://www.elastic.co/docs/reference/query-languages/query-dsl/query-dsl-query-string-query). Before (v3): ```blade @@ -300,6 +301,8 @@ If this is all correct, no custom commands will be necessary anymore, as the `ra ``` +References to `item.thumbnail` within ``, can be replaced with `addToCart.currentThumbnail` in `resources/views/listing/partials/item.blade.php` + The `` slot syntax changed from `$slot->isEmpty()` checks to `@slotdefault`: ```blade @@ -539,6 +542,8 @@ this.currencySymbolLocation // e.g. 'before' ## 9. Configuration File Changes +Compare the `./config/rapidez/*.php` with `./vendor/rapidez/*/config/rapidez/*.php` and add any missing entries in the overwritten config files. + ### `config/rapidez/frontend.php` | Change | Details | diff --git a/src/5.x/upgrading.md b/src/5.x/upgrading.md index 5badc45..0f28dcc 100644 --- a/src/5.x/upgrading.md +++ b/src/5.x/upgrading.md @@ -18,7 +18,7 @@ Other changes included in this release: Some of these are quite substantially breaking changes. On this page we'll mention the most important things that you will need to do to upgrade. -You should review [all template/config changes](https://github.com/rapidez/core/compare/5.x..master) and check the [full changelog](https://github.com/rapidez/core/releases). +You should review [all template/config changes](https://github.com/rapidez/core/compare/4.x..master) and check the [full changelog](https://github.com/rapidez/core/releases). :::tip For any major update, you should be aware that all overwritten Blade, Vue, and PHP files will need to be checked. Checking the above diff is the quickest way to tell where you need to make changes. @@ -80,7 +80,7 @@ This will require some work but we've got a list of things to check. Please read - [Dropped support for global $emit and $on](https://v3-migration.vuejs.org/breaking-changes/events-api#event-bus), For this we've [built a system on regular events](https://github.com/rapidez/core/blob/cecc136e5ef76dc4925186a332f875d3ffe658fe/resources/js/polyfills/emit.js#L18). You should replace `$root.$on`/`window.app.$on` with `window.$on`. - Check for any `v-if`s in combination with `v-for`, see: [If used on the same element, v-if will have higher precedence than v-for](https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html) - Rename all `slot-scope` to `v-slot` and move them to the component in your template -- The `price`, `truncate` and `url` filters no longer work, replace `@{{ final_price | price }}` with `@{{ price(final_price) }}` +- The `price`, `truncate` and `url` filters no longer work, replace `@{{ final_price | price }}` with `@{{ price(final_price) }}` as well as `$options.filters.price(final_price)` with `price(final_price)` - Any custom async components must be wrapped by `defineAsyncComponent`: `() => import('...')` to `defineAsyncComponent(() => import('...'))` - `window.app` no longer contains the custom variables. Replace `window.app.<...>` e.g. `cart` with `window.app.config.globalProperties.<...>` or if you’re within vue templates directly do `<...>` - When inside js functions all computed (refs) must be retrieved with `.value`. Examples are: `cart.value`, `user.value`, `token.value`, `mask.value`, `loading.value` @@ -203,6 +203,8 @@ These specific variables have been removed and should be replaced like so: | `->reviews_count` | `->reviewSummary->reviews_count` | | | `->reviews_score` | `->reviewSummary->reviews_score` | | +Also check these values in javascript syntax (instead of `->` checking `.`). + ### Translation strings A few translations strings have been changed and added: @@ -223,6 +225,7 @@ Translation files, as well as usage of these translations, should be changed acc ## Using AI? ::: details Using AI? This prompt will give you a head start! Do still check everything manually. +This is a large prompt, we suggest using tools like [Chief](https://chiefloop.com/) to turn it into separate tasks so AI has a smaller chance of making mistakes. `````markdown # Rapidez v5 Upgrade Prompt @@ -501,7 +504,12 @@ export default { } ``` -# 3.11 Check the migration docs +# 3.11 Check blade components + +On any blade component (``) it is no longer possible to add `v-*` attributes without value and must be replaced with empty values `v-*=""`. +For example attributes like `` must be changed to ``. + +# 3.12 Check the migration docs When in doubt view the [Vue 3 migration guide](https://v3-migration.vuejs.org/) @@ -534,6 +542,7 @@ Verify all steps from https://tailwindcss.com/docs/upgrade-guide have been execu ## 5. Flat Table Removal Migration Rapidez v5 queries `catalog_product_entity` and `catalog_category_entity` directly through attribute relations. +Compare the `./config/rapidez/*.php` with `./vendor/rapidez/*/config/rapidez/*.php` and add any missing entries in the overwritten config files. ### 5.1 Query constraints on attributes