Skip to content

Commit

Permalink
feat: Update for Craft 5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Apr 27, 2024
1 parent af01a4d commit 7688e6d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 37 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: /twig-profiler/v4/
DOCS_DEST_DIR: /twig-profiler/
on:
push:
branches:
- v4
- v5
paths:
- 'docs/**'
pull_request:
branches:
- v4
- v5
paths:
- 'docs/**'
workflow_dispatch:
Expand Down
15 changes: 2 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

All notable changes to this project will be documented in this file.

## 4.0.0 - UNRELEASED
## 5.0.0 - UNRELEASED
### Added
* Added `ServicesTrait` for the plugin service component registration
* Add `phpstan` and `ecs` code linting
* Add `code-analysis.yaml` GitHub action

### Changed
* Updated docs to use node 20 & a new sitemap plugin
* PHPstan code cleanup
* ECS code cleanup

## 4.0.0-beta.1 - 2022.03.14
### Added
* Initial Craft CMS 4 compatibility
* Stable release for Craft CMS 5
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-twigprofiler/badges/quality-score.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v4) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/coverage.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v4) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/build.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/build-status/v4) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/code-intelligence.svg?b=v4)](https://scrutinizer-ci.com/code-intelligence)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/quality-score.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v5) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/coverage.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v5) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/build.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/build-status/v5) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/code-intelligence.svg?b=v5)](https://scrutinizer-ci.com/code-intelligence)

# Twig Profiler plugin for Craft CMS 4.x
# Twig Profiler plugin for Craft CMS 5.x

Twig Profiler allows you to profile sections of your Twig templates, and see the resulting timings in the Yii2 Debug Toolbar

![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
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-twigprofiler",
"description": "Twig Profiler allows you to profile sections of your Twig templates, and see the resulting timings in the Yii2 Debug Toolbar",
"type": "craft-plugin",
"version": "4.0.0",
"version": "5.0.0",
"keywords": [
"craft",
"cms",
Expand All @@ -23,7 +23,8 @@
}
],
"require": {
"craftcms/cms": "^4.0.0"
"php": "^8.2",
"craftcms/cms": "^5.0.0"
},
"require-dev": {
"craftcms/ecs": "dev-main",
Expand All @@ -43,11 +44,6 @@
"optimize-autoloader": true,
"sort-packages": true
},
"autoload": {
"psr-4": {
"nystudio107\\minify\\": "src/"
}
},
"autoload": {
"psr-4": {
"nystudio107\\twigprofiler\\": "src/"
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/twig-profiler/v4
DOCS_DEST?=../../../sites/nystudio107/web/docs/twig-profiler
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: 'Twig Profiler Plugin',
description: 'Documentation for the Twig Profiler plugin',
base: '/docs/twig-profiler/v4/',
base: '/docs/twig-profiler/v5/',
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-twigprofiler/edit/develop-v4/docs/docs/:path',
pattern: 'https://github.com/nystudio107/craft-twigprofiler/edit/develop-v5/docs/docs/:path',
text: 'Edit this page on GitHub'
},
algolia: {
appId: 'V60OC8MPVK',
apiKey: 'f0f7f91f8388d5b8d8c7f78dbcc4ea97',
indexName: 'nystudio107-twig-profiler',
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/twig-profiler/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-twigprofiler/issues'},
{
text: 'v4', items: [
{text: 'v5', link: 'https://nystudio107.com/docs/twig-profiler/'},
{text: 'v4', link: '/'},
text: 'v5', items: [
{text: 'v5', link: '/'},
{text: 'v4', link: 'https://nystudio107.com/docs/twig-profiler/v4/'},
{text: 'v1', link: 'https://nystudio107.com/docs/twig-profiler/v1/'},
],
},
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.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-twigprofiler/badges/quality-score.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v4) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/coverage.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v4) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/build.png?b=v4)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/build-status/v4) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/code-intelligence.svg?b=v4)](https://scrutinizer-ci.com/code-intelligence)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/quality-score.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v5) [![Code Coverage](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/coverage.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/?branch=v5) [![Build Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/build.png?b=v5)](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/build-status/v5) [![Code Intelligence Status](https://scrutinizer-ci.com/g/nystudio107/craft-twigprofiler/badges/code-intelligence.svg?b=v5)](https://scrutinizer-ci.com/code-intelligence)

# Twig Profiler plugin for Craft CMS 4.x
# Twig Profiler plugin for Craft CMS 5.x

Twig Profiler allows you to profile sections of your Twig templates, and see the resulting timings in the Yii2 Debug Toolbar

![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 7688e6d

Please sign in to comment.