Skip to content

Commit

Permalink
refactored logic and cleanup repo skel
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed Nov 25, 2016
1 parent 42841b9 commit c0058d7
Show file tree
Hide file tree
Showing 22 changed files with 282 additions and 235 deletions.
Empty file modified .bldr.yml
100644 → 100755
Empty file.
Empty file modified .coveralls.yml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .editorconfig
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

root = true

[*]
Expand Down
9 changes: 6 additions & 3 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

##
# This file is part of `scr-be/shared-public-knowledge`
#
# This file is part of the `src-run/augustus-serializer-library` project.
#
# (c) Rob Frawley 2nd <rmf@src.run>
#
# For the full copyright and license information, view the LICENSE.md
# file distributed with this source code.
##
#

# Symfony 2
/app/cache/*
Expand Down Expand Up @@ -61,4 +61,7 @@
LICENSE
README

# phpcsfixer cache
.php_cs.cache

# EOF
Empty file modified .gitmodules
100644 → 100755
Empty file.
30 changes: 30 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/*
* This file is part of the `src-run/augustus-serializer-library` project.
*
* (c) Rob Frawley 2nd <rmf@src.run>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/

use SLLH\StyleCIBridge\ConfigBridge;

require_once __DIR__.'/vendor/autoload.php';

$headerString = <<<EOF
This file is part of the `src-run/augustus-serializer-library` project.
(c) Rob Frawley 2nd <rmf@src.run>
For the full copyright and license information, please view the LICENSE.md
file that was distributed with this source code.
EOF;

$headerConfig = [ 'header_comment' => [ 'header' => $headerString ] ];

$config = ConfigBridge::create();
$config->setRules(array_merge($config->getRules(), $headerConfig));

return $config;
24 changes: 24 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

preset: symfony

enabled:
- combine_consecutive_unsets
- linebreak_after_opening_tag
- no_short_echo_tag
- ordered_imports
- phpdoc_order
- php_unit_construct
- php_unit_dedicate_assert
- php_unit_strict
- short_array_syntax

disabled:
- simplified_null_return

finder:
exclude:
- 'vendor'
- 'var'

...
15 changes: 7 additions & 8 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
---

##
#
# This file is part of the `src-run/augustus-serializer-library` project.
#
# (c) Rob Frawley 2nd <rmf@src.run>
# (c) Scribe Inc <scr@src.run>
#
# For the full copyright and license information, view the LICENSE.md
# file distributed with this source code.
##
#

sudo : false
language : php
php : [ 5.6, 7.0 ]
php : [ 7.0, 7.1 ]

git:
depth : 3
depth: 3

env :
global :
secure : ZUzB7VhBBIGORmgDGKeVW2RLxQkSzYaXLIXYBerplikLmpnQCdiV16NcZTPZ8JVUJ9dTYWuVF0h2yoGmAgyrawWwmxo8g3Z/KdhzzMOl/1nyDZotROwNp89Iy7RpUpnFyKBV3/Hp2WZry+11QgqqBLLAHUd++ucaRr0mtBrSoD92oiQ3scbQyFkqkVDbseSm6sxYX87tw0r4GKC8DS7A9m7zlVky3KD7oPrnPfNvGq0MPsT3m9TCHIGrSuBLwQM9wCQOZ+CeayjjzJM8ByzCOSXEF9in9DI+Qgst+BgB2b6Tp1GmG3Se+I2u7eCGL+JOv0I934LFJXaXEIrJkH4xSNGcUcOALFng5NgDGNoa1gml1oqcb4YbO7DSGTlv7vmxpBF3DWOsh7ahad9PBeYqs1epQ3WoFsk6NyYAHshBAienbz+Vm6IoAUkT94b/KFHU8PZ0s1crYddbgtn9hPAVvfpI2LbtiEzjNmZwT8UBLRd79a/AYT9hKRD/XRxRdQHYUS+scSSVrR1P9sHm0vCO3wIqsBOa2WZXOtN28TN/jweAk7HRVgOrwQqnLp2ber+u0hTfoyX1wrUAW/jiiI/XzlhC/tAZifv8BgQbPpK3Pv/SlIOIOHNiuXDfdCTxJyY+R8SFCG12Tyi0Js7W7Am5VbqohUTKNzxNhGTkJJiR5dw=
env:
global:
- secure: "ZUzB7VhBBIGORmgDGKeVW2RLxQkSzYaXLIXYBerplikLmpnQCdiV16NcZTPZ8JVUJ9dTYWuVF0h2yoGmAgyrawWwmxo8g3Z/KdhzzMOl/1nyDZotROwNp89Iy7RpUpnFyKBV3/Hp2WZry+11QgqqBLLAHUd++ucaRr0mtBrSoD92oiQ3scbQyFkqkVDbseSm6sxYX87tw0r4GKC8DS7A9m7zlVky3KD7oPrnPfNvGq0MPsT3m9TCHIGrSuBLwQM9wCQOZ+CeayjjzJM8ByzCOSXEF9in9DI+Qgst+BgB2b6Tp1GmG3Se+I2u7eCGL+JOv0I934LFJXaXEIrJkH4xSNGcUcOALFng5NgDGNoa1gml1oqcb4YbO7DSGTlv7vmxpBF3DWOsh7ahad9PBeYqs1epQ3WoFsk6NyYAHshBAienbz+Vm6IoAUkT94b/KFHU8PZ0s1crYddbgtn9hPAVvfpI2LbtiEzjNmZwT8UBLRd79a/AYT9hKRD/XRxRdQHYUS+scSSVrR1P9sHm0vCO3wIqsBOa2WZXOtN28TN/jweAk7HRVgOrwQqnLp2ber+u0hTfoyX1wrUAW/jiiI/XzlhC/tAZifv8BgQbPpK3Pv/SlIOIOHNiuXDfdCTxJyY+R8SFCG12Tyi0Js7W7Am5VbqohUTKNzxNhGTkJJiR5dw="

install :
- bash .bldr/bldr -b up-env -q
Expand Down
125 changes: 58 additions & 67 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,90 @@

# Contributing

Looking to contribute a pull-request back to a **Source Consulting**
project? Great! Before sending a pull-request, ensure the following
requirements (__A__, __B__, and __C__) described below are properly met.
This will ensure your contribution is merged smoothly and quickly.
Made some local modifications that might benefit upstream and have a
motivation to contribute back to this project? Great! Before opening a
PR (pull request), though, be sure the code style requirements standards
described in this file have been met. This will expedite your PR and
ensure a seamless experience in pushing your code back upstream.

## A. Code Style

All projects in the `SR` namespace adhere to strict code-style
requirements. The expected style is guaranteed through use of the
excellent auto-code-styling project
All projects must adhere to strict code style requirements. Ensuring
your PR meets these requirements is now easier than ever thanks to
the excellent code styling auto-correcting CLI tool
[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).

### Download Fixer
### Get Development Deps

__A.__ To download *PHP CS Fixer* using *curl*:
You no longer have to download PHP CS Fixer yourself or have it pre-
installed globally on your system. Instead, it's a composer development
dependency. If you don't already have the development dependencies
installed, simply run (assuming you have composer installed globally on
your system):

```bash
curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
composer install --dev
```

__B.__ If *curl* is unavailable, download using *wget*:

```bash
wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer
```
### Run PHP CS Fixer

### Install Fixer

It is recommended to install *PHP-CS-Fixer* at a system-level, making it
available within your normal `PATH` environment variable (allowing you
to call `php-cs-fixer` from any location). After downloading:
Thanks to the recently added `.styleci.yml` (a style rule-set config
files) and `.php_cs.dist` (a php-cs-fixer bridge to read `.styleci.yml`
for its config) you do not have to provide any configuration parameters
to PHP CS Fixer. Simply enter the repository root and run:

```bash
sudo chmod a+x php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
bin/php-cs-fixer fix ./
```

### Run Fixer

When running *PHP CS Fixer*, there are a collection of "rules" that can
be passed via the --rules command-line option. Rules are also grouped
into "rule collections" that are prefixed by an "@" (at symbol). To
disable a rule, it should be prefixed by an "-" (minus sign).

*PHP CS Fixer* must be configured and run with the following rules:
- `@Symfony`
- `-simplified_null_return`
This ensures all code style rules are implemented and auto corrects any
inconsistencies. It also forcibly sets the PHP file-level doc-blocks,
which may remove any attributes you set if they were in the file-level
php doc-block. Don't fret: the next section describes acceptable
attribution methods (if you require such).

For example, to fix code within the `lib` directory of the current path:
## B. Attribution

```bash
php-cs-fixer fix lib/ --rules=@Symfony,-simplified_null_return
```

## B. New Files

Every file must contain a file-level "doc-block" following the below
template. The placeholder `PACKAGE_NAME` must match the
[Packagist](https://packagist.org/) project name for the respective file.
Attribution for yourself is 100% optional, but in some cases people
prefer an explicit doc-block `@author` attribution for all classes or
methods they wrote entirely themselves. If this is the case, the only
acceptable places to add attribution tags is in a *class doc-block* or
a *method doc-block*. The below example show how to implement atribution
for both these cases.

```php
/*
* This file is part of the `PACKAGE_NAME` project.
*
* (c) Rob Frawley 2nd <rmf@src.run>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
/**
* ...
* File-level doc-block goes here automatically...
* ...
*/
```

An "end of file" comment followed by an empty new line, must be present
at the end of all files.

```php
/* EOF */

