netresearch/typo3-testing-skill / skills/typo3-testing
typo3-testing
FlaggedUse when reproducing defects as failing tests, testing template or rendered output changes, confirming changes on a running TYPO3 instance, or setting up TYPO3 extension tests: unit/functional/E2E, PHPUnit 11-13, mutation testing, final-class mocks (v14), CI matrix across TYPO3 12/13/14.3 LTS, typo3-ci-workflows meta-package, CI failures. Also: transaction rollback, worker crashes, competing requests, testing-framework setup, test matrix, integration/e2e testing, coverage, test generation.
assets/.php-cs-fixer.dist.php
View on GitHub<?php
declare(strict_types=1);
/*
* PHP CS Fixer Configuration for TYPO3 Extensions
*
* Run check: Build/Scripts/runTests.sh -s cgl -n
* Run fix: Build/Scripts/runTests.sh -s cgl
*
* CUSTOMIZATION:
* - Adjust paths in Finder::create() for your directory structure
* - Update @PHP8x* migration rule for your minimum PHP version
*/
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = Finder::create()
->in(__DIR__ . '/Classes')
->in(__DIR__ . '/Configuration')
->in(__DIR__ . '/Tests')
->ignoreDotFiles(false)
->ignoreVCSIgnored(true);
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
// Base ruleset: PER Coding Style (PHP-FIG standard)
'@PER-CS' => true,
// PHP version migration (adjust to your minimum: @PHP80Migration, @PHP81Migration, etc.)
'@PHP82Migration' => true,
// Strict rules
'declare_strict_types' => true,
'strict_comparison' => true,
'strict_param' => true,
// Array notation
'array_syntax' => ['syntax' => 'short'],
'no_whitespace_before_comma_in_array' => true,
'whitespace_after_comma_in_array' => true,
'trim_array_spaces' => true,
'normalize_index_brace' => true,
// Casing
'constant_case' => true,
'lowercase_keywords' => true,
'native_function_casing' => true,
// Class notation
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
],
],
'final_class' => false, // Use final explicitly where needed
'no_blank_lines_after_class_opening' => true,
'ordered_class_elements' => [
'order' => [
'case', // Enum cases must come first
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
],
'self_accessor' => true,
'single_class_element_per_statement' => true,
// Control structure
'no_alternative_syntax' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'simplified_if_return' => true,
'trailing_comma_in_multiline' => [
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
],
// Function notation
'function_declaration' => ['closure_function_spacing' => 'one'],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'native_function_invocation' => [
'include' => ['@compiler_optimized'],
'scope' => 'namespaced',
'strict' => true,
],
'nullable_type_declaration_for_default_null_value' => true,
'return_type_declaration' => ['space_before' => 'none'],
'single_line_throw' => false,
'void_return' => true,
// Import
'fully_qualified_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => false,
'import_functions' => false,
],
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => ['class', 'function', 'const'],
'sort_algorithm' => 'alpha',
],
// Language construct
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'declare_parentheses' => true,
'single_space_around_construct' => true,
// Namespace
'blank_line_after_namespace' => true,
'clean_namespace' => true,
'no_leading_namespace_whitespace' => true,
// Operator
'binary_operator_spaces' => [
'default' => 'single_space',
],
'concat_space' => ['spacing' => 'one'],
'new_with_parentheses' => true,
'not_operator_with_successor_space' => false,
'object_operator_without_whitespace' => true,
'operator_linebreak' => ['only_booleans' => true],
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'unary_operator_spaces' => ['only_dec_inc' => false],
// PHPDoc
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'],
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_indent' => true,
'phpdoc_line_span' => [
'const' => 'single',
'method' => 'multi',
'property' => 'single',
],
'phpdoc_no_empty_return' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
'phpdoc_var_without_name' => true,
// Return notation
'no_useless_return' => true,
'return_assignment' => true,
// Semicolon
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_empty_statement' => true,
'no_singleline_whitespace_before_semicolons' => true,
'semicolon_after_instruction' => true,
// String notation
'single_quote' => true,
// Whitespace
'array_indentation' => true,
'blank_line_before_statement' => [
'statements' => ['return', 'throw', 'try'],
],
'compact_nullable_type_declaration' => true,
'heredoc_indentation' => ['indentation' => 'same_as_start'],
'method_chaining_indentation' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break',
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'switch',
'throw',
'use',
],
],
'no_spaces_around_offset' => true,
'no_whitespace_in_blank_line' => true,
'types_spaces' => ['space' => 'none'],
])
->setFinder($finder);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |