Skip to content

Commit 9418635

Browse files
jderusseNyholm
authored andcommitted
Add a documentation tio help user to migrate to 2.0 (#178)
1 parent facdc70 commit 9418635

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

UPGRADE-2.0.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
UPGRADE FROM 1.x to 2.0
2+
=======================
3+
4+
> Many internal things in the bundle has changed. If you only installed the
5+
> bundle and added some configuration then you just have to check the 2 first
6+
> steps of this file.
7+
8+
* The namespace of the bundle has changed to follow:
9+
10+
Before:
11+
12+
```php
13+
$bundles[] = new Ekino\Bundle\NewRelicBundle\EkinoNewRelicBundle();
14+
```
15+
16+
After:
17+
18+
```php
19+
$bundles[] = new Ekino\NewRelicBundle\EkinoNewRelicBundle();
20+
```
21+
22+
* The configuration structure has changed
23+
24+
```
25+
| EkinoNewRelicBundle 1.x | EkinoNewRelicBundle 2.0
26+
| ---------------------------- | --------------------------------
27+
| ekino_new_relic: | ekino_new_relic:
28+
| enabled | enabled
29+
| application_name | application_name
30+
| deployment_names | deployment_names
31+
| api_key | api_key
32+
| license_key | license_key
33+
| xmit | xmit
34+
| logging | logging
35+
| instrument | instrument
36+
| log_exceptions | exceptions
37+
| | interactor
38+
| | twig
39+
| | deprecations
40+
| | http
41+
| | enabled
42+
| using_symfony_cache | using_symfony_cache
43+
| transaction_naming | transaction_naming
44+
| transaction_naming_service | transaction_naming_service
45+
| ignored_routes | ignored_routes
46+
| ignored_paths | ignored_paths
47+
| | monolog
48+
| | enabled
49+
| | channels
50+
| | level
51+
| | service
52+
| | commands
53+
| log_commands | enabled
54+
| ignored_commands | ignored_commands
55+
```
56+
57+
* The Sonata integration has been removed.
58+
59+
* The Silex integration has been removed.
60+
61+
* Services are private by default. You should either use service injection
62+
or explicitly define your services as public if you really need to inject
63+
the container.
64+
65+
* The parameters `ekino.new_relic.interactor.real.class` and `ekino.new_relic.interactor.blackhole.class`
66+
have been removed. You should decorate the services instead.
67+
68+
* Name of services uses the class FQDN instead of string alias
69+
70+
| EkinoNewRelicBundle 1.x | EkinoNewRelicBundle 2.0
71+
| -------------------------------------------------------- | --------------------------------------------------------------------------
72+
| `ekino.new_relic.command_listener` | `Ekino\NewRelicBundle\Listener\CommandListener`
73+
| `ekino.new_relic.exception_listener` | `Ekino\NewRelicBundle\Listener\ExceptionListener`
74+
| `ekino.new_relic.interactor` | `Ekino\NewRelicBundle\NewRelic\NewRelicInteractorInterface`
75+
| `ekino.new_relic.interactor.blackhole` | `Ekino\NewRelicBundle\NewRelic\BlackholeInteractor`
76+
| `ekino.new_relic.interactor.logger` | `Ekino\NewRelicBundle\NewRelic\LoggingInteractorDecorator`
77+
| `ekino.new_relic.interactor.real` | `Ekino\NewRelicBundle\NewRelic\NewRelicInteractor`
78+
| `ekino.new_relic.request_listener` | `Ekino\NewRelicBundle\Listener\RequestListener`
79+
| `ekino.new_relic.response_listener` | `Ekino\NewRelicBundle\Listener\ResponseListener`
80+
| `ekino.new_relic.transaction_naming_strategy.controller` | `Ekino\NewRelicBundle\TransactionNamingStrategy\ControllerNamingStrategy`
81+
| `ekino.new_relic.transaction_naming_strategy.route` | `Ekino\NewRelicBundle\TransactionNamingStrategy\RouteNamingStrategy`
82+
| `ekino.new_relic.twig.new_relic_extension` | `Ekino\NewRelicBundle\Twig\NewRelicExtension`
83+
| `ekino.new_relic` | `Ekino\NewRelicBundle\NewRelic\Config`
84+
85+
86+
* The `NewRelicInteractorInterface` changed.
87+
88+
* added scalar type hinting on method declaration
89+
* added method `addCustomEvent`
90+
* added method `addCustomTracer`
91+
* added method `excludeFromApdex`
92+
* added method `recordDatastoreSegment`
93+
* added method `setCaptureParams`
94+
* added method `setUserAttributes`
95+
* added method `stopTransactionTiming`
96+
* rename method `noticeException` to `noticeThrowable`
97+
* added parameter `$ignore` to the method `endTransaction`
98+
* added parameters `$errno`, `$errstr`, `$errfile`, `$errline`, `$errcontext` to the method `noticeError`
99+
* added parameter `$license` to the method `startTransaction`
100+
101+
* The `TransactionNamingStrategyInterface` changed.
102+
103+
* Added scalar type hinting on method declaration
104+
105+
* Allmost all classes changed to add scalar type hinting and protected methods have been removed, you should use composition over inheritance.
106+
107+
* The class `NewRelic\NewRelic` has been renamed to `NewRelic\Config`

0 commit comments

Comments
 (0)