Skip to content

Commit

Permalink
Merge branch 'main' into next-39316-mysql-invalidator-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan authored Jan 7, 2025
2 parents 1572a0d + 592ec37 commit 109c442
Show file tree
Hide file tree
Showing 39 changed files with 116 additions and 89 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Shopware platform editor configuration normalization
# http://editorconfig.org/

# This is the top-most .editorconfig file; do not search in parent directories.
root = true

# All files.
[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea
.vscode
/dictionary.dic
/dictionary.dic

# VSCode-Project
/.vscode/
!/.vscode/settings.json
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
4 changes: 2 additions & 2 deletions guides/hosting/configurations/observability/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The OpenTelemetry profiler is not installed by default. Checkout the [OpenTeleme
To add custom spans to the profiler, you can use the `Shopware\Core\Profiling\Profiler::trace` method:

```PHP
```php
use Shopware\Core\Profiling\Profiler;
$value = Profiler::trace('my-example-trace', function () {
Expand All @@ -50,7 +50,7 @@ To add a custom profiler backend, you need to implement the `Shopware\Core\Profi

The following example shows a custom profiler backend that logs the traces to the console:

```PHP
```php
namespace App\Profiler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ variables:
Deploy:
stage: deploy
# Tags are useful to only use runners that are safe or meet specific requirements
image: shopware/shopware-cli:latest-php-8.3
image:
name: shopware/shopware-cli:latest
entrypoint: [ "/bin/sh", "-c" ]
before_script:
# First, we need to execute all commands that are defined in the `configureSSHAgent` variable.
- *configureSSHAgent
Expand Down
4 changes: 2 additions & 2 deletions guides/hosting/performance/k6.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The command `framework:demodata` can also execute multiple times in parallel, so

To run the tests, we need an scenario file. The repository comes with a example scenario file that you can use to test your store.

```js
```javascript
// example.js
import {
accountRegister,
Expand Down Expand Up @@ -127,7 +127,7 @@ so now the test will run with 10 virtual users and 100 iterations.

You can also run multiple scenarios in the same file. To do this, you can define them in the options like so:

```js
```javascript
// example.js
import { productChangePrice, productChangeStocks, fetchBearerToken, useCredentials, productImport } from "./helpers/api.js";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ When our extension is finished, you will get the following file structure:

Everything starts in the `main.ts` file:

```js
```javascript
import 'regenerator-runtime/runtime';
import { location } from '@shopware-ag/meteor-admin-sdk';

Expand Down Expand Up @@ -88,7 +88,7 @@ Observe that every file is named according to the component and prefixed with `s

Let us see how the component loading via `viewRenderer.ts` looks like:

```js
```javascript
import Vue from 'vue';
import { location } from '@shopware-ag/meteor-admin-sdk';

Expand Down Expand Up @@ -135,7 +135,7 @@ Those will be available after **registering the component**, which we will do in

For this topic we head to `mainCommands.ts`, since the registration of CMS elements is something to be done in a global scope.

```js
```javascript
import { cms } from '@shopware-ag/meteor-admin-sdk';

const CMS_ELEMENT_NAME = 'swag-dailymotion';
Expand Down Expand Up @@ -181,7 +181,7 @@ You can vary the structure of `swag-dailymotion`'s contents and create folders f

Let's go through each of the files to talk about it's contents, starting with `swag-dailymotion-config.ts`:

```js
```javascript
import Vue from 'vue'
import { data } from "@shopware-ag/meteor-admin-sdk";
import CONSTANTS from "../../base/mainCommands";
Expand Down Expand Up @@ -247,7 +247,7 @@ With these small additions to typical CMS element behavior, you have already don
Now let's have a look at the result of `swag-dailymotion-element.ts`:
```js
```javascript
import Vue from 'vue'
import { data } from "@shopware-ag/meteor-admin-sdk";
import CONSTANTS from "../../base/mainCommands";
Expand Down Expand Up @@ -311,7 +311,7 @@ It initially fetches the `element` data, as you've already seen it in the config
Lastly, have a look at `swag-dailymotion-preview.ts`. In most cases, not much logic is to be found here, since this is the preview loaded when choosing a CMS element for your block. It makes sense to show an example preview, a miniature skeleton of the result, or just the Dailymotion logo. Therefore, the following code will suffice for your example extension:
```js
```javascript
import Vue from 'vue'
export default Vue.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ One extension possibility in the Administration is the ability to add custom act
To get those buttons, you start in the `admin` section of your manifest file. There you can define `<action-button>` elements in order to add your button, as seen as below:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -297,7 +297,7 @@ This feature was added in Shopware 6.4.10.0, previous versions don't support rel
To use custom endpoints as the target url for action buttons you can define the target url as a relative url in your apps manifest.xml:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
6 changes: 3 additions & 3 deletions guides/plugins/apps/administration/add-custom-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To configure your module, you can set it up with with some additional attributes
Additionally you can define `label` elements inside of your `module` element, to set up how your module will be displayed in the admin menu.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -136,7 +136,7 @@ When you define a module, it gets automatically loaded by the Administration. Ad
The navigation id of your modules always uses the pattern `app-<appName>-<moduleName>`. So, within your manifest you can add a reference to modules that you just created:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -176,7 +176,7 @@ Your main module can be defined by adding a `main-module` element within your `a
To avoid mixing other modules with your main module, we decided to separate the main module from modules with navigation entries. You can still use the same URL on both, a module that is available through the menu and your main module.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
4 changes: 2 additions & 2 deletions guides/plugins/apps/app-base-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To get started with your app, create an `apps` folder inside the `custom` folder
The manifest file is the central point of your app. It defines the interface between your app and the Shopware instance. It provides all the information concerning your app, as seen in the minimal version below:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -299,7 +299,7 @@ Since version 6.4.12.0, your app can also request additional non-CRUD privileges
Sample permissions to read, create and update products, delete orders, as well as reading the cache configuration look like this:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/app-scripts/cart-manipulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ In general, Shopware prices consist of gross and net prices and are currency dep
You can define price fields for [custom fields](../custom-data/custom-fields)

```xml
// manifest.xml
<!-- manifest.xml -->
<custom-fields>
<custom-field-set>
<name>custom_field_test</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After the installation, you can use the SDK in your project. Here is an example:

## Registration process

```js
```javascript
import { AppServer, InMemoryShopRepository } from '@shopware-ag/app-server-sdk'

const app = new AppServer({
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/app-sdks/javascript/02-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The lifecycle registration in the `manifest.xml` would look like this:

The implementation is similar to [Registration](./01-getting_started),

```js
```javascript
import { AppServer, InMemoryShopRepository } from '@shopware-ag/app-server-sdk'

const app = new AppServer({
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/app-sdks/javascript/03-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The ContextResolver helps you to validate the Request, resolve the Shop and prov

## Usage

```js
```javascript
import { AppServer } from '@shopware-ag/app-server-sdk'

const app = new AppServer(/** ... */);
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/custom-data/custom-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To enable the usage of custom fields, the `custom-fields-aware` setting should b

Now you will find your entity in the "Entity Type" select when creating a custom field of type "Entity Select". Without a snippet label for the entity, it will display as `custom_entity_bundle.label`. You can create a snippet to add a label like so:

```js
```javascript
// Resources/app/administration/snippet/en-GB.json
{
"custom_entity_bundle": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ From 6.5.2.0, you can define the flow action in `flow.xml`. The `flow-action.xml
The manifest file is the central point of your app. It defines the interface between your app and the Shopware instance. It provides all the information concerning your app, as seen in the minimal version below:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To get started with your app, create an `apps` folder inside the `custom` folder
The manifest file is the central point of your app. It defines the interface between your app and the Shopware instance. It provides all the information concerning your app, as seen in the minimal version below:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -216,7 +216,7 @@ Snippet keys should be defined based on your trigger name defined at `<name>` in
</flow-extensions>
```

```js
```javascript
// custom/apps/FlowBuilderTriggerApp/Resources/app/administration/snippet/en-GB.json
{
"sw-flow-custom-event": {
Expand Down
16 changes: 8 additions & 8 deletions guides/plugins/apps/shipping-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following example represents the most minimal configuration for a shipping m
Ensure that the `<identifier>` of your shipping method remains unchanged, as Shopware will deactivate or delete shipping methods that do no longer appear in the manifest during app updates.

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -91,7 +91,7 @@ The following values are possible units
* year

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -129,7 +129,7 @@ The functionality offers more than one identifier name. The following examples r
* Shipping method active (expects true or false). Default value is `false`

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -174,7 +174,7 @@ Please note that the manifest cannot modify the description once you install the
:::

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -217,7 +217,7 @@ Please note that the manifest cannot modify the icon once you install the app, a
:::

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -247,7 +247,7 @@ You can activate the shipping method by default. Possible values for active are
* false: Deactivates the shipping method. Alternatively, you can leave out active

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -274,7 +274,7 @@ You can activate the shipping method by default. Possible values for active are
It is possible to add a tracking URL for customers to monitor the delivery status.

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -301,7 +301,7 @@ It is possible to add a tracking URL for customers to monitor the delivery statu
Here, you can set the display order of the shipping methods in the checkout. If you omit the tag, the position of the shipping method is 1 by default.

```xml
// manifest.xml
<!-- manifest.xml -->

<?xml version="1.0" encoding="UTF-8" ?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/starter/add-api-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ When using a self-hosted Shopware version, you can also create the project direc
Next, we will put our basic configuration into the file we just created.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
4 changes: 2 additions & 2 deletions guides/plugins/apps/starter/starter-admin-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ When you are using a self-hosted Shopware version, you can also create the proje
Next, we will put our basic configuration into the file we just created.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -113,7 +113,7 @@ The final step of the setup is to configure your app to use that file as an entr
To do that, we have to add an `admin` section to our `manifest.xml` file and pass it into the `base-app-url` tag:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
4 changes: 2 additions & 2 deletions guides/plugins/apps/storefront/cookies-with-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You should be familiar with the concept of apps.
To add new cookies to the cookie consent manager, you can add a `cookies` section to your `manifest.xml`. Inside this section, you can add new `cookie` elements, as shown in the following example. Note that you don't need a `setup` section in your `manifest.xml` since extending the Storefront doesn't need a registration nor an own server to run.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down Expand Up @@ -55,7 +55,7 @@ When adding multiple cookies through your app it may become handy to group them.
To add a cookie group, you can add a `groups` section within your `cookies` section in your `manifest.xml`. In the following example, we use the cookie that we created in the previous section but display it in a cookie group:

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/storefront/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Note that this feature was introduced in Shopware 6.4.12.0, and is not supported
You may want your templates loaded before or after other extensions. To do so, you can define a `template-load-priority` inside your `manifest.xml`. The default value to this is 0, with positive numbers your template will be loaded earlier, and with negative numbers later.

```xml
// manifest.xml
<!-- manifest.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/shopware/trunk/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
<meta>
Expand Down
Loading

0 comments on commit 109c442

Please sign in to comment.