Skip to content

Commit

Permalink
update deps, cleanup code, update meta files, update build files
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed Mar 28, 2018
1 parent 1baa4bf commit e19b279
Show file tree
Hide file tree
Showing 11 changed files with 259 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .bldr
Submodule .bldr updated 52 files
+2 −3 _app-cleanup/symfony-db-down.bash
+2 −3 _app-prepare/composer-req.bash
+0 −23 _app-prepare/db-create-mantle.bash
+3 −4 _app-prepare/npm-req.bash
+15 −0 _app-prepare/npm-run-build.bash
+15 −0 _app-prepare/symfony-assets-install.bash
+16 −0 _app-prepare/symfony-cp-params.bash
+15 −0 _app-prepare/symfony-db-load.bash
+2 −3 _app-prepare/symfony-db-make.bash
+15 −0 _app-prepare/yarn-req.bash
+15 −0 _app-prepare/yarn-run-build.bash
+68 −79 _common/command-set_common.bash
+44 −0 _common/command-set_run-cmd.bash
+25 −0 _common/command-set_run-exe.bash
+25 −0 _common/command-set_run-sql.bash
+5 −6 _common/common.bash
+331 −129 _common/functions.bash
+42 −21 _common/variables.bash
+6 −7 _env-build/imagemagick.bash
+2 −3 _env-cleanup/ci-codacy.bash
+6 −3 _env-cleanup/ci-coveralls.bash
+15 −0 _env-cleanup/composer-del.bash
+2 −3 _env-prepare/composer-get.bash
+0 −26 _env-prepare/db-config.bash
+17 −0 _env-prepare/mysql-setup-innodb.bash
+15 −0 _env-prepare/mysql-setup-utf8mb4.bash
+254 −0 _helpers/php-cs-fixer/bridge.php
+293 −0 _helpers/php-cs-fixer/config.php
+32 −0 _php-configuration/_php-configuration-add.bash
+16 −13 _php-configuration/_php-configuration.bash
+17 −0 _php-extensions/_php-extensions-add.bash
+34 −28 _php-extensions/_php-extensions-runner.bash
+10 −13 _php-extensions/_php-extensions.bash
+1 −1 _php-extensions/php-5/igbinary.bash
+2 −2 _php-extensions/php-5/imagick.bash
+1 −1 _php-extensions/php-5/memcached.bash
+1 −1 _php-extensions/php-5/msgpack.bash
+1 −1 _php-extensions/php-5/redis.bash
+1 −1 _php-extensions/php-5/twig.bash
+1 −1 _php-extensions/php-5/yaml.bash
+3 −3 _php-extensions/php-7/igbinary.bash
+2 −2 _php-extensions/php-7/imagick.bash
+1 −1 _php-extensions/php-7/memcached.bash
+1 −1 _php-extensions/php-7/msgpack.bash
+1 −1 _php-extensions/php-7/redis.bash
+2 −2 _php-extensions/php-7/twig.bash
+1 −1 _php-extensions/php-7/yaml.bash
+68 −29 bldr
+9 −10 bldr_down-app.bash
+8 −9 bldr_down-env.bash
+9 −10 bldr_up-app.bash
+32 −33 bldr_up-env.bash
32 changes: 16 additions & 16 deletions .bldr.yml
@@ -1,16 +1,16 @@
api_branch : origin/master
api_parser : ~
api_cfgmod : clone
api_runner : ~
api_paths : lib
env_make : ~
env_prep : get-composer
env_post : ci-coveralls,ci-codacy
php_conf : timezone
php_exts : ~
app_prep : dep-composer
app_post : ~
app_path : ~
pkg_name : augustus-exception-library
pkg_desc : "Core exception class implementations with advanced context information and built-in string replacement functionality."
pkg_bndl : false
api_branch: origin/master
api_parser: ~
api_cfgmod: clone
api_runner: ~
api_paths: lib
env_make: ~
env_prep: composer-get
php_conf: timezone
php_exts: ~
app_prep: composer-req
app_post: ~
env_post: composer-del,ci-coveralls,ci-codacy
app_path: ~
pkg_name: augustus-exception-library
pkg_desc: "Core exception class implementations with advanced context information and built-in string replacement functionality."
pkg_bndl: false
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule ".bldr"]
path = .bldr
url = https://github.com/src-run/usr-src-builder.git
url = https://github.com/src-run/usr-src-builder-bash.git
87 changes: 72 additions & 15 deletions .php_cs.dist
@@ -1,32 +1,89 @@
<?php

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

use SLLH\StyleCIBridge\ConfigBridge;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

require_once __DIR__.'/vendor/sllh/php-cs-fixer-styleci-bridge/autoload.php';

