Skip to content

Commit

Permalink
General tweaks to package infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
code-distortion committed Dec 15, 2023
1 parent 48d01dd commit 9852eec
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 24 deletions.
15 changes: 10 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/infection.json5.dist export-ignore
/phpcs.xml export-ignore
/phpstan.neon.dist export-ignore
/phpunit.github-actions.up-to-9.xml.dist export-ignore
/phpunit.github-actions.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
18 changes: 14 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
build
composer.lock
vendor
.idea/
.phpunit/
.phpunit.cache/
build/
infection/
phpunit/
phpunit.cache/
vendor/
.phpunit.result.cache
.idea
composer.lock
infection.json5
phpstan.neon
phpunit.xml
tests/Unit/ManualTest.php
todo.txt
update-steps.txt
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@
"ocramius/package-versions": true,
"infection/extension-installer": true
}
},
"suggest": {
"vlucas/phpdotenv": "Allows you to easily read values from .env files",
"symfony/dotenv": "Allows you to easily read values from .env files"
}
}
3 changes: 0 additions & 3 deletions phpstan.neon

This file was deleted.

7 changes: 7 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
paths:
- src/
- tests/
level: max
parallel:
processTimeout: 300.0
24 changes: 12 additions & 12 deletions tests/Unit/FluentDotEnvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ public static function canGetMultipleValuesDataProvider(): array
'get() - three params as separate params' => [
'method' => 'get',
'params' => ['ONE', 'TWO', 'THREE'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
],
'get() - mixed params and array 1' => [
'method' => 'get',
Expand All @@ -1381,17 +1381,17 @@ public static function canGetMultipleValuesDataProvider(): array
'get() - mixed params and array 2' => [
'method' => 'get',
'params' => ['ONE', ['TWO', 'THREE']],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
],
'get() - mixed params and array 3' => [
'method' => 'get',
'params' => [['ONE'], ['TWO', 'THREE']],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
],
'get() - mixed params and array 4' => [
'method' => 'get',
'params' => [['ONE', 'TWO'], 'THREE'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
'expected' => ['ONE' => '1', 'TWO' => '2', 'THREE' => '3'],
],

// INTEGER
Expand Down Expand Up @@ -1423,7 +1423,7 @@ public static function canGetMultipleValuesDataProvider(): array
'castInteger() - three params as separate params' => [
'method' => 'castInteger',
'params' => ['ONE', 'TWO', 'THREE'],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
],
'castInteger() - mixed params and array 1' => [
'method' => 'castInteger',
Expand All @@ -1433,17 +1433,17 @@ public static function canGetMultipleValuesDataProvider(): array
'castInteger() - mixed params and array 2' => [
'method' => 'castInteger',
'params' => ['ONE', ['TWO', 'THREE']],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
],
'castInteger() - mixed params and array 3' => [
'method' => 'castInteger',
'params' => [['ONE'], ['TWO', 'THREE']],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
],
'castInteger() - mixed params and array 4' => [
'method' => 'castInteger',
'params' => [['ONE', 'TWO'], 'THREE'],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
'expected' => ['ONE' => 1, 'TWO' => 2, 'THREE' => 3],
],

// BOOLEAN
Expand Down Expand Up @@ -1475,7 +1475,7 @@ public static function canGetMultipleValuesDataProvider(): array
'castBoolean() - three params as separate params' => [
'method' => 'castBoolean',
'params' => ['TRUE', 'FALSE', 'YES'],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
],
'castBoolean() - mixed params and array 1' => [
'method' => 'castBoolean',
Expand All @@ -1485,17 +1485,17 @@ public static function canGetMultipleValuesDataProvider(): array
'castBoolean() - mixed params and array 2' => [
'method' => 'castBoolean',
'params' => ['TRUE', ['FALSE', 'YES']],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
],
'castBoolean() - mixed params and array 3' => [
'method' => 'castBoolean',
'params' => [['TRUE'], ['FALSE', 'YES']],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
],
'castBoolean() - mixed params and array 4' => [
'method' => 'castBoolean',
'params' => [['TRUE', 'FALSE'], 'YES'],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
'expected' => ['TRUE' => true, 'FALSE' => false, 'YES' => true],
],
];
}
Expand Down

0 comments on commit 9852eec

Please sign in to comment.