From 014888263bf764fc66df0819f3cfef9243182b4c Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:15:25 +0000 Subject: [PATCH 1/3] WIP --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 ++++----- .github/dependabot.yml | 2 +- .github/workflows/dependabot-auto-merge.yml | 6 ++-- .github/workflows/phpstan.yml | 2 +- .github/workflows/release.yml | 23 ++++++++++++++ .github/workflows/run-tests.yml | 4 +-- composer.json | 34 ++++++++++----------- 7 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8b9c8e3..bc5e177 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,7 +1,7 @@ name: Bug Report description: Report an Issue or Bug with the Package title: "[Bug]: " -labels: ["bug"] +labels: [ "bug" ] body: - type: markdown attributes: @@ -20,8 +20,8 @@ We're sorry to hear you have a problem. Can you help us solve it by providing th attributes: label: Package Version description: What version of our Package are you running? Please be as specific as possible - placeholder: "11.0" - value: "11.0" + placeholder: "12.0" + value: "12.0" validations: required: true - type: input @@ -29,8 +29,8 @@ We're sorry to hear you have a problem. Can you help us solve it by providing th attributes: label: PHP Version description: What version of PHP are you running? Please be as specific as possible - placeholder: "8.3.0" - value: "8.3.0" + placeholder: "8.4.0" + value: "8.4.0" validations: required: true - type: input @@ -38,8 +38,8 @@ We're sorry to hear you have a problem. Can you help us solve it by providing th attributes: label: Laravel Version description: What version of Laravel are you running? Please be as specific as possible - placeholder: "11.0.0" - value: "11.0.0" + placeholder: "12.0.0" + value: "12.0.0" validations: required: true - type: dropdown diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 30c8a49..0bc378d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,4 +9,4 @@ updates: schedule: interval: "weekly" labels: - - "dependencies" \ No newline at end of file + - "dependencies" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 2cb1d5e..2df1631 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -10,20 +10,20 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} steps: - + - name: Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v2.3.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - + - name: Auto-merge Dependabot PRs for semver-minor updates if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - + - name: Auto-merge Dependabot PRs for semver-patch updates if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} run: gh pr merge --auto --merge "$PR_URL" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index d9306d6..b0cde6a 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -16,7 +16,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.3' + php-version: '8.4' coverage: none - name: Install composer dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..afa28ff --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: release + +on: + pull_request: + types: + - closed + branches: + - main +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: '0' + - name: Bump version and push tag + uses: anothrNick/github-tag-action@master + env: + GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} + WITH_V: true + RELEASE_BRANCHES: main + DEFAULT_BUMP: minor diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a44a477..c4d9e45 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,8 +14,8 @@ jobs: max-parallel: 1 matrix: os: [ ubuntu-latest ] - php: [ 8.3 ] - laravel: [ 11.* ] + php: [ 8.2, 8.3, 8.4 ] + laravel: [ 12.* ] stability: [ prefer-lowest, prefer-stable ] name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index cd98b22..682813a 100755 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "authors": [ { "name": "Sebastian Bürgin-Fix", - "email": "sebastian.fix@buergin.ch", + "email": "sebastian.buergin@buergin.ch", "homepage": "https://www.codebar.ch", "role": "Sofware-Engineer" }, @@ -21,25 +21,24 @@ } ], "require": { - "php": "^8.3", + "php": "8.2.*|8.3.*|8.4.*", "guzzlehttp/guzzle": "^7.8", - "illuminate/contracts": "^10.0|^11.0", - "nesbot/carbon": "^2.72", + "illuminate/contracts": "^12.0", + "nesbot/carbon": "^3.8", + "spatie/laravel-package-tools": "^1.19", "saloonphp/cache-plugin": "^3.0", - "saloonphp/laravel-plugin": "^3.0", - "saloonphp/saloon": "^3.7", - "spatie/laravel-package-tools": "^1.16" + "saloonphp/laravel-plugin": "^3.5", + "saloonphp/saloon": "^3.10.1" }, "require-dev": { - "laravel/pint": "^1.14", - "larastan/larastan": "^2.9", - "orchestra/testbench": "^9.0", - "pestphp/pest": "^2.34", - "phpstan/extension-installer": "^1.3", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^10.5", - "spatie/laravel-ray": "^1.35" + "laravel/pint": "^1.21", + "larastan/larastan": "^v3.1", + "orchestra/testbench": "^10.0", + "pestphp/pest": "^3.7", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "spatie/laravel-ray": "^1.39" }, "autoload": { "psr-4": { @@ -49,8 +48,7 @@ }, "autoload-dev": { "psr-4": { - "CodebarAg\\LaravelInstagram\\Tests\\": "tests/", - "Workbench\\App\\": "workbench/app/" + "CodebarAg\\LaravelInstagram\\Tests\\": "tests/" } }, "scripts": { From 1235a68e6a3f3aba264a2c64bd2f058d6fb3f0c4 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:19:39 +0000 Subject: [PATCH 2/3] WIP --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b2f62c..443adb4 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ - + [![Latest Version on Packagist](https://img.shields.io/packagist/v/codebar-ag/laravel-instagram.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-instagram) -[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/codebar-ag/laravel-instagram/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/codebar-ag/laravel-instagram/actions?query=workflow%3Arun-tests+branch%3Amain) -[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/codebar-ag/laravel-instagram/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/codebar-ag/laravel-instagram/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) +[![GitHub-Tests](https://github.com/codebar-ag/laravel-instagram/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-instagram/actions/workflows/run-tests.yml) +[![GitHub Code Style](https://github.com/codebar-ag/laravel-instagram/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/codebar-ag/laravel-instagram/actions/workflows/fix-php-code-style-issues.yml) [![Total Downloads](https://img.shields.io/packagist/dt/codebar-ag/laravel-instagram.svg?style=flat-square)](https://packagist.org/packages/codebar-ag/laravel-instagram) This package was developed to give you a quick start to communicate with the @@ -39,7 +39,8 @@ This package is only designed to login with a single user account to display ins | Version | PHP Version | Laravel Version | |---------|-------------|-----------------| -| > v11.0 | ^8.3 | ^11.* | +| v12.0.0 | ^8.2 - ^8.4 | ^12.* | +| v11.0.0 | ^8.2 - ^8.3 | ^11.* | ## Installation From 291cf50d92f8af2f98eb8e84c6340bf52155d8a7 Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:22:21 +0000 Subject: [PATCH 3/3] WIP --- .editorconfig | 15 +++++++++++++++ .gitattributes | 19 +++++++++++++++++++ .gitignore | 3 +-- phpstan.neon.dist | 4 ++-- phpunit.xml.dist | 9 +++++++-- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a7c44dd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9e9519b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,19 @@ +# Path-based git attributes +# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html + +# Ignore all test and documentation with "export-ignore". +/.github export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/phpunit.xml.dist export-ignore +/art export-ignore +/docs export-ignore +/tests export-ignore +/.editorconfig export-ignore +/.php_cs.dist.php export-ignore +/psalm.xml export-ignore +/psalm.xml.dist export-ignore +/testbench.yaml export-ignore +/UPGRADING.md export-ignore +/phpstan.neon.dist export-ignore +/phpstan-baseline.neon export-ignore diff --git a/.gitignore b/.gitignore index 9f3973b..91b23b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ .idea .phpunit.result.cache .phpunit.cache -build composer.lock coverage phpunit.xml @@ -10,4 +9,4 @@ testbench.yaml vendor node_modules .phpactor.json - +build diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4c4eab1..0cc2d04 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,11 +2,11 @@ includes: - phpstan-baseline.neon parameters: - level: 4 + level: 5 paths: - src - config tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true - + noEnvCallsOutsideOfConfig: false diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2064984..8cd5597 100755 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,11 @@ - + - + tests @@ -16,6 +20,7 @@ +