From 271b182c1ae6f87b31e7e96246ff567b06119905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:30:43 +0100 Subject: [PATCH 01/15] config: add .editorconfig file --- .editorconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..37cfad7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +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 From 09a6fc06d2f01ad66c75094bf119d32eb8daa50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:32:48 +0100 Subject: [PATCH 02/15] config: add .gitattributes file --- .gitattributes | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ba39bf5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +.circleci/ export-ignore +.github/ export-ignore +.vscode/ export-ignore +tests/ export-ignore + +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +CODE-OF-CONDUCT.md export-ignore +CONTRIBUTING.md export-ignore +phpunit.xml export-ignore +pint.json export-ignore From 6c826912db65ed357b92360a85914344eadaf731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:34:23 +0100 Subject: [PATCH 03/15] config: change to laravel preset for pint --- pint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pint.json b/pint.json index ea5e72c..93061b6 100644 --- a/pint.json +++ b/pint.json @@ -1,3 +1,3 @@ { - "preset": "psr12" + "preset": "laravel" } From f29094730fa9a9e420cb05305ba99be32bc79d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:34:51 +0100 Subject: [PATCH 04/15] docs: fix broken link --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8214381..de7ad62 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thank you for investing your time in contributing to this project! Please take a moment to review this document in order to streamline the contribution process for you and any reviewers involved. -Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable. +Read our [Code of Conduct](CODE-OF-CONDUCT.md) to keep our community approachable and respectable. In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR. From bfca49e1da4ed943180821ca85a4e503d17320fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:35:52 +0100 Subject: [PATCH 05/15] docs: formatting on contribute guide --- CONTRIBUTING.md | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index de7ad62..4f0d7c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,11 +56,9 @@ Commits should be in the format `(): `. This allows ou ### Example workflow -Follow this process if you'd like your work considered for inclusion in the -project: +Follow this process if you'd like your work considered for inclusion in the project: -1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, - and configure the remotes: +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: ```bash # Clone your fork of the repo into the current directory @@ -78,16 +76,13 @@ project: git pull upstream ``` -3. Create a new topic branch (off the main project development branch) to - contain your feature, change, or fix: +3. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix: ```bash git checkout -b ``` -4. Commit your changes in logical chunks. Use Git's - [interactive rebase](https://help.github.com/articles/interactive-rebase) - feature to tidy up your commits before making them public. +4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public. 5. Locally merge (or rebase) the upstream development branch into your topic branch: @@ -101,24 +96,22 @@ project: git push origin ``` -7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) - with a clear title and description. +7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. -**IMPORTANT**: By submitting a patch, you agree to allow the project owner to -license your work under the same license as that used by the project. +**IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project. -# Pre-requisites +## Pre-requisites 1. Check php is installed globally 2. Install composer locally according to instructions here: https://getcomposer.org/download/ -# Install deps +## Install deps -Run `php composer.phar i` to install deps +Run `php composer.phar install` to install deps -# Development +## Development Commands: - Run unit tests: `./vendor/bin/phpunit` -- Update dependencies: `php composer.phar u` +- Update dependencies: `php composer.phar update` From 4fc054518b862bff9c2a2f0de70ed8c6e0f186dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:38:06 +0100 Subject: [PATCH 06/15] config: reindent composer.json with 4 spaces --- composer.json | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/composer.json b/composer.json index 1d24949..ec216d4 100644 --- a/composer.json +++ b/composer.json @@ -1,27 +1,27 @@ { - "name": "imgix/imgix-php", - "description": "A PHP client library for generating URLs with imgix.", - "type": "library", - "version": "4.1.0", - "license": "BSD-2-Clause", - "keywords": [ - "imgix" - ], - "require": { - "php": "^8.0" - }, - "require-dev": { - "laravel/pint": "^1.4", - "phpunit/phpunit": "^9.5.10" - }, - "autoload": { - "psr-4": { - "Imgix\\": "src/" + "name": "imgix/imgix-php", + "description": "A PHP client library for generating URLs with imgix.", + "type": "library", + "version": "4.1.0", + "license": "BSD-2-Clause", + "keywords": [ + "imgix" + ], + "require": { + "php": "^8.0" + }, + "require-dev": { + "laravel/pint": "^1.4", + "phpunit/phpunit": "^9.5.10" + }, + "autoload": { + "psr-4": { + "Imgix\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Imgix\\Tests\\": "tests/" + } } - }, - "autoload-dev": { - "psr-4": { - "Imgix\\Tests\\": "tests/" - } - } } From 1fa040bb17efbe73c92d0a788e919dab425b4b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:42:35 +0100 Subject: [PATCH 07/15] config: reorder composer keys --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ec216d4..f22484a 100644 --- a/composer.json +++ b/composer.json @@ -3,10 +3,10 @@ "description": "A PHP client library for generating URLs with imgix.", "type": "library", "version": "4.1.0", - "license": "BSD-2-Clause", "keywords": [ "imgix" ], + "license": "BSD-2-Clause", "require": { "php": "^8.0" }, From 0d2053d3a1920b69eb9d10235fc416bf2799d652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:42:53 +0100 Subject: [PATCH 08/15] config: remove version from composer.json --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index f22484a..49462ec 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,6 @@ "name": "imgix/imgix-php", "description": "A PHP client library for generating URLs with imgix.", "type": "library", - "version": "4.1.0", "keywords": [ "imgix" ], From 957a865b130c7a90ea4d9f9e67115679ca1531aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:43:20 +0100 Subject: [PATCH 09/15] config: add links to composer.json --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 49462ec..cb1027f 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,11 @@ "imgix" ], "license": "BSD-2-Clause", + "homepage": "https://docs.imgix.com", + "support": { + "issues": "https://github.com/imgix/imgix-php/issues", + "source": "https://github.com/imgix/imgix-php" + }, "require": { "php": "^8.0" }, From 29774134939a9d87cd52d42d92e2fe1162918b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:44:20 +0100 Subject: [PATCH 10/15] config: add common settings to composer.json --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cb1027f..ceb7cac 100644 --- a/composer.json +++ b/composer.json @@ -27,5 +27,10 @@ "psr-4": { "Imgix\\Tests\\": "tests/" } - } + }, + "config": { + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true } From 65d39106b9e72f1d2a04b86018d6ed3636d3a7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:44:37 +0100 Subject: [PATCH 11/15] config: add custom scripts to composer.json --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index ceb7cac..38e259b 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,11 @@ "Imgix\\Tests\\": "tests/" } }, + "scripts": { + "format": "vendor/bin/pint", + "test": "vendor/bin/phpunit", + "test-coverage": "@test --coverage-text" + }, "config": { "sort-packages": true }, From fd42dc6307ff3ac5c25c5bfa05c531fb8fa6f5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:45:46 +0100 Subject: [PATCH 12/15] config: reference composer script in contribute.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f0d7c5..64ef917 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -113,5 +113,5 @@ Run `php composer.phar install` to install deps Commands: -- Run unit tests: `./vendor/bin/phpunit` +- Run unit tests: `php composer.phar run test` - Update dependencies: `php composer.phar update` From 4b92c842c35afa87a3522fbf792b893d31fbeb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 11:46:22 +0100 Subject: [PATCH 13/15] chore: update dependencies --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index bf16889..a125e3b 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": "3ccda72ca21e42c2d3b05dc5beadc568", + "content-hash": "601521759d44cd966079671d17852a44", "packages": [], "packages-dev": [ { @@ -79,16 +79,16 @@ }, { "name": "laravel/pint", - "version": "v1.4.0", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "0e7ffdb0af871be10d798e234772ea5d4020ae4a" + "reference": "80ddf23a5d97825e79bb1018eebb6f3f985d4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/0e7ffdb0af871be10d798e234772ea5d4020ae4a", - "reference": "0e7ffdb0af871be10d798e234772ea5d4020ae4a", + "url": "https://api.github.com/repos/laravel/pint/zipball/80ddf23a5d97825e79bb1018eebb6f3f985d4fa8", + "reference": "80ddf23a5d97825e79bb1018eebb6f3f985d4fa8", "shasum": "" }, "require": { @@ -99,7 +99,7 @@ "php": "^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~3.13.1", + "friendsofphp/php-cs-fixer": "^3.14", "illuminate/view": "^9.32.0", "laravel-zero/framework": "^9.2.0", "mockery/mockery": "^1.5.1", @@ -141,7 +141,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-01-10T20:03:42+00:00" + "time": "2023-01-31T15:50:45+00:00" }, { "name": "myclabs/deep-copy", @@ -371,16 +371,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.23", + "version": "9.2.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", - "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", + "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", "shasum": "" }, "require": { @@ -436,7 +436,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" }, "funding": [ { @@ -444,7 +444,7 @@ "type": "github" } ], - "time": "2022-12-28T12:41:10+00:00" + "time": "2023-01-26T08:26:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1805,9 +1805,9 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.0" From de5a1d32036884d9692a76f390dadb512b5d0b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 14:18:49 +0100 Subject: [PATCH 14/15] config: handle line endings same on all systems --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index ba39bf5..5d6dd7c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,5 @@ +* text=auto eol=lf + .circleci/ export-ignore .github/ export-ignore .vscode/ export-ignore From e4da08792748d333494051e98e6a0a5446e3b884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20Lundgren?= Date: Wed, 1 Feb 2023 14:19:29 +0100 Subject: [PATCH 15/15] config: use 2 space indentation for yaml --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 37cfad7..dd9a2b5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,6 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2