Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
Updated Dependencies for 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 13, 2019
1 parent c2f9509 commit a0b684b
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 34 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_meta/
vendor/
*.komodoproject
vendor
composer.lock
test/cache
.DS_Store
*.komodoproject
.php_cs.cache
_meta
3 changes: 2 additions & 1 deletion .php_cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

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

$rules = [
Expand Down
13 changes: 8 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [4.2.0] - 2019-01-13
- Updated Dependencies for 4.2

## [v4.1.3] - 2019-01-10
## [4.1.3] - 2019-01-10
### Fixed
- Fix warning with PHP 7.3

## [v4.1.2] - 2018-11-13
## [4.1.2] - 2018-11-13
### Fixed
- Updated Run Method to add NameSpace Array ([#23](https://github.com/userfrosting/fortress/pull/23))

## [v4.1.1] - 2017-07-10
## [4.1.1] - 2017-07-10
### Fixed
- Properly recognize schema keys with no content in RequestDataTransformer ([userfrosting/UserFrosting#766](https://github.com/userfrosting/UserFrosting/issues/766))

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ Alternatively, there might be fields that appear in the form that should be vali

To accomplish this, each validation rule can now accept a `domain` property. Setting to "server" will have it only applied server-side. Setting to "client" will have it only appear in the client-side rules. If not specified, rules will be applied both server- and client-side by default. You can also set this explicitly with the value "both".

## Testing
## [Style Guide](STYLE-GUIDE.md)

```
vendor/bin/phpunit
```
## [Testing](RUNNING_TESTS.md)
42 changes: 42 additions & 0 deletions RUNNING_TESTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Running Tests

## Prerequisites

### PHPUnit
Unit tests use PHPUnit framework (see http://www.phpunit.de for more information). PHPUnit can be installed via Composer together with other development dependencies using the following command from the command line.

```
php composer install --dev
```

If you don't have composer, you need to install it:
1. [Get Composer and Follow Installation instructions here](https://getcomposer.org/download )
2. Be sure to [install Composer **globally**](https://getcomposer.org/doc/00-intro.md#globally): `mv composer.phar /usr/local/bin/composer`

## Running

Once the prerequisites are installed, run the tests from the project root directory:

```
vendor/bin/phpunit
```


If the tests are successful, you should see something similar to this. Otherwise, the errors will be displayed.
```
PHPUnit 5.4.8-2-g44c37e0 by Sebastian Bergmann and contributors.
. 1 / 1 (100%)
Time: 41 ms, Memory: 3.75MB
OK (1 test, 18 assertions)
```

# Running test coverage report

```
vendor/bin/phpunit --coverage-html _meta/coverage
```

Report will be available in _meta/coverage/index.html
22 changes: 16 additions & 6 deletions STYLE-GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Style guide for contributing to userfrosting/fortress
# Style guide for contributing

## PHP

Expand All @@ -13,14 +13,14 @@ In addition:

```
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2017 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/licenses/UserFrosting.md (MIT License)
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/
```

### Classes

- All classes MUST be prefaced with a documentation block containing a description and the author(s) of that class. You SHOULD add other descriptive properties as well.
Expand All @@ -30,11 +30,21 @@ In addition:
- Setter methods SHOULD return the parent object.

### Variables

- All class member variables and local variables MUST be declared in `camelCase`.

### Arrays

- Array keys MUST be defined using `snake_case`. This is so they can be referenced in Twig and other templating languages.
- Array keys MUST NOT contain `.`. This is because `.` is a reserved operator in Laravel and Twig's [dot syntax](https://medium.com/@assertchris/dot-notation-3fd3e42edc61).
- Multidimensional arrays SHOULD be referenced using dot syntax whenever possible. So, instead of doing `$myArray['person1']['email']`, you should use `$myArray['person1.email']` if your array structure supports it.

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

```
vendor/bin/php-cs-fixer fix
```
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"require": {
"ezyang/htmlpurifier": "4.7.0",
"php": ">=5.6.0",
"userfrosting/i18n": "~4.1.0",
"userfrosting/support": "~4.1.0",
"userfrosting/i18n": "~4.2.0",
"userfrosting/support": "~4.2.0",
"vlucas/valitron": "1.2.3"
},
"require-dev": {
Expand Down
3 changes: 2 additions & 1 deletion src/Adapter/ClientSideValidationAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/Adapter/FormValidationAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/Adapter/JqueryValidationAdapter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/RequestDataTransformer.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/RequestDataTransformerInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/RequestSchema.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/RequestSchema/RequestSchemaInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/RequestSchema/RequestSchemaRepository.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/ServerSideValidator.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
3 changes: 2 additions & 1 deletion src/ServerSideValidatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* UserFrosting (http://www.userfrosting.com)
* UserFrosting Fortress (http://www.userfrosting.com)
*
* @link https://github.com/userfrosting/fortress
* @copyright Copyright (c) 2013-2019 Alexander Weissman
* @license https://github.com/userfrosting/fortress/blob/master/LICENSE.md (MIT License)
*/

Expand Down
2 changes: 0 additions & 2 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit a0b684b

Please sign in to comment.