Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- checkout
- run: composer install --no-interaction
- run: composer install --no-interaction --no-suggest --prefer-dist
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer dist, and no need to display suggested packages.

- run: vendor/bin/phpunit
- run: vendor/bin/phpcs --standard=PSR2 src test

Expand Down
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
exclude_paths:
- test/*
- test/*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Respect .editorconfig file

15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a standard .editorconfig file.

charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
15 changes: 10 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/test export-ignore
/phpunit.xml export-ignore
/.github export-ignore
/.circleci export-ignore
/.codeclimate.yml export-ignore
* text=auto

/.circleci export-ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort folders, hidden files and files that don't need to be exported.

/.github export-ignore
/test export-ignore
.codeclimate.yml export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
phpunit.xml.dist export-ignore
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
.DS_Store

# PhpStorm
.idea
/.idea
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properly prefix folders and un-prefix files


# Composer
/vendor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, sort folders, then hidden files, the files

composer.lock
composer.phar
/vendor

# PhpUnit
phpunit.phar
/phpunit.xml
phpunit.xml

# Extras
build/
/build
*.swp
34 changes: 25 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,53 @@
{
"name": "intercom/intercom-php",
"description": "Intercom API client built on top of Guzzle 6",
"keywords": ["intercom", "intercom.io", "api", "guzzle"],
"keywords": [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format and sort keywords

"api",
"guzzle",
"intercom",
"intercom.io"
],
"license": "Apache-2.0",
"authors": [
{
"name": "Intercom Platform Team",
"homepage": "http://intercom.io"
"homepage": "https://www.intercom.com"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update homepage

}
],
"support": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add support section

"issues": "https://github.com/intercom/intercom-php/issues",
"source": "https://github.com/intercom/intercom-php"
},
"autoload": {
"psr-4": {
"Intercom\\": ["src"]
"Intercom\\": [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default composer formatting

"src"
]
}
},
"autoload-dev": {
"psr-4": {
"Intercom\\Test\\": ["test"]
"Intercom\\Test\\": [
"test"
]
}
},
"require": {
"php": ">= 7.1",
"ext-json": "*",
"php-http/httplug": "^1.0 || ^2.0",
"php-http/client-common": "^1.9 || ^2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort packages

"php-http/client-implementation": "*",
"php-http/discovery": "^1.4",
"php-http/httplug": "^1.0 || ^2.0",
"php-http/message": "^1.7",
"psr/http-message": "^1.0",
"php-http/client-common": "^1.9 || ^2.0"
"psr/http-message": "^1.0"
},
"require-dev": {
"php-http/guzzle6-adapter": "^1.0 || ^2.0",
"phpunit/phpunit": "^7.0",
"squizlabs/php_codesniffer": "^3.1",
"php-http/guzzle6-adapter": "^1.0 || ^2.0"
"squizlabs/php_codesniffer": "^3.1"
},
"config": {
"sort-packages": true
}
}
3 changes: 2 additions & 1 deletion phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
stopOnFailure="false"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

>
<testsuites>
<testsuite name="Intercom Test Suite">
<directory suffix=".php">./test/</directory>
Expand Down