Skip to content

Commit

Permalink
Merge branch 'fork6' into fork6-blog
Browse files Browse the repository at this point in the history
  • Loading branch information
carakas committed Dec 17, 2023
2 parents 6f11286 + 528d702 commit 3dbf3d7
Show file tree
Hide file tree
Showing 431 changed files with 14,092 additions and 15,097 deletions.
24 changes: 24 additions & 0 deletions .env
@@ -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
@@ -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
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
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
@@ -0,0 +1,3 @@
*.*
!*.css
!*.scss
12 changes: 12 additions & 0 deletions .stylelintrc
@@ -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
@@ -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
@@ -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
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

0 comments on commit 3dbf3d7

Please sign in to comment.