Skip to content

Commit

Permalink
Merge pull request #41 from eventfarm/upgrading-to-latest-php
Browse files Browse the repository at this point in the history
Verifying and Updating the Library for the latest PHP Version (8.3)
  • Loading branch information
toddcornett authored Jan 3, 2024
2 parents b820847 + e95109f commit e48258d
Show file tree
Hide file tree
Showing 8 changed files with 1,196 additions and 1,248 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ before_script:
script:
- vendor/bin/phpcs --standard=PSR2 src/
- vendor/bin/phpunit -c phpunit.xml
after_script:
- ./bin/codeclimate.sh
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Event Farm
Copyright (c) 2023 Event Farm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
[![Travis](https://img.shields.io/travis/eventfarm/restforcephp.svg?maxAge=2592000?style=flat-square)](https://travis-ci.org/eventfarm/restforcephp)
[![Downloads](https://img.shields.io/packagist/dt/eventfarm/restforcephp.svg?style=flat-square)](https://packagist.org/packages/eventfarm/restforcephp)
[![Packagist](https://img.shields.io/packagist/l/eventfarm/restforcephp.svg?maxAge=2592000?style=flat-square)](https://packagist.org/packages/eventfarm/restforcephp)
[![Code Climate](https://codeclimate.com/github/eventfarm/restforcephp/badges/gpa.svg)](https://codeclimate.com/github/eventfarm/restforcephp)
[![Test Coverage](https://codeclimate.com/github/eventfarm/restforcephp/badges/coverage.svg)](https://codeclimate.com/github/eventfarm/restforcephp/coverage)

This is meant to emulate what the [ejhomes/restforce gem](https://github.com/ejholmes/restforce) is doing for rails.

## Installation

This library requires PHP 7.1 or later; we recommend using the latest available version of PHP.
This library requires PHP 7.1 or later; we recommend using the latest available version of PHP. It has been test through the latest version of PHP (v8.3 as of this writing)

```
$ composer require eventfarm/restforcephp
Expand Down Expand Up @@ -46,7 +44,7 @@ class DemoSalesforceApi
{
/** @var null|RestforceInterface $restforce */
private $restforce;

public function getRestforceClient(): RestforceInterface
{
if ($this->restforce === null) {
Expand Down Expand Up @@ -74,7 +72,7 @@ Consult the [Salesforce OAuth 2.0 Documentation](https://developer.salesforce.co

## Salesforce Documentation

Links to Salesforce documentation pages can be found in each section. Alternatively, here is the [holy grail of the Saleforce endpoints.](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm)
Links to Salesforce documentation pages can be found in each section. Alternatively, here is the [holy grail of the Saleforce endpoints.](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_list.htm)

## Usage

Expand Down Expand Up @@ -184,7 +182,7 @@ $responseInterface = $restforce->update('Account', '001i000001ysdBGAAY', [
## Contributing

Thanks for considering contributing to our Restforcephp project. Just a few things:

- Make sure your commit conforms to the PSR-2 coding standard.
- Make sure your commit messages are well defined.
- Make sure you have added the necessary unit tests for your changes.
Expand Down Expand Up @@ -214,5 +212,11 @@ $ vendor/bin/phpcs -p --standard=PSR2 src/ tests/
Auto runs and resolves some low hanging PSR2 fixes, this might not get all of them, so rerun the check after.

```bash
$ vendor/bin/phpcbf --standard=PSR2 src/ tests/
$ vendor/bin/phpcbf --standard=PSR2 src/ tests/
```

#### Check Compatability for PHP Version:

```bash
$ vendor/bin/phpcs -p ./src/ --standard=PHPCompatibility --runtime-set testVersion 7.1-8.4
```
5 changes: 0 additions & 5 deletions bin/codeclimate.sh

This file was deleted.

12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"description": "PHP Salesforce REST",
"license": "MIT",
"require-dev": {
"phpunit/phpunit": "~5.4",
"squizlabs/php_codesniffer": "~2.6",
"codeclimate/php-test-reporter": "dev-master"
"phpunit/phpunit": "~10.5.5",
"squizlabs/php_codesniffer": "~3.7.2",
"phpcompatibility/php-compatibility": "~9.3.5"
},
"require": {
"php": ">=7.1",
"psr/http-message": "^1.0",
"guzzlehttp/guzzle": "^6.3|^7.0"
"guzzlehttp/guzzle": "^7.0"
},
"autoload": {
"psr-4": {
Expand All @@ -21,5 +21,9 @@
"psr-4": {
"EventFarm\\Restforce\\Test\\": "tests"
}
},
"scripts": {
"post-install-cmd": "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility",
"post-update-cmd" : "\"vendor/bin/phpcs\" --config-set installed_paths vendor/phpcompatibility/php-compatibility"
}
}
Loading

0 comments on commit e48258d

Please sign in to comment.