Skip to content
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

MediaWiki 1.43 #28

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Syntax-Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
name: PHP ${{ matrix.php }} Syntax Check
steps:
- uses: actions/checkout@master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/
.php-cs-fixer.cache
159 changes: 159 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
// Skip anything being ignored in .gitignore.
->ignoreVCSIgnored(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,

// PSR12 overrides.
'no_closing_tag' => false,
'no_break_comment' => false, // A bit buggy with comments.
'statement_indentation' => false, // A bit buggy with comments.

// Array notation.
'array_syntax' => ['syntax' => 'short'],
'normalize_index_brace' => true,
'whitespace_after_comma_in_array' => true,

// Basic.
'no_trailing_comma_in_singleline' => true,

// Casing.
'class_reference_name_casing' => true,

// Cast notation.
'cast_spaces' => ['space' => 'single'],

// Control structure.
'include' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'simplified_if_return' => true,
'trailing_comma_in_multiline' => false,

// Function notation.
'lambda_not_used_import' => true,
'nullable_type_declaration_for_default_null_value' => true,

// Import.
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],

// Language construct.
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'nullable_type_declaration' => ['syntax' => 'question_mark'],

// Namespace notation.
'no_leading_namespace_whitespace' => true,

// Operator.
'concat_space' => ['spacing' => 'one'],
'operator_linebreak' => [
'only_booleans' => true,
'position' => 'beginning',
],
'standardize_not_equals' => true,
'ternary_to_null_coalescing' => true,

// PHPDoc.
'phpdoc_indent' => true,
'phpdoc_line_span' => [
'const' => 'multi',
'property' => 'multi',
'method' => 'multi',
],
'phpdoc_no_access' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => [
'order' => [
'param',
'throws',
'return',
],
],
'phpdoc_no_empty_return' => true,
'phpdoc_param_order' => true,
'phpdoc_scalar' => [
'types' => [
'boolean',
'callback',
'double',
'integer',
'real',
'str',
],
],
'phpdoc_to_comment' => [
'ignored_tags' => ['todo'],
],
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => [
'groups' => ['alias', 'meta', 'simple'],
],
'phpdoc_var_without_name' => true,

// Return notation.
'no_useless_return' => true,
'simplified_null_return' => true,

// Semicolon.
'multiline_whitespace_before_semicolons' => true,
'no_empty_statement' => true,
'no_singleline_whitespace_before_semicolons' => true,

// String notation.
'explicit_string_variable' => true,
'simple_to_complex_string_variable' => true,
'single_quote' => true,

// Whitespace.
'array_indentation' => true,
'blank_line_before_statement' => [
'statements' => [
'case',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
'yield_from',
],
],
'heredoc_indentation' => ['indentation' => 'start_plus_one'],
'method_chaining_indentation' => true,
'no_spaces_around_offset' => [
'positions' => ['inside', 'outside'],
],
'type_declaration_spaces' => [
'elements' => ['function', 'property'],
],
])
->setIndent("\t")
->setFinder($finder);

?>
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Parts of this theme are licensed under [BSD 3-clause license](https://www.openso
#### Branches organization:
| Version | MediaWiki | SMF 2.0 | SMF 2.1 |
| ------- | ---------- | ------------------ | ------------------ |
| master | 1.43 (LTS) | :white_check_mark: | :white_check_mark: |
| 2.0 | 1.39 (LTS | :white_check_mark: | :white_check_mark: |
| master | 1.43 (LTS) | :x: | :white_check_mark: |
| 2.0 | 1.39 (LTS) | :x: | :white_check_mark: |
| 1.4 | 1.35 (LTS) | :white_check_mark: | :x: |
| 1.3 | 1.27 (LTS) | :white_check_mark: | :x: |
| 1.2 | 1.25 | :white_check_mark: | :x: |
Expand Down
17 changes: 17 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "simplemachines/mw-curve",
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.40"
},
"scripts": {
"lint": "php-cs-fixer --quiet check --config .php-cs-fixer.dist.php --path-mode=intersection $(git diff --name-only \"*.php\") || php-cs-fixer check --diff --config .php-cs-fixer.dist.php --path-mode=intersection $(git diff --name-only \"*.php\")",
"lint-fix": "php-cs-fixer fix -v --config .php-cs-fixer.dist.php --path-mode=intersection $(git diff --name-only \"*.php\")"
},
"config": {
"platform": {
"php": "8.0.0"
}
}
}
Loading
Loading