Skip to content

Commit

Permalink
Merge pull request #4295 from Catrobat/dependabot/composer/phpunit/ph…
Browse files Browse the repository at this point in the history
…punit-10.3.3

Build(deps-dev): Bump phpunit/phpunit from 9.6.8 to 10.3.3
  • Loading branch information
dmetzner authored Sep 8, 2023
2 parents 5ee362f + 19eb5f6 commit d41a479
Show file tree
Hide file tree
Showing 216 changed files with 1,311 additions and 1,939 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
- name: PHP Copy Paste Detector
uses: StephaneBour/[email protected]
with:
args: src tests
args: src

#
# phpdd (Php Code Fixer):
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"hwi/oauth-bundle": "dev-master",
"incenteev/composer-parameter-handler": "^2.1",
"lexik/jwt-authentication-bundle": "^2.19",
"php-http/guzzle6-adapter": "^2.0",
"php-http/guzzle7-adapter": "^1.0",
"php-http/httplug-bundle": "^1.29",
"php-http/message": "^1.16",
"ramsey/uuid": "^4.7",
Expand Down Expand Up @@ -70,7 +70,6 @@
"behat/behat": "^3.13",
"behat/mink": "^1.10",
"deployer/deployer": "^v7.3",
"dg/bypass-finals": "^1.4",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "2.9.*",
"doctrine/doctrine-fixtures-bundle": "^3.4",
Expand All @@ -82,15 +81,15 @@
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10.3",
"rector/rector": "^0.18.0",
"symfony/browser-kit": "6.3.*",
"symfony/http-client": "6.3.*",
"symfony/maker-bundle": "^1.48",
"symfony/phpunit-bridge": "6.3.*",
"symfony/stopwatch": "6.3.*",
"symfony/web-profiler-bundle": "6.3.*",
"vimeo/psalm": "^5.12.0",
"vimeo/psalm": "^5.14.0",
"wapmorgan/php-deprecation-detector": "^2.0",
"textalk/websocket": "1.5.8"
},
Expand Down
1,154 changes: 505 additions & 649 deletions composer.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions config/bootstrap_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@

$_SERVER['APP_ENV'] = 'test';
require dirname(__DIR__).'/config/bootstrap.php';

use DG\BypassFinals;

BypassFinals::enable();
63 changes: 25 additions & 38 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="config/bootstrap_test.php"
failOnWarning="true"
convertDeprecationsToExceptions="false"
>
<php>
<ini name="display_errors" value="1"/>
<ini name="error_reporting" value="-1"/>
<env name="APP_ENV" value="test" force="true"/>
<env name="SHELL_VERBOSITY" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5"/>
</php>

<testsuites>
<testsuite name="Project Test Suite">
<directory>tests/PhpUnit</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>

<extensions>
<extension class="App\System\Testing\PhpUnit\Hook\RefreshTestEnvHook"/>
<!-- Run `composer require symfony/panther` before enabling this extension -->
<!-- <extension class="Symfony\Component\Panther\ServerExtension" /> -->
</extensions>

</phpunit>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="config/bootstrap_test.php" failOnWarning="true">
<php>
<ini name="display_errors" value="1"/>
<ini name="error_reporting" value="-1"/>
<env name="APP_ENV" value="test" force="true"/>
<env name="SHELL_VERBOSITY" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests/PhpUnit</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="true"/>
<extensions>
<bootstrap class="App\System\Testing\PhpUnit\Extension\BootstrapExtension"/>
</extensions>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
3 changes: 1 addition & 2 deletions src/Admin/ApkGeneration/ApkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public function __construct(
protected ProgramManager $program_manager,
protected JenkinsDispatcher $jenkins_dispatcher,
protected EntityManagerInterface $entity_manager
) {
}
) {}

public function resetApkBuildStatusAction(): RedirectResponse
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/ApkGeneration/ApkPendingAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ protected function configureDefaultSortValues(array &$sortValues): void

public function __construct(
private readonly ScreenshotRepository $screenshot_repository
) {
}
) {}

/**
* @param Program $object
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/ApkGeneration/ApkReadyAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ protected function configureDefaultSortValues(array &$sortValues): void

public function __construct(
private readonly ScreenshotRepository $screenshot_repository
) {
}
) {}

public function getThumbnailImageUrl(Program $object): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class ReportedCommentsController extends CRUDController
{
public function __construct(
private readonly EntityManagerInterface $entity_manager
) {
}
) {}

public function unreportProgramAction(): RedirectResponse
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/DB_Updater/AchievementsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class AchievementsAdmin extends AbstractAdmin

public function __construct(
protected AchievementManager $achievement_manager
) {
}
) {}

protected function configureRoutes(RouteCollectionInterface $collection): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class AchievementsAdminController extends CRUDController
public function __construct(
protected AchievementManager $achievement_manager,
protected KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/DB_Updater/Controller/CronJobsAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function __construct(
protected CronJobRepository $cron_job_repository,
protected EntityManagerInterface $entity_manager,
protected KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class ExtensionsAdminController extends CRUDController
{
public function __construct(
protected KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class SpecialUpdaterAdminController extends CRUDController
{
public function __construct(
protected KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/DB_Updater/Controller/TagsAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class TagsAdminController extends CRUDController
{
public function __construct(
protected KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/MediaPackage/MediaPackageAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ protected function configureFormFields(FormMapper $form): void
*
* Fields to be shown on filter forms
*/
protected function configureDatagridFilters(DatagridMapper $filter): void
{
}
protected function configureDatagridFilters(DatagridMapper $filter): void {}

