Skip to content

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Apr 8, 2024
1 parent dba5cd2 commit 38ce5c8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 47 deletions.
1 change: 0 additions & 1 deletion .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- develop
- v3
workflow_dispatch:
permissions:
contents: read
Expand Down
21 changes: 0 additions & 21 deletions CHANGELOG-WIP.md

This file was deleted.

25 changes: 5 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# Release Notes for Sprig Core

## 3.0.0-beta.2 - 2024-03-26

### Removed

- Removed the `success` variable. Use `sprig.isSuccess` or `sprig.isError` instead.
- Removed the `flashes` variable. Use `sprig.message` or `craft.app.session.flash()` instead.
- Removed the `id` variable. Use `sprig.modelId` instead.

## 3.0.0-beta.1 - 2024-02-14
## 3.0.0 - 2024-04-08

> {warning} Template caches and static page caches should be cleared after performing this update.
### Added

- Added compatibility with Craft 5.0.0.
- Added the `sprig.isSuccess` variable.
- Added the `sprig.isError` variable.
- Added the `sprig.message` variable.
- Added the `sprig.modelId` variable.
- Added compatibility with Craft 5.

### Changed

Expand All @@ -28,9 +16,6 @@

- Removed the `sprig.script` variable.
- Removed the `s-on` attribute.

### Deprecated

- Deprecated the `success` variable. Use `sprig.isSuccess` or `sprig.isError` instead.
- Deprecated the `flashes` variable. Use `sprig.message` or `craft.app.session.flash()` instead.
- Deprecated the `id` variable. Use `sprig.modelId` instead.
- Removed the `success` variable. Use `sprig.isSuccess` or `sprig.isError` instead.
- Removed the `flashes` variable. Use `sprig.message` instead.
- Removed the `id` variable. Use `sprig.modelId` instead.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Stable Version](https://img.shields.io/packagist/v/putyourlightson/craft-sprig-core?label=stable)]((https://packagist.org/packages/putyourlightson/craft-sprig-core))
[![Total Downloads](https://img.shields.io/packagist/dt/putyourlightson/craft-sprig-core)](https://packagist.org/packages/putyourlightson/craft-sprig-core)

<p align="center"><img width="150" src="https://raw.githubusercontent.com/putyourlightson/craft-sprig-core/v3/src/icon.svg"></p>
<p align="center"><img width="150" src="https://raw.githubusercontent.com/putyourlightson/craft-sprig-core/develop/src/icon.svg"></p>

# Sprig Core Module for Craft CMS

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "putyourlightson/craft-sprig-core",
"description": "A reactive Twig component framework for Craft.",
"version": "3.0.0-beta.2",
"version": "3.0.0",
"type": "craft-module",
"license": "mit",
"require": {
"php": "^8.2",
"craftcms/cms": "^5.0.0"
"craftcms/cms": "^5.0"
},
"require-dev": {
"craftcms/ecs": "dev-main",
"craftcms/generator": "2.0.x-dev",
"craftcms/phpstan": "dev-main",
"markhuot/craft-pest-core": "v3.x-dev",
"putyourlightson/craft-generate-test-spec": "v2.x-dev",
"putyourlightson/craft-sprig": "^3.0.0-beta.1",
"putyourlightson/craft-sprig": "^3.0",
"vlucas/phpdotenv": "^5.4.1"
},
"repositories": [
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/ComponentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private function runActionInternal(string $action): array
$modelId = $this->getModelId();
}

$message = $success ? $variables['flashes']['success'] ?? '' : $variables['flashes']['error'] ?? '';
$message = ($success ? Craft::$app->getSession()->getSuccess() : Craft::$app->getSession()->getError()) ?: '';
$this->setSessionValues($success, $message, $modelId);

return $variables;
Expand Down

0 comments on commit 38ce5c8

Please sign in to comment.