Skip to content

4.1.4 Ready code #5058

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

Merged
merged 291 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
3d1603e
Merge pull request #4795 from jeromegamez/deprecated-safe-mode
paulbalandan Jun 7, 2021
9b51c1a
Merge pull request #4790 from paulbalandan/blank-line-before-statement
paulbalandan Jun 8, 2021
d030096
Enable `braces`
paulbalandan Jun 7, 2021
517e2ee
Merge pull request #4792 from paulbalandan/braces
paulbalandan Jun 8, 2021
6121819
Ensure single space between cast and variable
paulbalandan Jun 7, 2021
6cd4a11
Merge pull request #4797 from paulbalandan/cast-spaces
paulbalandan Jun 8, 2021
4129b40
Use short forms of param and return types
paulbalandan Jun 8, 2021
2b78883
Align phpdocs
paulbalandan Jun 8, 2021
cbfe80d
Separate and group similar phpdocs
paulbalandan Jun 8, 2021
c8e0708
Update rector/rector requirement from 0.11.14 to 0.11.15 (#4803)
dependabot[bot] Jun 8, 2021
34d74c7
Merge pull request #4798 from mmfarhan/develop
samsonasik Jun 8, 2021
5310253
Update rector/rector requirement from 0.11.15 to 0.11.16 (#4805)
dependabot[bot] Jun 9, 2021
ca153fc
[Rector] Apply Rector: SimplifyRegexPatternRector
samsonasik Jun 9, 2021
2b95624
Merge pull request #4802 from paulbalandan/phpdoc-param-return-types
paulbalandan Jun 9, 2021
18f5611
Merge pull request #4806 from samsonasik/apply-rector-simplify-regex
samsonasik Jun 9, 2021
5333844
Shift binary alignment to `align_single_space_minimal`
paulbalandan Jun 8, 2021
5c5cfae
Merge pull request #4801 from paulbalandan/align-single-space-minimal
paulbalandan Jun 9, 2021
4e6997b
Ensure whitespace after commas in array
paulbalandan Jun 9, 2021
0fc1b93
Use short list syntax
paulbalandan Jun 9, 2021
391ae15
Ensure no trailing comma in single-line array
paulbalandan Jun 9, 2021
f89da51
Remove whitespaces before commas in arrays
paulbalandan Jun 9, 2021
cfa91a6
Ensure arrays use square braces
paulbalandan Jun 9, 2021
777eec1
Ensure trailing commas in multiline array
paulbalandan Jun 9, 2021
27366b2
Remove extra spaces inside arrays
paulbalandan Jun 9, 2021
995c51f
Merge pull request #4808 from paulbalandan/array-related-rules
paulbalandan Jun 10, 2021
e91b3ee
Add visibility identifiers
paulbalandan Jun 10, 2021
1ced623
Class, trait and interface elements must be separated with one line
paulbalandan Jun 10, 2021
d71c67f
Enable `ordered_imports`
totoprayogo1916 Jun 10, 2021
4f42d4b
Enable `class_definition` fixer
paulbalandan Jun 10, 2021
a45a5f0
Define `class_keyword_remove` rule as off
paulbalandan Jun 10, 2021
029c9b0
Enable `clean_namespace` fixer
paulbalandan Jun 10, 2021
1dac15f
Enable `combine_consecutive_issets` fixer
paulbalandan Jun 10, 2021
f59bf04
Enable `combine_consecutive_unsets` fixer
paulbalandan Jun 10, 2021
b215a7d
Enable `combine_nested_dirname` fixer
paulbalandan Jun 10, 2021
6e0b894
Enable `comment_to_phpdoc` fixer
paulbalandan Jun 10, 2021
9927db3
Enable `compact_nullable_typehint` fixer
paulbalandan Jun 10, 2021
8ea319b
Ensure one space in concatenations
paulbalandan Jun 10, 2021
38a8cb2
Enable `constant_case`
paulbalandan Jun 10, 2021
882c1a8
Enable `heredoc_indentation` fixer
paulbalandan Jun 10, 2021
099fda5
Convert Heredoc to Nowdoc syntax where possible
paulbalandan Jun 10, 2021
84a4839
Fix newly discovered errors
paulbalandan Jun 10, 2021
f494f77
Revert model coalesce
MGatner Jun 10, 2021
2198dd0
Merge pull request #4819 from MGatner/magic-model
MGatner Jun 10, 2021
c3a10f5
Merge pull request #4817 from paulbalandan/c-rules
paulbalandan Jun 10, 2021
3d0a4a7
Merge pull request #4818 from paulbalandan/heredocs
paulbalandan Jun 10, 2021
3411002
Properly indent all phpdocs
paulbalandan Jun 11, 2021
07160ec
Normalize inline phpdocs
paulbalandan Jun 11, 2021
7635183
Change phpdoc line span to multi-line
paulbalandan Jun 11, 2021
7a38ce6
Remove unneeded and aliased phpdocs
paulbalandan Jun 11, 2021
cc4d0cb
Use correct casing for phpdoc types
paulbalandan Jun 11, 2021
de23489
Sort phpdoc types alphabetically
paulbalandan Jun 11, 2021
631e5ae
Update rector/rector requirement from 0.11.16 to 0.11.20 (#4832)
dependabot[bot] Jun 14, 2021
21727d8
Merge pull request #4820 from paulbalandan/phpdoc-rules
paulbalandan Jun 15, 2021
36abf56
Merge pull request #4823 from paulbalandan/phpdoc-types
paulbalandan Jun 15, 2021
b5d1de9
Modernize and standardize typecasting
paulbalandan Jun 15, 2021
6af5370
Enforce ordering and trimming of phpdoc elements
paulbalandan Jun 15, 2021
1476c84
Define switch-related rules
paulbalandan Jun 15, 2021
44a9fe2
Define rules starting with "L"
paulbalandan Jun 15, 2021
eddc5a0
Merge pull request #4835 from paulbalandan/switch-rules
MGatner Jun 16, 2021
38207b9
Merge pull request #4838 from paulbalandan/L-rules
paulbalandan Jun 16, 2021
4c5d8e3
Define rules for ternary operators
paulbalandan Jun 15, 2021
fb24304
Define rules on unary operators
paulbalandan Jun 15, 2021
9197063
Use correct casing for PHP magic methods and constants
paulbalandan Jun 15, 2021
6d70cfe
Set `mb_str_functions` fixer as false
paulbalandan Jun 15, 2021
361590b
Merge pull request #4837 from paulbalandan/unary-op
paulbalandan Jun 16, 2021
6d74db0
Merge pull request #4839 from paulbalandan/m-rules
paulbalandan Jun 16, 2021
915190a
Enable `multiline_comment_opening_closing` fixer
paulbalandan Jun 16, 2021
4b601e5
Enable `multiline_whitespace_before_semicolons` fixer
paulbalandan Jun 16, 2021
54b6dcc
Merge pull request #4836 from paulbalandan/ternaries
paulbalandan Jun 17, 2021
2b323e2
Merge pull request #4842 from paulbalandan/last-m-rules
paulbalandan Jun 17, 2021
a0dca3d
Enable `method_argument_space` fixer
paulbalandan Jun 15, 2021
31826d0
Merge pull request #4840 from paulbalandan/method-argument-space
paulbalandan Jun 17, 2021
57f5cd8
Enable `method_chaining_indentation` fixer
paulbalandan Jun 16, 2021
de0da8b
Merge pull request #4841 from paulbalandan/method-chaining
paulbalandan Jun 17, 2021
23dbbfc
Native functions and type hints should be written in correct case
paulbalandan Jun 17, 2021
58dbb2b
Merge pull request #4845 from paulbalandan/native-fn-casing
paulbalandan Jun 18, 2021
1b0fa35
All instances created with new keyword must be followed by braces.
paulbalandan Jun 17, 2021
6524ccc
Master language constructs shall be used instead of aliases.
paulbalandan Jun 17, 2021
325a824
Merge pull request #4846 from paulbalandan/new-with-braces
paulbalandan Jun 18, 2021
f5dff11
Merge pull request #4847 from paulbalandan/no-alias-language-construc…
paulbalandan Jun 18, 2021
e47a954
[Commands] Remove unused $minPHPVersion property at Serve command
samsonasik Jun 20, 2021
6249987
Merge pull request #4852 from samsonasik/remove-unused-minphpversion
samsonasik Jun 20, 2021
35f2c4f
Update to latest PHPStan and Rector and Rector config compat
samsonasik Jun 23, 2021
007c66f
Merge pull request #4861 from samsonasik/update-latest-phpstan-rector
samsonasik Jun 23, 2021
3e0c343
[Rector] Apply Rector: RemoveExtraParametersRector
samsonasik Jun 23, 2021
e73f750
Merge pull request #4862 from samsonasik/apply-rector-r
samsonasik Jun 23, 2021
398b329
[Rector] Apply Rector: RemoveUnusedVariableAssignRector
samsonasik Jun 24, 2021
1808e7e
Merge pull request #4864 from samsonasik/apply-rector-remove-unused-v…
samsonasik Jun 24, 2021
625be30
Update rector/rector requirement from 0.11.21 to 0.11.23 (#4869)
dependabot[bot] Jun 24, 2021
7e4e56c
Test classes should be marked as final and internal
paulbalandan Jun 25, 2021
224f347
Normalize tests to use dedicated PHPUnit assertions
paulbalandan Jun 25, 2021
f8bba8c
Covers should be using FQCN
paulbalandan Jun 24, 2021
39cfd81
Test methods should camelCased
paulbalandan Jun 24, 2021
0487495
Simplify mocks used
paulbalandan Jun 24, 2021
9ee4abd
PHPUnit classes MUST be used in namespaced version
paulbalandan Jun 24, 2021
d47cd9e
Change visibility of `setUp` and `tearDown` to original `protected`
paulbalandan Jun 24, 2021
32f74f1
Convert test annotation to prefix
paulbalandan Jun 24, 2021
11023cc
Ensure all assertions are invoked the same
paulbalandan Jun 24, 2021
36613e6
Disable requiring size and covers by default
paulbalandan Jun 24, 2021
7e21104
Merge pull request #4871 from paulbalandan/phpunit-others
paulbalandan Jun 25, 2021
047d061
Var annotations should be correct and proper
paulbalandan Jun 25, 2021
bd10834
Modernize exponentiation
paulbalandan Jun 25, 2021
fa57ddd
Change protected properties and methods to private when possible
paulbalandan Jun 25, 2021
304fbd3
Ensure classes follow PSR-4
paulbalandan Jun 25, 2021
02a439b
Configure rules in "d"
paulbalandan Jun 26, 2021
24e7726
Merge pull request #4873 from paulbalandan/other-p-rules
paulbalandan Jun 26, 2021
4dbf046
Update to latest laminas-escaper ^2.8
samsonasik Jun 26, 2021
39f6889
Enable `echo_tag_syntax` until `error_suppression` fixers
paulbalandan Jun 26, 2021
2d11584
Strive for stricter assertions
paulbalandan Jun 25, 2021
b856a65
Merge pull request #4878 from samsonasik/update-laminas-escaper-28
samsonasik Jun 26, 2021
2800a4b
Merge pull request #4879 from paulbalandan/e-rules
paulbalandan Jun 28, 2021
376cf18
Merge pull request #4874 from paulbalandan/phpunit-strict-mode
paulbalandan Jun 28, 2021
7b7d251
Convert to explicit those implicit string variables (#4882)
paulbalandan Jun 28, 2021
308d0be
Enable `explicit_indirect_variable` (#4881)
paulbalandan Jun 28, 2021
9acff4f
Update rector/rector requirement from 0.11.23 to 0.11.28 (#4889)
dependabot[bot] Jun 28, 2021
e524097
Update to rector 0.11.29
samsonasik Jun 30, 2021
ca794d1
Merge pull request #4893 from samsonasik/update-rector-01129
samsonasik Jun 30, 2021
0641dd9
Update rector/rector requirement from 0.11.29 to 0.11.32 (#4895)
dependabot[bot] Jul 1, 2021
0598850
Enable remaining rules in "f" (#4888)
paulbalandan Jul 2, 2021
e1b3ec0
Enable `escape_implicit_backslashes` fixer (#4880)
paulbalandan Jul 2, 2021
86ece11
Enable `no_blank_lines_after_class_opening` fixer
paulbalandan Jul 2, 2021
8ac891b
Conditionally enable `no_blank_lines_after_phpdoc` fixer
paulbalandan Jul 2, 2021
3e1b205
Enable PSR-12 normative rules
paulbalandan Jul 2, 2021
3b9ef14
Enable other "no" rules with little impact
paulbalandan Jul 2, 2021
b198a43
Remove unused imports and non-printable characters
paulbalandan Jul 2, 2021
f293451
Merge pull request #4900 from paulbalandan/no-rules
paulbalandan Jul 3, 2021
651a4e9
Enable `no_null_property_initialization` fixer (#4901)
paulbalandan Jul 4, 2021
1928006
Update rector/rector requirement from 0.11.32 to 0.11.35 (#4916)
dependabot[bot] Jul 6, 2021
2b2097a
Add rule to remove some phpdoc tags and sort the rules
paulbalandan Jul 7, 2021
7beece1
Explicitly define all available options
paulbalandan Jul 7, 2021
5ea4c57
Merge pull request #4917 from paulbalandan/general-phpdocs
paulbalandan Jul 8, 2021
30b1bc1
Define `implode_call` and `include` rules
paulbalandan Jul 7, 2021
1dc72c1
Convert is_null to null === and fix phpstan errors
paulbalandan Jul 7, 2021
71e33a1
Apply rector fixes
paulbalandan Jul 7, 2021
d932904
Object accessors should be without whitespace
paulbalandan Jul 7, 2021
cc20a0b
Enable `operator_linebreak` rule
paulbalandan Jul 7, 2021
9224fb3
Set ordering rules
paulbalandan Jul 7, 2021
bff33ac
Merge pull request #4919 from paulbalandan/i-rules
paulbalandan Jul 8, 2021
f39a3b8
Merge pull request #4921 from paulbalandan/o-rules
paulbalandan Jul 8, 2021
a70577b
Enable `random_api_migration` fixer
paulbalandan Jul 8, 2021
2bdb38d
Enable `regular_callable_call` fixer
paulbalandan Jul 8, 2021
1b7d725
Enable `return_assignment` fixer
paulbalandan Jul 8, 2021
a374f94
Enable `return_type_declaration` fixer
paulbalandan Jul 8, 2021
02ac2de
Merge pull request #4926 from paulbalandan/r-rules
paulbalandan Jul 9, 2021
7df9693
Enable initial `single_**` rules which does not change current code
paulbalandan Jul 8, 2021
c56a5b1
Simplify single line comments
paulbalandan Jul 8, 2021
bc29beb
Use single quotes when possible
paulbalandan Jul 8, 2021
21afd7f
Enable `single_space_after_construct` fixer
paulbalandan Jul 8, 2021
d932e87
Use one trait per statement
paulbalandan Jul 8, 2021
a4fe347
Add `?` to nullable typehints
paulbalandan Jul 9, 2021
ac19c85
[Rector] Re-run InlineIfToExplicitIfRector on Latest Rector 0.11.36
samsonasik Jul 11, 2021
c9414b8
move * // @codeCoverageIgnore to method comment
samsonasik Jul 11, 2021
34735f5
run cs fix
samsonasik Jul 11, 2021
ef3bbb9
undo Foobar.php _support
samsonasik Jul 11, 2021
e6836d2
eol
samsonasik Jul 11, 2021
7769ea4
Merge pull request #4930 from samsonasik/update-rector-inline-if
samsonasik Jul 11, 2021
7d9b9da
Merge pull request #4928 from paulbalandan/add-nullable-types
paulbalandan Jul 11, 2021
cb8fb02
Merge pull request #4924 from paulbalandan/single---rules
paulbalandan Jul 11, 2021
7843c24
Define last "s" rules
paulbalandan Jul 8, 2021
4bf84ae
Merge pull request #4925 from paulbalandan/other-s-rules
paulbalandan Jul 12, 2021
d4afbec
Enable `self_accessor` and `self_static_accessor` fixers
paulbalandan Jul 8, 2021
e9110af
Configure but disable `semicolon_after_instruction`
paulbalandan Jul 8, 2021
cdc475e
Enable `simplified_if_return` fixer
paulbalandan Jul 8, 2021
4a1f582
Merge pull request #4923 from paulbalandan/s-rules
paulbalandan Jul 12, 2021
6c37823
Define remaining rules (#4934)
paulbalandan Jul 14, 2021
46130bb
Remove 'memory_usage' from 'displayPerformanceMetrics()' comment (#4939)
NSURLSession0 Jul 17, 2021
9aa9cd3
Normalize var and return annotations (#4942)
paulbalandan Jul 18, 2021
52c8145
Fix tag casing and tag types (#4943)
paulbalandan Jul 18, 2021
36152b3
Change some phpdocs to simple comments (#4945)
paulbalandan Jul 18, 2021
a6cfb8c
Remove useless code separator comments (#4946)
paulbalandan Jul 19, 2021
c18b692
Split config files into which has headers or not
paulbalandan Jul 19, 2021
0ee2b2f
Add file-level headers
paulbalandan Jul 19, 2021
37619d2
Merge pull request #4949 from paulbalandan/headers
paulbalandan Jul 20, 2021
c29d176
[Rector] Update rector to 0.11.37, clean up config
samsonasik Jul 21, 2021
013036b
Merge pull request #4954 from samsonasik/update-rector-clean-up-config
samsonasik Jul 21, 2021
44a19db
Update to phpdocumentor v3.0 (#4773)
paulbalandan Jul 22, 2021
627d86f
Remove upload step
paulbalandan Jul 22, 2021
c44a150
[PHPStan] Using PHPStan ^0.12.91
samsonasik Jul 24, 2021
e6fddba
Merge pull request #4962 from samsonasik/phpstan-more-01291
samsonasik Jul 24, 2021
f58a15c
Add workflow for linting framework (#4958)
paulbalandan Jul 24, 2021
a037b50
Update pre-commit to lint code (#4960)
paulbalandan Jul 24, 2021
b7ec33c
Remove superfluous phpdoc tags (#4941)
paulbalandan Jul 24, 2021
2a09808
Update to phpdoc v3.1 (#4961)
paulbalandan Jul 24, 2021
1652b3b
[Rector] Apply FuncGetArgsToVariadicParamRector
samsonasik Jul 24, 2021
d422154
update @param and phpstan handling
samsonasik Jul 24, 2021
df41929
Merge pull request #4963 from samsonasik/apply-rector-func-get-to-var…
samsonasik Jul 24, 2021
9c6de35
Optimize Filters
mostafakhudair Jul 24, 2021
ee23a3f
Merge pull request #4965 from mostafakhudair/optimize-filter
paulbalandan Jul 26, 2021
dc0f0d5
Update rector/rector requirement from 0.11.37 to 0.11.40 (#4967)
dependabot[bot] Jul 27, 2021
9f6daac
Fix API repo preparation step
paulbalandan Jul 27, 2021
087c115
Fix phpstan error properly
paulbalandan Jul 27, 2021
7f6783e
Add tests for File::getDestination
paulbalandan Jul 27, 2021
91bf8a6
[Rector] Apply MakeInheritedMethodVisibilitySameAsParentRector
samsonasik Jul 26, 2021
07ea12a
update changelog for breaking changes method
samsonasik Jul 28, 2021
bb40ac8
Merge pull request #4970 from paulbalandan/phpstan-non-empty-string
samsonasik Jul 28, 2021
1998c4c
Merge pull request #4966 from samsonasik/apply-rector-make-inherited-…
samsonasik Jul 28, 2021
bd37870
Merge pull request #4969 from paulbalandan/apidocs-action
paulbalandan Jul 28, 2021
ea6469b
Manual cleanup of comments and docblocks
paulbalandan Jul 24, 2021
31bfbba
Fix notice in pre-commit hook
paulbalandan Jul 24, 2021
e08d548
Merge pull request #4964 from paulbalandan/manual-cleanup
paulbalandan Jul 28, 2021
3ab3ade
Delete `docs` directly, not `api/docs` (#4976)
paulbalandan Jul 28, 2021
cb4fe4d
Revert to use `ACCESS_TOKEN`
paulbalandan Jul 28, 2021
f730dba
[Rector] Apply Rector: RemoveDuplicatedArrayKeyRector
samsonasik Jul 29, 2021
241abc9
remove key in creditCardProvider
samsonasik Jul 29, 2021
b254cf1
using dataProvider for Ordinal test
samsonasik Jul 29, 2021
3908d0c
Update tests/system/Helpers/InflectorHelperTest.php
samsonasik Jul 29, 2021
cba2328
index Credit card provider
samsonasik Jul 31, 2021
4169dce
Merge pull request #4978 from samsonasik/apply-rector-remove-duplicat…
samsonasik Aug 1, 2021
aa96117
Update rector/rector requirement from 0.11.40 to 0.11.42 (#4984)
dependabot[bot] Aug 3, 2021
fc52b05
Update rector/rector requirement from 0.11.42 to 0.11.43 (#4985)
dependabot[bot] Aug 4, 2021
781aa9e
Remove override (#4991)
paulbalandan Aug 6, 2021
5f09c24
Update rector/rector requirement from 0.11.43 to 0.11.46 (#4995)
dependabot[bot] Aug 9, 2021
77b7910
Update rector/rector requirement from 0.11.46 to 0.11.47 (#4997)
dependabot[bot] Aug 13, 2021
dcb54b3
Add SpaceAfterCommentFixer
paulbalandan Aug 13, 2021
b0978fb
Merge pull request #4999 from paulbalandan/space-after-comment-start-…
MGatner Aug 14, 2021
7e8fc18
[Rector] Apply Rector: RemoveDoubleAssignRector
samsonasik Aug 14, 2021
381748a
Merge pull request #5000 from samsonasik/remove-double-assign
samsonasik Aug 14, 2021
0c38916
[Rector] Apply Rector dead code set list
samsonasik Aug 17, 2021
377eddb
use single line @var
samsonasik Aug 17, 2021
6ba40da
Merge pull request #5007 from samsonasik/apply-rector-dead-code-set-list
samsonasik Aug 17, 2021
5c8d1ae
Make Cookie compatible with ArrayAccess
paulbalandan Aug 18, 2021
d1ed808
Replace deprecated FILTER_SANITIZE_STRING
paulbalandan Aug 18, 2021
eb11804
Make CookieStore compatible with IteratorAggregate::getIterator
paulbalandan Aug 18, 2021
148d78a
Merge pull request #5010 from paulbalandan/iterator-aggregate
MGatner Aug 18, 2021
a4ff0e9
Make the session handlers all compatible with SessionHandlerInterface…
paulbalandan Aug 19, 2021
9b4fbce
Make CITestStreamFilter compatible with php_user_filter (#5014)
paulbalandan Aug 20, 2021
d8b43eb
Update rector/rector requirement from 0.11.48 to 0.11.49 (#5018)
dependabot[bot] Aug 23, 2021
4d0110f
Make Time compatible with DateTime (#5022)
paulbalandan Aug 26, 2021
dae39bf
Apply PHP Copy/Paste Detector
MGatner Aug 26, 2021
4272b8e
Update dependabot config (#5027)
paulbalandan Aug 27, 2021
82d39de
Add `ReturnTypeWillChange` attribute to Entity (#5028)
paulbalandan Aug 27, 2021
7be28cd
Replace unused Entity private method (#5029)
paulbalandan Aug 27, 2021
d50f8ec
Update rector/rector requirement from 0.11.49 to 0.11.52
dependabot[bot] Aug 27, 2021
60d5dc8
Restore join code
MGatner Aug 27, 2021
3cbb617
clean up rector.php config skip
samsonasik Aug 28, 2021
520dd87
Merge pull request #5033 from codeigniter4/dependabot/composer/rector…
samsonasik Aug 28, 2021
c79a2cb
Fix broken apt installation
paulbalandan Aug 29, 2021
3a040f8
Merge pull request #5037 from paulbalandan/apt-fix
MGatner Aug 29, 2021
a630617
Make File compatible with SplFileInfo (#5040)
paulbalandan Aug 30, 2021
ffcf115
Update documentation code samples (#5039)
paulbalandan Aug 30, 2021
3d6b3bd
Merge pull request #5031 from MGatner/phpcbd
MGatner Aug 30, 2021
b24b483
[Rector] Apply Rector: FixClassCaseSensitivityNameRector
samsonasik Aug 31, 2021
ab580ba
Fix key casting in form_dropdown helper. (#5035)
sfadschm Aug 31, 2021
0869c0d
Merge pull request #5044 from samsonasik/apply-rector-fix-class-case
samsonasik Aug 31, 2021
cca4660
Bump to php-cs-fixer v3.1 (#5045)
paulbalandan Aug 31, 2021
4ab9d66
Switch to official coding standard (#5038)
paulbalandan Sep 2, 2021
b855bca
Apply NoCodeSeparatorCommentFixer
paulbalandan Sep 3, 2021
0ae2594
Prep for 4.1.4 release
MGatner Sep 6, 2021
62bf3ab
Add entry to changelog for initial PHP 8.1 changes
paulbalandan Sep 4, 2021
26b7a90
docs: fix indentation of the list
kenjis Sep 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ root = true
end_of_line = lf

[*.php]
indent_style = tab
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ utils/ export-ignore
rector.php export-ignore
phpunit.xml.dist export-ignore
phpstan.neon.dist export-ignore
.php-cs-fixer.dist.php export-ignore

# The source user guide, either
user_guide_src/ export-ignore
Expand Down
25 changes: 15 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
version: 2

updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: 'composer'
directory: '/'
schedule:
interval: 'daily'
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
ignore:
- dependency-name: '*'
update-types:
- 'version-update:semver-minor'
- 'version-update:semver-patch'
46 changes: 22 additions & 24 deletions .github/workflows/deploy-apidocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# When changes are pushed to the develop branch,
# build the current version of the API documentation
# with phpDocumentor and deploy it to the api branch.
# with phpDocumentor and deploy it to codeigniter4/api.
name: Deploy API Documentation

on:
Expand All @@ -9,13 +9,14 @@ on:
- 'develop'
paths:
- 'system/**'
- '.github/workflows/deploy-apidocs.yml'

jobs:

build:
name: Deploy to api
if: (github.repository == 'codeigniter4/CodeIgniter4')
runs-on: ubuntu-latest
if: github.repository == 'codeigniter4/CodeIgniter4'
runs-on: ubuntu-20.04

steps:
- name: Setup credentials
run: |
Expand All @@ -37,37 +38,34 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: intl
php-version: '8.0'
coverage: none

- name: Install GraphViz for phpDocumentor
run: |
sudo apt install -yq graphviz

- name: Download phpDocumentor
- name: Download phpDocumentor v3.1
run: |
cd ./source
curl \
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v2.9.1/phpDocumentor.phar \
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.1.0/phpDocumentor.phar \
-o admin/phpDocumentor.phar

- name: Prepare
- name: Prepare API repo
working-directory: api
run: |
cd ./api
rm -rf ./api/docs*
mkdir -p ./api/docs
git reset --hard master
rm -rfv docs
mkdir --parents --verbose docs

- name: Build
- name: Build API in source repo
working-directory: source
run: |
cd ./source
chmod +x admin/phpDocumentor.phar
admin/phpDocumentor.phar
php admin/phpDocumentor.phar run --ansi --verbose
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs

- name: Deploy
- name: Deploy to API repo
working-directory: api
run: |
cd ./api
git add .
git commit -m "API sync for ${GITHUB_SHA}"
git push
if ! git diff-index --quiet HEAD; then
git commit -m "Updated API for commit ${GITHUB_SHA}"
git push origin master
fi
8 changes: 4 additions & 4 deletions .github/workflows/deploy-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
framework:
name: Deploy to framework
if: (github.repository == 'codeigniter4/CodeIgniter4')
if: github.repository == 'codeigniter4/CodeIgniter4'
runs-on: ubuntu-latest
steps:
- name: Identify
Expand All @@ -36,7 +36,7 @@ jobs:
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v4.0.2
uses: actions/github-script@v4
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand All @@ -54,7 +54,7 @@ jobs:

appstarter:
name: Deploy to appstarter
if: (github.repository == 'codeigniter4/CodeIgniter4')
if: github.repository == 'codeigniter4/CodeIgniter4'
runs-on: ubuntu-latest
steps:
- name: Identify
Expand All @@ -81,7 +81,7 @@ jobs:
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v4.0.2
uses: actions/github-script@v4
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/test-coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Coding Standards

on:
push:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'
pull_request:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'

jobs:
lint:
name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
php-version:
- '7.3'
- '7.4'
- '8.0'

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: tokenizer
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
${{ runner.os }}-

- name: Install dependencies
run: composer update --ansi --no-interaction

- name: Run lint on `app/`, `admin/`, `public/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.no-header.php-cs-fixer.dist.php --using-cache=no --diff

- name: Run lint on `system/`, `tests`, `utils/`, and root PHP files
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
43 changes: 43 additions & 0 deletions .github/workflows/test-phpcpd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# When a PR is opened or a push is made, check code
# for duplication with PHP Copy/Paste Detector.
name: PHPCPD

on:
pull_request:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'public/**'
- 'system/**'
- '.github/workflows/test-phpcpd.yml'
push:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'public/**'
- 'system/**'
- '.github/workflows/test-phpcpd.yml'

jobs:
build:
name: Duplicate Code Detection
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phive
extensions: intl, json, mbstring, xml

- name: Detect code duplication
run: |
sudo phive --no-progress install --global --trust-gpg-keys 4AA394086372C20A phpcpd
phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php app/ public/ system/
4 changes: 2 additions & 2 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

- name: Cache composer dependencies
uses: actions/cache@v2.1.5
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -64,7 +64,7 @@ jobs:
run: mkdir -p build/phpstan

- name: Cache PHPStan result cache directory
uses: actions/cache@v2.1.5
uses: actions/cache@v2
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']
mysql-versions: ['5.7']
include:
- php-versions: 7.4
- php-versions: '7.4'
db-platforms: MySQLi
mysql-versions: 8.0
mysql-versions: '8.0'

services:
mysql:
Expand Down Expand Up @@ -107,13 +107,14 @@ jobs:
run: |
sudo apt-get install --reinstall libgs9-common fonts-noto-mono libgs9:amd64 libijs-0.35:amd64 fonts-urw-base35 ghostscript poppler-data libjbig2dec0:amd64 gsfonts libopenjp2-7:amd64 fonts-droid-fallback ttf-dejavu-core
sudo apt-get install -y imagemagick
sudo apt-get install --fix-broken

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2.1.5
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -122,7 +123,7 @@ jobs:
- name: Install dependencies
run: |
composer update --ansi --no-interaction
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan codeigniter4/codeigniter4-standard squizlabs/php_codesniffer
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
php -r 'file_put_contents("vendor/laminas/laminas-zendframework-bridge/src/autoload.php", "");'
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
Expand All @@ -140,7 +141,7 @@ jobs:
- if: github.repository_owner == 'codeigniter4' && matrix.php-versions == '7.4'
name: Run Coveralls
run: |
composer global require php-coveralls/php-coveralls:^2.4
composer global require --ansi php-coveralls/php-coveralls:^2.4
php-coveralls --coverage_clover=build/logs/clover.xml -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

- name: Cache composer dependencies
uses: actions/cache@v2.1.5
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,5 @@ nb-configuration.xml
/results/
/phpunit*.xml
/.phpunit.*.cache

/.php-cs-fixer.php
42 changes: 42 additions & 0 deletions .no-header.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\CodingStandard\CodeIgniter4;
use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer;
use Nexus\CsConfig\Fixer\Comment\SpaceAfterCommentStartFixer;
use Nexus\CsConfig\FixerGenerator;
use PhpCsFixer\Finder;

$finder = Finder::create()
->files()
->in([
__DIR__ . '/admin',
__DIR__ . '/app',
__DIR__ . '/public',
])
->notName('#Logger\.php$#');

$overrides = [];

$options = [
'cacheFile' => 'build/.no-header.php-cs-fixer.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
SpaceAfterCommentStartFixer::name() => true,
],
];

return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();
Loading