-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use custom HTTP Client, custom Logger, PHPStan #13
Merged
Merged
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e57099f
feat: Allow custom HTTP client and PSR-logger
tyiuhc 0faa2e7
remove murmur3 hash dependency
tyiuhc 4a187eb
update test.yml with additional PHP versions
tyiuhc dca6c02
Update to use PHPStan
tyiuhc 6d5149d
Update comments and README
tyiuhc ffad979
nit: improve description
tyiuhc 1e5d2ce
update return type of build() in amplitude and assignment config
tyiuhc ba3ca2b
fix assignment tracking
tyiuhc c888204
fix unit test utils
tyiuhc 4d5ab89
improve FetchClientInterface comments
tyiuhc 3e6117a
nit: code style
tyiuhc b6bfd50
fix: GuzzleFetchClient delay function
tyiuhc a0d7a11
docs: update descriptions
tyiuhc af5d592
nit: remove echo
tyiuhc b416164
refactor: custom HTTP client params naming
tyiuhc 939c1ec
refactor: rename fetchClient vars to httpClient
tyiuhc ac58d23
refactor: update log levels
tyiuhc 942bccf
refactor: update log level default
tyiuhc 24dd6bf
docs: improve HttpClientInterface descriptions
tyiuhc 48815ef
refactor: update log level name
tyiuhc cb35c52
refactor: remove unneeded import
tyiuhc 48f682a
Allow all versions of PSR log
tyiuhc 505c633
update LocalEvaluationClient - add getFlagConfigs method, change meth…
tyiuhc 5aa4295
fix: update hashCode util function to use explicit int cast
tyiuhc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since php 8 the standard for logging is PSR-3. Normally it would be enough to add
"^1|^2|^3"
here and let composer figure it out. However, the interface has changed slightly since PSR-3 and this package has two implementations of theLoggerInterface
(InternalLogger
andDefaultLogger
) which are incompatible with the new PSR.As far as I know there are three possible solutions:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's easier. I think they can drop support for
psr/log v1
and only support^2 || ^3
.Then, the argument and returns types can be added, and it should just work.
All these projects are able to do it:
I checked
monolog/monolog
and it requires^2 || ^3
and their implementation looks like this:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the fixes we needed to apply to make it work for us:
https://github.com/amplitude/experiment-php-server/compare/amplitude:custom-enhancement...LVoogd:custom-enhancement?expand=1