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

- 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" ]
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.4.0
uses: dependabot/fetch-metadata@v2.5.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ vendor
node_modules
.phpactor.json
build
auth.json
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.

## 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.
Comment on lines +43 to +45
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The contributing guide references PSR-2, but this repo already standardizes formatting via Laravel Pint (composer format / vendor/bin/pint, and the CI workflow uses aglipanci/laravel-pint-action). Updating this section to reflect the actual formatter/standard will prevent contributors from following the wrong style guide.

Copilot uses AI. Check for mistakes.

- **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.
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Minor wording: "security related" is typically hyphenated as "security-related" in this context.

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

Copilot uses AI. Check for mistakes.
13 changes: 8 additions & 5 deletions tests/ImageFieldTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use CodebarAg\FlysystemCloudinaryNova\CloudinaryImage;
use Laravel\Nova\Fields\Image;

beforeEach(function () {
config([
'filesystems.disks.cloudinary' => [
Expand All @@ -15,25 +18,25 @@
});

it('extends nova image', function () {
$field = CodebarAg\FlysystemCloudinaryNova\CloudinaryImage::make('Image');
$field = CloudinaryImage::make('Image');

expect($field)->toBeInstanceOf(Laravel\Nova\Fields\Image::class);
expect($field)->toBeInstanceOf(Image::class);
});

it('throws an exception if cloudinary disk is not configured', function () {
config([
'filesystems.disks.cloudinary' => [],
]);

CodebarAg\FlysystemCloudinaryNova\CloudinaryImage::make('Image');
CloudinaryImage::make('Image');
})->throws(Exception::class, 'Cloudinary disk is not configured.');

it('does not throw an exception if cloudinary disk is configured', function () {
CodebarAg\FlysystemCloudinaryNova\CloudinaryImage::make('Image');
CloudinaryImage::make('Image');
})->throwsNoExceptions();

it('has the disk configured to cloudinary', function () {
$field = CodebarAg\FlysystemCloudinaryNova\CloudinaryImage::make('Image');
$field = CloudinaryImage::make('Image');

expect($field->disk)->toBe('cloudinary');
});
Loading