Skip to content

Commit

Permalink
feat: Update for v5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 19, 2025
1 parent c548693 commit d2f0c1f
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 72 deletions.
1 change: 0 additions & 1 deletion .craftplugin

This file was deleted.

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: /units/v4/
DOCS_DEST_DIR: /units/
on:
push:
branches:
- v4
- v5
paths:
- 'docs/**'
pull_request:
branches:
- v4
- v5
paths:
- 'docs/**'
workflow_dispatch:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request: null
push:
branches:
- develop-v4
- develop-v5
workflow_dispatch:
permissions:
contents: read
Expand All @@ -14,11 +14,9 @@ jobs:
fail-fast: false
matrix:
actions:
-
name: 'PHPStan'
- name: 'PHPStan'
run: composer phpstan
-
name: 'Coding Standards'
- name: 'Coding Standards'
run: composer fix-cs
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
Expand Down
46 changes: 2 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
# Units Changelog

## 4.0.2 - UNRELEASED
## 5.0.0 - UNRELEASED
### Added
* Add `ecs` and `phpstan` code quality tools

## 4.0.1 - 2023.04.24
### Changed
* Updated the docs to use VitePress `^1.0.0-alpha.29`
* Allow for versioning of the docs

### Fixed
* Fixed an issue that through a Typed Property Error exception when creating a Units field ([#41](https://github.com/nystudio107/craft-units/issues/41))
* Add `allow-plugins` to `composer.json` to fix CI

## 4.0.0 - 2022.05.17
### Added
* Initial Craft CMS 4 release

### Fixed
* Fixed an issue that would cause the field type to be unusable if you were running PHP 8 or later, due to additions in the token parser in PHP 8 ([#40](https://github.com/nystudio107/craft-units/issues/40))

## 4.0.0-beta.1 - 2022.03.17

### Added

* Initial Craft CMS 4 compatibility

## 1.0.4 - 2020-10-27
### Fixed
- Fixed Composer 2 compatibility

## 1.0.3 - 2018-05-16
### Changed
- Handle incoming numeric values from a converted Number field type

## 1.0.2 - 2018-05-14
### Changed
- Handle cases where there is no `min` or `max` properly in the validator

## 1.0.1 - 2018-05-14
### Changed
- Added null checks in the Field's `init()` method

## 1.0.0 - 2018-05-12
### Added
- Initial release
* Initial Craft CMS 5 release
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAJOR_VERSION?=4
MAJOR_VERSION?=5
PLUGINDEV_PROJECT_DIR?=/Users/andrew/webdev/sites/plugindev/cms_v${MAJOR_VERSION}/
VENDOR?=nystudio107
PROJECT_PATH?=${VENDOR}/$(shell basename $(CURDIR))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/quality-score.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v4) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/coverage.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v4) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/build.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/build-status/v4) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/code-intelligence.svg?b=v4)](https://scrutinizer-ci.com/code-intelligence)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/quality-score.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v5) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/coverage.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v5) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/build.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/build-status/v5) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/code-intelligence.svg?b=v5)](https://scrutinizer-ci.com/code-intelligence)

# Units plugin for Craft CMS 4.x
# Units plugin for Craft CMS 5.x

Units is a plugin that can convert between any units of measure, and comes with a Field for content authors to use.

![Screenshot](./docs/docs/resources/img/plugin-logo.png)

## Requirements

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

## Installation

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-units",
"description": "Units is a plugin that can convert between any units of measure, and comes with a Field for content authors to use",
"type": "craft-plugin",
"version": "4.0.2",
"version": "5.0.0",
"keywords": [
"craft",
"cms",
Expand All @@ -16,7 +16,7 @@
"support": {
"docs": "https://nystudio107.com/docs/units/",
"issues": "https://nystudio107.com/plugins/units/support",
"source": "https://github.com/nystudio107/craft-typogrify"
"source": "https://github.com/nystudio107/craft-units"
},
"license": "MIT",
"authors": [
Expand All @@ -26,7 +26,7 @@
}
],
"require": {
"craftcms/cms": "^4.0.0",
"craftcms/cms": "^5.0.0",
"php-units-of-measure/php-units-of-measure": "^2.1.0"
},
"require-dev": {
Expand All @@ -46,7 +46,7 @@
},
"optimize-autoloader": true,
"platform": {
"php": "8.0.2"
"php": "8.2"
},
"platform-check": false,
"sort-packages": true
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/units/v4
DOCS_DEST?=../../../sites/nystudio107/web/docs/units
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: 'Units Plugin',
description: 'Documentation for the Units plugin',
base: '/docs/units/v4/',
base: '/docs/units/',
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-units/edit/develop-v4/docs/docs/:path',
pattern: 'https://github.com/nystudio107/craft-units/edit/develop-v5/docs/docs/:path',
text: 'Edit this page on GitHub'
},
algolia: {
appId: 'TVGT09IBL5',
apiKey: 'd2d2de61619265d05d80bf26ad24f9b4',
indexName: 'nystudio107-units',
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/units/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-units/issues'},
{
text: 'v4', items: [
{text: 'v5', link: 'https://nystudio107.com/docs/units/'},
{text: 'v4', link: '/'},
text: '54', items: [
{text: 'v5', link: '/'},
{text: 'v4', link: 'https://nystudio107.com/docs/units/v4/'},
{text: 'v1', link: 'https://nystudio107.com/docs/units/v1/'},
],
},
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/quality-score.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v4) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/coverage.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v4) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/build.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-units/build-status/v4) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/code-intelligence.svg?b=v4)](https://scrutinizer-ci.com/code-intelligence)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/quality-score.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v5) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/coverage.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/?branch=v5) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/build.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-units/build-status/v5) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-units/badges/code-intelligence.svg?b=v5)](https://scrutinizer-ci.com/code-intelligence)

<!-- textlint-disable en-capitalization -->

# Units plugin for Craft CMS 4.x
# Units plugin for Craft CMS 5.x

Units is a plugin that can convert between any units of measure, and comes with a Field for content authors to use.

![Screenshot](./resources/img/plugin-logo.png)

## Requirements

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

## Installation

Expand Down

0 comments on commit d2f0c1f

Please sign in to comment.