Skip to content

Commit

Permalink
Merge pull request TYPO3-Documentation#45 from LiquidPL/symfony-php-u…
Browse files Browse the repository at this point in the history
…pgrade

Upgrade to PHP 8.2 and Symfony 6.3
  • Loading branch information
linawolf authored Jul 22, 2023
2 parents 8905735 + fc942f9 commit 73db22d
Show file tree
Hide file tree
Showing 43 changed files with 4,610 additions and 1,812 deletions.
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: t3docs-search-indexer
type: php
docroot: public
php_version: "7.4"
php_version: "8.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
Expand Down
7 changes: 7 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_DEBUG=1
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
/var/
/vendor/
###< symfony/framework-bundle ###

###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###

###> friendsofphp/php-cs-fixer ###
/.php_cs
/.php_cs.cache
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
14 changes: 7 additions & 7 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}
// Define in which folders to search and which folders to exclude
// Exclude some directories that are excluded by Git anyways to speed up the sniffing
$finder = PhpCsFixer\Finder::create()
// Define in which folders to search and which folders to exclude.
// Exclude some directories that are excluded by Git anyway to speed up the sniffing
$finder = (new PhpCsFixer\Finder())
->exclude('vendor')
->exclude('typo3conf')
->exclude('typo3temp')
Expand All @@ -50,7 +50,7 @@
// - Remove unused use statements in the PHP source code
// - Ensure Concatenation to have at least one whitespace around
// - Remove trailing whitespace at the end of blank lines.
return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
Expand All @@ -64,7 +64,7 @@
'declare_equal_normalize' => ['space' => 'none'],
'dir_constant' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'lowercase_cast' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'modernize_types_casting' => true,
Expand All @@ -74,7 +74,7 @@
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_null_property_initialization' => true,
Expand All @@ -87,7 +87,7 @@
'no_useless_else' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'php_unit_construct' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame'],
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']],
'php_unit_mock_short_will_return' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'phpdoc_no_access' => true,
Expand Down
27 changes: 14 additions & 13 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/usr/bin/env php
<?php

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
putenv('SYMFONY_PHPUNIT_REMOVE=symfony/yaml');
}
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
}
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
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();
} 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";
exit(1);
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}
45 changes: 28 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,44 @@
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.4",
"php": "^8.2",
"ext-dom": "*",
"ext-iconv": "*",
"ext-json": "*",
"cweagans/composer-patches": "^1.7",
"ruflin/elastica": "^7.1",
"sensio/framework-extra-bundle": "^5.5",
"symfony/asset": "^4.3",
"symfony/console": "^4.3",
"symfony/css-selector": "^4.3",
"symfony/dom-crawler": "^4.3",
"symfony/finder": "^4.3",
"symfony/flex": "^1.4",
"symfony/framework-bundle": "^4.3",
"symfony/stopwatch": "^4.3",
"symfony/twig-bundle": "^4.3",
"symfony/yaml": "^4.3"
"symfony/asset": "^6.3",
"symfony/console": "^6.3",
"symfony/css-selector": "^6.3",
"symfony/dom-crawler": "^6.3",
"symfony/finder": "^6.3",
"symfony/flex": "^1.20",
"symfony/framework-bundle": "^6.3",
"symfony/monolog-bundle": "^3.8",
"symfony/stopwatch": "^6.3",
"symfony/twig-bundle": "^6.3",
"symfony/yaml": "^6.3"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.19.2",
"mikey179/vfsstream": "^1.6",
"symfony/dotenv": "^4.3",
"symfony/phpunit-bridge": "^4.3",
"friendsofphp/php-cs-fixer": ">=v2.18.2"
"phpspec/prophecy": "^1.17",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.6",
"symfony/browser-kit": "^6.3",
"symfony/dotenv": "^6.3",
"symfony/phpunit-bridge": "^6.3",
"symfony/web-profiler-bundle": "6.3.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"cweagans/composer-patches": true,
"symfony/flex": true
}
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -67,7 +77,8 @@
"extra": {
"symfony": {
"id": "01C3GA9QV9DBZXQBG4MFTG7YCG",
"allow-contrib": false
"allow-contrib": false,
"require": "6.3.*"
}
}
}
Loading

0 comments on commit 73db22d

Please sign in to comment.