Skip to content

Commit

Permalink
Merge branch 'main' into next-6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanrajh committed Jan 23, 2025
2 parents 2e23d9e + 1f3089d commit 4c099c4
Show file tree
Hide file tree
Showing 62 changed files with 798 additions and 211 deletions.
64 changes: 64 additions & 0 deletions .github/scripts/broken-pageref.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// deno run --allow-read .github/scripts/broken-pageref.js

import { resolve, dirname, fromFileUrl } from "https://deno.land/std/path/mod.ts";
import { walk } from "https://deno.land/std/fs/mod.ts";

const rootDir = resolve(Deno.cwd());

async function findBrokenLinks() {
const brokenLinks = [];

for await (const entry of walk(rootDir, { exts: ['.md'], followSymlinks: true })) {
if (entry.isFile) {
const content = await Deno.readTextFile(entry.path);
const matches = [...content.matchAll(/<PageRef page="([^"]+)"/g)];

for (const match of matches) {
let relativePath = match[1];

if (relativePath.startsWith('http')) {
continue
}

if (relativePath.includes('#')) {
relativePath = relativePath.split('#')[0]
}

if (relativePath.endsWith('/')) {
relativePath = `${relativePath}/index.md`
}

if (relativePath.endsWith('.html')) {
relativePath = `${relativePath.substring(0, relativePath.length - '.html'.length)}.md`
} else if (!relativePath.endsWith('.md')) {
relativePath = `${relativePath}.md`
}

const resolvedPath = resolve(dirname(entry.path), relativePath);

try {
await Deno.stat(resolvedPath);
} catch {
brokenLinks.push({ file: entry.path, relativePath, resolvedPath });
}
}
}
}

return brokenLinks;
}

const brokenLinks = await findBrokenLinks();
if (brokenLinks.length) {
console.log('Broken links found:');
brokenLinks.forEach(link => {
console.log(`File: ${link.file}`);
console.log(`Relative Path: ${link.relativePath}`);
console.log(`Resolved Path: ${link.resolvedPath}`);
console.log('---');
});
Deno.exit(1)
}

console.log('No broken links found.');
Deno.exit(0)
7 changes: 7 additions & 0 deletions .github/workflows/markdown-style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- uses: denoland/setup-deno@v1
with:
deno-version: "~1.32"

- name: Check broken PageRef links
run: deno run --allow-read .github/scripts/broken-pageref.js

- name: Lint all files
uses: docker://avtodev/markdown-lint:v1.5
with:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/version-milestone-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check docs milestone and shopware version

on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:

