Skip to content

Commit

Permalink
Merge branch 'release/5.0.0' into v5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Apr 13, 2024
2 parents 596308b + e2a36d5 commit a763fa6
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 118 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /empty-coalesce/v4/
DOCS_DEST_DIR: /empty-coalesce/
on:
push:
branches:
- v4
- v5
paths:
- 'docs/**'
pull_request:
branches:
- v4
- v5
paths:
- 'docs/**'
workflow_dispatch:
Expand Down
40 changes: 2 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
# Empty Coalesce Changelog

## 4.0.0 - 2022.08.04
## 5.0.0 - 2024.04.13
### Added
* Initial Craft CMS 4 release

## 4.0.0-beta.1 - 2022.03.12

### Added

* Initial Craft CMS 4 compatibility

## 1.0.6 - 2019-05-23
### Changed
* Remove the pointless `Twig_Node_Expression_EmptyCoalesce` class

## 1.0.5 - 2019-04-30
### Changed
* Updated Twig namespacing to be compliant with deprecated class aliases in 2.7.x
* Use Twig's `twig_test_empty()` instead of PHP's `empty()`

## 1.0.4 - 2018-12-20
### Changed
* Fixed namespacing/comments
* Fixed tests

## 1.0.3 - 2018-12-18
### Changed
* Refactored the node parser to handle all undefined values appropriately

## 1.0.2 - 2018-10-04
### Changed
* Fixed an issue where if the first expression was a constant, the evaluation wouldn't work as expected

## 1.0.1 - 2018-09-21
### Changed
* Fixed broken documentation URLs

## 1.0.0 - 2018-06-04
### Added
- Initial release
* Initial Craft CMS 5 release
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-emptycoalesce",
"description": "Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty.",
"type": "craft-plugin",
"version": "4.0.0",
"version": "5.0.0",
"keywords": [
"craftcms",
"craft-plugin",
Expand All @@ -26,7 +26,8 @@
}
],
"require": {
"craftcms/cms": "^4.0.0"
"php": "^8.2",
"craftcms/cms": "^5.0.0"
},
"require-dev": {
"craftcms/ecs": "dev-main",
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MAJOR_VERSION?=4
MAJOR_VERSION?=5
TAG?=20-alpine
CONTAINER?=$(shell basename $(dir $(CURDIR)))-v${MAJOR_VERSION}-docs
DOCS_DEV_PORT?=400${MAJOR_VERSION}
DOCS_DEST?=../../../sites/nystudio107/web/docs/empty-coalesce/v4
DOCS_DEST?=../../../sites/nystudio107/web/docs/empty-coalesce/
IMAGE_INFO=$(shell docker image inspect $(CONTAINER):$(TAG))
IMAGE_NAME=${CONTAINER}:${TAG}
DOCKER_RUN=docker container run --rm -it -v "${CURDIR}":/app
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineConfig} from 'vitepress'
export default defineConfig({
title: 'Empty Coalesce Plugin',
description: 'Documentation for the Empty Coalesce plugin',
base: '/docs/empty-coalesce/v4/',
base: '/docs/empty-coalesce/',
lang: 'en-US',
head: [
['meta', {content: 'https://github.com/nystudio107', property: 'og:see_also',}],
Expand All @@ -18,15 +18,15 @@ export default defineConfig({
],
logo: '/img/plugin-logo.svg',
editLink: {
pattern: 'https://github.com/nystudio107/craft-emptycoalesce/edit/develop-v4/docs/docs/:path',
pattern: 'https://github.com/nystudio107/craft-emptycoalesce/edit/develop-v5/docs/docs/:path',
text: 'Edit this page on GitHub'
},
algolia: {
appId: 'L15LEW8LWP',
apiKey: '39198fa2e54d3da8c644d9cd241cff5a',
indexName: 'nystudio107-empty-coalesce',
searchParameters: {
facetFilters: ["version:v4"],
facetFilters: ["version:v5"],
},
},
lastUpdatedText: 'Last Updated',
Expand All @@ -37,9 +37,9 @@ export default defineConfig({
{text: 'Changelog', link: 'https://nystudio107.com/plugins/empty-coalesce/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-empty-coalesce/issues'},
{
text: 'v4', items: [
{text: 'v5', link: 'https://nystudio107.com/docs/empty-coalesce/'},
{text: 'v4', link: '/'},
text: 'v5', items: [
{text: 'v5', link: '/'},
{text: 'v4', link: 'https://nystudio107.com/docs/empty-coalesce/v4/'},
{text: 'v1', link: 'https://nystudio107.com/docs/empty-coalesce/v1/'},
],
},
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/quality-score.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v4) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/coverage.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v4) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/build.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/build-status/v4) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/code-intelligence.svg?b=v4)](https://scrutinizer-ci.com/code-intelligence)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/quality-score.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v5) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/coverage.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v5) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/build.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/build-status/v5) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/badges/code-intelligence.svg?b=v5)](https://scrutinizer-ci.com/code-intelligence)

# Empty Coalesce plugin for Craft CMS

Expand All @@ -8,7 +8,7 @@ Empty Coalesce adds the ??? operator to Twig that will return the first thing th

## Requirements

This plugin requires Craft CMS 4.0.0 or later.
This plugin requires Craft CMS 5.0.0 or later.

## Installation

Expand Down Expand Up @@ -80,7 +80,7 @@ Using the Empty Coalescing operator is simple; you can chain together as many va
```twig
{% set choice = thingOne ??? thingTwo ??? thingThree ??? thingFour %}
```
The first thing that is defined, not null, and not empty will be what `choise` is set to. If _nothing_ meets that criteria, then `choice` is set to `null`. For example:
The first thing that is defined, not null, and not empty will be what `choice` is set to. If _nothing_ meets that criteria, then `choice` is set to `null`. For example:

```twig
{% set bar = null %}
Expand Down
Loading

0 comments on commit a763fa6

Please sign in to comment.