```

## C. Attribution

Sometimes completely new classes are written by a contributor. When
this is the case, *the contributor __may__ choose (at their discretion)*,
to use a class-level "doc-block" to provide attribution using the
following template.

```php
/**
* Class ReallyCoolContributedClass.
* A description of the purpose of this class.
*
* @author CONTRIBUTOR_NAME <CONTRIBUTOR_EMAIL>
*/
class ReallyCoolContributedClass
{
// ...

/**
* A description of the purpose of this method.
*
* @author CONTRIBUTOR_NAME <CONTRIBUTOR_EMAIL>
*/
public function myWonderfulMethod()
{
// ...
}

// ...
}
```

## C. Submit PR

After completing the above requirements (items **A.** and **B.**) your
code is primed and ready to be accepted upstream. Go ahead and open a
PR: we appreciate your time and contribution to this project, however
small or large!
Empty file modified LICENSE.md
100644 → 100755
Empty file.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

# [src-run] augustus-serializer-library

| Travis-CI | Codacy Rating | Code Coverage | Style-CI |
|:----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|
| [![Travis](https://src.run/augustus-serializer-library/travis.svg)](https://src.run/augustus-serializer-library/travis) | [![Codacy](https://src.run/augustus-serializer-library/codacy.svg)](https://src.run/augustus-serializer-library/codacy) | [![Coveralls](https://src.run/augustus-serializer-library/coveralls.svg)](https://src.run/augustus-serializer-library/coveralls) | [![Coveralls](https://src.run/augustus-serializer-library/styleci.svg)](https://src.run/augustus-serializer-library/styleci) |
| Travis-CI | Codacy Rating | Code Coverage | Style-CI | Release | API Documentation |
|:----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|
| [![Travis](https://src.run/augustus-serializer-library/travis.svg)](https://src.run/augustus-serializer-library/travis) | [![Codacy](https://src.run/augustus-serializer-library/codacy.svg)](https://src.run/augustus-serializer-library/codacy) | [![Coveralls](https://src.run/augustus-serializer-library/coveralls.svg)](https://src.run/augustus-serializer-library/coveralls) | [![Coveralls](https://src.run/augustus-serializer-library/styleci.svg)](https://src.run/augustus-serializer-library/styleci) | [![Packagist](https://src.run/augustus-serializer-library/packagist.svg)](https://src.run/augustus-serializer-library/packagist) | [![API Docs](https://src.run/augustus-serializer-library/api.svg)](https://src.run/augustus-serializer-library/api) |


## Overview

[Welcome](https://src.run/go/readme_welcome)!
The `src-run/augustus-serializer-library` package provides the following

> simple abstraction on serialize functions with support for php- json- and igbinary-based serialization
> A simple library to facilitate dumping of files to native php.
### Grouping

Expand Down Expand Up @@ -116,5 +116,4 @@ information.
| __Stable Release__ | [![Packagist](https://src.run/augustus-serializer-library/packagist.svg)](https://src.run/augustus-serializer-library/packagist) |
| __Dev Release__ | [![Packagist](https://src.run/augustus-serializer-library/packagist_pre.svg)](https://src.run/augustus-serializer-library/packagist) |
| __License__ | [![License](https://src.run/augustus-serializer-library/license.svg)](https://src.run/augustus-serializer-library/license) |
| __Reference__ | [![License](https://src.run/augustus-serializer-library/api.svg)](https://src.run/augustus-serializer-library/api) |

70 changes: 39 additions & 31 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
{
"name" : "src-run/augustus-serializer-library",
"license" : "MIT",
"type" : "library",
"homepage" : "https://src.run/augustus-serializer-library",
"description" : "simple abstraction on serialize functions with support for php- json- and igbinary-based serialization",
"support" : {
"email" : "rmf@src.run",
"issues" : "https://src.run/augustus-serializer-library/issues",
"source" : "https://src.run/augustus-serializer-library/git"
"name": "src-run/augustus-serializer-library",
"license": "MIT",
"type": "library",
"homepage": "https://src.run/augustus-serializer-library",
"description": "Basic serialize implementations supporting for php, json, and igbinary serializer.",
"support": {
"email": "rmf@src.run",
"issues": "https://src.run/augustus-serializer-library/issues",
"source": "https://src.run/augustus-serializer-library/git"
},
"keywords" : [
"keywords": [
"augustus-serializer-library", "augustus", "serializer", "library", "rmf", "src-run"
],
"authors" : [
"authors": [
{
"name" : "Rob Frawley 2nd",
"email" : "rmf@src.run",
"name": "Rob Frawley 2nd",
"email": "rmf@src.run",
"homepage": "https://src.run/rmf",
"role" : "Project Lead"
"role": "Project Lead"
}
],
"require" : {
"php" : "^5.6||^7.0",
"src-run/augustus-exception-library" : "^0.6"
"require": {
"php": "~7.0",
"src-run/augustus-utility-library": "~0.7"
},
"require-dev" : {
"phpunit/phpunit" : "^5.0",
"codacy/coverage" : "^1.0",
"satooshi/php-coveralls" : "^1.0"
"require-dev": {
"codacy/coverage": "~1.0",
"ext-igbinary": "*",
"friendsofphp/php-cs-fixer": "v2.0.0-alpha",
"phpunit/phpunit": "~5.4",
"satooshi/php-coveralls": "~1.0",
"sllh/php-cs-fixer-styleci-bridge": "~2.1",
"symfony/phpunit-bridge": "~3.0"
},
"autoload" : {
"psr-4" : {
"SR\\Serializer\\" : "lib/"
"suggest": {
"ext-igbinary": "Require to use igbinary serializer implementation."
},
"autoload": {
"psr-4": {
"SR\\Serializer\\": "lib/"
}
},
"autoload-dev" : {
"psr-4" : {
"SR\\Serializer\\Tests\\" : "tests/"
"autoload-dev": {
"psr-4": {
"SR\\Serializer\\Tests\\": "tests/"
}
},
"minimum-stability" : "dev",
"prefer-stable" : true,
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"bin-dir" : "bin"
"bin-dir": "bin",
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master" : "0.6-dev"
"dev-master": "0.7-dev"
}
}
}
Loading

0 comments on commit c0058d7

Please sign in to comment.