diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 72084f8..62c7328 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at graham@alt-three.com. All +reported by contacting the project team at yo@7span.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/.github/SECURITY.md b/.github/SECURITY.md index e01aa14..ed898c7 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -12,9 +12,3 @@ If you discover a security vulnerability within this package, please send an email to one the security contacts. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. - -### Security Contacts - -* James Brooks (james@alt-three.com) -* Graham Campbell (graham@alt-three.com) -* Joe Cohen (joe@alt-three.com) diff --git a/LICENSE b/LICENSE index 2c6d3ba..59e5ec5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2020 Alt Three Services Limited +Copyright (c) Spatie bvba Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6795df0..768110b 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,16 @@ -![Alt Three Segment](https://user-images.githubusercontent.com/2829600/71490849-0de16e00-2825-11ea-87a6-ddada0f35224.png) - -

-Build Status -StyleCI Status -Software License -Packagist Downloads -Latest Version -

- - ## Installation -Alt Three Segment is a [Segment](https://segment.com/) bridge for Laravel. This version requires [PHP](https://php.net) 7.1-7.4, and supports Laravel 5.5-8. Simply require the package using [Composer](https://getcomposer.org): +SevenSpan Segment is a [Segment](https://segment.com/) bridge for Laravel. This version requires [PHP](https://php.net) 8.2, and supports Laravel 9 and 10. Simply require the package using [Composer](https://getcomposer.org): ```bash -$ composer require alt-three/segment:^3.5 +$ composer require sevenspan/segment-php-sdk:^1.0 ``` -Once installed, if you are not using automatic package discovery, then you need to register the `AltThree\Segment\SegmentServiceProvider` service provider in your `config/app.php`. - +Once installed, if you are not using automatic package discovery, then you need to register the `SevenSpan\SegmentPhpSdk\SegmentServiceProvider` service provider in your `config/app.php`. ## Configuration -Alt Three Segment requires configuration. +SevenSpan Segment requires configuration. To get started, you'll need to publish all vendor assets: @@ -32,7 +20,6 @@ $ php artisan vendor:publish This will create a `config/segment.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases. - ## Usage Once you've set your `write_key` value in the configuration, you're ready to go! For the most part you can follow [Segments own instructions](https://segment.com/docs/libraries/php/quickstart) however, you'll want to replace the `Analytics` classname with `Segment` - plus, you don't need to call `class_alias`. @@ -61,12 +48,10 @@ Segment::track([ ]); ``` - ## Security -Our full security policy is available to read [here](https://github.com/AltThree/Segment/security/policy). - +Our full security policy is available to read [here](https://github.com/7span/segment-php-sdk/security/policy). ## License -Alt Three Segment is licensed under [The MIT License (MIT)](LICENSE). +SevenSpan Segment is licensed under [The MIT License (MIT)](LICENSE). diff --git a/composer.json b/composer.json index d2ba5a9..e52d2f7 100644 --- a/composer.json +++ b/composer.json @@ -1,45 +1,69 @@ { - "name": "alt-three/segment", - "description": "A Segment bridge for Laravel", - "keywords": ["segment", "bridge", "segment.com", "segment.io", "api", "Alt Three"], - "license": "MIT", - "authors": [ - { - "name": "Alt Three", - "email": "support@alt-three.com" - } - ], - "require": { - "php": "^7.1.3", - "illuminate/config": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0", - "segmentio/analytics-php": "~1.5.2" + "name": "sevenspan/segment-php-sdk", + "description": "A Segment bridge for Laravel", + "keywords": [ + "segment", + "analytics", + "php8.1", + "laravel9", + "data-analytics", + "bridge", + "segment.com", + "segment.io", + "api" + ], + "license": "MIT", + "authors": [ + { + "name": "Hemratna Bhimani", + "email": "hemratna.bhimani@gmail.com", + "homepage": "https://github.com/7span/segment-php-sdk", + "role": "Developer" }, - "require-dev": { - "graham-campbell/analyzer": "^2.4 || ^3.0", - "graham-campbell/testbench": "^5.5", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.4 || ^9.0" + { + "name": "Binal Gajjar", + "email": "binal.gajjar7@gmail.com", + "homepage": "https://github.com/7span/segment-php-sdk", + "role": "Developer" }, - "autoload": { - "psr-4": { - "AltThree\\Segment\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "AltThree\\Tests\\Segment\\": "tests/" - } - }, - "config": { - "preferred-install": "dist" - }, - "extra": { - "laravel": { - "providers": [ - "AltThree\\Segment\\SegmentServiceProvider" - ] - } - }, - "minimum-stability": "dev", - "prefer-stable": true -} + { + "name": "Kajal Pandya", + "email": "kjlkajal98@gmail.com", + "homepage": "https://github.com/7span/segment-php-sdk", + "role": "Developer" + } + ], + "require": { + "php": "^8.1.0||^8.2", + "illuminate/config": "^9.0|^10.0|^11.0", + "illuminate/support": "^9.0|^10.0|^11.0", + "segmentio/analytics-php": "~3.5.0 || ^3.7.0 || ^3.8.0" + }, + "require-dev": { + "graham-campbell/analyzer": "^2.4 || ^3.0 || ^3.1 || ^4.0 || ^4.1", + "graham-campbell/testbench": "^5.5 || ^6.0", + "phpunit/phpunit": "^6.5 || ^7.5 || ^8.4 || ^9.0 || ^10.0 || ^11.0" + }, + "autoload": { + "psr-4": { + "SevenSpan\\Segment\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "SevenSpan\\Tests\\Segment\\": "tests/" + } + }, + "config": { + "preferred-install": "dist" + }, + "extra": { + "laravel": { + "providers": [ + "SevenSpan\\Segment\\SegmentServiceProvider" + ] + } + }, + "minimum-stability": "dev", + "prefer-stable": true +} \ No newline at end of file diff --git a/config/segment.php b/config/segment.php index 2b48de1..cfb24a3 100644 --- a/config/segment.php +++ b/config/segment.php @@ -2,15 +2,6 @@ declare(strict_types=1); -/* - * This file is part of Alt Three Segment. - * - * (c) Alt Three Services Limited - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - return [ /* diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d7e76d9..0c04166 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,7 +16,7 @@ verbose="true" > - + ./tests diff --git a/src/SegmentServiceProvider.php b/src/SegmentServiceProvider.php index 7adaf00..dd10fad 100644 --- a/src/SegmentServiceProvider.php +++ b/src/SegmentServiceProvider.php @@ -2,27 +2,13 @@ declare(strict_types=1); -/* - * This file is part of Alt Three Segment. - * - * (c) Alt Three Services Limited - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace AltThree\Segment; +namespace SevenSpan\Segment; use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider; use Laravel\Lumen\Application as LumenApplication; -use Segment; +use Segment\Segment; -/** - * This is the segment service provider class. - * - * @author Graham Campbell - */ class SegmentServiceProvider extends ServiceProvider { /** @@ -30,6 +16,7 @@ class SegmentServiceProvider extends ServiceProvider * * @return void */ + public function boot() { $this->setupConfig(); @@ -46,6 +33,7 @@ public function boot() * * @return void */ + protected function setupConfig() { $source = realpath($raw = __DIR__.'/../config/segment.php') ?: $raw; diff --git a/tests/AnalysisTest.php b/tests/AnalysisTest.php index fafe6b1..882c0b0 100644 --- a/tests/AnalysisTest.php +++ b/tests/AnalysisTest.php @@ -2,26 +2,12 @@ declare(strict_types=1); -/* - * This file is part of Alt Three Segment. - * - * (c) Alt Three Services Limited - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace AltThree\Tests\Segment; +namespace SevenSpan\Tests\Segment; use GrahamCampbell\Analyzer\AnalysisTrait; use Laravel\Lumen\Application; use PHPUnit\Framework\TestCase; -/** - * This is the analysis test class. - * - * @author Graham Campbell - */ class AnalysisTest extends TestCase { use AnalysisTrait; diff --git a/tests/ServiceProviderTest.php b/tests/ServiceProviderTest.php index d01c009..c158f85 100644 --- a/tests/ServiceProviderTest.php +++ b/tests/ServiceProviderTest.php @@ -2,26 +2,12 @@ declare(strict_types=1); -/* - * This file is part of Alt Three Segment. - * - * (c) Alt Three Services Limited - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +namespace SevenSpan\Tests\Segment; -namespace AltThree\Tests\Segment; - -use AltThree\Segment\SegmentServiceProvider; +use SevenSpan\Segment\SegmentServiceProvider; use GrahamCampbell\TestBench\AbstractPackageTestCase; use GrahamCampbell\TestBenchCore\ServiceProviderTrait; -/** - * This is the service provider test class. - * - * @author Graham Campbell - */ class ServiceProviderTest extends AbstractPackageTestCase { use ServiceProviderTrait;