From 3bddbb59e253d70a99509c8c2aa1d2b03e2eb499 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Feb 2024 13:27:17 +1100 Subject: [PATCH 1/3] Update ubl libs => invoiceninja --- composer.json | 2 +- composer.lock | 209 ++++++++++++++++++++++++++------------------------ 2 files changed, 108 insertions(+), 103 deletions(-) diff --git a/composer.json b/composer.json index 8a48a1dfd65c..c503a5a5b4b7 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "beganovich/snappdf": "^4", "braintree/braintree_php": "^6.0", "checkout/checkout-sdk-php": "^3.0", - "cleverit/ubl_invoice": "^1.3", + "invoiceninja/ubl_invoice": "^2", "doctrine/dbal": "^3.0", "eway/eway-rapid-php": "^1.3", "fakerphp/faker": "^1.14", diff --git a/composer.lock b/composer.lock index 996b296ac9a6..5a6b0f06e414 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "359f228fda9c04b6ed93f1e337152473", + "content-hash": "a1bebba0b0ac5d8ed26813339eee514c", "packages": [ { "name": "afosto/yaac", @@ -1783,65 +1783,6 @@ }, "time": "2024-01-10T13:50:01+00:00" }, - { - "name": "cleverit/ubl_invoice", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/CleverIT/UBL_invoice.git", - "reference": "3a9ad41ae9039e718bee29eea9127e6f0c819c71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/CleverIT/UBL_invoice/zipball/3a9ad41ae9039e718bee29eea9127e6f0c819c71", - "reference": "3a9ad41ae9039e718bee29eea9127e6f0c819c71", - "shasum": "" - }, - "require": { - "sabre/xml": "^1.5" - }, - "require-dev": { - "greenter/ubl-validator": "^2.0", - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "CleverIt\\UBL\\Invoice\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bram van Eijk | CleverIT", - "email": "bram@cleverit.nl", - "homepage": "http://www.cleverit.nl", - "role": "Developer" - } - ], - "description": "A PHP wrapper for UBL invoices", - "homepage": "https://github.com/CleverIT/UBL_invoice", - "keywords": [ - "clever invoice", - "cleverit", - "electronic invoice", - "invoice", - "ubl", - "ublinvoice", - "xml", - "xml invoice" - ], - "support": { - "issues": "https://github.com/CleverIT/UBL_invoice/issues", - "source": "https://github.com/CleverIT/UBL_invoice/tree/v1.3.0" - }, - "time": "2019-02-05T13:34:30+00:00" - }, { "name": "clue/stream-filter", "version": "v1.7.0", @@ -3514,16 +3455,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.333.1", + "version": "v0.334.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "f82f631755771082cc9070592b82596b359ce6da" + "reference": "5d2ebd6199b34b4b207eff2118bb783ae7b6f413" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/f82f631755771082cc9070592b82596b359ce6da", - "reference": "f82f631755771082cc9070592b82596b359ce6da", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5d2ebd6199b34b4b207eff2118bb783ae7b6f413", + "reference": "5d2ebd6199b34b4b207eff2118bb783ae7b6f413", "shasum": "" }, "require": { @@ -3552,9 +3493,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.333.1" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.334.0" }, - "time": "2024-01-29T01:16:44+00:00" + "time": "2024-02-04T01:06:40+00:00" }, { "name": "google/auth", @@ -4886,6 +4827,70 @@ }, "time": "2023-08-20T23:21:28+00:00" }, + { + "name": "invoiceninja/ubl_invoice", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/invoiceninja/UBL_invoice.git", + "reference": "02735339bf89f9a48da7d8b11d991dbe812d713e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/invoiceninja/UBL_invoice/zipball/02735339bf89f9a48da7d8b11d991dbe812d713e", + "reference": "02735339bf89f9a48da7d8b11d991dbe812d713e", + "shasum": "" + }, + "require": { + "goetas-webservices/xsd2php-runtime": "^0.2.2", + "sabre/xml": "^4.0" + }, + "require-dev": { + "goetas-webservices/xsd2php": "^0.3", + "greenter/ubl-validator": "^2", + "phpunit/phpunit": "^10" + }, + "type": "library", + "autoload": { + "psr-4": { + "CleverIt\\UBL\\Invoice\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bram van Eijk | CleverIT", + "email": "bram@cleverit.nl", + "homepage": "http://www.cleverit.nl", + "role": "Developer" + }, + { + "name": "David Bomba", + "email": "turbo124@gmail.com" + } + ], + "description": "A PHP wrapper for UBL invoices - forked from CleverIT", + "homepage": "https://github.com/invoiceninja/UBL_invoice", + "keywords": [ + "clever invoice", + "cleverit", + "electronic invoice", + "invoice", + "ubl", + "ublinvoice", + "xml", + "xml invoice" + ], + "support": { + "source": "https://github.com/invoiceninja/UBL_invoice/tree/v2.0.1" + }, + "time": "2024-02-05T02:16:14+00:00" + }, { "name": "jean85/pretty-package-versions", "version": "2.0.5", @@ -6317,16 +6322,16 @@ }, { "name": "league/flysystem", - "version": "3.23.1", + "version": "3.24.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e" + "reference": "b25a361508c407563b34fac6f64a8a17a8819675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", - "reference": "199e1aebbe3e62bd39f4d4fc8c61ce0b3786197e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b25a361508c407563b34fac6f64a8a17a8819675", + "reference": "b25a361508c407563b34fac6f64a8a17a8819675", "shasum": "" }, "require": { @@ -6346,7 +6351,7 @@ "require-dev": { "async-aws/s3": "^1.5 || ^2.0", "async-aws/simple-s3": "^1.1 || ^2.0", - "aws/aws-sdk-php": "^3.220.0", + "aws/aws-sdk-php": "^3.295.10", "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", @@ -6357,7 +6362,7 @@ "phpseclib/phpseclib": "^3.0.34", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", - "sabre/dav": "^4.3.1" + "sabre/dav": "^4.6.0" }, "type": "library", "autoload": { @@ -6391,7 +6396,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.23.1" + "source": "https://github.com/thephpleague/flysystem/tree/3.24.0" }, "funding": [ { @@ -6403,24 +6408,24 @@ "type": "github" } ], - "time": "2024-01-26T18:42:03+00:00" + "time": "2024-02-04T12:10:17+00:00" }, { "name": "league/flysystem-aws-s3-v3", - "version": "3.23.1", + "version": "3.24.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", - "reference": "97728e7a0d40ec9c6147eb0f4ee4cdc6ff0a8240" + "reference": "809474e37b7fb1d1f8bcc0f8a98bc1cae99aa513" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/97728e7a0d40ec9c6147eb0f4ee4cdc6ff0a8240", - "reference": "97728e7a0d40ec9c6147eb0f4ee4cdc6ff0a8240", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/809474e37b7fb1d1f8bcc0f8a98bc1cae99aa513", + "reference": "809474e37b7fb1d1f8bcc0f8a98bc1cae99aa513", "shasum": "" }, "require": { - "aws/aws-sdk-php": "^3.220.0", + "aws/aws-sdk-php": "^3.295.10", "league/flysystem": "^3.10.0", "league/mime-type-detection": "^1.0.0", "php": "^8.0.2" @@ -6456,8 +6461,7 @@ "storage" ], "support": { - "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", - "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.23.1" + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.24.0" }, "funding": [ { @@ -6469,7 +6473,7 @@ "type": "github" } ], - "time": "2024-01-26T18:25:23+00:00" + "time": "2024-01-26T18:43:21+00:00" }, { "name": "league/flysystem-local", @@ -10843,16 +10847,16 @@ }, { "name": "sabre/uri", - "version": "2.3.3", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sabre-io/uri.git", - "reference": "7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b" + "reference": "1774043c843f1db7654ecc93368a98be29b07544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/uri/zipball/7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b", - "reference": "7e0e7dfd0b7e14346a27eabd66e843a6e7f1812b", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/1774043c843f1db7654ecc93368a98be29b07544", + "reference": "1774043c843f1db7654ecc93368a98be29b07544", "shasum": "" }, "require": { @@ -10899,20 +10903,20 @@ "issues": "https://github.com/sabre-io/uri/issues", "source": "https://github.com/fruux/sabre-uri" }, - "time": "2023-06-09T06:54:04+00:00" + "time": "2023-06-09T07:04:02+00:00" }, { "name": "sabre/xml", - "version": "1.5.1", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sabre-io/xml.git", - "reference": "a367665f1df614c3b8fefc30a54de7cd295e444e" + "reference": "99caa5dd248776ca6a1e1d2cfdef556a3fa63456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e", - "reference": "a367665f1df614c3b8fefc30a54de7cd295e444e", + "url": "https://api.github.com/repos/sabre-io/xml/zipball/99caa5dd248776ca6a1e1d2cfdef556a3fa63456", + "reference": "99caa5dd248776ca6a1e1d2cfdef556a3fa63456", "shasum": "" }, "require": { @@ -10920,12 +10924,13 @@ "ext-xmlreader": "*", "ext-xmlwriter": "*", "lib-libxml": ">=2.6.20", - "php": ">=5.5.5", - "sabre/uri": ">=1.0,<3.0.0" + "php": "^7.4 || ^8.0", + "sabre/uri": ">=2.0,<4.0.0" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.7", - "sabre/cs": "~1.0.0" + "friendsofphp/php-cs-fixer": "^3.38", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6" }, "type": "library", "autoload": { @@ -10967,7 +10972,7 @@ "issues": "https://github.com/sabre-io/xml/issues", "source": "https://github.com/fruux/sabre-xml" }, - "time": "2019-01-09T13:51:57+00:00" + "time": "2023-11-09T10:47:15+00:00" }, { "name": "sentry/sdk", @@ -17790,16 +17795,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.9", + "version": "10.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe" + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", - "reference": "0bd663704f0165c9e76fe4f06ffa6a1ca727fdbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", "shasum": "" }, "require": { @@ -17871,7 +17876,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10" }, "funding": [ { @@ -17887,7 +17892,7 @@ "type": "tidelift" } ], - "time": "2024-01-22T14:35:40+00:00" + "time": "2024-02-04T09:07:51+00:00" }, { "name": "sebastian/cli-parser", From 3c0be86e6cfbe926ba4c277334e7c1238c88ff52 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Feb 2024 15:09:02 +1100 Subject: [PATCH 2/3] Add open telemetery --- app/Exceptions/Handler.php | 6 +- app/Jobs/Company/CompanyExport.php | 5 +- app/Jobs/Util/ReminderJob.php | 3 +- app/Repositories/ClientContactRepository.php | 4 +- app/Services/Invoice/EInvoice/RoEInvoice.php | 2 +- composer.json | 6 +- composer.lock | 489 ++++++++++++++++++- config/open-telemetry.php | 98 ++++ 8 files changed, 600 insertions(+), 13 deletions(-) create mode 100644 config/open-telemetry.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 8b2e2460b314..ddb0ad957f1e 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -104,10 +104,10 @@ class Handler extends ExceptionHandler if (Ninja::isHosted()) { - if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) { - $uri = urldecode(request()->getRequestUri()); + // if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) { + // $uri = urldecode(request()->getRequestUri()); // event(new \Modules\Admin\Events\ThrottledExceptionRaised(auth()->user()?->account?->key, $uri, request()->ip())); - } + // } Integration::configureScope(function (Scope $scope): void { $name = 'hosted@invoiceninja.com'; diff --git a/app/Jobs/Company/CompanyExport.php b/app/Jobs/Company/CompanyExport.php index 96c86fa61966..454f82347eb8 100644 --- a/app/Jobs/Company/CompanyExport.php +++ b/app/Jobs/Company/CompanyExport.php @@ -67,9 +67,8 @@ class CompanyExport implements ShouldQueue public function handle() { MultiDB::setDb($this->company->db); - - // $this->company = Company::query()->where('company_key', $this->company->company_key)->first(); - + nlog("starting export"); + set_time_limit(0); $this->export_data['app_version'] = config('ninja.app_version'); diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index e73897378eec..2c79b7c67490 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -26,6 +26,7 @@ use App\Utils\Traits\MakesReminders; use Illuminate\Support\Facades\Auth; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; +use Spatie\OpenTelemetry\Jobs\TraceAware; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -37,7 +38,7 @@ class ReminderJob implements ShouldQueue use SerializesModels; use MakesReminders; use MakesDates; - + public $tries = 1; public function __construct() diff --git a/app/Repositories/ClientContactRepository.php b/app/Repositories/ClientContactRepository.php index 4a508fc18964..4434a8a80c8e 100644 --- a/app/Repositories/ClientContactRepository.php +++ b/app/Repositories/ClientContactRepository.php @@ -86,8 +86,8 @@ class ClientContactRepository extends BaseRepository $update_contact->password = Hash::make($contact['password']); ClientContact::withTrashed() - ->where('company_id', $client->id) - ->where('client_id', $client->company_id) + ->where('company_id', $client->company_id) + ->where('client_id', $client->id) ->where('email', $update_contact->email)->cursor() ->each(function ($saveable_contact) use ($update_contact){ $saveable_contact->password = $update_contact->password; diff --git a/app/Services/Invoice/EInvoice/RoEInvoice.php b/app/Services/Invoice/EInvoice/RoEInvoice.php index 65127ea96eca..43691d632d73 100644 --- a/app/Services/Invoice/EInvoice/RoEInvoice.php +++ b/app/Services/Invoice/EInvoice/RoEInvoice.php @@ -368,7 +368,7 @@ class RoEInvoice extends AbstractService public function generateXml(): string { - $ubl_invoice = $this->handle(); // Call the existing handle method to get the UBLInvoice + $ubl_invoice = $this->run(); // Call the existing handle method to get the UBLInvoice $generator = new Generator(); return $generator->invoice($ubl_invoice, $this->invoice->client->getCurrencyCode()); } diff --git a/composer.json b/composer.json index c503a5a5b4b7..c2f34cadfc27 100644 --- a/composer.json +++ b/composer.json @@ -107,17 +107,19 @@ "php": "^8.1|^8.2", "barryvdh/laravel-debugbar": "^3.6", "barryvdh/laravel-ide-helper": "^2.13", + "beyondcode/laravel-query-detector": "^1.8", "brianium/paratest": "^7", "fakerphp/faker": "^1.14", "filp/whoops": "^2.7", "friendsofphp/php-cs-fixer": "^3.14", "laracasts/cypress": "^3.0", + "larastan/larastan": "^2", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", - "larastan/larastan": "^2", "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^10.0", "spatie/laravel-ignition": "^2.0", + "spatie/laravel-open-telemetry": "^0.0.9", "spaze/phpstan-stripe": "^3.0" }, "autoload": { @@ -180,4 +182,4 @@ ], "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 5a6b0f06e414..82bb75f38b56 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a1bebba0b0ac5d8ed26813339eee514c", + "content-hash": "61931b267752ed077ff3f1545b80259b", "packages": [ { "name": "afosto/yaac", @@ -16087,6 +16087,66 @@ }, "time": "2023-06-14T05:06:27+00:00" }, + { + "name": "beyondcode/laravel-query-detector", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/beyondcode/laravel-query-detector.git", + "reference": "722c45c07b96d88abd499c3ed7fd949798bede5a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beyondcode/laravel-query-detector/zipball/722c45c07b96d88abd499c3ed7fd949798bede5a", + "reference": "722c45c07b96d88abd499c3ed7fd949798bede5a", + "shasum": "" + }, + "require": { + "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0|^10.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "laravel/legacy-factories": "^1.0", + "orchestra/testbench": "^3.0 || ^4.0 || ^5.0 || ^6.0|^8.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BeyondCode\\QueryDetector\\QueryDetectorServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BeyondCode\\QueryDetector\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcel Pociot", + "email": "marcel@beyondco.de", + "homepage": "https://beyondcode.de", + "role": "Developer" + } + ], + "description": "Laravel N+1 Query Detector", + "homepage": "https://github.com/beyondcode/laravel-query-detector", + "keywords": [ + "beyondcode", + "laravel-query-detector" + ], + "support": { + "issues": "https://github.com/beyondcode/laravel-query-detector/issues", + "source": "https://github.com/beyondcode/laravel-query-detector/tree/1.8.0" + }, + "time": "2023-11-15T08:04:32+00:00" + }, { "name": "brianium/paratest", "version": "v7.3.1", @@ -17211,6 +17271,274 @@ ], "time": "2023-10-11T15:45:01+00:00" }, + { + "name": "open-telemetry/api", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/opentelemetry-php/api.git", + "reference": "401d04c6afe349afa78250ac862db2f89dbf94f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/401d04c6afe349afa78250ac862db2f89dbf94f6", + "reference": "401d04c6afe349afa78250ac862db2f89dbf94f6", + "shasum": "" + }, + "require": { + "open-telemetry/context": "^1.0", + "php": "^7.4 || ^8.0", + "psr/log": "^1.1|^2.0|^3.0", + "symfony/polyfill-php80": "^1.26", + "symfony/polyfill-php81": "^1.26", + "symfony/polyfill-php82": "^1.26" + }, + "conflict": { + "open-telemetry/sdk": "<=1.0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0.x-dev" + } + }, + "autoload": { + "files": [ + "Trace/functions.php" + ], + "psr-4": { + "OpenTelemetry\\API\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "description": "API for OpenTelemetry PHP.", + "keywords": [ + "Metrics", + "api", + "apm", + "logging", + "opentelemetry", + "otel", + "tracing" + ], + "support": { + "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", + "docs": "https://opentelemetry.io/docs/php", + "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", + "source": "https://github.com/open-telemetry/opentelemetry-php" + }, + "time": "2024-01-10T13:04:59+00:00" + }, + { + "name": "open-telemetry/context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/opentelemetry-php/context.git", + "reference": "e9d254a7c89885e63fd2fde54e31e81aaaf52b7c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/e9d254a7c89885e63fd2fde54e31e81aaaf52b7c", + "reference": "e9d254a7c89885e63fd2fde54e31e81aaaf52b7c", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0", + "symfony/polyfill-php80": "^1.26", + "symfony/polyfill-php81": "^1.26", + "symfony/polyfill-php82": "^1.26" + }, + "suggest": { + "ext-ffi": "To allow context switching in Fibers" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0.x-dev" + } + }, + "autoload": { + "files": [ + "fiber/initialize_fiber_handler.php" + ], + "psr-4": { + "OpenTelemetry\\Context\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "description": "Context implementation for OpenTelemetry PHP.", + "keywords": [ + "Context", + "opentelemetry", + "otel" + ], + "support": { + "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", + "docs": "https://opentelemetry.io/docs/php", + "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", + "source": "https://github.com/open-telemetry/opentelemetry-php" + }, + "time": "2024-01-13T05:50:44+00:00" + }, + { + "name": "open-telemetry/sdk", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/opentelemetry-php/sdk.git", + "reference": "818263750d299df5b9612a738440e56d92e5a296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/818263750d299df5b9612a738440e56d92e5a296", + "reference": "818263750d299df5b9612a738440e56d92e5a296", + "shasum": "" + }, + "require": { + "ext-json": "*", + "open-telemetry/api": "^1.0", + "open-telemetry/context": "^1.0", + "open-telemetry/sem-conv": "^1.0", + "php": "^7.4 || ^8.0", + "php-http/discovery": "^1.14", + "psr/http-client": "^1.0", + "psr/http-client-implementation": "^1.0", + "psr/http-factory-implementation": "^1.0", + "psr/http-message": "^1.0.1|^2.0", + "psr/log": "^1.1|^2.0|^3.0", + "symfony/polyfill-mbstring": "^1.23", + "symfony/polyfill-php80": "^1.26", + "symfony/polyfill-php81": "^1.26", + "symfony/polyfill-php82": "^1.26" + }, + "suggest": { + "ext-gmp": "To support unlimited number of synchronous metric readers", + "ext-mbstring": "To increase performance of string operations" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0.x-dev" + } + }, + "autoload": { + "files": [ + "Common/Util/functions.php", + "Logs/Exporter/_register.php", + "Metrics/MetricExporter/_register.php", + "Propagation/_register.php", + "Trace/SpanExporter/_register.php", + "Common/Dev/Compatibility/_load.php", + "_autoload.php" + ], + "psr-4": { + "OpenTelemetry\\SDK\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "description": "SDK for OpenTelemetry PHP.", + "keywords": [ + "Metrics", + "apm", + "logging", + "opentelemetry", + "otel", + "sdk", + "tracing" + ], + "support": { + "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", + "docs": "https://opentelemetry.io/docs/php", + "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", + "source": "https://github.com/open-telemetry/opentelemetry-php" + }, + "time": "2024-01-24T12:00:22+00:00" + }, + { + "name": "open-telemetry/sem-conv", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/opentelemetry-php/sem-conv.git", + "reference": "d03e6501d21c04cd1b1e66e4cbcc7c2dd2e2cfa3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/d03e6501d21c04cd1b1e66e4cbcc7c2dd2e2cfa3", + "reference": "d03e6501d21c04cd1b1e66e4cbcc7c2dd2e2cfa3", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "OpenTelemetry\\SemConv\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "opentelemetry-php contributors", + "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" + } + ], + "description": "Semantic conventions for OpenTelemetry PHP.", + "keywords": [ + "Metrics", + "apm", + "logging", + "opentelemetry", + "otel", + "semantic conventions", + "semconv", + "tracing" + ], + "support": { + "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", + "docs": "https://opentelemetry.io/docs/php", + "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", + "source": "https://github.com/open-telemetry/opentelemetry-php" + }, + "time": "2024-01-23T21:47:17+00:00" + }, { "name": "phar-io/manifest", "version": "2.0.3", @@ -19115,6 +19443,86 @@ ], "time": "2024-01-12T13:14:58+00:00" }, + { + "name": "spatie/laravel-open-telemetry", + "version": "0.0.9", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-open-telemetry.git", + "reference": "3785efd133829ae6d1a27cccb99772c2a31295fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-open-telemetry/zipball/3785efd133829ae6d1a27cccb99772c2a31295fa", + "reference": "3785efd133829ae6d1a27cccb99772c2a31295fa", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^10.0", + "illuminate/http": "^10.0", + "open-telemetry/api": "^1.0", + "open-telemetry/sdk": "^1.0", + "php": "^8.1", + "php-http/guzzle7-adapter": "^1.0", + "spatie/laravel-package-tools": "^1.13.8" + }, + "require-dev": { + "laravel/pint": "^1.3", + "nunomaduro/collision": "^7.0", + "nunomaduro/larastan": "^2.3.4", + "orchestra/testbench": "^8.0", + "pestphp/pest": "^2.0", + "pestphp/pest-plugin-laravel": "^2.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.3", + "spatie/laravel-ray": "^1.31", + "spatie/pest-plugin-snapshots": "^2.0", + "spatie/phpunit-snapshot-assertions": "^5.0", + "spatie/test-time": "^1.3", + "spatie/valuestore": "^1.3.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\OpenTelemetry\\OpenTelemetryServiceProvider" + ], + "aliases": { + "Measure": "Spatie\\OpenTelemetry\\Facades\\Measure" + } + } + }, + "autoload": { + "psr-4": { + "Spatie\\OpenTelemetry\\": "src", + "Spatie\\OpenTelemetry\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Measure performance across jobs and services", + "homepage": "https://github.com/spatie/laravel-open-telemetry", + "keywords": [ + "laravel", + "laravel-open-telemetry", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-open-telemetry/issues", + "source": "https://github.com/spatie/laravel-open-telemetry/tree/0.0.9" + }, + "time": "2024-01-12T12:12:48+00:00" + }, { "name": "spaze/phpstan-stripe", "version": "v3.1.0", @@ -19256,6 +19664,85 @@ ], "time": "2023-01-26T09:26:14+00:00" }, + { + "name": "symfony/polyfill-php82", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php82.git", + "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/7716bea9c86776fb3362d6b52fe1fc9471056a49", + "reference": "7716bea9c86776fb3362d6b52fe1fc9471056a49", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php82\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php82/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-08-25T17:27:25+00:00" + }, { "name": "symfony/stopwatch", "version": "v6.4.3", diff --git a/config/open-telemetry.php b/config/open-telemetry.php new file mode 100644 index 000000000000..355c0118e819 --- /dev/null +++ b/config/open-telemetry.php @@ -0,0 +1,98 @@ + null, + + /* + * A driver is responsible for transmitting any measurements. + */ + 'drivers' => [ + Spatie\OpenTelemetry\Drivers\HttpDriver::class => [ + 'url' => 'http://localhost:9411/api/v2/spans', + // 'url' => 'http://localhost:4318/v1/traces' + ], + ], + + /* + * This class determines if your measurements should actually be sent + * to the reporting drivers. + */ + 'sampler' => Spatie\OpenTelemetry\Support\Samplers\AlwaysSampler::class, + + /* + * Tags can be added to any measurement. These classes will determine the + * values of the tags when a new trace starts. + */ + 'trace_tag_providers' => [ + \Spatie\OpenTelemetry\Support\TagProviders\DefaultTagsProvider::class, + ], + + /* + * Tags can be added to any measurement. These classes will determine the + * values of the tags when a new span starts. + */ + 'span_tag_providers' => [ + + ], + + 'queue' => [ + /* + * When enabled, any measurements (spans) you make in a queued job that implements + * `TraceAware` will automatically belong to the same trace that was + * started in the process that dispatched the job. + */ + 'make_queue_trace_aware' => true, + + /* + * When this is set to `false`, only jobs the implement + * `TraceAware` will be trace aware. + */ + 'all_jobs_are_trace_aware_by_default' => true, + + /* + * When set to `true` all jobs will + * automatically start a span. + */ + 'all_jobs_auto_start_a_span' => true, + + /* + * These jobs will be trace aware even if they don't + * implement the `TraceAware` interface. + */ + 'trace_aware_jobs' => [ + + ], + + /* + * These jobs will never trace aware, regardless of `all_jobs_are_trace_aware_by_default`. + */ + 'not_trace_aware_jobs' => [ + + ], + ], + + /* + * These actions can be overridden to have fine-grained control over how + * the package performs certain tasks. + * + * In most cases, you should use the default values. + */ + 'actions' => [ + 'make_queue_trace_aware' => Spatie\OpenTelemetry\Actions\MakeQueueTraceAwareAction::class, + ], + + /* + * This class determines how the package measures time. + */ + 'stopwatch' => Spatie\OpenTelemetry\Support\Stopwatch::class, + + /* + * This class generates IDs for traces and spans. + */ + 'id_generator' => Spatie\OpenTelemetry\Support\IdGenerator::class, +]; From 7ce2221e8728cf080cb7c818c99debce60a313d6 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Feb 2024 15:09:30 +1100 Subject: [PATCH 3/3] v5.8.23 --- VERSION.txt | 2 +- config/ninja.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 694a2b5eb39c..aaeac54d5972 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.8.22 \ No newline at end of file +5.8.23 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index 3a3e2c684ccf..e73d23c33cd8 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -17,8 +17,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION', '5.8.22'), - 'app_tag' => env('APP_TAG', '5.8.22'), + 'app_version' => env('APP_VERSION', '5.8.23'), + 'app_tag' => env('APP_TAG', '5.8.23'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false),