Skip to content

Commit

Permalink
Merge branch 'release/1.4.6' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Oct 8, 2024
2 parents e9c0b1c + 5645d9e commit 4238622
Show file tree
Hide file tree
Showing 24 changed files with 3,107 additions and 809 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Code Analysis

on:
pull_request: null
push:
branches:
- develop
workflow_dispatch:
permissions:
contents: read
jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
-
name: 'PHPStan'
run: composer phpstan
-
name: 'Coding Standards'
run: composer fix-cs
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: 'ctype,curl,dom,iconv,imagick,intl,json,mbstring,openssl,pcre,pdo,reflection,spl,zip'
ini-values: post_max_size=256M, max_execution_time=180, memory_limit=512M
tools: composer:v2
- name: Install Composer dependencies
run: composer install --no-interaction --no-ansi --no-progress
- run: ${{ matrix.actions.run }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Recipe Changelog

## 1.4.6 - 2024.10.08
### Added
* Add `phpstan` and `ecs` code linting
* Add `code-analysis.yaml` GitHub action

## 1.4.5 - 2024.01.14
### Added
* Automate release generation via GitHub action
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
The MIT License (MIT)
Copyright (c) 2017 nystudio107
Copyright (c) nystudio107

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
MAJOR_VERSION?=3
PLUGINDEV_PROJECT_DIR?=/Users/andrew/webdev/sites/plugindev/cms_v${MAJOR_VERSION}/
VENDOR?=nystudio107
PROJECT_PATH?=${VENDOR}/$(shell basename $(CURDIR))

.PHONY: dev docs release

# Start up the buildchain dev server
dev:
# Start up the docs dev server
docs:
${MAKE} -C docs/ dev
# Run code quality tools, tests, and build the buildchain & docs in preparation for a release
release: --code-quality --code-tests --buildchain-clean-build --docs-clean-build
# The internal targets used by the dev & release targets
--buildchain-clean-build:
--code-quality:
${MAKE} -C ${PLUGINDEV_PROJECT_DIR} -- ecs check vendor/${PROJECT_PATH}/src --fix
${MAKE} -C ${PLUGINDEV_PROJECT_DIR} -- phpstan analyze -c vendor/${PROJECT_PATH}/phpstan.neon
--code-tests:
--docs-clean-build:
${MAKE} -C docs/ clean
${MAKE} -C docs/ image-build
${MAKE} -C docs/ fix
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ To install Recipe, follow these steps:

You can also install Recipe via the **Plugin Store** in the Craft AdminCP.

Recipe works on Craft 3.x.

## Documentation

Click here -> [Recipe Documentation](https://nystudio107.com/plugins/recipe/documentation)
Expand Down
14 changes: 13 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-recipe",
"description": "A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support",
"type": "craft-plugin",
"version": "1.4.5",
"version": "1.4.6",
"keywords": [
"craft",
"cms",
Expand All @@ -25,6 +25,18 @@
"require": {
"craftcms/cms": "^3.0.0"
},
"require-dev": {
"craftcms/ecs": "dev-main",
"craftcms/feed-me": "^4.0.0",
"craftcms/phpstan": "dev-main",
"craftcms/rector": "dev-main",
"nystudio107/craft-seomatic": "^3.0.0"
},
"scripts": {
"phpstan": "phpstan --ansi --memory-limit=1G",
"check-cs": "ecs check --ansi",
"fix-cs": "ecs check --fix --ansi"
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
Expand Down
5 changes: 4 additions & 1 deletion docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export default defineConfig({
algolia: {
appId: 'ANVOBU7GYX',
apiKey: '66d1888afb505fa3d1b0342a487706ff',
indexName: 'recipe'
indexName: 'recipe',
searchParameters: {
facetFilters: ["version:v3"],
},
},
lastUpdatedText: 'Last Updated',
sidebar: [],
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/badges/quality-score.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/?branch=v1) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/badges/coverage.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/?branch=v1) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/badges/build.png?b=v1)](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/build-status/v1) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-recipe/badges/code-intelligence.svg?b=v1)](https://scrutinizer-ci.com/code-intelligence)

# Recipe plugin for Craft CMS
# Recipe plugin for Craft CMS 3.x

A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support

Check warning on line 5 in docs/docs/index.md

View workflow job for this annotation

GitHub Actions / build (20.x)

"portion" is wordy or unneeded

Expand All @@ -10,7 +10,7 @@ Related: [Recipe for Craft 2.x](https://github.com/nystudio107/recipe)

## Requirements

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

## Installation

Expand Down Expand Up @@ -169,7 +169,7 @@ To do any further manipulation of the Recipe Image (perhaps a transform) you can

The Recipe field conceptually encompasses a single recipe. However, if you require multiple components in a recipe you can still use Recipe.

An example of a multiple component recipe might be a dish that requires a sauce that's prepared separately from the main dish.
An example of a multiple component recipe might be a dish that requires a sauce thats prepared separately from the main dish.

What you can do is create a Matrix field that contains a Recipe field.

Expand Down
Loading

0 comments on commit 4238622

Please sign in to comment.