-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to add custom HTTP client / Remove Monolog (#42)
* Make Guzzle optional, remove Monolog, set up phpstan & php-cs-fixer * Update php-ci.yml * Update .gitattributes * Update composer.json * Fixup log generation * Fixup client comments * Use PHPUnit 9 / More php cs rule options * Update php-ci.yml * Add CC UA header check in tests
- Loading branch information
Showing
56 changed files
with
1,820 additions
and
1,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
/vendor | ||
composer.lock | ||
.idea/ | ||
|
||
.DS_Store | ||
|
||
.phpunit.result.cache | ||
|
||
.php-cs-fixer.cache | ||
/samples/consolesample/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests') | ||
; | ||
|
||
$config = (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PhpCsFixer' => true, | ||
'@PSR2' => true, | ||
'php_unit_internal_class' => false, | ||
'php_unit_test_class_requires_covers' => false, | ||
'global_namespace_import' => [ | ||
'import_classes' => true, | ||
'import_constants' => true, | ||
'import_functions' => false, | ||
], | ||
]) | ||
->setUsingCache(true) | ||
->setFinder($finder) | ||
; | ||
|
||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
parameters: | ||
level: 8 | ||
paths: | ||
- src | ||
ignoreErrors: | ||
- | ||
message: '#PHPDoc tag \@throws with type Psr\\Cache\\InvalidArgumentException is not subtype of Throwable#' | ||
path: src/Cache/Psr6Cache.php | ||
count: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
<phpunit | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
beStrictAboutOutputDuringTests="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="ConfigCat Tests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="ConfigCat Tests"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ConfigCat\Attributes; | ||
|
||
/** | ||
* Represents the root JSON keys of a ConfigCat configuration file. | ||
* @package ConfigCat | ||
*/ | ||
class Config | ||
{ | ||
public const PREFERENCES = "p"; | ||
public const ENTRIES = "f"; | ||
public const PREFERENCES = 'p'; | ||
public const ENTRIES = 'f'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ConfigCat\Attributes; | ||
|
||
/** | ||
* Represents the JSON keys of a ConfigCat percentage rule. | ||
* @package ConfigCat | ||
*/ | ||
class PercentageAttributes | ||
{ | ||
public const VALUE = "v"; | ||
public const PERCENTAGE = "p"; | ||
public const VARIATION_ID = "i"; | ||
public const VALUE = 'v'; | ||
public const PERCENTAGE = 'p'; | ||
public const VARIATION_ID = 'i'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ConfigCat\Attributes; | ||
|
||
/** | ||
* Represents the JSON keys of the Preferences section in the ConfigCat configuration file. | ||
* @package ConfigCat | ||
*/ | ||
class Preferences | ||
{ | ||
public const BASE_URL = "u"; | ||
public const REDIRECT = "r"; | ||
public const BASE_URL = 'u'; | ||
public const REDIRECT = 'r'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ConfigCat\Attributes; | ||
|
||
/** | ||
* Represents the JSON keys of a ConfigCat roll-out rule. | ||
* @package ConfigCat | ||
*/ | ||
class RolloutAttributes | ||
{ | ||
public const VALUE = "v"; | ||
public const COMPARISON_ATTRIBUTE = "a"; | ||
public const COMPARATOR = "t"; | ||
public const COMPARISON_VALUE = "c"; | ||
public const VARIATION_ID = "i"; | ||
public const VALUE = 'v'; | ||
public const COMPARISON_ATTRIBUTE = 'a'; | ||
public const COMPARATOR = 't'; | ||
public const COMPARISON_VALUE = 'c'; | ||
public const VARIATION_ID = 'i'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ConfigCat\Attributes; | ||
|
||
/** | ||
* Represents the JSON keys of a ConfigCat setting. | ||
* @package ConfigCat | ||
*/ | ||
class SettingAttributes | ||
{ | ||
public const VALUE = "v"; | ||
public const TYPE = "t"; | ||
public const ROLLOUT_PERCENTAGE_ITEMS = "p"; | ||
public const ROLLOUT_RULES = "r"; | ||
public const VARIATION_ID = "i"; | ||
public const VALUE = 'v'; | ||
public const TYPE = 't'; | ||
public const ROLLOUT_PERCENTAGE_ITEMS = 'p'; | ||
public const ROLLOUT_RULES = 'r'; | ||
public const VARIATION_ID = 'i'; | ||
} |
Oops, something went wrong.