Skip to content

Fork6 #372

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

Open
wants to merge 70 commits into
base: fork6
Choose a base branch
from
Open

Fork6 #372

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ac8da0a
Add ToggleSecret to backend scripts
Sep 20, 2023
aa9910a
Fix typo
Sep 22, 2023
7dc5731
Initialise toast present on page load and add progress bar for autohide
Sep 22, 2023
e6c74dc
Select toasts in InitToasts.js by data-attribute instead of class
Sep 22, 2023
c2a65e6
npm package updates
carakas Sep 25, 2023
1af2d77
Configure fork database naming strategy
carakas Sep 26, 2023
5b1efc9
Make sure all cache is cleared while preparing for reinstall
carakas Sep 26, 2023
93af514
Better name for the id for translations across locale
carakas Sep 26, 2023
06e8b79
Switch route slugs from _ to -
carakas Sep 26, 2023
b1b0c92
Fix datagrid actions with _
carakas Sep 28, 2023
6512ae0
Merge branch 'fork6' into toggle-secret
Oct 11, 2023
1d63cf5
Add toggle password form type
Oct 11, 2023
8f4137e
Rename ToggleSecret to TogglePasswordInputType
Oct 11, 2023
e8bab89
Move TogglePasswordInputType to core
Oct 11, 2023
a0e9cfc
Better naming for toggle password visibility
Oct 11, 2023
2e56f91
Rewrite to native js
Oct 11, 2023
fd23b5c
Add package to speed up functional testing
carakas Sep 28, 2023
a7666b0
Create test database if needed or requested
carakas Sep 28, 2023
2812f5c
Implement BackendWebTestCase
carakas Sep 29, 2023
82b979f
Fix wrong mapping in docker
carakas Sep 29, 2023
619b069
Make it easy to append fixtures
carakas Sep 29, 2023
1d1d2f9
Add fixtures for Backend user and user group
carakas Sep 29, 2023
86a76eb
Better error messages for asserts
carakas Sep 29, 2023
3e73c1b
Automatically group fixtures by module
carakas Sep 29, 2023
9e64dff
Add tests for Backend UserIndex action
carakas Sep 29, 2023
87cb552
Use the enviroment variables to install fork for the phpstan test on …
carakas Sep 29, 2023
f06f2fc
Always verity authentication when the TEST_URL constant is present fo…
carakas Sep 29, 2023
98c584a
Move the title verification to the page load test so we can reuse a p…
carakas Sep 29, 2023
ee5ca31
Add automated test for missing translations
carakas Sep 29, 2023
ea5dda7
Log in by default when loading a page during a functional test
carakas Sep 30, 2023
5489e30
Fix inconsistant assert name for page content check
carakas Sep 30, 2023
a7fd1a7
Better error messages for user validation
carakas Sep 30, 2023
e3789e9
Add tests for adding users
carakas Sep 30, 2023
92cf2ee
Fix missing translation for filter button on pages with data grids
carakas Sep 30, 2023
6bdf267
Speed up UserFixture
carakas Sep 30, 2023
374a60b
Allow symfomny flex
carakas Sep 30, 2023
da6623b
Fix cache issues in tests
carakas Sep 30, 2023
38f2101
Make testing forms more easy
carakas Oct 1, 2023
1ce4c8a
Implement functional testing feedback
carakas Oct 3, 2023
fb608fe
Make the first letter of a breadcrumb item a capital letter
carakas Oct 4, 2023
618c0b7
BackendWebTestCase:loadPage() returns the user when authentication is…
carakas Oct 4, 2023
d446516
Add functional test for editing users
carakas Oct 4, 2023
01f64c9
Use readable names for the tabs
carakas Nov 17, 2023
ccaed8a
Better flash messages when deleting users
carakas Nov 17, 2023
43c5711
Fix error flashmessages not showing
carakas Nov 17, 2023
becadc1
Implement testing deleting users
carakas Nov 17, 2023
c1d2f6d
Add comment why the email length is limited
carakas Nov 17, 2023
79257dc
Merge branch 'fork6' into toggle-secret
carakas Nov 20, 2023
55be30e
Merge pull request #3560 from forkcms/toggle-secret
carakas Nov 20, 2023
59236eb
Fix password strength indicator not working during install
carakas Nov 26, 2023
ae67b8f
Proper implementation for page and content title
carakas Nov 22, 2023
b1dd44b
Fix deprecations
carakas Nov 24, 2023
d3969af
Remove old asset code
carakas Nov 24, 2023
ab750b8
Use all caps for twig globals
carakas Nov 25, 2023
cbd3455
Next phase migration meta
carakas Nov 25, 2023
3472aeb
Create a function for the backend and frontend module names
carakas Nov 25, 2023
b3ac2d1
Fix deprecation in Intl
carakas Nov 25, 2023
f437778
Make the constants consistant
carakas Nov 26, 2023
0afa4e3
Add missing breadcrumb
carakas Nov 26, 2023
d76ec73
Apply the page meta in the frontend
carakas Nov 26, 2023
bae6b17
Add no index and no follow when in debug mode
carakas Nov 27, 2023
1c80d53
Add open graph to meta
carakas Nov 27, 2023
90f4708
Use the translated page title for the meta in the installer
carakas Nov 27, 2023
0cabe71
Fix domain changing while testing installer
carakas Nov 27, 2023
cc5c374
Fix installer issues
carakas Nov 28, 2023
c44578e
Don't use a custom dbal type for the SEOFollow and SEOIndex
carakas Nov 29, 2023
0527d15
Improve meta labels
carakas Nov 29, 2023
f55ed17
Ci pipeline fixes (#3578)
Dec 1, 2023
05e3080
Symfony 6.4 (#3588)
carakas Dec 2, 2023
528d702
Fork6 contentblocks (#3555)
davysumo Dec 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 24 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
APP_ENV=prod
APP_DEBUG=0
APP_SECRET=
Expand All @@ -24,3 +39,12 @@ FORK_DEFAULT_DATE_FORMAT_LONG="l j F Y"
FORK_DEFAULT_TIME_FORMAT="H:i"
FORK_DEFAULT_NUMBER_FORMAT="dot_nothing"
FORK_DEFAULT_DATE_TIME_ORDER="%1\$s %2\$s"

LOCK_DSN=flock

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/messenger ###
5 changes: 5 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
FORK_DATABASE_NAME=${FORK_DATABASE_NAME}_test
TEST_DATABASE=cached
SITE_PROTOCOL=https
SITE_DOMAIN=fork.test
FORK_DEBUG_EMAIL=test@example.com
SITE_MULTILINGUAL=true
53 changes: 41 additions & 12 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
php: [8.2, 8.3]
testsuite: ["functional", "unit", "installer"]
name: PHPUnit - ${{ matrix.testsuite }} (PHP ${{ matrix.php }})
services:
Expand All @@ -37,15 +37,15 @@ jobs:
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP with coverage
if: ${{ matrix.php == '8.1' }}
if: ${{ matrix.php == '8.2' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, bcmath, intl, gd, exif, iconv, imagick
coverage: PCOV

- name: Setup PHP without coverage
if: ${{ matrix.php != '8.1' }}
if: ${{ matrix.php != '8.2' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -69,26 +69,55 @@ jobs:

- run: node_modules/.bin/webpack

- name: Install Fork CMS
run: cp src/Modules/Installer/tests/fork-cms-installation-configuration.yaml fork-cms-installation-configuration.yaml && bin/console forkcms:installer:install && sed -i 's/forkcms_test/forkcms/g' .env.local
env:
FORK_DATABASE_USER: root
FORK_DATABASE_PASSWORD: kingtriton

- name: Execute tests with coverage
if: ${{ matrix.php == '8.1' }}
if: ${{ matrix.php == '8.2' }}
run: bin/simple-phpunit --testsuite=${{ matrix.testsuite}} --coverage-clover=${{ matrix.testsuite}}.clover
env:
FORK_INSTALLATION_LOCALE_ENV_PATH: .env.local
APP_ENV: test
APP_SECRET: notsosecret
FORK_DATABASE_HOST: 127.0.0.1
FORK_DATABASE_PORT: 3306
FORK_DATABASE_NAME: forkcms_test
FORK_DATABASE_USER: root
FORK_DATABASE_PASSWORD: kingtriton

- name: Execute tests without coverage
if: ${{ matrix.php != '8.1' }}
if: ${{ matrix.php != '8.2' }}
run: bin/simple-phpunit --testsuite=${{ matrix.testsuite}}
env:
FORK_INSTALLATION_LOCALE_ENV_PATH: .env.local
APP_ENV: test
APP_SECRET: notsosecret
FORK_DATABASE_HOST: 127.0.0.1
FORK_DATABASE_PORT: 3306
FORK_DATABASE_NAME: forkcms_test
FORK_DATABASE_USER: root
FORK_DATABASE_PASSWORD: kingtriton

- name: Display error logs on failure
if: ${{ failure() }}
run: |
[ -r var/log/installer/debug.log ] && cat var/log/installer/debug.log
bin/console debug:dotenv
ls -alh
[ -r var/log/install/debug.log ] && cat var/log/install/debug.log
[ -r var/log/test/debug.log ] && cat var/log/test/debug.log
[ -r var/log/test_instal/debug.log ] && cat var/log/test_instal/debug.log
[ -r var/log/test_install/debug.log ] && cat var/log/test_install/debug.log
[ -r var/log/prod/debug.log ] && cat var/log/prod/debug.log
[ -r var/log/dev/debug.log ] && cat var/log/dev/debug.log
env:
FORK_INSTALLATION_LOCALE_ENV_PATH: .env.local
APP_ENV: test

- name: Upload Coverage report
uses: codecov/codecov-action@v1
if: ${{ matrix.php == '8.1' }}
if: ${{ matrix.php == '8.2' }}
with:
file: ${{ matrix.testsuite}}.clover
flags: ${{ matrix.testsuite}}
Expand All @@ -112,7 +141,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, bcmath, intl, gd, exif, iconv, imagick
coverage: none

Expand All @@ -126,7 +155,7 @@ jobs:
APP_ENV: dev

- name: Install Fork CMS
run: mv src/Modules/Installer/tests/fork-cms-installation-configuration.yaml fork-cms-installation-configuration.yaml && bin/console forkcms:installer:install && bin/console cache:clear
run: cp src/Modules/Installer/tests/fork-cms-installation-configuration.yaml fork-cms-installation-configuration.yaml && bin/console forkcms:installer:install && bin/console cache:clear
env:
APP_ENV: dev
APP_DEBUG: 1
Expand All @@ -150,7 +179,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, bcmath, intl, gd, exif, iconv, imagick
coverage: none

Expand Down Expand Up @@ -190,7 +219,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, bcmath, intl, gd, exif, iconv, imagick
coverage: none

Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ docker-compose.override.yml
# PHPUnit
/.phpunit.result.cache

# PHP-CS
/.phpcs-report.xml

# Twigcs
/.twigcs-report.xml

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/assets/installer
Expand All @@ -68,6 +74,7 @@ yarn-error.log
###> squizlabs/php_codesniffer ###
/.phpcs-cache
/phpcs.xml
/phpcs-report.xml
###< squizlabs/php_codesniffer ###
###> symfony/phpunit-bridge ###
.phpunit
Expand Down
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.*
!*.css
!*.scss
12 changes: 12 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"no-descending-specificity": null
},
"ignoreFiles": [
"src/**/scss/plugins/*.scss",
"src/Modules/Backend/assets/Backend/webpack/scss/components/_date-time-picker.scss",
"src/Modules/Backend/assets/Backend/webpack/scss/components/_codex-editor.scss",
"src.fork5"
]
}
18 changes: 18 additions & 0 deletions .twig_cs.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

use FriendsOfTwig\Twigcs;

return Twigcs\Config\Config::create()
->addFinder(
Twigcs\Finder\TemplateFinder::create()->in(__DIR__ . '/src')
)
->addFinder(
Twigcs\Finder\TemplateFinder::create()->in(__DIR__ . '/templates')
)
->setName('Fork CMS config')
->setSeverity('error')
->setReporter('console')
->setRuleSet(Twigcs\Ruleset\Official::class)
->setDisplay('blocking');
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1-apache
FROM php:8.2-apache
LABEL maintainer="Fork CMS <info@fork-cms.com>"

# Enable Apache mod_rewrite
Expand Down
25 changes: 14 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"blog",
"php"
],
"version": "6.0.0",
"homepage": "https://www.fork-cms.com/",
"license": "MIT",
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-json": "*",
Expand All @@ -32,7 +33,7 @@
"symfony/monolog-bundle": "^3.7",
"codex-team/editor.js": "^2.0",
"beberlei/doctrineextensions": "^1.2",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/webpack-encore-bundle": "^2.1",
"phpoffice/phpspreadsheet": "^1.12",
"composer/package-versions-deprecated": "^1.11",
"symfony/flex": "^2.0",
Expand All @@ -49,7 +50,7 @@
"twig/twig": "^3.0",
"symfony/debug-bundle": "^6.0",
"symfony/yaml": "^6.0",
"doctrine/annotations": "^1.0",
"doctrine/annotations": "^2.0",
"phpdocumentor/reflection-docblock": "^5.2",
"symfony/property-access": "^6.0",
"symfony/property-info": "^6.0",
Expand All @@ -70,8 +71,9 @@
"symfony/lock": "6.*"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "dev-master as 3.6.0",
"symfony/phpunit-bridge": "^6.0",
"symfony/phpunit-bridge": "^7.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpstan/phpstan-doctrine": "^1.0",
Expand All @@ -81,10 +83,16 @@
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/stopwatch": "^6.0",
"symfony/web-profiler-bundle": "^6.0",
"symfony/browser-kit": "^6.0"
"symfony/browser-kit": "^6.0",
"friendsoftwig/twigcs": "*",
"dama/doctrine-test-bundle": "^8.0",
"symfony/css-selector": "6.*"
},
"config": {
"bin-dir": "bin"
"bin-dir": "bin",
"allow-plugins": {
"symfony/flex": true
}
},
"support": {
"forum": "https://fork-cms.herokuapp.com",
Expand All @@ -111,11 +119,6 @@
"**/Test/"
]
},
"autoload-dev": {
"psr-4": {
"ForkCMS\\Tests\\": "tests/"
}
},
"conflict": {
"symfony/symfony": "*"
},
Expand Down
Loading