Skip to content

Commit

Permalink
Merge pull request #2 from qlimix/v2
Browse files Browse the repository at this point in the history
V2
  • Loading branch information
frank-q committed Nov 14, 2020
2 parents 189e1aa + 857e579 commit 2cf5e3e
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 35 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: php

php:
- 7.2
- 7.3
- 7.4
- nightly

matrix:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 2.0.0 - 14-11-2020

### Compatibility
- changed to PHP >7.4 from >=7.2

### Dependencies
- Updated the code standard

### Changes
- PHP 7.4 type hinting
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
"description": "Environment utilities",
"license": "MIT",
"keywords": [
"qlimix",
"environment",
"env",
"value"
"env"
],
"require": {
"php": ">=7.2"
"php": ">7.4"
},
"authors": [
{
Expand All @@ -32,6 +30,6 @@
"sort-packages": true
},
"require-dev": {
"qlimix/code-standard": "^1.0"
"qlimix/code-standard": "^3.0"
}
}
17 changes: 13 additions & 4 deletions grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
parameters:
git_dir: .
bin_dir: vendor/bin
grumphp:
stop_on_failure: false
ignore_unstaged_changes: false
ascii: ~
ascii:
failed: ~
succeeded: ~
tasks:
phpcs:
phpmd:
Expand All @@ -18,3 +18,12 @@ parameters:
- "public"
- "bin"
- "docs"
psalm:
config: psalm.xml
ignore_patterns: []
no_cache: false
report: ~
output_format: null
threads: 1
triggered_by: ['php']
show_info: false
File renamed without changes.
13 changes: 13 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<arg name="colors"/>

<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>

<!-- Include full Qlimix Coding Standard -->
<rule ref="Qlimix"/>
</ruleset>
22 changes: 0 additions & 22 deletions phpunit.xml.dist

This file was deleted.

56 changes: 56 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0"?>
<psalm
totallyTyped="true"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
memoizeMethodCallResults="true"
errorLevel="8"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<LessSpecificReturnType errorLevel="info" />

<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->

<DeprecatedMethod errorLevel="info" />
<DeprecatedProperty errorLevel="info" />
<DeprecatedClass errorLevel="info" />
<DeprecatedConstant errorLevel="info" />
<DeprecatedFunction errorLevel="info" />
<DeprecatedInterface errorLevel="info" />
<DeprecatedTrait errorLevel="info" />

<InternalMethod errorLevel="info" />
<InternalProperty errorLevel="info" />
<InternalClass errorLevel="info" />

<MissingClosureReturnType errorLevel="info" />
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />

<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
<MissingParamType errorLevel="info" />

<RedundantCondition errorLevel="info" />

<DocblockTypeContradiction errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />

<UnresolvableInclude errorLevel="info" />

<RawObjectIteration errorLevel="info" />

<InvalidStringClass errorLevel="info" />
</issueHandlers>
</psalm>
3 changes: 1 addition & 2 deletions src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ final class Environment
private const PRODUCTION = 'prod';
private const DEVELOPMENT = 'dev';

/** @var string */
private $env;
private string $env;

public function __construct(string $env)
{
Expand Down

0 comments on commit 2cf5e3e

Please sign in to comment.