From 164259e93a833f2af8255cde7bc8194780418244 Mon Sep 17 00:00:00 2001 From: Sebastian Fix Date: Fri, 20 Mar 2026 07:17:13 +0100 Subject: [PATCH 1/2] Bumped dependencies --- .github/dependabot.yml | 40 ++++++++++++++++++++++++------ CONTRIBUTING.md | 55 ++++++++++++++++++++++++++++++++++++++++++ SECURITY.md | 3 +++ 3 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0bc378d..9ac6a65 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,38 @@ -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" - labels: - - "dependencies" + interval: "daily" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + groups: + minor-and-patch: + update-types: [ "minor", "patch" ] + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + allow: + - dependency-type: "direct" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + groups: + minor-and-patch: + update-types: [ "minor", "patch" ] + + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "daily" + allow: + - dependency-type: "direct" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + groups: + minor-and-patch: + update-types: [ "minor", "patch" ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b4ae1c4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contributing + +Contributions are **welcome** and will be fully **credited**. + +Please read and understand the contribution guide before creating an issue or pull request. + +## Etiquette + +This project is open source, and as such, the maintainers give their free time to build and maintain the source code +held within. They make the code freely available in the hope that it will be of use to other developers. It would be +extremely unfair for them to suffer abuse or anger for their hard work. + +Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the +world that developers are civilized and selfless people. + +It's the duty of the maintainer to ensure that all submissions to the project are of sufficient +quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. + +## Viability + +When requesting or submitting new features, first consider whether it might be useful to others. Open +source projects are used by many developers, who may have entirely different needs to your own. Think about +whether or not your feature is likely to be used by other users of the project. + +## Procedure + +Before filing an issue: + +- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. +- Check to make sure your feature suggestion isn't already present within the project. +- Check the pull requests tab to ensure that the bug doesn't have a fix in progress. +- Check the pull requests tab to ensure that the feature isn't already in progress. + +Before submitting a pull request: + +- Check the codebase to ensure that your feature doesn't already exist. +- Check the pull requests to ensure that another person hasn't already submitted the feature or fix. + +## Requirements + +If the project maintainer has any additional requirements, you will find them listed here. + +- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). + +- **Add tests!** - Your patch won't be accepted if it doesn't have tests. + +- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. + +- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. + +- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. + +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. + +**Happy coding**! diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..dd923a2 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy + +If you discover any security related issues, please email info@codebar.ch instead of using the issue tracker. From 45bc105a3d0e409cdd5b1a4e1577e647589a563f Mon Sep 17 00:00:00 2001 From: Sebastian Fix Date: Fri, 20 Mar 2026 08:05:41 +0100 Subject: [PATCH 2/2] chore: fix code style with Laravel Pint --- src/Traits/AuthorizationCodeGrant.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Traits/AuthorizationCodeGrant.php b/src/Traits/AuthorizationCodeGrant.php index 6067b46..4713c54 100755 --- a/src/Traits/AuthorizationCodeGrant.php +++ b/src/Traits/AuthorizationCodeGrant.php @@ -4,6 +4,7 @@ namespace CodebarAg\LaravelInstagram\Traits; +use CodebarAg\LaravelInstagram\Requests\Authentication\GetAccessTokenRequest; use CodebarAg\LaravelInstagram\Requests\Authentication\GetRefreshAccessTokenRequest; use CodebarAg\LaravelInstagram\Requests\Authentication\GetShortLivedAccessTokenRequest; use DateInterval; @@ -74,7 +75,7 @@ public function getAuthorizationUrl(array $scopes = [], ?string $state = null, s * * @param callable(TRequest): (void)|null $requestModifier * - * @throws \Saloon\Exceptions\InvalidStateException + * @throws InvalidStateException */ public function getAccessToken(string $code, ?string $state = null, ?string $expectedState = null, bool $returnResponse = false, ?callable $requestModifier = null): OAuthAuthenticator|Response { @@ -110,7 +111,7 @@ public function getAccessToken(string $code, ?string $state = null, ?string $exp * * @param callable(TRequest): (void)|null $requestModifier * - * @throws \Saloon\Exceptions\InvalidStateException + * @throws InvalidStateException * @throws OAuthConfigValidationException */ public function getShortLivedAccessToken(string $code, ?string $state = null, ?string $expectedState = null, bool $returnResponse = false, ?callable $requestModifier = null): OAuthAuthenticator|Response @@ -244,7 +245,7 @@ protected function resolveUserRequest(OAuthConfig $oauthConfig): Request protected function resolveAccessTokenRequest(string $code, OAuthConfig $oauthConfig): Request { - return new \CodebarAg\LaravelInstagram\Requests\Authentication\GetAccessTokenRequest($code, $oauthConfig); + return new GetAccessTokenRequest($code, $oauthConfig); } protected function resolveShortLivedAccessTokenRequest(string $code, OAuthConfig $oauthConfig): Request