$header = <<<EOF
$header = <<<HEADER
This file is part of the `src-run/augustus-exception-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;

$config = ConfigBridge::create();
$config
->setRules(array_merge($config->getRules(), [
'header_comment' => ['header' => $header],
]))
->setUsingCache(false);
HEADER;

return $config;
return Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setFinder((new Finder())->in(__DIR__))
->setHideProgress(false)
->setLineEnding("\n")
->setIndent(' ')
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit57Migration:risky' => true,
'array_syntax' => [
'syntax' => 'short'
],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'final_internal_class' => true,
'header_comment' => [
'header' => $header,
'separate' => 'both'
],
'heredoc_to_nowdoc' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => [
'syntax' => 'short',
],
'mb_str_functions' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private'
],
],
'ordered_imports' => true,
'php_unit_strict' => true,
'php_unit_no_expectation_annotation' => true,
'php_unit_test_class_requires_covers' => true,
'phpdoc_order' => true,
'phpdoc_summary' => false,
'psr4' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
]);
10 changes: 4 additions & 6 deletions .travis.yml
Expand Up @@ -11,7 +11,7 @@

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

git:
depth : 3
Expand All @@ -21,14 +21,12 @@ env:
- secure: G3EdnF+JQ7R1+JmyZJZACypfVelF15tMDNQhhvmQG6uCCsGhM6oVgoCoIDY4xYQu+2xOVP00AM796sIowxPRrJ7VzxZtky6KIY0fkex4FE+s69WFqysDupNVEICALpv9E1xNUkDmFIqO5dF5im63tepfmIXJkGM4LEuujm8Kg4RGLVxoy3BAmdfXGvsWGRyLjXH83/vNHRc36sYM9CyYu69QJVrBV6mSQcNDdywb+aabuFQ/fe/kDfY65d06YsdchG+0f26f19UHSN0yTReGIVB7V5pwlwSm/q8E/W9fqTfxWhlCYnoxFJpwuA/DCSel6uyhYKUYjuRpo4dfty0MMWqfUJQ7Cy5AdmuuYVefZ0w8kIJV3Q6e32gDQejv+7UicuvY3PpmjPtouhSOo6sRBX2BGDNWDzhwE7uAzzoJaW3Z/qklxDseFr1C2dW9rxj99b2rGsGVZoCIX8b7MmHe/PAJbdEz++kC9E/X9wBzbtudwNFt30eUsGmjbrzc9hZWH/pC5Ckfe0+tCow/fWab9TrPsgwpM12aybBqdDoJ8z8cEscyHGaNd81ALXNQHFYO8l/rR0DJoP3MZ8mO/jBt26JAGKya9Dg7fNDFujRQEprf9hlDWvSEEXUtnh/Xndk1B8JGDV8jPKmVPOkgfG8pJpQQw+YpcFjvy9ZaQSgC2yE=

install :
- bash .bldr/bldr -b up-env -q
- bash .bldr/bldr -b up-app -q
- bash .bldr/bldr -b up

script :
- bin/phpunit -vvv
- bin/simple-phpunit || bin/phpunit

after_script :
- bash .bldr/bldr -b down-app -q
- bash .bldr/bldr -b down-env -q
- bash .bldr/bldr -b down

...
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
# The MIT License (MIT)

**Copyright © 2016 Rob Frawley 2nd <[rmf at src dot run](rmf@src.run)>**
**Copyright © 2016–2018 Rob Frawley 2nd <[rmf at src dot run](rmf@src.run)>**

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Expand Up @@ -19,15 +19,14 @@
}
],
"require": {
"php": "~7.0",
"src-run/augustus-utility-library": "~0.7"
"php": "~7.1",
"src-run/augustus-utility-library": "~0.8"
},
"require-dev": {
"codacy/coverage": "~1.0",
"friendsofphp/php-cs-fixer": "~1.0",
"phpunit/phpunit": "~5.4",
"satooshi/php-coveralls": "~1.0",
"sllh/php-cs-fixer-styleci-bridge": "~2.1"
"friendsofphp/php-cs-fixer": "~2.0",
"phpunit/phpunit": "~5.7",
"satooshi/php-coveralls": "~2.0"
},
"autoload": {
"psr-4": {
Expand Down
29 changes: 10 additions & 19 deletions lib/ExceptionInterface.php
Expand Up @@ -11,27 +11,10 @@

namespace SR\Exception;

use SR\Util\Context\FileContextInterface;
use SR\Utilities\Context\FileContextInterface;

interface ExceptionInterface extends \Throwable
{
/**
* Constructor accepts message string and any number of parameters, which will be used as string replacements for
* message string (unless an instance of \Throwable is found, in which case it is passed to parent as previous).
*
* @param null|string $message
* @param mixed ...$parameters
*/
public function __construct(string $message = null, ...$parameters);

/**
* @param null|string $message
* @param mixed ...$parameters
*
* @return ExceptionInterface
*/
public static function create(string $message = null, ...$parameters): ExceptionInterface;

/**
* Return string representation of exception.
*
Expand All @@ -46,6 +29,14 @@ public function __toString(): string;
*/
public function __toArray(): array;

/**
* @param null|string $message
* @param mixed ...$parameters
*
* @return ExceptionInterface
*/
public static function create(string $message = null, ...$parameters): self;

/**
* Returns the exception type (class name) as either a fully-qualified class name or as just the class base name.
*
Expand Down Expand Up @@ -100,7 +91,7 @@ public function getAttributes(): array;
*
* @return ExceptionInterface
*/
public function setAttribute(string $index, $value): ExceptionInterface;
public function setAttribute(string $index, $value): self;

/**
* Returns true if an attribute with the specified index exists.
Expand Down

0 comments on commit e19b279

Please sign in to comment.