Documentation update for development part
This commit is contained in:
121
.phan/config.php
121
.phan/config.php
@@ -26,74 +26,77 @@
|
||||
// use Phan\Config;
|
||||
|
||||
return [
|
||||
"minimum_target_php_version" => "7.4",
|
||||
// If true, missing properties will be created when
|
||||
// they are first seen. If false, we'll report an
|
||||
// error message.
|
||||
"allow_missing_properties" => false,
|
||||
// turn color on (-C)
|
||||
"color_issue_messages_if_supported" => true,
|
||||
// set minimum version
|
||||
"minimum_target_php_version" => "7.4",
|
||||
// If true, missing properties will be created when
|
||||
// they are first seen. If false, we'll report an
|
||||
// error message.
|
||||
"allow_missing_properties" => false,
|
||||
|
||||
// Allow null to be cast as any type and for any
|
||||
// type to be cast to null.
|
||||
"null_casts_as_any_type" => false,
|
||||
// Allow null to be cast as any type and for any
|
||||
// type to be cast to null.
|
||||
"null_casts_as_any_type" => false,
|
||||
|
||||
// Backwards Compatibility Checking
|
||||
'backward_compatibility_checks' => true,
|
||||
// Backwards Compatibility Checking
|
||||
'backward_compatibility_checks' => true,
|
||||
|
||||
// Run a quick version of checks that takes less
|
||||
// time
|
||||
"quick_mode" => false,
|
||||
// Run a quick version of checks that takes less
|
||||
// time
|
||||
"quick_mode" => false,
|
||||
|
||||
// Only emit critical issues to start with
|
||||
// (0 is low severity, 5 is normal severity, 10 is critical)
|
||||
"minimum_severity" => 10,
|
||||
// Only emit critical issues to start with
|
||||
// (0 is low severity, 5 is normal severity, 10 is critical)
|
||||
"minimum_severity" => 10,
|
||||
|
||||
// default false for include path check
|
||||
"enable_include_path_checks" => true,
|
||||
"include_paths" => [
|
||||
],
|
||||
'ignore_undeclared_variables_in_global_scope' => true,
|
||||
// default false for include path check
|
||||
"enable_include_path_checks" => true,
|
||||
"include_paths" => [
|
||||
],
|
||||
'ignore_undeclared_variables_in_global_scope' => true,
|
||||
|
||||
"file_list" => [
|
||||
],
|
||||
"file_list" => [
|
||||
],
|
||||
|
||||
// A list of directories that should be parsed for class and
|
||||
// method information. After excluding the directories
|
||||
// defined in exclude_analysis_directory_list, the remaining
|
||||
// files will be statically analyzed for errors.
|
||||
//
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
// Change this to include the folders you wish to analyze
|
||||
// (and the folders of their dependencies)
|
||||
'src/'
|
||||
// 'www',
|
||||
// To speed up analysis, we recommend going back later and
|
||||
// limiting this to only the vendor/ subdirectories your
|
||||
// project depends on.
|
||||
// `phan --init` will generate a list of folders for you
|
||||
//'www/vendor',
|
||||
],
|
||||
// A list of directories that should be parsed for class and
|
||||
// method information. After excluding the directories
|
||||
// defined in exclude_analysis_directory_list, the remaining
|
||||
// files will be statically analyzed for errors.
|
||||
//
|
||||
// Thus, both first-party and third-party code being used by
|
||||
// your application should be included in this list.
|
||||
'directory_list' => [
|
||||
// Change this to include the folders you wish to analyze
|
||||
// (and the folders of their dependencies)
|
||||
'src/'
|
||||
// 'www',
|
||||
// To speed up analysis, we recommend going back later and
|
||||
// limiting this to only the vendor/ subdirectories your
|
||||
// project depends on.
|
||||
// `phan --init` will generate a list of folders for you
|
||||
//'www/vendor',
|
||||
],
|
||||
|
||||
|
||||
// A list of directories holding code that we want
|
||||
// to parse, but not analyze
|
||||
"exclude_analysis_directory_list" => [
|
||||
'vendor',
|
||||
'test',
|
||||
],
|
||||
'exclude_file_list' => [
|
||||
],
|
||||
// A list of directories holding code that we want
|
||||
// to parse, but not analyze
|
||||
"exclude_analysis_directory_list" => [
|
||||
'vendor',
|
||||
'test',
|
||||
],
|
||||
'exclude_file_list' => [
|
||||
],
|
||||
|
||||
// what not to show as problem
|
||||
'suppress_issue_types' => [
|
||||
// 'PhanUndeclaredMethod',
|
||||
'PhanEmptyFile',
|
||||
],
|
||||
// what not to show as problem
|
||||
'suppress_issue_types' => [
|
||||
// 'PhanUndeclaredMethod',
|
||||
'PhanEmptyFile',
|
||||
],
|
||||
|
||||
// Override to hardcode existence and types of (non-builtin) globals in the global scope.
|
||||
// Class names should be prefixed with `\`.
|
||||
//
|
||||
// (E.g. `['_FOO' => '\FooClass', 'page' => '\PageClass', 'userId' => 'int']`)
|
||||
'globals_type_map' => [],
|
||||
// Override to hardcode existence and types of (non-builtin) globals in the global scope.
|
||||
// Class names should be prefixed with `\`.
|
||||
//
|
||||
// (E.g. `['_FOO' => '\FooClass', 'page' => '\PageClass', 'userId' => 'int']`)
|
||||
'globals_type_map' => [],
|
||||
];
|
||||
|
||||
27
README.md
27
README.md
@@ -155,16 +155,37 @@ On exception the log data is in the error message json (see exceptions)
|
||||
|
||||
## Development
|
||||
|
||||
Run `composer install` or `phive install` to setup the tools
|
||||
|
||||
phpcs config is stored in `phpcs.xml` and should be picked up by the standard tools
|
||||
|
||||
* we use tabs instead of spaces for indents, the rest is standard PSR1+PSR12
|
||||
|
||||
### Direct tests
|
||||
|
||||
These direct run tests exist:
|
||||
|
||||
* `tests/aws_read_env_tests.php`: Equal to running `tests/aws_gift_card_tests.php?info=true`, will output env test data
|
||||
* `test/aws_gift_card_tests.php`: The following parameters exists
|
||||
* info: set to print out info
|
||||
* fund: set to run funds get tests
|
||||
* gift: run all the gift card get/set/remove tests
|
||||
* mocks: run the error checks
|
||||
* debug: print out debug information
|
||||
* debug_mock: print out all the debug logs too
|
||||
|
||||
### Phan
|
||||
|
||||
`vendor/bin/phan --analyze-twice`
|
||||
`vendor/bin/phan --analyze-twice` or `tools/phan --analyze-twice`
|
||||
|
||||
### PHPstan
|
||||
|
||||
`vendor/bin/phpstan`
|
||||
`vendor/bin/phpstan` or `tools/phpstan`
|
||||
|
||||
> [!notice] Level 9 is set as we have various mixed values that cannot be easily changed into a direct value type
|
||||
|
||||
### PHPUnit
|
||||
|
||||
Unit tests have to be run from base folder with
|
||||
|
||||
`vendor/bin/phpunit test/phpUnitTests/`
|
||||
`vendor/bin/phpunit` or `tools/phpunit`
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<phpunit colors="true" cacheDirectory=".phpunit.cache">
|
||||
<phpunit colors="true" cacheDirectory=".phpunit.cache" bootstrap="vendor/autoload.php" >
|
||||
<!-- Below removes final from classes for mock tests -->
|
||||
<!-- <extensions>
|
||||
<extension class="test\phpUnit\Extension\BypassFinalExtension" file="test/phpUnit/Extension/BypassFinalExtension.php" />
|
||||
</extensions> -->
|
||||
<extensions>
|
||||
<bootstrap class="DG\BypassFinals\PHPUnitExtension"/>
|
||||
</extensions>
|
||||
|
||||
@@ -19,7 +19,7 @@ class Client implements ClientInterface
|
||||
*
|
||||
* @param string $url The URL being requested,
|
||||
* including domain and protocol
|
||||
* @param array<int,string> $headers Headers to be used in the request
|
||||
* @param array<int,string> $headers Headers to be used in the request
|
||||
* @param array<mixed>|string $params Can be nested for arrays and hashes
|
||||
* @return string Result as json string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user