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
40 changes: 33 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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" ]

Comment on lines +14 to +26

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

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

This repo doesn't appear to contain a package.json/yarn.lock/pnpm lockfile, so a Dependabot package-ecosystem: "npm" entry targeting directory: "/" will fail and repeatedly report configuration errors. Remove the npm update block or point it at the directory that actually contains the Node manifest(s).

Suggested change
- 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" ]

Copilot uses AI. Check for mistakes.
- 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" ]
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
Comment on lines +1 to +5

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

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

CONTRIBUTING.md already exists under .github/CONTRIBUTING.md with the same content; adding a second copy at the repository root increases the chance the two drift over time and creates ambiguity about which one contributors should follow. Prefer keeping a single canonical contributing guide (either the root file or the .github/ one) and remove the duplicate.

Copilot uses AI. Check for mistakes.

## 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**!
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

If you discover any security related issues, please email info@codebar.ch instead of using the issue tracker.

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

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

SECURITY.md already exists under .github/SECURITY.md with the same content; keeping both introduces duplication and the risk of the policies diverging later. Prefer keeping a single canonical security policy file (either the root file or the .github/ one) and remove the duplicate.

Suggested change
If you discover any security related issues, please email info@codebar.ch instead of using the issue tracker.
The canonical security policy for this project is maintained at `.github/SECURITY.md`.
Please refer to that file for up-to-date information on how to report security issues and our security response process.

Copilot uses AI. Check for mistakes.
7 changes: 4 additions & 3 deletions src/Traits/AuthorizationCodeGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading