Skip to content

Commit d312d1f

Browse files
authored
4.2.0 Release
2 parents abe0184 + 38572ba commit d312d1f

File tree

429 files changed

+21913
-10744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

429 files changed

+21913
-10744
lines changed

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Forces Git to handle line endings, preventing any changes (like from editors or tools) being commited.
2+
# Also improves reliability of tools like Git Lens.
3+
* text=auto
4+
5+
# NPM always rewrites package.json and package-lock.json to lf.
6+
# This stops the annoying tendancy for false positive changes to appear under Windows.
7+
package.json text=lf
8+
package-lock.json text=lf

.github/CONTRIBUTING.md

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,76 @@ When it's time to integrate changes, our git flow more or less follows http://nv
4444

4545
### Branches
4646

47-
- `master`: The current release or release candidate. Always numbered as `major.minor.revision`, possibly with an `-alpha` or `-beta` extension as well.
48-
- `develop`: During alpha/beta, contains major changes to a release candidate. After beta, contains breaking changes that will need to wait for the next version to be integrated. Always numbered as `major.minor.x`, possibly with an `-alpha` or `-beta` extension as well.
47+
#### `master`
48+
The current release or release candidate. Always numbered as `major.minor.revision`, possibly with an `-alpha`, `-beta` or `-RC` extension as well. Commits should **never** be send directly on this branch.
4949

50-
### Changes
50+
#### `hotfix`
51+
Contains the next bug fix release, typically matching the next `revision` version. Any changes not introducing a breaking change can be committed to this branch. Always numbered as `major.minor.revision`.
5152

52-
#### Hotfixes
53+
When ready, changes should be merged into both **master** and **develop**.
5354

54-
Hotfixes should be created in a separate branch, and then merged into both **master** and **develop**.
55+
#### `develop`
56+
Contains breaking changes that will need to wait for the next version to be integrated. Typically matched the next `minor` version. Always numbered as `major.minor.x`.
5557

56-
#### Features
58+
When ready, changes should be merged into both **master** and **hotfix**.
5759

