Skip to content
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

Refactoring improvements housekeeping #34

Merged
merged 46 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3e1858e
Removed php-cs-fixer - we will replace with the much stricter doctrin…
asgrim Aug 20, 2019
6371abb
Added doctrine/coding-standard to apply stricter coding standards acr…
asgrim Aug 20, 2019
fc6297c
Apply new coding standards across codebase
asgrim Aug 20, 2019
47ceebf
Added Psalm to run static analysis on codebase
asgrim Aug 20, 2019
4ffb5f9
Fix issues found by static analysis
asgrim Aug 20, 2019
3a976d7
Fixing up unit test execution so it passes again
asgrim Aug 20, 2019
085069d
Updated documentation with new tools and formatting consistency
asgrim Aug 20, 2019
d5fe5d4
Define interface for type coercion and move to separate namespace
asgrim Aug 20, 2019
d10befb
Move config sources into logical namespace
asgrim Aug 20, 2019
f47afb5
Add missing @covers annotations and static method usage
asgrim Aug 20, 2019
192f0e5
Prefer type-safe assertions in test suite
asgrim Aug 20, 2019
fc14fa4
Fixing new CS issues arising from refactor
asgrim Aug 20, 2019
3570ffd
Move classes related to CoreAgent into separate namespace and made @i…
asgrim Aug 20, 2019
c1dea25
Audit classes for @internal and @deprecated markers
asgrim Aug 20, 2019
5eb2c7b
Add interface for Connector
asgrim Aug 20, 2019
763a5bb
Use constructor injection for creating an Agent
asgrim Aug 20, 2019
d878ca0
Deprecate Agent#getRequest()
asgrim Aug 20, 2019
2287d37
Eliminated multiple unused classes
asgrim Aug 20, 2019
6e779e4
Move Tag, Span, and Request into namespaces
asgrim Aug 20, 2019
af83263
Replace usage of Uuids with semantic RequestId and SpanId which give …
asgrim Aug 20, 2019
f81a6ca
Integration tests should not generate coverage
asgrim Aug 20, 2019
b9e9b19
Serialize IDs properly
asgrim Aug 20, 2019
e125940
Propose better way of injecting configuration to Agent - requires a r…
asgrim Aug 20, 2019
e36e881
Fixes to DerivedSource to use correct keys and also stop using magic …
asgrim Aug 20, 2019
382bf0b
Create injector from config externally to invert dependency on Config
asgrim Aug 20, 2019
760366e
Ignored Endpoints to use a string array instead of Config directly
asgrim Aug 20, 2019
80d59e4
Inject download URL to CoreAgent\Downloader
asgrim Aug 20, 2019
5d2b8d3
Fix Law of Demeter and Liskov substitution issues with CoreAgent\Manager
asgrim Aug 20, 2019
1ece5aa
Eliminate getConfig
asgrim Aug 20, 2019
32a0e05
Removed setConfig method
asgrim Aug 20, 2019
a448dbb
Removed get/setLogger methods from Agent
asgrim Aug 20, 2019
70cc3f9
Make things private in CoreAgent where they don't need to be public
asgrim Aug 20, 2019
b3b3ea9
Fix up namespacing and naming of events
asgrim Aug 20, 2019
3f663e5
Added todo for API discussion
asgrim Aug 20, 2019
b0fccdd
Fixed cs for @todo added
asgrim Aug 20, 2019
52bf608
Updated to make Connector accept a SerializableMessage and shift resp…
asgrim Aug 21, 2019
aebfcc3
Added comment about Tag* class naming
asgrim Aug 21, 2019
b168af1
Capture messages in a delegator in the Agent integration test
asgrim Aug 21, 2019
f5304e9
Added basic docs on using the base library
asgrim Aug 21, 2019
d68befc
Added comment back in regarding having to sleep
asgrim Aug 21, 2019
2eca2d0
Fixing cs and analysis issues
asgrim Aug 21, 2019
ea7c2c3
Set a default for ignore config key to avoid null check
asgrim Aug 21, 2019
ac5effa
Removed commented lines of code about unused property
asgrim Aug 21, 2019
6866b1e
Run phpcbf to fix CS issue
asgrim Aug 21, 2019
9ecc85f
RegisterMessage should be @internal
asgrim Aug 21, 2019
ee7df77
Renamed SerializableMessage to Command to use consistent terminology …
asgrim Aug 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ phpunit.xml
composer.phar
.DS_STORE
.idea
.php_cs.cache
.phpcs-cache
16 changes: 0 additions & 16 deletions .php_cs

This file was deleted.

9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ before_script:
- composer install --prefer-dist --no-interaction --no-suggest

script:
- vendor/bin/php-cs-fixer fix -v --dry-run --stop-on-violation --using-cache=no
- vendor/bin/phpunit --configuration phpunit.xml.dist
- vendor/bin/phpcs
- vendor/bin/psalm
- vendor/bin/phpunit

notifications:
on_success: never
on_failure: always
on_success: never
on_failure: always
38 changes: 26 additions & 12 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
Dev Guide
=========
# Dev Guide

Setup
-----
## Setup

composer install
```bash
composer install
```

## Running tests

Running tests
-------------
```bash
vendor/bin/phpunit
```

vendor/bin/phpunit
## Writing Code

### Checking for static analysis issues

Writing Code
------------
```bash
vendor/bin/psalm
```

We have an automated style fixer called php-cs-fixer. Style is checked on TravisCI as well.
### Checking coding standards are met

vendor/bin/php-cs-fixer fix
```bash
vendor/bin/phpcs
```

### Fixing coding standards automatically

We have an automated style fixer called PHP Code Sniffer. Style is checked on TravisCI as well.

```bash
vendor/bin/phpcbf
```
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

Email us at [email protected] to get on the beta invite list!

Monitor the performance of PHP Laravel apps with Scout's
[PHP APM Agent](https://www.scoutapm.com).
Detailed performance metrics and transaction traces are collected once the
agent is installed and configured.
Monitor the performance of PHP apps with Scout's [PHP APM Agent](https://www.scoutapm.com).

Detailed performance metrics and transaction traces are collected once the agent is installed and configured.

## Requirements

Expand All @@ -15,15 +13,16 @@ PHP Versions: 7.1+
## Quick Start

This package is the base library for the various framework-specific packages.
To install the ScoutAPM Agent for a specific framework, use the specific
package instead.

* [Laravel](https://github.com/scoutapp/scout-apm-laravel)
### Laravel

To install the ScoutAPM Agent for a specific framework, use the specific package instead.

* [Laravel](https://github.com/scoutapp/scout-apm-laravel)

## Documentation

For full installation and troubleshooting documentation, visit our
[help site](http://docs.scoutapm.com/#php-agent).
For full installation and troubleshooting documentation, visit our [help site](http://docs.scoutapm.com/#php-agent).

## Support

Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
"ramsey/uuid": "^3.7"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15",
"doctrine/coding-standard": "^6.0",
"monolog/monolog": "^1.24",
"phpunit/phpunit": "^7.5",
"spatie/phpunit-watcher": "^1.8"
"spatie/phpunit-watcher": "^1.8",
"vimeo/psalm": "^3.4"
},
"suggest": {
"ext-xdebug": "Required for processing of request headers"
Expand Down
Loading