⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
erp.dev-unit.com
/
vendor
/
omniphx
/
forrest
/
View File Name :
CONTRIBUTING.md
# Contribution Guide ## Build After you've forked the repo, clone forrest into a new Laravel application or existing project. I recommend creating a new directory to store this project to seperate it from the rest of your codebase. This guide will assume it is named `library` but you can call it anything you like. `git clone git@github.com:<username>/forrest.git libraries/forrest` Next, update your `composer.json` to include the psr-4 auto-loader location. Your should already see the `App\\` namespace unless you've named it something else: ``` "autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/", "Omniphx\\Forrest\\": "libraries/forrest/src/Omniphx/Forrest" } }, ``` Add required dependencies: ``` "require": { "firebase/php-jwt": "^5.2", "nesbot/carbon": "^2.0|^3.0" }, ``` Next run: `composer update` From your project's root, add the service provider and alias to your `config/app.php` (same as the install guide): ``` Omniphx\Forrest\Providers\Laravel\ForrestServiceProvider::class 'Forrest' => Omniphx\Forrest\Providers\Laravel\Facades\Forrest::class ``` And publish the forrest configuration: `php artisan vendor:publish` For more details on configuration, see the README.md ## Testing This project uses the PHPSpec testing framework. PHPSpec leverages mocks so that we only test the code that we've written and assume that other libraries and integrations (such as the Salesforce REST API) are working perfectly fine. You can read more about PHPSpec here: `http://www.phpspec.net/en/stable/` You'll also need to be in the forrest directory, not your root/project directory to run tests. 1. `cd libary/forrest` 2. `composer update` 3. `vendor/bin/phpspec run` (it should be fast!) All test are located in the `spec` folder and have a similar namespace to the files in our `src` folder. If you add new test methods, please use descriptive method naming. For instance, `it_should_not_call_refresh_method_if_there_is_no_token`