58-
New features that introduce some breaking changes should be created in a separate branch. When they are ready, they can be merged into `develop`.
60+
#### `feature-*`
61+
New features that introduce some breaking changes or incomplete code should be committed in a separate `feature-{name}` branch.
62+
63+
When ready, the branch should be **[squashed-merged](https://github.com/blog/2141-squash-your-commits)** ([guide](https://stackoverflow.com/a/5309051/445757)) into `develop` (or `hotfix` if it doesn't introduce a breaking change).
5964

6065
### Releases
6166

62-
After every release, the `master` branch (and possibly `develop`, for minor/major releases) should immediately be version-bumped. That way, new changes can be accumulated until the next release.
67+
After every release, the `hotfix` branch (and possibly `develop`, for minor/major releases) should immediately be version-bumped. That way, new changes can be accumulated until the next release.
6368

6469
When a new version is created, the version number need to be changed in `app/define.php`. `CHANGELOG.md` should also be updated and the associated tag should be created on Github.
6570

66-
#### Alpha/beta releases
71+
#### Alpha/beta/RC releases
72+
73+
During alpha/beta/RC, a release candidate always sits on the `master` branch. During the alpha/beta phase, major changes can still be integrated into `master` from `develop`. However, this should bump the revision number instead of the minor/major number. During RC, only _hotfixes_ can be merged into `master`.
74+
75+
## Working together
76+
77+
### Issues
78+
79+
Issues are used as a todo list. Each issue represent something that needs to be fixed, added or improved. Be sure to assign issues to yourself when working on something so everyones knows this issue is taken care of.
80+
81+
Issues are tagged to represent the feature or category it refers to. We also have some special tags to help organize issues. These includes:
82+
83+
- [`good first issue`](https://github.com/userfrosting/UserFrosting/labels/good%20first%20issue): If this is your first time contributing to UserFrosting, look for the `good first issue` tag. It's associated with easier issues anyone can tackle.
84+
85+
- [`up-for-grabs`](https://github.com/userfrosting/UserFrosting/labels/up-for-grabs): Theses issues have not yet been assigned to anybody. Look for theses when you want to start working on a new issue.
86+
87+
- [`needs discussion`](https://github.com/userfrosting/UserFrosting/labels/needs%20discussion) : This issue needs to be discussed with the dev team before being implemented as more information is required, questions remain or a higher level decision needs to be made.
88+
89+
- [`needs more info`](https://github.com/userfrosting/UserFrosting/labels/needs%20more%20info): More information is required from the author of the issue.
90+
91+
### Milestones
92+
93+
In order to keep a clear roadmap, milestones are used to track what is happening and what needs to be done. Milestones are used to classify problems by:
94+
- Things that need to be done ASAP
95+
- Things we are doing right now
96+
- Things we will probably do soon
97+
- Things we probably will not do soon
98+
99+
**Things that need to be done ASAP**: this is the highest priority and this milestone should always be empty. Issues related to important bug fixes should be set on this milestone immediately. The milestone always refers to the next version of _revision_, also known as the next bugfix version.
100+
101+
**Things we are doing right now**: this is the "main" milestone we are currently working on. Usually represents the next `minor` version, but may also represent the next major version when the focus is on the next major release.
67102

68-
During alpha/beta, a release candidate sits on the `master` branch. Minor improvements should be treated as hotfixes, while major changes should be treated as features. In alpha/beta, major changes can still be integrated into `master` from `develop`. However, this should bump the revision number instead of the minor/major number.
103+
**Things we’ll probably do soon**: It's a "Next Tasks" milestone. These tasks will be addressed in the near future, but not close enough for the next version. Usually represents the second minor revision **and** the next major release.
104+
105+
**Things we probably won’t do soon**: We refer to these issues and sometimes look through them, but they are easy to ignore and sometimes intentionally ignored. Represent issues without milestones that do not have a defined timeframe.
106+
107+
108+
To maintain a clear history of progress on each milestone, milestones must be closed when completed and the corresponding version released. A new milestone must then be created for the next release. In addition, the milestone version must be updated when new versions are released.
109+
110+
## Learn documentation
111+
112+
The [Learn Documentation](https://learn.userfrosting.com) should always be updated along side code changes.
113+
114+
Changes to the [learn repository](https://github.com/userfrosting/learn) should follow the same logic as the main repository, ie. any changes applied to the `hotfix` branch should be documented in the learn `hotfix` branch. This also apply to `feature-*` branches.
115+
116+
Additionally, the `learn` repository can have `dev-*` for learn specific features and fixes.
69117

70118
## Building the API documentation
71119

@@ -74,3 +122,19 @@ To build the API documentation, install [ApiGen](http://www.apigen.org/) globall
74122
`apigen generate --source UserFrosting/app,userfrosting-assets/src,userfrosting-config/Config,userfrosting-fortress/Fortress,userfrosting-i18n/I18n,userfrosting-session/Session,userfrosting-support/Support --destination userfrosting-api --exclude *vendor*,*_meta* --template-theme "bootstrap"`
75123

76124
from inside your dev directory.
125+
126+
## Automatically fixing coding style with PHP-CS-Fixer
127+
128+
[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) can be used to automatically fix PHP code styling. UserFrosting provides a project specific configuration file ([`.php_cs`](.php_cs)) with a set of rules reflecting our [style guidelines](../STYLE-GUIDE.md). This tool should be used before submitting any code change to assure the style guidelines are met. Every sprinkles will also be parsed by the fixer.
129+
130+
PHP-CS-Fixer is automatically loaded by Composer and can be used from the UserFrosting root directory :
131+
132+
```
133+
app/vendor/bin/php-cs-fixer fix
134+
```
135+
136+
## Useful tools
137+
138+
If you are using **Atom**, be sure to checkout theses useful packages :
139+
- [Docblockr](https://atom.io/packages/docblockr) : Used to generate [documentation block](https://github.com/userfrosting/UserFrosting/blob/master/STYLE-GUIDE.md#documentation).
140+
- [php-ide-serenata](https://atom.io/packages/php-ide-serenata) : Integrates [Serenata](https://gitlab.com/Serenata/Serenata) as PHP IDE, providing autocompletion, code navigation, refactoring, signature help, linting and annotations.

.gitignore

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Ignores my text editor metadata
1+
# Ignores text editor metadata
22
*.komodoproject
3+
.php_cs.cache
34

45
# Ignores Mac metadata. You can configure this globally if you use a Mac: http://islegend.com/development/setting-global-gitignore-mac-windows/
56
.DS_Store
@@ -14,15 +15,17 @@ app/.env
1415
composer.lock
1516
composer.phar
1617

17-
# Ignore log, cache, and sessions directories
18+
# Ignore log, cache, sessions and storage directories
1819
app/cache/*
1920
app/logs/*
2021
app/sessions/*
22+
app/storage/*
2123

22-
# Unignore log, cache, and sessions .gitkeeps
24+
# Unignore log, cache, sessions and storage .gitkeeps
2325
!app/cache/.gitkeep
2426
!app/logs/.gitkeep
2527
!app/sessions/.gitkeep
28+
!app/storage/.gitkeep
2629

2730
# Ignore bower vendor assets
2831
/app/sprinkles/*/assets/vendor/
@@ -59,4 +62,16 @@ public/css/min/*
5962
# Ignore personal config files (v0.3.x)
6063
app/config-userfrosting.php
6164

65+
# Physical database storage for containers (?)
6266
app/database/userfrosting.db
67+
68+
# Ignore vendor assets
69+
app/assets/*
70+
71+
# Ignore Vagrant & Homestead VM
72+
vagrant/Homestead/
73+
.vagrant/*
74+
75+
# Igore npm lockfile
76+
build/package-lock.json
77+
build/package.lock

.php_cs

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?php
2+
3+
$header = 'UserFrosting (http://www.userfrosting.com)
4+
5+
@link https://github.com/userfrosting/UserFrosting
6+
@copyright Copyright (c) 2019 Alexander Weissman
7+
@license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)';
8+
9+
$rules = [
10+
'@PSR2' => true,
11+
'array_syntax' => ['syntax' => 'short'],
12+
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => false],
13+
'blank_line_after_namespace' => true,
14+
'blank_line_after_opening_tag' => true,
15+
'blank_line_before_return' => true,
16+
'braces' => true,
17+
'cast_spaces' => true,
18+
'class_definition' => true,
19+
'declare_equal_normalize' => true,
20+
'elseif' => true,
21+
'encoding' => true,
22+
'full_opening_tag' => true,
23+
'function_declaration' => true,
24+
'function_typehint_space' => true,
25+
'hash_to_slash_comment' => true,
26+
'heredoc_to_nowdoc' => true,
27+
'include' => true,
28+
'indentation_type' => true,
29+
'line_ending' => true,
30+
'lowercase_cast' => true,
31+
'lowercase_constants' => true,
32+
'lowercase_keywords' => true,
33+
'method_argument_space' => true,
34+
'method_separation' => true,
35+
'multiline_whitespace_before_semicolons' => true,
36+
'native_function_casing' => true,
37+
'new_with_braces' => true,
38+
'no_blank_lines_after_class_opening' => true,
39+
'no_blank_lines_after_phpdoc' => true,
40+
'no_break_comment' => true,
41+
'no_closing_tag' => true,
42+
'no_empty_phpdoc' => true,
43+
'no_empty_statement' => true,
44+
'no_extra_blank_lines' => true,
45+
'no_leading_import_slash' => true,
46+
'no_leading_namespace_whitespace' => true,
47+
'no_mixed_echo_print' => ['use' => 'echo'],
48+
'no_multiline_whitespace_around_double_arrow' => true,
49+
'no_short_bool_cast' => true,
50+
'no_singleline_whitespace_before_semicolons' => true,
51+
'no_spaces_after_function_name' => true,
52+
'no_spaces_around_offset' => true,
53+
'no_spaces_inside_parenthesis' => true,
54+
'no_trailing_comma_in_list_call' => true,
55+
'no_trailing_comma_in_singleline_array' => true,
56+
'no_trailing_whitespace' => true,
57+
'no_trailing_whitespace_in_comment' => true,
58+
'no_unneeded_control_parentheses' => true,
59+
'no_unreachable_default_argument_value' => true,
60+
'no_unused_imports' => true,
61+
'no_useless_return' => true,
62+
'no_whitespace_before_comma_in_array' => true,
63+
'no_whitespace_in_blank_line' => true,
64+
'normalize_index_brace' => true,
65+
'object_operator_without_whitespace' => true,
66+
'phpdoc_align' => true,
67+
'phpdoc_indent' => true,
68+
'phpdoc_inline_tag' => true,
69+
'phpdoc_no_empty_return' => true,
70+
'phpdoc_no_access' => true,
71+
'phpdoc_no_alias_tag' => ['type' => 'var'],
72+
'phpdoc_no_package' => true,
73+
'phpdoc_order' => true,
74+
'phpdoc_scalar' => true,
75+
'phpdoc_single_line_var_spacing' => true,
76+
'phpdoc_trim' => true,
77+
'phpdoc_types' => true,
78+
'psr4' => true,
79+
'short_scalar_cast' => true,
80+
'simplified_null_return' => true,
81+
'single_blank_line_at_eof' => true,
82+
'single_blank_line_before_namespace' => true,
83+
'single_class_element_per_statement' => true,
84+
'single_import_per_statement' => true,
85+
'single_line_after_imports' => true,
86+
'single_quote' => true,
87+
'space_after_semicolon' => true,
88+
'standardize_not_equals' => true,
89+
'switch_case_semicolon_to_colon' => true,
90+
'switch_case_space' => true,
91+
'ternary_operator_spaces' => true,
92+
'trim_array_spaces' => true,
93+
'unary_operator_spaces' => true,
94+
'visibility_required' => true,
95+
'whitespace_after_comma_in_array' => true,
96+
97+
'header_comment' => [
98+
'header' => $header,
99+
'separate' => 'bottom',
100+
'comment_type' => 'PHPDoc',
101+
]
102+
];
103+
104+
$finder = PhpCsFixer\Finder::create()
105+
->exclude([
106+
'vendor',
107+
])
108+
->in([__DIR__ . '/app', __DIR__ . '/public']);
109+
110+
return PhpCsFixer\Config::create()
111+
->setRules($rules)
112+
->setFinder($finder)
113+
->setUsingCache(true)
114+
->setCacheFile(__DIR__.'/.php_cs.cache')
115+
->setRiskyAllowed(true);

.travis.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,39 @@ php:
1111
- 7
1212
- 7.1
1313
- 7.2
14+
- 7.3
1415

1516
env:
1617
matrix:
1718
- DB=mysql
1819
- DB=sqlite
1920
- DB=pgsql
2021

22+
cache:
23+
directories:
24+
- $HOME/.composer/cache
25+
2126
before_install:
2227
# copy sprinkles.json
2328
- cp app/sprinkles.example.json app/sprinkles.json
2429
# set up db
2530
- bash build/before_install.sh $DB
31+
# update node
32+
- nvm install 10.12.0
2633

2734
before_script:
2835
# install deps and UF
2936
- composer install
37+
- php bakery debug
38+
- php bakery build-assets
3039
- php bakery migrate
3140

3241
script:
3342
# run unit tests
34-
- composer test
43+
- app/vendor/bin/phpunit --coverage-clover=coverage.xml
44+
45+
after_success:
46+
- bash <(curl -s https://codecov.io/bash)
3547

3648
after_failure:
3749
- cat app/log/userfrosting.log

0 commit comments

Comments
 (0)