Commit Graph

12 Commits

Author SHA1 Message Date
Brett McBride e4f9604411
remove deprecated rector rule (#1352)
this silences a rector warning which was breaking local build
2024-07-19 09:30:29 -04:00
Brett McBride fbdb103590
upgrade to phpunit 11 (#1308)
* run unit tests in random order
running in random order highlights some interference between tests (mostly logging being enabled), and is a requirement for
mutation testing (ie, all tests must pass when executed in a random order).
* adding infection mutation testing
this adds the ability to run infection. It generates a lot of output, which is an exercise for another PR...
* replace assertwell/phpunit-global-state
the package was not compatible with phpunit 11. create out own test Trait, which handles
env vars, as well as general cleanup of the usual suspects of state that our tests mess up
* remove redundant tearDown functions
there's an after annotation on the trait to handle this
* use rector to upgrade tests for phpunit 11
* fixing CoversFunction for namespaced functions
* use FQNs in test attributes
2024-05-16 09:21:28 +10:00
Brett McBride a1489d3081
upgrade to phpunit 10 (#1258)
* upgrade to phpunit 10

* removing unintended commented code
2024-03-18 21:02:39 -04:00
Brett McBride 4cb04999d9
drop php 8.0 support (#1256)
* bump php to 8.1, apply rector
* readonly and typehints
* suppress a dodgy readonly property conversion
* remove some redundant readonly phpdocs
* dont run workflows against 8.0
* more readonly and typehints
* phpdoc reformat
* typehints
* remove php81 polyfill
* revert a rector BC breaking change, and disable that rector for ParentBased
2024-03-15 10:14:21 +11:00
Brett McBride f798bb6f01
Drop PHP 7.4 support (#1244)
* drop php 7.4 support
update composer.json minimums, and run rector over the code to update what it can. changed some static analysis
config to fix some rector-induced failures.

* adding union typehints

* reformat constructor property promotions

* updating/removing phpdoc

* suppress protobuf extension complaint
submitted a PR upstream to fix phan stubs

* don't validate packages against 7.4

* remove php8 polyfill

* fix readonly comments

* apply trailing commas to multiline fixer
upgrade php-cs-fixer, and apply a new rule for multiline comments

* remove unreachable default match arms for protobuf serializer

* adding more union types to vars

* use weakmap directly

* remove handling for not-supported WeakMap

* spacing
2024-03-03 20:21:16 -05:00
Brett McBride 197a7a4c2c
optional internal metrics (#1106)
adding a configuration option OTEL_PHP_INTERNAL_METRICS_ENABLED which
controls whether the SDK will emit its own metrics (eg batch processor
state).
2023-08-31 09:23:20 +10:00
Brett McBride 638799275c
require google/protobuf (native) (#1067)
We made protobuf implementation optional back in #949 however it seems to be tripping up
a number of developers. Since native + extension can be installed at the same time (with
extension taking priority), I think that users will be less surprised when starting out
if there is a working implementation by default.
2023-07-04 14:47:34 +10:00
Brett McBride 1aea1f23b9
moving api/common classes up to api (#1033)
- apply TC review feedback to move Globals to top-level.
it was suggested to move Instrumentation into its own package, but I chose instead to just move that dir
up to the top level of API
- added a BC layer to alias the moved classes
- added some more examples
2023-06-16 08:51:03 +10:00
Brett McBride 653a726959
new rector rules (#964)
apply one new rector rule, and disable FlipTypeControlToUseExclusiveTypeRector (which changes about 40 files, and IMO makes it harder to comprehend)
2023-04-07 12:36:40 +10:00
Brett McBride 116e46d964
sdk autoloading (#854)
* sdk autoloading
* use instrumentation initializers
* basic sdk + autoloading documentation
* exampler filter from config
* configuration default types
2022-11-14 08:52:35 +11:00
Timo Michna 47ee3e9e80
Apply rector Code Quality rules (#743)
* Add rector Code Quality rule

* Apply rector Code Quality rule
2022-07-02 12:48:10 -04:00
Timo Michna 7c0c71ccab
Add Rector and PHP 7.4 rules (#739)
* Add rector as dev dependency

* Add rector config

* Add rector make targets

* Add intl extension to dev image to support rector

* Add rector make targets

* Apply rector PHP_74 rules

* Fix CS

* Make Phan happy
2022-06-30 14:59:09 -04:00