Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Statamic 5 #23

Merged
merged 9 commits into from
Apr 27, 2024
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
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:

strategy:
matrix:
php: [8.3, 8.2, 8.1]
laravel: [10.*]
statamic: [^4.0]
testbench: [8.*]
php: [8.3, 8.2]
laravel: [11.*, 10.*]
statamic: [^5.0]
os: [ubuntu-latest]

name: ${{ matrix.php }} - ${{ matrix.statamic }} - ${{ matrix.laravel }}
Expand All @@ -33,7 +32,7 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "statamic/cms:${{ matrix.statamic }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "statamic/cms:${{ matrix.statamic }}" --no-interaction --no-update
composer install --no-interaction

- name: Run PHPUnit
Expand Down
90 changes: 5 additions & 85 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,10 @@
# Changelog

## Unreleased

## v3.1.2 (2023-09-10)

### What's improved

* Multi-site is now actually supported! #21 by @martyf

## v3.1.1 (2023-07-09)

### What's fixed

* Fixed utility not being registered properly #20

## v3.1.0 (2023-06-13)

### What's new

* Added back PHP 8.1 support #19

## v3.0.0 (2023-04-28)
## v4.0.0 (2024-xx-xx)

### What's new
* Statamic 5 support #23 by @duncanmcclean

- Static Cache Manager v3 now supports Statamic 4 #16

### Upgrade guide

1. In your site's `composer.json` file, replace `doublethreedigital/static-cache-manager` with `duncanmcclean/static-cache-manager`
2. Then, change the addon's version constraint to `^3.0`

## v2.1.0 (2023-01-28)

### What's new

- Statamic 3.4 Support

## v2.0.0 (2022-12-29)

The supported versions of PHP/Statamic/Laravel used alongside this addon have changed, the supported versions are now:

- PHP 8.1 & 8.2
- Statamic 3.3
- Laravel 9

## v1.2.1 (2022-03-08)

### What's improved

- Finally added an icon to the utility
- Made the textbox work a little bit better for smaller screen sizes

## v1.2.0 (2022-02-26)

### What's new

- Statamic 3.3 support

### Breaking changes

- Dropped support for Statamic 3.0 and Statamic 3.1

## v1.1.1 (2022-02-23)

### What's fixed

- Versions of a page with query parameters will now actually get cleared #10 #12 by @duncanmcclean

## v1.1.0 (2022-01-21)

### What's fixed

- When you enter a path, you couldn't previously start it with a `/` or it wouldn't do anything #8 #9
- If you were wanting to clear a cached file like `whats-on_.html`, entering `whats-on` wouldn't do anything because it would look for the wrong path (`whats-on`, instead of `whats-on_.html`) #9

## v1.0.1 (2021-08-19)

### What's new

- Support for [Statamic 3.2](https://statamic.com/blog/statamic-3.2-beta)

## v1.0.0 (2021-04-05)

- Initial release

```

```
### What's changed
* Dropped PHP 8.1 support
* Dropped Statamic 4 support
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
}
},
"require": {
"php": "^8.1",
"statamic/cms": "^4.0"
"php": "^8.2",
"statamic/cms": "^5.0"
},
"require-dev": {
"nunomaduro/collision": "^6.1",
"orchestra/testbench": "^7.0"
"orchestra/testbench": "^8.0 || ^9.0"
},
"scripts": {
"lint": [
Expand Down
50 changes: 3 additions & 47 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,9 @@
namespace DuncanMcClean\StaticCacheManager\Tests;

use DuncanMcClean\StaticCacheManager\ServiceProvider;
use Orchestra\Testbench\TestCase as OrchestraTestCase;
use Statamic\Extend\Manifest;
use Statamic\Providers\StatamicServiceProvider;
use Statamic\Statamic;
use Statamic\Testing\AddonTestCase;

abstract class TestCase extends OrchestraTestCase
abstract class TestCase extends AddonTestCase
{
protected function getPackageProviders($app)
{
return [
StatamicServiceProvider::class,
ServiceProvider::class,
];
}

protected function getPackageAliases($app)
{
return [
'Statamic' => Statamic::class,
];
}

protected function getEnvironmentSetUp($app)
{
parent::getEnvironmentSetUp($app);

$app->make(Manifest::class)->manifest = [
'duncanmcclean/static-cache-manager' => [
'id' => 'duncanmcclean/static-cache-manager',
'namespace' => 'DuncanMcClean\\StaticCacheManager\\',
],
];
}

protected function resolveApplicationConfiguration($app)
{
parent::resolveApplicationConfiguration($app);

$configs = [
'assets', 'cp', 'forms', 'static_caching',
'sites', 'stache', 'system', 'users',
];

foreach ($configs as $config) {
$app['config']->set("statamic.$config", require(__DIR__."/../vendor/statamic/cms/config/{$config}.php"));
}

$app['config']->set('statamic.users.repository', 'file');
}
protected string $addonServiceProvider = ServiceProvider::class;
}
Loading