Skip to content

Commit

Permalink
Update sulu and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn authored and alexander-schranz committed Jun 24, 2024
1 parent 8a66e44 commit 64d1023
Show file tree
Hide file tree
Showing 127 changed files with 3,460 additions and 3,663 deletions.
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"extends": "eslint-config-ma",
"parser": "babel-eslint"
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-env"]
}
}
}
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ composer:

lint:
stage: test
image: sulu/php:8.1-cli
image: sulu/php:8.2-cli
services:
- mysql:8.0
before_script:
Expand All @@ -54,7 +54,7 @@ lint:

test:
stage: test
image: sulu/php:8.1-cli
image: sulu/php:8.2-cli
services:
- mysql:8.0
before_script:
Expand All @@ -64,7 +64,7 @@ test:

build:
stage: test
image: sulu/php:8.1-cli
image: sulu/php:8.2-cli
services:
- mysql:8.0
- name: elasticsearch:7.13.2
Expand All @@ -74,13 +74,13 @@ build:

js-css-website:
stage: test
image: node:14
image: node:18
dependencies: []
variables:
NODE_OPTIONS: --max-old-space-size=1536
before_script:
- npm config set cache "$(pwd)/.npm-cache"
- yarn config set cache-folder "$(pwd)/.yarn-cache"
- yarn config set cache-folder "$(pwd)/.yarn-cache"
script:
- cd assets/website
- yarn install --frozen-lockfile
Expand All @@ -94,7 +94,7 @@ js-css-website:

security-check:
stage: test
image: sulu/php:8.1-cli
image: sulu/php:8.2-cli
before_script:
- curl -sS https://get.symfony.com/cli/installer | bash
- mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
Expand Down
6 changes: 5 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@
'single_line_throw' => false,
'visibility_required' => ['elements' => ['property', 'method', 'const']],
'phpdoc_to_comment' => [
'ignored_tags' => ['todo', 'var'],
'ignored_tags' => ['todo', 'var', 'see', 'phpstan-ignore-next-line'],
],
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'nullable_type_declaration_for_default_null_value' => true,
'fully_qualified_strict_types' => false,
'no_null_property_initialization' => false,
'nullable_type_declaration' => false,
])
->setFinder($finder);
2 changes: 1 addition & 1 deletion .php-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1
8.2
17 changes: 3 additions & 14 deletions assets/admin/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
and_chr >= 107
and_ff >= 106
and_qq >= 13.1
and_uc >= 13.4
android >= 107
chrome >= 106
edge >= 106
firefox >= 105
ios_saf >= 16.0
kaios >= 2.5
op_mob >= 64
opera >= 90
safari >= 16.0
samsung >= 17.0
last 2 versions and not dead
not ie < 12
not ie_mob < 12
9 changes: 9 additions & 0 deletions assets/admin/.npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ engine-strict=true
# package.json. to display a helpful message instead of a confusing dependency tree error when using npm 7, we enable
# the "legacy-peer-deps" setting: https://github.com/sulu/skeleton/issues/133#issuecomment-907271497
legacy-peer-deps=true

# unfortunataly, npm >= 7 ignores dependencies of local dependencies to handle them the same way as normal
# dependencies we require to use install-links which will create a tar ball for all packages and install
# it like a normal dependency with its dependencies
install-links=true