/**
* {@inheritdoc}
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/MediaPackage/MediaPackageFileAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class MediaPackageFileAdmin extends AbstractAdmin

public function __construct(
private readonly MediaPackageFileRepository $media_package_file_repository
) {
}
) {}

public function prePersist($object): void
{
Expand Down
5 changes: 2 additions & 3 deletions src/Admin/Projects/ApproveProjects/ApproveProjectsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public function __construct(
private readonly ExtractedFileRepository $extracted_file_repository,
protected TokenStorageInterface $security_token_storage,
protected ParameterBagInterface $parameter_bag
) {
}
) {}

/**
* @param mixed|Program $object
Expand Down Expand Up @@ -181,7 +180,7 @@ protected function configureShowFields(ShowMapper $show): void
'template' => 'Admin/program_containing_code_objects.html.twig',
])
->add('Actions', null, [
'accessor' => function ($subject): void { }, // Just some buttons, nothing to "access"!
'accessor' => function ($subject): void {}, // Just some buttons, nothing to "access"!
'template' => 'Admin/program_approve_action.html.twig',
])
;
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/Projects/ProjectsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function __construct(
private readonly ScreenshotRepository $screenshot_repository,
protected TokenStorageInterface $security_token_storage,
private readonly ParameterBagInterface $parameter_bag
) {
}
) {}

public function getObjectMetadata($object): MetadataInterface
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/SpecialProjects/ExampleProgramAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public function __construct(
private readonly ImageRepository $example_image_repository,
private readonly ProgramManager $program_manager,
private readonly FlavorRepository $flavor_repository
) {
}
) {}

/**
* @param ExampleProgram $object
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/SpecialProjects/FeaturedProgramAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class FeaturedProgramAdmin extends AbstractAdmin
public function __construct(
private readonly ImageRepository $featured_image_repository,
private readonly ProgramManager $program_manager
) {
}
) {}

/**
* @param FeaturedProgram $object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ abstract class AbstractMachineTranslationAdminController extends CRUDController
public function __construct(
private readonly EntityManagerInterface $entity_manager,
private readonly KernelInterface $kernel
) {
}
) {}

public function listAction(Request $request): Response
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/Survey/AllSurveysAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class AllSurveysAdmin extends AbstractAdmin

public function __construct(
protected EntityManagerInterface $entity_manager
) {
}
) {}

/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class BroadcastNotificationController extends CRUDController
public function __construct(
protected NotificationManager $notification_manager,
protected UserManager $user_manager
) {
}
) {}

public function listAction(Request $request): Response
{
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/Tools/FeatureFlag/FeatureFlagAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class FeatureFlagAdmin extends AbstractAdmin
*
* Fields to be shown on filter forms
*/
protected function configureDatagridFilters(DatagridMapper $filter): void
{
}
protected function configureDatagridFilters(DatagridMapper $filter): void {}

/**
* {@inheritdoc}
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/Tools/FeatureFlag/FeatureFlagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
*/
class FeatureFlagController extends CRUDController
{
public function __construct(protected FeatureFlagManager $manager)
{
}
public function __construct(protected FeatureFlagManager $manager) {}

public function setFlagAction(): RedirectResponse
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/Tools/Maintenance/MaintainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function __construct(
private readonly string $file_storage_dir,
private readonly string $apk_dir,
private readonly string $log_dir
) {
}
) {}

/**
* @throws \Exception
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/Tools/Maintenance/RemovableMemory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class RemovableMemory

public ?string $archive_command_name = null;

public function __construct(public string $name = '', public string $description = '')
{
}
public function __construct(public string $name = '', public string $description = '') {}

public function setSize(string $size): void
{
Expand Down
3 changes: 1 addition & 2 deletions src/Admin/Tools/SendMailToUser/SendMailToUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
protected UserManager $user_manager,
protected LoggerInterface $logger,
private readonly ResetPasswordHelperInterface $resetPasswordHelper
) {
}
) {}

public function listAction(Request $request = null): Response
{
Expand Down
4 changes: 1 addition & 3 deletions src/Admin/Users/UserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Sonata\UserBundle\Admin\Model\UserAdmin as BaseUserAdmin;

class UserAdmin extends BaseUserAdmin
{
}
class UserAdmin extends BaseUserAdmin {}
3 changes: 1 addition & 2 deletions src/Admin/Users/UserDataReport/UserDataReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public function __construct(
protected UserManager $user_manager,
protected NotificationRepository $notification_repository,
protected EntityManagerInterface $entity_manager
) {
}
) {}

/**
* @param string $id The id of the user which data should be shown
Expand Down
Loading

0 comments on commit d41a479

Please sign in to comment.