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

Dx 495/fix broken links #1194

Merged
merged 3 commits into from
Nov 24, 2023
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
2 changes: 1 addition & 1 deletion .github/scripts/format-code-guidelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ async function formatCode(filePath: string): Promise<void> {
}

function codePathToGithubLink(codePath: string): string {
const urlPath = codePath.replace('resources/guidelines/', '');
const urlPath = codePath.replace('resources/guidelines/code', 'coding-guidelines');
return `https://github.com/shopware/shopware/blob/trunk/${urlPath}`
}
21 changes: 21 additions & 0 deletions .github/workflows/validate-external-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: External link validation

on:
pull_request:
types: [opened, edited]
schedule:
- cron: 0 11 * * *

jobs:
linkvalidator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lychee Link Checker
id: lychee
uses: lycheeverse/[email protected]
with:
args: --accept=200,403,429 -s "https" "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "https://github.com/\[your*" --exclude "https://localhost:9200" --exclude-mail
- name: Fail if there were link errors
continue-on-error: true # to be removed after fixes from platform are applied
run: exit ${{ steps.lychee.outputs.exit_code }}
2 changes: 1 addition & 1 deletion concepts/api/store-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Using plugins, you can add custom routes to the Store API \(as well as any other

## What next?

* To start working with the Store API, check out our [Quick Start guide](https://shopware.stoplight.io/docs/store-api/docs/guides/quick-start/README.md) and explore all endpoints in our reference guide.
* To start working with the Store API, check out our [Quick Start guide](https://shopware.stoplight.io/docs/store-api/38777d33d92dc-quick-start-guide) and explore all endpoints in our reference guide.

* An interesting project based \(almost\) solely on the Store API is [Shopware PWA](../../products/pwa).
2 changes: 1 addition & 1 deletion concepts/commerce/checkout-concept/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These steps are outlined in the diagram below:

The diagram above shows the payment flow for headless environments; however, for the single-stack scenario (i.e., when the default Storefront is used) the differences are minor and described in the section below.

If you want to see a specific example of a headless payment using the Store API, head to [API documentation](https://shopware.stoplight.io/docs/store-api/docs/guides/quick-start/handling-the-payment.md).
If you want to see a specific example of a headless payment using the Store API, head to [API documentation](https://shopware.stoplight.io/docs/store-api/8218801e50fe5-handling-the-payment).

### 1. Select payment method

Expand Down
2 changes: 1 addition & 1 deletion concepts/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order to provide users \(i.e., developers\) with a clear abstraction, Shopwar

![](../../assets/app-extension-model.png)

Starting with Shopware 6.4.0.0, we introduced a new way to extend Shopware using the newly created app system. Apps are not executed within the process of the Shopware Core but are notified about events via webhooks, which they can register. They can modify and interact with Shopware resources through the [Admin REST API](https://shopware.stoplight.io/docs/admin-api).
Starting with Shopware 6.4.0.0, we introduced a new way to extend Shopware using the newly created app system. Apps are not executed within the process of the Shopware Core but are notified about events via webhooks, which they can register. They can modify and interact with Shopware resources through the [Admin REST API](https://shopware.stoplight.io/docs/admin-api/twpxvnspkg3yu-quick-start-guide).

## Plugins

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This feature has been introduced with Shopware version 6.4.3.1
The [SameSite configuration](https://symfony.com/doc/current/reference/configuration/framework.html#cookie-samesite) comes with the Symfony FrameworkBundle and supersedes the removed `sw_csrf` Twig function.
It is widely [available](https://caniuse.com/same-site-cookie-attribute) in modern browsers and is set to `lax` per default.

For more information, refer to [SameSite cookies site](https://web.dev/i18n/en/samesite-cookies-explained/)
For more information, refer to [SameSite cookies site](https://web.dev/articles/samesite-cookies-explained?hl=en)

## Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ bin/console es:create:alias
## Logfiles and tipps

You can usually find the Elasticsearch logfiles at [`/var/log/elasticsearch`](https://www.elastic.co/guide/en/elasticsearch/reference/master/settings.html#_config_file_format) to check for any issues when indexing.
Also, tools like [Kibana](https://www.elastic.co/what-is/kibana) or [Cerebro](https://wissen.profihost.com/wissen/artikel/cerebro/) can help you better understand what is happening in your Elasticsearch.
Also, tools like [Kibana](https://www.elastic.co/kibana) or [Cerebro](https://wissen.profihost.com/wissen/artikel/cerebro/) can help you better understand what is happening in your Elasticsearch.
4 changes: 2 additions & 2 deletions guides/integrations-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Generally, Shopware provides two APIs that serve two aspects of integrations wit

Frontend applications usually provide interfaces for users \(customers\). These applications usually don't expose sensitive data and have two layers of users - anonymous and authenticated i.e., unregistered and registered. Payloads are usually small, performance and availability are critical.

<PageRef page="https://shopware.stoplight.io/docs/store-api/storeapi.json" title="Store API Endpoint Reference" target="_blank" />
<PageRef page="https://shopware.stoplight.io/docs/store-api/7b972a75a8d8d-shopware-store-api" title="Store API Endpoint Reference" target="_blank" />

## Backend-facing integrations - Admin API

These integrations are characterized by the exchange of structured data, synchronizations, imports, exports and notifications. Performance is also important in terms of high data loads rather than fast response times. Consistency, error handling, and transaction-safety are critical.

<PageRef page="https://shopware.stoplight.io/docs/admin-api/adminapi.json" title="Admin API Endpoint Reference" target="_blank" />
<PageRef page="https://shopware.stoplight.io/docs/admin-api/8d53c59b2e6bc-shopware-admin-api" title="Admin API Endpoint Reference" target="_blank" />

Shopware's Store and Admin APIs offer essential technical resources for you to interact with and customize the platform's core functions, enabling tailored solutions and seamless integration.
12 changes: 6 additions & 6 deletions guides/plugins/plugins/administration/add-custom-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ nav:

Since the Shopware 6 Administration is using [VueJS](https://vuejs.org/) as its framework, it also supports creating custom components. This guide will teach you how to register your own custom component with your plugin.

In this example, you will create a component, that will print a 'Hello world!' everywhere it's being used.
In this example, you will create a component that will print a 'Hello world!' everywhere it's being used.

## Prerequisites

This guide **does not** explain how to create a new plugin for Shopware 6. Head over to our Plugin base guide to learn how to create a plugin at first:

<PageRef page="../plugin-base-guide" />

If you want to work with entities in your custom component or page, it might be useful to take a look at how to create custom entity guide first:
If you want to work with entities in your custom component or page, it might be useful to take a look at how to create a custom entity guide first:

<PageRef page="../framework/data-handling/add-custom-complex-data" />

Especially if you want to add a new page for an own module, you should consider to look at the process on how to add a custom module first.
Especially if you want to add a new page for an own module, you should consider looking at the process on how to add a custom module first.

<PageRef page="add-custom-module" />

Expand Down Expand Up @@ -106,14 +106,14 @@ Shopware.Component.register('hello-world', {
});
```

This is a [shorthand](https://alligator.io/js/object-property-shorthand-es6/), which can only be used if the variable is named exactly like the property.
This is a [shorthand](https://eslint.org/docs/latest/rules/object-shorthand), which can only be used if the variable is named exactly like the property.

## Next steps

You've now added a custom component, including a little template. However, there's more discover here.
You've now added a custom component, including a little template. However, there's more to discover here.

* [More about templates](writing-templates)
* [Add some styling to your component](add-custom-styles)
* [Use shortcuts for your component](add-shortcuts)

Furthermore, what about [customizing other components](customizing-components), instead of creating new ones.
Furthermore, what about [customizing other components](customizing-components), instead of creating new ones?
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Now your module's `index.js` will be executed.
## Override the component

Your `index.js` is still empty now, so let's override the `sw-settings-rule-detail-assignments` component.
This is technically done by calling the method `override` method of our [ComponentFactory](https://github.com/shopware/shopware/blob/trunk/src/Administration/Resources/app/administration/src/core/factory/component.factory.ts), which is available through our third party wrapper.
This is technically done by calling the method `override` method of our [ComponentFactory](https://github.com/shopware/shopware/blob/trunk/src/Administration/Resources/app/administration/src/core/factory/async-component.factory.ts), which is available through our third party wrapper.
This method expects a name, and a configuration for the component you want to override.

```javascript
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/plugins/api/customer-specific-pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Customer-specific pricing is part of the Commercial plugin, requiring an existin
To create, alter and/or delete customer-specific prices, you can use the API endpoint `/api/_action/custom-price`. Like with any other admin request in Shopware, you must first authenticate yourself. Therefore, please head over to the
[authentication guide](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEwODA3NjQx-authentication) for details.

Otherwise, the Customer-specific Pricing API interface models itself upon the interface of the [sync API](https://shopware.stoplight.io/docs/admin-api), so you will be able to package your requests similarly.
Otherwise, the Customer-specific Pricing API interface models itself upon the interface of the [sync API](https://shopware.stoplight.io/docs/admin-api/twpxvnspkg3yu-quick-start-guide), so you will be able to package your requests similarly.

::: info
You can use the route with single `upsert` and `delete` actions or even combine those in a single request: you can pack several different commands inside one sync API request, and each of them is executed in an independent and isolated way
Expand Down
3 changes: 1 addition & 2 deletions guides/plugins/plugins/api/multi-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ To create, modify or delete Warehouses, WarehouseGroups etc., related to Multi-I
Meanwhile, refer to the following links regarding the general use of the Admin API:

* [Authentication & Authorization](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEwODA3NjQx-authentication)
* [Request & Response Structure](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEyMzAzNDU1-request-and-response-structure)
* [Endpoint Structure](https://shopware.stoplight.io/docs/admin-api/ZG9jOjEyMzA1ODA5-endpoint-structure)
* [Request,Response and Endpoint Structure](https://shopware.stoplight.io/docs/admin-api/9a4d773bd3665-request-and-response-structure)

## Data structure

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Administration

B2B Suite Administration modules are built following the official [Shopware Administration](https://developer.shopware.com/docs/guides/plugins/plugins/administration) documentation. For a more in-depth guide, please refer to the [User documentation](https://docs.shopware.com/en/shopware-6-en/extensions/b2b-suite-administration).
B2B Suite Administration modules are built following the official [Shopware Administration](https://developer.shopware.com/docs/guides/plugins/plugins/administration/) documentation. For a more in-depth guide, please refer to the [User documentation](https://docs.shopware.com/en/shopware-6-en/extensions/b2b-suite-administration).
2 changes: 1 addition & 1 deletion products/extensions/b2b-suite/guides/core/entity-acl.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ As you can see in the graphic below, access control is basically a concern of ev
![acl addresses](../../../../../assets/acl-architecture.svg)

The base ACL component described in this document provides functionality for repository filtering and service checks.
The [Authentication component](https://docs.enterprise.shopware.com/b2b-suite/technical/store-front-authentication/) provides the context for the currently logged-in user and the [ACL route](https://docs.enterprise.shopware.com/b2b-suite/technical/acl-routes/) component then provides the ability to secure routes and means of inspection for allowed routes.
The [Authentication component](authentication) provides the context for the currently logged-in user and the [ACL route](../storefront/acl-routing) component then provides the ability to secure routes and means of inspection for allowed routes.

## Naming

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/6.5-new-php-language-features.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/6.5-new-php-language-features.md)
:::

# 2023-05-16 - PHP 8.1 & Symfony 6.1 new features
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/adr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/adr.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/adr.md)
:::

# ADR
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/benchmarks.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/benchmarks.md)
:::

# Benchmarks
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/decorator-pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/decorator-pattern.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/decorator-pattern.md)
:::

# Decorator pattern
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/domain-exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/domain-exceptions.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/domain-exceptions.md)
:::

# Domain exceptions
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/extendability.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/extendability.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/extendability.md)
:::

# Extendability
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/final-and-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/final-and-internal.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/final-and-internal.md)
:::

# Final and internal annotation
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/internal.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/internal.md)
:::

# Internal
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/code/core/unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/unit-tests.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/unit-tests.md)
:::

# Unit tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::: info
This document represents core guidelines and has been mirrored from the core in our Shopware 6 repository.
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/code/core/writing-code-for-static-analysis.md)
You can find the original version [here](https://github.com/shopware/shopware/blob/trunk/coding-guidelines/core/writing-code-for-static-analysis.md)
:::

# Writing code for static analysis
Expand Down
2 changes: 1 addition & 1 deletion resources/guidelines/testing/e2e-best-practises.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ We strongly recommend following Cypress own best practices as well.

When it comes to dividing test types, selecting and prioritizing test cases, and thus designing tests, things get a bit more complicated. We have generally aligned our test strategy with the test pyramid, although not 100%. The pyramid states that end-to-end tests should be written in a few but well chosen test cases because end-to-end tests are slow and expensive.

At [Shopware Community Day](https://scd.shopware.com/en/) 2020, we gave a talk on how we approach automated testing in Shopware, how far we have come on this journey, and what we have gained so far:
At [Shopware Community Day](https://scd.shopware.com/en-US/) 2020, we gave a talk on how we approach automated testing in Shopware, how far we have come on this journey, and what we have gained so far:

<YoutubeRef video="sxvQoWF4KS0" title="A matter of trust – test - #SCD20 (ENG) - YouTube" target="_blank" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ Error or informational messages can only be recorded in the event log of Shopwar
Avoid 400/500 errors at any time unless the 400 errors are related to an API call.
:::

### Untrusted content should not be included

See [Untrusted content should not be included in SonarQube rules](https://rules.sonarsource.com/javascript/RSPEC-2611)

### Extension manager

The Debug Console controls the app's installation, uninstallation, reinstallation, and deletion. No 400 errors or exceptions are allowed to appear.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ Error or informational messages can only be recorded in the event log of Shopwar
Avoid 400/500 errors at any time unless the 400 errors are related to an API call.
:::

### Untrusted content should not be included

See [Untrusted content should not be included in SonarQube rules](https://rules.sonarsource.com/javascript/RSPEC-2611).

### Own media folder

Customers must create own media folders or use existing ones to upload images.
Expand Down
Loading
Loading