Skip to content

Commit

Permalink
4.2.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette authored Mar 15, 2019
2 parents abe0184 + 38572ba commit d312d1f
Show file tree
Hide file tree
Showing 429 changed files with 21,913 additions and 10,744 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Forces Git to handle line endings, preventing any changes (like from editors or tools) being commited.
# Also improves reliability of tools like Git Lens.
* text=auto

# NPM always rewrites package.json and package-lock.json to lf.
# This stops the annoying tendancy for false positive changes to appear under Windows.
package.json text=lf
package-lock.json text=lf
84 changes: 74 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,76 @@ When it's time to integrate changes, our git flow more or less follows http://nv

### Branches

- `master`: The current release or release candidate. Always numbered as `major.minor.revision`, possibly with an `-alpha` or `-beta` extension as well.
- `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.
#### `master`
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.

### Changes
#### `hotfix`
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`.

#### Hotfixes
When ready, changes should be merged into both **master** and **develop**.

Hotfixes should be created in a separate branch, and then merged into both **master** and **develop**.
#### `develop`
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`.

#### Features
When ready, changes should be merged into both **master** and **hotfix**.

New features that introduce some breaking changes should be created in a separate branch. When they are ready, they can be merged into `develop`.
#### `feature-*`
New features that introduce some breaking changes or incomplete code should be committed in a separate `feature-{name}` branch.

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).

### Releases

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.
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.

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.

#### Alpha/beta releases
#### Alpha/beta/RC releases

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`.

## Working together

### Issues

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.

Issues are tagged to represent the feature or category it refers to. We also have some special tags to help organize issues. These includes:

- [`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.

- [`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.

- [`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.

- [`needs more info`](https://github.com/userfrosting/UserFrosting/labels/needs%20more%20info): More information is required from the author of the issue.

### Milestones

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:
- Things that need to be done ASAP
- Things we are doing right now
- Things we will probably do soon
- Things we probably will not do soon

**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.

**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.

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.
**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.

**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.


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.

## Learn documentation

The [Learn Documentation](https://learn.userfrosting.com) should always be updated along side code changes.

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.

Additionally, the `learn` repository can have `dev-*` for learn specific features and fixes.

## Building the API documentation

Expand All @@ -74,3 +122,19 @@ To build the API documentation, install [ApiGen](http://www.apigen.org/) globall
`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"`

from inside your dev directory.

## Automatically fixing coding style with PHP-CS-Fixer

[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.

PHP-CS-Fixer is automatically loaded by Composer and can be used from the UserFrosting root directory :

```
app/vendor/bin/php-cs-fixer fix
```

## Useful tools

If you are using **Atom**, be sure to checkout theses useful packages :
- [Docblockr](https://atom.io/packages/docblockr) : Used to generate [documentation block](https://github.com/userfrosting/UserFrosting/blob/master/STYLE-GUIDE.md#documentation).
- [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.
21 changes: 18 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Ignores my text editor metadata
# Ignores text editor metadata
*.komodoproject
.php_cs.cache

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

# Ignore log, cache, and sessions directories
# Ignore log, cache, sessions and storage directories
app/cache/*
app/logs/*
app/sessions/*
app/storage/*

# Unignore log, cache, and sessions .gitkeeps
# Unignore log, cache, sessions and storage .gitkeeps
!app/cache/.gitkeep
!app/logs/.gitkeep
!app/sessions/.gitkeep
!app/storage/.gitkeep

# Ignore bower vendor assets
/app/sprinkles/*/assets/vendor/
Expand Down Expand Up @@ -59,4 +62,16 @@ public/css/min/*
# Ignore personal config files (v0.3.x)
app/config-userfrosting.php

# Physical database storage for containers (?)
app/database/userfrosting.db

# Ignore vendor assets
app/assets/*

# Ignore Vagrant & Homestead VM
vagrant/Homestead/
.vagrant/*

# Igore npm lockfile
build/package-lock.json
build/package.lock
115 changes: 115 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?php

$header = 'UserFrosting (http://www.userfrosting.com)
@link https://github.com/userfrosting/UserFrosting
@copyright Copyright (c) 2019 Alexander Weissman
@license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)';

$rules = [
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => false],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_return' => true,
'braces' => true,
'cast_spaces' => true,
'class_definition' => true,
'declare_equal_normalize' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'indentation_type' => true,
'line_ending' => true,
'lowercase_cast' => true,
'lowercase_constants' => true,
'lowercase_keywords' => true,
'method_argument_space' => true,
'method_separation' => true,
'multiline_whitespace_before_semicolons' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_break_comment' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => ['use' => 'echo'],
'no_multiline_whitespace_around_double_arrow' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unneeded_control_parentheses' => true,
'no_unreachable_default_argument_value' => true,
'no_unused_imports' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => ['type' => 'var'],
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'psr4' => true,
'short_scalar_cast' => true,
'simplified_null_return' => true,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,

'header_comment' => [
'header' => $header,
'separate' => 'bottom',
'comment_type' => 'PHPDoc',
]
];

$finder = PhpCsFixer\Finder::create()
->exclude([
'vendor',
])
->in([__DIR__ . '/app', __DIR__ . '/public']);

return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder($finder)
->setUsingCache(true)
->setCacheFile(__DIR__.'/.php_cs.cache')
->setRiskyAllowed(true);
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,39 @@ php:
- 7
- 7.1
- 7.2
- 7.3

env:
matrix:
- DB=mysql
- DB=sqlite
- DB=pgsql

cache:
directories:
- $HOME/.composer/cache

before_install:
# copy sprinkles.json
- cp app/sprinkles.example.json app/sprinkles.json
# set up db
- bash build/before_install.sh $DB
# update node
- nvm install 10.12.0

before_script:
# install deps and UF
- composer install
- php bakery debug
- php bakery build-assets
- php bakery migrate

script:
# run unit tests
- composer test
- app/vendor/bin/phpunit --coverage-clover=coverage.xml

after_success:
- bash <(curl -s https://codecov.io/bash)

after_failure:
- cat app/log/userfrosting.log
Loading

0 comments on commit d312d1f

Please sign in to comment.