# pnpm does not install dependencies of local dependencies correctly by default but if use the shamefully-hoist
# configuration it also installs them correctly and can so be correctly build via pnpm
shamefully-hoist=true
5 changes: 1 addition & 4 deletions assets/admin/babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
"plugins": [
["@babel/plugin-proposal-decorators", {"legacy": true}],
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-export-namespace-from"
"@babel/plugin-proposal-class-properties"
],
"assumptions": {
"setPublicClassFields": true
Expand Down
74 changes: 35 additions & 39 deletions assets/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,55 @@
"mobx-react": "^5.0.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"sulu-admin-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Resources/js",
"sulu-audience-targeting-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/AudienceTargetingBundle/Resources/js",
"sulu-category-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/Resources/js",
"sulu-contact-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Resources/js",
"sulu-custom-url-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/CustomUrlBundle/Resources/js",
"sulu-location-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/LocationBundle/Resources/js",
"sulu-media-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Resources/js",
"sulu-page-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/PageBundle/Resources/js",
"sulu-preview-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/PreviewBundle/Resources/js",
"sulu-route-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/RouteBundle/Resources/js",
"sulu-search-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SearchBundle/Resources/js",
"sulu-security-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/Resources/js",
"sulu-snippet-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/SnippetBundle/Resources/js",
"sulu-trash-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/TrashBundle/Resources/js",
"sulu-website-bundle": "file:node_modules/@sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/js"
"sulu-admin-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Resources/js",
"sulu-audience-targeting-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/AudienceTargetingBundle/Resources/js",
"sulu-category-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/CategoryBundle/Resources/js",
"sulu-contact-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/ContactBundle/Resources/js",
"sulu-custom-url-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/CustomUrlBundle/Resources/js",
"sulu-location-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/LocationBundle/Resources/js",
"sulu-media-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Resources/js",
"sulu-page-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/PageBundle/Resources/js",
"sulu-preview-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/PreviewBundle/Resources/js",
"sulu-route-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/RouteBundle/Resources/js",
"sulu-search-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SearchBundle/Resources/js",
"sulu-security-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SecurityBundle/Resources/js",
"sulu-snippet-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/SnippetBundle/Resources/js",
"sulu-trash-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/TrashBundle/Resources/js",
"sulu-website-bundle": "file:../../vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/js"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@ckeditor/ckeditor5-dev-utils": "^30.3.2",
"@ckeditor/ckeditor5-theme-lark": "^34.2.0",
"@ckeditor/ckeditor5-dev-utils": "^39.6.3",
"@ckeditor/ckeditor5-theme-lark": "^41.2.1",
"autoprefixer": "^10.4.7",
"babel-loader": "^8.0.6",
"clean-webpack-plugin": "^4.0.0",
"babel-loader": "^9.1.0",
"core-js": "^3.18.0",
"css-loader": "^5.2.4",
"file-loader": "^6.0.0",
"glob": "^7.1.2",
"mini-css-extract-plugin": "^1.5.0",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"glob": "^10.3.10",
"mini-css-extract-plugin": "^2.7.1",
"postcss": "^8.4.14",
"postcss-calc": "^8.2.4",
"postcss-calc": "^9.0.1",
"postcss-hexrgba": "^2.1.0",
"postcss-import": "^14.1.0",
"postcss-loader": "^4.0.0",
"postcss-nested": "^5.0.6",
"postcss-simple-vars": "^6.0.3",
"raw-loader": "^4.0.0",
"regenerator-runtime": "^0.13.3",
"webpack": "^4.27.0",
"webpack-clean-obsolete-chunks": "^0.4.0",
"webpack-cli": "^4.7.0",
"webpack-manifest-plugin": "^4.0.2"
"postcss-import": "^16.1.0",
"postcss-loader": "^8.1.0",
"postcss-nested": "^6.0.0",
"postcss-simple-vars": "^7.0.1",
"regenerator-runtime": "^0.14.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0",
"webpack-manifest-plugin": "^5.0.0"
},
"engines": {
"node": ">=14",
"npm": ">=6 <7"
"yarn": "use 'npm install' instead",
"bun": "^1.0",
"pnpm": "^8.0",
"npm": "8.* || 9.* || 10.*"
}
}
4 changes: 2 additions & 2 deletions assets/website/js/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import web from '@sulu/web';
import WindowScroll from '@sulu/web/packages/components/window-scroll/window-scroll';
import $ from 'jquery';
import '../css/main.scss';
import './polyfill';
import WindowScroll from '@sulu/web/packages/components/window-scroll/window-scroll';
import Timeago from './components/Timeago';
import NavigationToggler from './components/NavigationToggler';
import SlickSlider from './components/SlickSlider';
import Tabs from './components/Tabs';
import Timeago from './components/Timeago';

window.$ = window.jQuery = $;
window.web = web;
Expand Down
8 changes: 5 additions & 3 deletions bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!\is_dir(\dirname(__DIR__) . '/vendor')) {
throw new \LogicException('Dependencies are missing. Try running "composer install".');
}

if (!\is_file(\dirname(__DIR__) . '/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
throw new \LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

require_once \dirname(__DIR__) . '/vendor/autoload_runtime.php';

if (!isset($suluContext)) {
$suluContext = Kernel::CONTEXT_ADMIN;
}
Expand Down
10 changes: 7 additions & 3 deletions bin/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ if (!\ini_get('date.timezone')) {
}

if (\is_file(\dirname(__DIR__) . '/vendor/phpunit/phpunit/phpunit')) {
\define('PHPUNIT_COMPOSER_INSTALL', \dirname(__DIR__) . '/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
if (\PHP_VERSION_ID >= 80000) {
require \dirname(__DIR__) . '/vendor/phpunit/phpunit/phpunit';
} else {
\define('PHPUNIT_COMPOSER_INSTALL', \dirname(__DIR__) . '/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else {
if (!\is_file(\dirname(__DIR__) . '/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
Expand Down
23 changes: 23 additions & 0 deletions compose.override.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'

services:
###> symfony/mailer ###
mailer:
image: axllent/mailpit
ports:
- "1025"
- "8025"
environment:
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
###< symfony/mailer ###

###> doctrine/doctrine-bundle ###
database:
ports:
- "3306:3306"
###< doctrine/doctrine-bundle ###

elasticsearch:
ports:
- "9200:9200"
4 changes: 2 additions & 2 deletions docker-compose.yml → compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-ChangeMe}
MYSQL_ROOT_HOST: '%'
volumes:
- db-data:/var/lib/mysql
- database-data:/var/lib/mysql
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/mysql:rw
###< doctrine/doctrine-bundle ###
Expand All @@ -26,6 +26,6 @@ services:

volumes:
###> doctrine/doctrine-bundle ###
db-data:
database-data:
###< doctrine/doctrine-bundle ###
elasticsearch-data:
Loading

0 comments on commit 64d1023

Please sign in to comment.