Skip to content

Commit 41c5001

Browse files
authored
Revert "Codeception fix (#597)" (#601)
* Revert "Codeception fix (#597)" This reverts commit 18582e0. * Fix: use pull_request instead of pull_request_target in codeception workflow * Fix: use pull_request instead of pull_request_target in static analysis workflow
1 parent 3275594 commit 41c5001

277 files changed

Lines changed: 22540 additions & 8758 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
return [
4-
Pimcore\Bundle\DataImporterBundle\PimcoreDataImporterBundle::class => ['all' => true],
5-
Pimcore\Bundle\StudioBackendBundle\PimcoreStudioBackendBundle::class => ['all' => true],
6-
Pimcore\Bundle\StudioUiBundle\PimcoreStudioUiBundle::class => ['all' => true],
4+
\Pimcore\Bundle\AdminBundle\PimcoreAdminBundle::class => ['all' => true],
5+
\Pimcore\Bundle\DataImporterBundle\PimcoreDataImporterBundle::class => ['all' => true]
76
];

.github/ci/files/config/packages/security.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ security:
1414
provider: pimcore_admin
1515
http_basic: ~
1616

17-
pimcore_studio: '%pimcore_studio_backend.firewall_settings%'
17+
pimcore_admin: '%pimcore_admin_bundle.firewall_settings%'
1818

1919
access_control:
2020
# Pimcore admin ACl // DO NOT CHANGE!
21-
- { path: ^/pimcore-studio/api/(docs|docs/json|translations|user/reset-password)$, roles: PUBLIC_ACCESS }
22-
- { path: ^/pimcore-studio/api, roles: ROLE_PIMCORE_USER }
21+
- { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS }
22+
- { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
23+
- { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER }
24+
- { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
25+
- { path: ^/admin/login$, roles: PUBLIC_ACCESS }
26+
- { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS }
27+
- { path: ^/admin, roles: ROLE_PIMCORE_USER }
2328

2429
role_hierarchy:
2530
# Pimcore admin // DO NOT CHANGE!

.github/ci/files/config/packages/test/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ doctrine:
2323
user: ~
2424
password: ~
2525
mapping_types:
26+
enum: string
2627
bit: boolean
2728

2829
pimcore:

.github/workflows/codeception.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "[0-9]+.[0-9]+"
1010
- "[0-9]+.x"
1111
- "feature-*"
12-
pull_request_target:
12+
pull_request:
1313
types: [opened, synchronize, reopened]
1414

1515
env:
@@ -26,8 +26,6 @@ jobs:
2626
steps:
2727
- name: Checkout code
2828
uses: actions/checkout@v4
29-
with:
30-
ref: ${{ github.event.pull_request.base.ref || github.ref }}
3129

3230
- name: Checkout reusable workflow repo
3331
uses: actions/checkout@v4

.github/workflows/new-static-analysis.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
schedule:
55
- cron: '0 3 * * 1,3,5'
66
workflow_dispatch:
7-
pull_request_target:
7+
pull_request:
88
types: [ opened, synchronize, reopened ]
99
paths-ignore:
1010
- 'assets/**'
@@ -84,6 +84,7 @@ jobs:
8484
private_repo: ${{ needs.setup-matrix.outputs.private_repo }}
8585
APP_ENV: test
8686
PIMCORE_TEST: 1
87+
REQUIRE_ADMIN_BUNDLE: "true"
8788
COVERAGE: "none"
8889
secrets:
8990
SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }}
Lines changed: 146 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,156 @@
11
name: "Studio Frontend Build"
2-
2+
33
on:
44
push:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
- "[0-9]+.x"
8+
- "feature-*"
9+
- "nightly"
10+
- "studio"
511
paths:
612
- "assets/studio/**"
7-
pull_request:
13+
pull_request_target:
14+
branches:
15+
- "[0-9]+.[0-9]+"
16+
- "[0-9]+.x"
17+
- "*_actions"
18+
- "feature-*"
19+
- "nightly"
820
paths:
921
- "assets/studio/**"
1022
workflow_dispatch:
11-
23+
24+
env:
25+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
26+
1227
permissions:
13-
contents: write
14-
28+
contents: read
29+
1530
jobs:
16-
studio-frontend-build:
17-
uses: pimcore/workflows-collection-public/.github/workflows/reusable-studio-frontend-build.yaml@main
31+
install:
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
with:
38+
ref: ${{ env.BRANCH_NAME }}
39+
repository: ${{ github.event.pull_request.head.repo.full_name }}
40+
41+
- name: Set up Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: 22
45+
46+
- name: Cache npm dependencies
47+
uses: actions/cache@v4
48+
with:
49+
path: ./assets/studio/node_modules
50+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
51+
restore-keys: |
52+
${{ runner.os }}-node-
53+
- name: Install dependencies
54+
working-directory: ./assets/studio
55+
run: npm ci
56+
57+
lint:
58+
needs: install
59+
runs-on: ubuntu-latest
60+
61+
permissions:
62+
contents: write
63+
64+
steps:
65+
- name: Checkout code
66+
uses: actions/checkout@v4
67+
with:
68+
ref: ${{ env.BRANCH_NAME }}
69+
repository: ${{ github.event.pull_request.head.repo.full_name }}
70+
71+
- name: Set up Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: 22
75+
76+
- name: Cache npm dependencies
77+
uses: actions/cache@v4
78+
with:
79+
path: ./assets/studio/node_modules
80+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
81+
restore-keys: |
82+
${{ runner.os }}-node-
83+
- name: Run code linting
84+
working-directory: ./assets/studio
85+
run: npm run lint-fix
86+
87+
- uses: stefanzweifel/git-auto-commit-action@v5
88+
with:
89+
commit_message: Apply eslint-fixer changes
90+
91+
check-types:
92+
needs: install
93+
runs-on: ubuntu-latest
94+
95+
permissions:
96+
contents: write
97+
98+
steps:
99+
- name: Checkout code
100+
uses: actions/checkout@v4
101+
with:
102+
ref: ${{ env.BRANCH_NAME }}
103+
repository: ${{ github.event.pull_request.head.repo.full_name }}
104+
105+
- name: Set up Node.js
106+
uses: actions/setup-node@v4
107+
with:
108+
node-version: 22
109+
110+
- name: Cache npm dependencies
111+
uses: actions/cache@v4
112+
with:
113+
path: ./assets/studio/node_modules
114+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
115+
restore-keys: |
116+
${{ runner.os }}-node-
117+
- name: Run code linting
118+
working-directory: ./assets/studio
119+
run: npm run check-types
120+
121+
build:
122+
needs:
123+
- lint
124+
- check-types
125+
runs-on: ubuntu-latest
126+
127+
permissions:
128+
contents: write
129+
130+
steps:
131+
- name: Checkout code
132+
uses: actions/checkout@v4
133+
with:
134+
ref: ${{ env.BRANCH_NAME }}
135+
repository: ${{ github.event.pull_request.head.repo.full_name }}
136+
137+
- name: Set up Node.js
138+
uses: actions/setup-node@v4
139+
with:
140+
node-version: 22
141+
142+
- name: Cache npm dependencies
143+
uses: actions/cache@v4
144+
with:
145+
path: ./assets/studio/node_modules
146+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
147+
restore-keys: |
148+
${{ runner.os }}-node-
149+
- name: Run production build
150+
working-directory: ./assets/studio
151+
run: npm run build
152+
153+
- uses: stefanzweifel/git-auto-commit-action@v5
154+
with:
155+
file_pattern: './src/Resources/public/studio/'
156+
commit_message: Automatic frontend build

.php-cs-fixer.cache

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

assets/studio/.eslintrc.js

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
module.exports = {
2+
"ignorePatterns": ['*.gen.ts'],
3+
"env": {
4+
"browser": true,
5+
"es2021": true
6+
},
7+
"settings": {
8+
"react": {
9+
"version": "detect"
10+
}
11+
},
12+
"extends": [
13+
"standard-with-typescript",
14+
"plugin:react/recommended",
15+
"plugin:storybook/recommended"
16+
],
17+
"parserOptions": {
18+
"ecmaFeatures": {
19+
"jsx": true
20+
},
21+
"ecmaVersion": "latest",
22+
"sourceType": "module"
23+
},
24+
"overrides": [
25+
{
26+
"env": {
27+
"node": true
28+
},
29+
"files": [
30+
".eslintrc.{js,cjs}"
31+
],
32+
"parserOptions": {
33+
"sourceType": "script"
34+
}
35+
},
36+
37+
{
38+
"files": ["*.spec.ts", "*.spec.tsx", "*.test.ts", "*.test.tsx"],
39+
"env": {
40+
"jest": true
41+
}
42+
}
43+
],
44+
"plugins": [
45+
"react",
46+
"header"
47+
],
48+
"rules": {
49+
"@typescript-eslint/no-misused-promises": "off",
50+
"@typescript-eslint/no-non-null-assertion": "off",
51+
"@typescript-eslint/unbound-method": "off",
52+
'react/jsx-boolean-value': 'error',
53+
'react/jsx-closing-bracket-location': 'error',
54+
'react/jsx-curly-spacing': [ 'error', 'always' ],
55+
'react/jsx-equals-spacing': 'error',
56+
'react/jsx-first-prop-new-line': 'error',
57+
'react/jsx-indent-props': [ 'error', 2 ],
58+
'react/jsx-indent': [ 'error', 2 ],
59+
'react/jsx-key': 'error',
60+
'react/jsx-max-props-per-line': [ 'error', { 'maximum': 1 }],
61+
'react/jsx-no-literals': 'off',
62+
'react/jsx-no-target-blank': 'error',
63+
'react/jsx-pascal-case': 'error',
64+
'react/jsx-sort-props': 'error',
65+
'react/jsx-tag-spacing': 'error',
66+
'react/jsx-no-constructed-context-values': 'error',
67+
'react/jsx-wrap-multilines': [
68+
'error',
69+
{
70+
"declaration": "parens-new-line",
71+
"assignment": "parens-new-line",
72+
"return": "parens-new-line",
73+
"arrow": "parens-new-line",
74+
"condition": "parens-new-line",
75+
"logical": "parens-new-line",
76+
"prop": "ignore"
77+
}
78+
],
79+
'max-lines': ['error', { max: 300 }],
80+
'header/header': [2, 'block', [
81+
'*',
82+
' * This source file is available under the terms of the',
83+
' * Pimcore Open Core License (POCL)',
84+
' * Full copyright and license information is available in',
85+
' * LICENSE.md which is distributed with this source code.',
86+
' *',
87+
' * @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)',
88+
' * @license Pimcore Open Core License (POCL)',
89+
' '
90+
], 2]
91+
}
92+
}

0 commit comments

Comments
 (0)