Skip to content

Commit 5d843ec

Browse files
committed
Merge branch 'symfony74'
2 parents e513960 + 3518321 commit 5d843ec

File tree

18 files changed

+3842
-833
lines changed

18 files changed

+3842
-833
lines changed

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DATABASE_EMULATE_NATURAL_SORT=0
3131
# General settings
3232
###################################################################################
3333

34-
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates
34+
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates or when no request context is available.
3535
# This must end with a slash!
3636
DEFAULT_URI="https://partdb.changeme.invalid/"
3737

@@ -134,4 +134,5 @@ CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
134134
###> symfony/framework-bundle ###
135135
APP_ENV=prod
136136
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
137+
APP_SHARE_DIR=var/share
137138
###< symfony/framework-bundle ###

assets/controllers/csrf_protection_controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const nameCheck = /^[-_a-zA-Z0-9]{4,22}$/;
22
const tokenCheck = /^[-_/+a-zA-Z0-9]{24,}$/;
33

44
// Generate and double-submit a CSRF token in a form field and a cookie, as defined by Symfony's SameOriginCsrfTokenManager
5+
// Use `form.requestSubmit()` to ensure that the submit event is triggered. Using `form.submit()` will not trigger the event
6+
// and thus this event-listener will not be executed.
57
document.addEventListener('submit', function (event) {
68
generateCsrfToken(event.target);
79
}, true);
@@ -33,8 +35,8 @@ export function generateCsrfToken (formElement) {
3335
if (!csrfCookie && nameCheck.test(csrfToken)) {
3436
csrfField.setAttribute('data-csrf-protection-cookie-value', csrfCookie = csrfToken);
3537
csrfField.defaultValue = csrfToken = btoa(String.fromCharCode.apply(null, (window.crypto || window.msCrypto).getRandomValues(new Uint8Array(18))));
36-
csrfField.dispatchEvent(new Event('change', { bubbles: true }));
3738
}
39+
csrfField.dispatchEvent(new Event('change', { bubbles: true }));
3840

3941
if (csrfCookie && tokenCheck.test(csrfToken)) {
4042
const cookie = csrfCookie + '_' + csrfToken + '=' + csrfCookie + '; path=/; samesite=strict';

assets/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import '../css/app/treeview.css';
2828
import '../css/app/images.css';
2929

3030
// start the Stimulus application
31-
import '../bootstrap';
31+
import '../stimulus_bootstrap';
3232

3333
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
3434
const $ = require('jquery');

bin/phpunit

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
#!/usr/bin/env php
22
<?php
33

4-
if (!ini_get('date.timezone')) {
5-
ini_set('date.timezone', 'UTC');
6-
}
7-
8-
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
9-
if (PHP_VERSION_ID >= 80000) {
10-
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
11-
} else {
12-
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
13-
require PHPUNIT_COMPOSER_INSTALL;
14-
PHPUnit\TextUI\Command::main();
15-
}
16-
} else {
17-
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
18-
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
19-
exit(1);
20-
}
21-
22-
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
23-
}
4+
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';

composer.json

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,36 +57,35 @@
5757
"shivas/versioning-bundle": "^4.0",
5858
"spatie/db-dumper": "^3.3.1",
5959
"symfony/apache-pack": "^1.0",
60-
"symfony/asset": "7.3.*",
61-
"symfony/console": "7.3.*",
62-
"symfony/css-selector": "7.3.*",
63-
"symfony/dom-crawler": "7.3.*",
64-
"symfony/dotenv": "7.3.*",
65-
"symfony/expression-language": "7.3.*",
60+
"symfony/asset": "7.4.*",
61+
"symfony/console": "7.4.*",
62+
"symfony/css-selector": "7.4.*",
63+
"symfony/dom-crawler": "7.4.*",
64+
"symfony/dotenv": "7.4.*",
65+
"symfony/expression-language": "7.4.*",
6666
"symfony/flex": "^v2.3.1",
67-
"symfony/form": "7.3.*",
68-
"symfony/framework-bundle": "7.3.*",
69-
"symfony/http-client": "7.3.*",
70-
"symfony/http-kernel": "7.3.*",
71-
"symfony/mailer": "7.3.*",
67+
"symfony/form": "7.4.*",
68+
"symfony/framework-bundle": "7.4.*",
69+
"symfony/http-client": "7.4.*",
70+
"symfony/http-kernel": "7.4.*",
71+
"symfony/mailer": "7.4.*",
7272
"symfony/monolog-bundle": "^3.1",
73-
"symfony/polyfill-php82": "^1.28",
74-
"symfony/process": "7.3.*",
75-
"symfony/property-access": "7.3.*",
76-
"symfony/property-info": "7.3.*",
77-
"symfony/rate-limiter": "7.3.*",
78-
"symfony/runtime": "7.3.*",
79-
"symfony/security-bundle": "7.3.*",
80-
"symfony/serializer": "7.3.*",
81-
"symfony/string": "7.3.*",
82-
"symfony/translation": "7.3.*",
83-
"symfony/twig-bundle": "7.3.*",
73+
"symfony/process": "7.4.*",
74+
"symfony/property-access": "7.4.*",
75+
"symfony/property-info": "7.4.*",
76+
"symfony/rate-limiter": "7.4.*",
77+
"symfony/runtime": "7.4.*",
78+
"symfony/security-bundle": "7.4.*",
79+
"symfony/serializer": "7.4.*",
80+
"symfony/string": "7.4.*",
81+
"symfony/translation": "7.4.*",
82+
"symfony/twig-bundle": "7.4.*",
8483
"symfony/ux-translator": "^2.10",
8584
"symfony/ux-turbo": "^2.0",
86-
"symfony/validator": "7.3.*",
87-
"symfony/web-link": "7.3.*",
85+
"symfony/validator": "7.4.*",
86+
"symfony/web-link": "7.4.*",
8887
"symfony/webpack-encore-bundle": "^v2.0.1",
89-
"symfony/yaml": "7.3.*",
88+
"symfony/yaml": "7.4.*",
9089
"symplify/easy-coding-standard": "^12.5.20",
9190
"tecnickcom/tc-lib-barcode": "^2.1.4",
9291
"twig/cssinliner-extra": "^3.0",
@@ -111,12 +110,12 @@
111110
"phpunit/phpunit": "^11.5.0",
112111
"rector/rector": "^2.0.4",
113112
"roave/security-advisories": "dev-latest",
114-
"symfony/browser-kit": "7.3.*",
115-
"symfony/debug-bundle": "7.3.*",
113+
"symfony/browser-kit": "7.4.*",
114+
"symfony/debug-bundle": "7.4.*",
116115
"symfony/maker-bundle": "^1.13",
117-
"symfony/phpunit-bridge": "7.3.*",
118-
"symfony/stopwatch": "7.3.*",
119-
"symfony/web-profiler-bundle": "7.3.*"
116+
"symfony/phpunit-bridge": "7.4.*",
117+
"symfony/stopwatch": "7.4.*",
118+
"symfony/web-profiler-bundle": "7.4.*"
120119
},
121120
"replace": {
122121
"symfony/polyfill-mbstring": "*",
@@ -174,7 +173,7 @@
174173
"extra": {
175174
"symfony": {
176175
"allow-contrib": false,
177-
"require": "7.3.*",
176+
"require": "7.4.*",
178177
"docker": true
179178
}
180179
}

0 commit comments

Comments
 (0)