Skip to content

Commit

Permalink
Merge pull request #31 from oveleon/develop
Browse files Browse the repository at this point in the history
Contao 5.1 support
  • Loading branch information
zoglo authored Aug 3, 2023
2 parents c3762d3 + ce5c246 commit 1edd85c
Show file tree
Hide file tree
Showing 68 changed files with 1,671 additions and 1,894 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Composer
/composer.lock
/vendor/

# PhpUnit
/.phpunit.result.cache
/phpunit.xml

# IDE
/.idea

# Node modules
/node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

---

> Working with **Contao 4.9** and up to **Contao 4.13** (PHP ^7.4 and PHP 8)
> Working with **Contao 4.13** and **Contao 5.1** (PHP ^8.1)
---

Expand Down
124 changes: 57 additions & 67 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,61 @@
{
"name": "oveleon/contao-glossary-bundle",
"type": "contao-bundle",
"description": "A glossary extension for the Contao Open Source CMS. Glossaries are organized in archives similar to news and events and can be displayed via a list and reader module.",
"license":"AGPL-3.0-or-later",
"authors": [
{
"name": "Fabian Ekert",
"homepage": "https://github.com/eki89"
},
{
"name": "Sebastian Zoglowek",
"homepage": "https://github.com/zoglo"
}
"name": "oveleon/contao-glossary-bundle",
"type": "contao-bundle",
"description": "A glossary extension for the Contao Open Source CMS. Glossaries are organized in archives similar to news and events and can be displayed via a list and reader module.",
"license": "AGPL-3.0-or-later",
"authors": [
{
"name": "Sebastian Zoglowek",
"homepage": "https://github.com/zoglo"
},
{
"name": "Fabian Ekert",
"homepage": "https://github.com/eki89"
}
],
"require": {
"php": "^8.1",
"ext-json": "*",
"contao/core-bundle": "^4.13 || ^5.1",
"symfony/http-foundation": "^5.4 || ^6.0",
"symfony/string": "^5.4 || ^6.0"
},
"require-dev": {
"contao/manager-plugin": "^2.3.1"
},
"conflict": {
"contao/core": "*",
"contao/manager-plugin": "<2.0 || >=3.0"
},
"autoload": {
"psr-4": {
"Oveleon\\ContaoGlossaryBundle\\": "src/"
},
"classmap": [
"contao/"
],
"require": {
"php": "^7.4 || ^8.0",
"ext-json":"*",
"contao/core-bundle": "^4.9",
"symfony/http-foundation":"4.4.* || ^5.2",
"symfony/string": "^5.4"
},
"conflict": {
"contao/core": "*",
"contao/manager-plugin": "<2.0 || >=3.0"
},
"require-dev": {
"contao/manager-plugin": "^2.3.1",
"contao/easy-coding-standard": "^3.4"
},
"extra": {
"branch-alias": {
"dev-main": "2.0.x-dev"
},
"contao-manager-plugin": "Oveleon\\ContaoGlossaryBundle\\ContaoManager\\Plugin"
},
"autoload": {
"psr-4": {
"Oveleon\\ContaoGlossaryBundle\\": "src/"
},
"classmap": [
"src/Resources/contao/"
],
"exclude-from-classmap": [
"src/Resources/contao/config/",
"src/Resources/contao/dca/",
"src/Resources/contao/languages/",
"src/Resources/contao/templates/"
]
},
"autoload-dev": {
"psr-4": {
"Contao\\ContaoGlossaryBundle\\Tests\\": "tests/"
}
},
"support": {
"issues": "https://github.com/oveleon/contao-glossary-bundle/issues",
"source": "https://github.com/oveleon/contao-glossary-bundle"
},
"scripts": {
"cs-fixer": [
"vendor/bin/ecs check src/ --fix --ansi"
]
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
"exclude-from-classmap": [
"contao/config/",
"contao/dca/",
"contao/languages/",
"contao/templates/"
]
},
"extra": {
"branch-alias": {
"dev-main": "2.2.x-dev"
},
"contao-manager-plugin": "Oveleon\\ContaoGlossaryBundle\\ContaoManager\\Plugin"
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"contao/manager-plugin": true
}
},
"support": {
"issues": "https://github.com/oveleon/contao-glossary-bundle/issues",
"source": "https://github.com/oveleon/contao-glossary-bundle"
}
}
22 changes: 22 additions & 0 deletions config/listener.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:
contao_glossary.listener.generate_page:
class: Oveleon\ContaoGlossaryBundle\EventListener\GeneratePageListener
arguments:
- '@contao.framework'
tags:
- { name: contao.hook, hook: generatePage }
public: true

contao_glossary.listener.insert_tags:
class: Oveleon\ContaoGlossaryBundle\EventListener\InsertTagsListener
arguments:
- '@contao.framework'
tags:
- { name: contao.hook, hook: replaceInsertTags }
public: true

contao_glossary.listener.breadcrumb:
class: Oveleon\ContaoGlossaryBundle\EventListener\BreadcrumbListener
tags:
- { name: contao.hook, hook: generateBreadcrumb }
public: true
3 changes: 3 additions & 0 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
glossary:
resource: '../src/Controller'
type: annotation
32 changes: 32 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: true

Oveleon\ContaoGlossaryBundle\:
resource: '../src/'
exclude: '../src/{Model,DependencyInjection,Resources}'

Oveleon\ContaoGlossaryBundle\Controller\GlossaryController:
arguments:
- '@contao.framework'
tags:
- controller.service_arguments

contao_glossary.picker.glossary_provider:
class: Oveleon\ContaoGlossaryBundle\Picker\GlossaryPickerProvider
arguments:
- '@knp_menu.factory'
- '@router'
- '@?translator'
- '@security.helper'
tags:
- { name: contao.picker_provider, priority: 0 }

contao_glossary.listener.sitemap:
class: Oveleon\ContaoGlossaryBundle\EventListener\SitemapListener
arguments:
- '@contao.framework'
tags:
- kernel.event_listener
Loading

0 comments on commit 1edd85c

Please sign in to comment.