Skip to content

Commit

Permalink
Feature/craft 5 update (#108)
Browse files Browse the repository at this point in the history
* Ran Rector for C5

* phpstan fixes

* Fixed version constraints

* Added phpstan config file

* Deprecated before-body-end-hook

* Comments and return type cleanup

* Updated site-picker for multisites

* Minor updates

---------

Co-authored-by: Jørgen Ellingsen <jorgenellingsen@Jrgen-sin-MacBook-Pro.local>
  • Loading branch information
jellingsen and Jørgen Ellingsen authored Apr 19, 2024
1 parent d319d4e commit 9fed4d3
Show file tree
Hide file tree
Showing 13 changed files with 220 additions and 181 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Release Notes for Cookie Consent
## 5.0.0 - 2024-04-19

### Deprecated
- before-body-end hook deprecated. Use after-body-start.

## 4.0.4 - 2022-09-30

Expand Down Expand Up @@ -206,4 +210,4 @@
## 1.0.0 - 2019-05-14

### Added
- Initial Plugin Release
- Initial Plugin Release
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ You need to add this line right after your start-body-tag in the relevant layout

`{% hook 'after-body-start' %}`

~~To give you full control over where the plugin is rendering the consent template, you need to add this line before your end-body-tag in the relevant layout file(s):~~
`{% hook 'before-body-end' %}`

**Note:** *Both hooks will work as of v1.5.0, but please do not use both. Before-body-end will likely be deprecated in a future update.*

## Activate the plugin for your site
Navigate to the plugin inside your Control Panel. If you have the correct permissions, it should be visible in the menu.

Expand Down Expand Up @@ -116,4 +111,4 @@ This object contains key-value pairs of consents and their status.
The object will be created if the default javascript file is loaded, and a form with the ID #elc-cookie-consent-form exists and has the `data-show`-attribute has the url to the consent show endpoint(/cookie-consent/show)

## Acknowledgements
Plugin Icon designed by Trinh Ho from Flaticon
Plugin Icon designed by Trinh Ho from Flaticon
19 changes: 14 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elleracompany/craft-cookie-consent",
"description": "GDPR Compliant Cookie Consent Plugin",
"version": "4.0.4",
"description": "Craft Cookie Consent Plugin",
"version": "5.0.0",
"type": "craft-plugin",
"keywords": ["cookies", "consent", "gdpr"],
"license": "proprietary",
Expand All @@ -16,20 +16,29 @@
},
"require": {
"ext-json": "*",
"craftcms/cms": "^4.0"
"craftcms/cms": "^5.0"
},
"autoload": {
"psr-4": {
"elleracompany\\cookieconsent\\": "src/"
}
},
"extra": {
"name": "GDPR Cookie Consent",
"name": "Cookie Consent",
"handle": "cookie-consent",
"documentationUrl": "https://github.com/elleracompany/craft-cookie-consent/blob/master/README.md",
"changelogUrl": "https://github.com/elleracompany/craft-cookie-consent/blob/master/CHANGELOG.md",
"class": "elleracompany\\cookieconsent\\CookieConsent"
},
"prefer-stable": true,
"minimum-stability": "dev"
"minimum-stability": "dev",
"require-dev": {
"craftcms/phpstan": "dev-main"
},
"config": {
"allow-plugins": {
"yiisoft/yii2-composer": true,
"craftcms/plugin-installer": true
}
}
}
96 changes: 92 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- vendor/craftcms/phpstan/phpstan.neon

parameters:
level: 0
paths:
- src
Loading

0 comments on commit 9fed4d3

Please sign in to comment.