jobs:
check-milestone-and-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get all open pull requests
id: get_open_prs
run: |
open_prs=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls?state=open" | jq -r '.[].number' | tr '\n' ' ')
echo "open_prs=$open_prs" >> $GITHUB_ENV
- name: Process each pull request
run: |
for pr_number in $open_prs; do
milestone=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/$pr_number" | jq -r .milestone.title)
latest_version=$(curl -s https://api.github.com/repos/shopware/shopware/releases/latest | jq -r .tag_name)
if [ "$milestone" == "$latest_version" ]; then
existing_comments=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/comments" | jq -r '.[].body')
if ! echo "$existing_comments" | grep -q "The feature is ready to be merged @Isengo1989 @sushmangupta @bojanrajh"; then
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-X POST \
-d "{\"body\": \"The feature is ready to be merged @Isengo1989 @sushmangupta @bojanrajh\"}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/comments"
fi
# Remove blocked label if it exists
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels" | jq -r '.[].name' | grep -q "blocked" && \
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-X DELETE \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels/blocked"
else
if [ "$milestone" != "null" ]; then
# Add blocked label if it does not exist
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels" | jq -r '.[].name' | grep -q "blocked" || \
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-X POST \
-d "{\"labels\": [\"blocked\"]}" \
"https://api.github.com/repos/${{ github.repository }}/issues/$pr_number/labels"
fi
fi
done
31 changes: 28 additions & 3 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ appVersion
args
arrayfacade
ArrayFacade
AssociationField
async
AsynchronousPaymentHandlerInterface
AsyncPaymentTransactionStruct
Expand All @@ -83,6 +84,7 @@ AuthenticationIdentityLoader
autocompletion
autogenerate
autogenerated
AutoIncrementField
autoload
autoloaded
autoloader
Expand All @@ -98,6 +100,7 @@ axios
B2B Component
B2B Components
B2B Suite
BackedEnum
backend
Backend
backends
Expand Down Expand Up @@ -148,6 +151,7 @@ BottleJS
bourgau
bPlatform
brainer
BreadcrumbField
bRestApi
browserslist
bruteforce
Expand Down Expand Up @@ -201,6 +205,7 @@ CartVerifyPersistEvent
CartWeightRule
CascadeDelete
CashRounding
CashRoundingConfigField
catchable
catched
CategoryRoute
Expand Down Expand Up @@ -259,6 +264,8 @@ cmsService
codebase
codeblock
codeblocks
codemods
Codemods
codereview
Codestyle
colorpicker
Expand Down Expand Up @@ -330,6 +337,8 @@ CriteriaEvent
CriteriaParser
CriteriaTest
cron
croninterval
CronIntervalField
Cronjobs
CrossSellingDataSet
cryptographic
Expand Down Expand Up @@ -391,6 +400,8 @@ datasets
DataSets
DataStorer
DateField
dateinterval
DateIntervalField
datepicker
Datepicker
DateRangeRule
Expand Down Expand Up @@ -434,8 +445,8 @@ dereference
dereferenced
DESC
describeFeatures
destructuring
destructure
destructuring
Deutsch
dev
devenv
Expand Down Expand Up @@ -527,6 +538,7 @@ entrypoints
enum
Enum
ENUM
EnumField
enums
Enums
ENUMS
Expand Down Expand Up @@ -585,6 +597,7 @@ filesystem
Filesystem
filesystems
firstname
fk
Fk
FkField
flattenDeep
Expand Down Expand Up @@ -862,6 +875,7 @@ LoginContextService
loginRequired
LoginRequired
loginViaApi
longtext
LongText
LONGTEXT
LongTextField
Expand All @@ -888,6 +902,7 @@ manufacturerId
ManyToMany
ManyToManyAssociation
ManyToManyAssociationField
manytomanyid
ManyToManyId
ManyToManyIdField
ManyToOne
Expand Down Expand Up @@ -1066,8 +1081,8 @@ otel
OTEL
otlp
OTLP
oversales
overrideComponentSetup
oversales
paas
Paas
PaaS
Expand Down Expand Up @@ -1244,10 +1259,12 @@ quantityBefore
quantityDelta
Quickstart
QuillJS
rabbitmq
RabbitMq
RabbitMQ
randomHex
RDB
RDBMS
readAsArrayBuffer
readAsDataURL
readAsText
Expand Down Expand Up @@ -1282,6 +1299,7 @@ Reindexes
reinitializing
ReinstallApps
reinstallation
remoteaddress
RemoteAddress
RemoteAddressField
removeBy
Expand All @@ -1305,6 +1323,7 @@ RestrictDelete
resubmittable
rethrown
returnUrl
Reusability
revalidation
ReverseInherited
Reviewdog
Expand Down Expand Up @@ -1380,6 +1399,7 @@ SeoUrlTemplate
seperate
seperated
serializable
SerializedField
serializer
setFlags
setLocaleToEnGb
Expand Down Expand Up @@ -1470,6 +1490,7 @@ StockUpdater
stopwords
Storable
StorableFlow
StorageAware
storages
StoreApiResponse
StoreApiRoute
Expand Down Expand Up @@ -1527,6 +1548,7 @@ SynchronousPaymentHandlerInterface
Synopsys
systemconfigfacade
systemd
TaxFreeConfigField
TaxProvider
TaxProviders
TaxProviderStruct
Expand All @@ -1550,6 +1572,7 @@ theming
themself
timeframe
TimeRangeRule
TimeZoneField
tinyint
TinyMCE
tipps
Expand Down Expand Up @@ -1580,6 +1603,7 @@ TreeBreadcrumb
TreeBreadcrumbField
TreeLevel
TreeLevelField
treepath
TreePath
TreePathField
TreeSelect
Expand All @@ -1588,8 +1612,8 @@ TriggerReload
truthy
tsx
TTL
TwigJS
twigjs
TwigJS
typeAndCheck
typeAndCheckSearchField
TypeError
Expand Down Expand Up @@ -1665,6 +1689,7 @@ validators
Valkey
varchar
VARCHAR
VariantListingConfigField
VCL
VCS
ve
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion concepts/api/store-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Whenever additional logic is added to Shopware, the method of the corresponding

Using plugins, you can add custom routes to the Store API \(as well as any other routes\) and also register custom services. We don't force developers to provide API coverage for their functionalities. However, if you want to support headless applications, ensure that your plugin provides its functionalities through dedicated routes.

<PageRef page="../../guides/plugins/plugins/framework/store-api" />
<PageRef page="../../guides/plugins/plugins/framework/store-api/" />

## What next?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nav:

The Deployment Helper is a tool that unifies the steps executed after the Code has been uploaded to the server.
On a traditional deployment, you would run it after the files have been uploaded.
When using a Containerized environment you would run Deployment Helper with the new source code and then switch over the traffic.
When using a Containerized environment, you would run Deployment Helper with the new source code and then switch over the traffic.

## Installing the Deployment Helper

Expand Down Expand Up @@ -137,7 +137,22 @@ When you open the extension manager, you will see that you are not logged in. Th

## Removal of extensions

If you want to remove an extension you need to do it in two steps:
To find the name (for example `SwagPlatformDemoData`) of the extension you want to remove, use the `./bin/console plugin:list` command.

```shell
./bin/console plugin:list
Shopware Plugin Service
=======================
----------------------------- ------------------------------------------ ---------------------------------------------- --------- ----------------- ------------------- ----------- -------- ------------- ----------------------
Plugin Label Composer name Version Upgrade version Author Installed Active Upgradeable Required by composer
----------------------------- ------------------------------------------ ---------------------------------------------- --------- ----------------- ------------------- ----------- -------- ------------- ----------------------
SwagPlatformDemoData Shopware 6 Demo data swag/demo-data 2.0.1 shopware AG Yes No No No
----------------------------- ------------------------------------------ ---------------------------------------------- --------- ----------------- ------------------- ----------- -------- ------------- ----------------------
```

If you want to remove an extension, you need to do it in two steps:

1.) Set the extension to `remove` in the `.shopware-project.yml` file

Expand Down Expand Up @@ -168,7 +183,7 @@ After the deployment, you can remove the extension from the source code, remove
In a Docker environment, you have a base image with a running PHP Webserver.
From that image you make a new image with your Shopware source code.
To prepare the Shopware source code, you can run [shopware-cli project ci](https://sw-cli.fos.gg) to install the dependencies and build the assets.
On deployment you spawn a second container or init a container, which runs the Deployment Helper.
On deployment, you spawn a second container or init a container, which runs the Deployment Helper.
The Deployment Helper sets up Shopware when it is not installed, installs the extensions and runs the one-time tasks.

### SFTP / Deployer
Expand Down
Loading

0 comments on commit 4c099c4

Please sign in to comment.