Skip to content

Commit 52c8237

Browse files
committed
Merge tag '2.2.0'
Stable release 2.2.0 This brings full Contao 4.9 support. Additionally there have been performance improvements and various bugfixes. - there is a preview of the created elements incl. type and whether visible or not in the input mask as well as in the list view
2 parents 9322de8 + 532bde9 commit 52c8237

17 files changed

Lines changed: 552 additions & 284 deletions

.check-author.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ mapping:
1212
- "adziemba <adziemba@web.de>"
1313
'Ingolf Steinhardt <info@e-spin.de>':
1414
- 'zonky <info@e-spin.de>'
15+
- 'Ingolf Steinhardt <git@e-spin.de>'

.github/workflows/diagnostics.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
php: [7.3, 7.4]
15-
contao: [~4.4.0, ~4.9.0]
14+
php: [7.4]
15+
contao: [~4.9.0]
1616

1717
steps:
1818
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Pull source

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.DS_Store
33
Thumbs.db
44

5-
# IDEs
5+
# IDEs
66
.buildpath
77
.project
88
.settings/
@@ -17,4 +17,5 @@ composer.lock
1717

1818
# build
1919
build/
20-
build.properties
20+
build.properties
21+
.phpunit.result.cache

composer.json

Lines changed: 61 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,61 @@
1-
{
2-
"name": "metamodels/attribute_contentarticle",
3-
"description": "MetaModels attribute for content article",
4-
"keywords": [
5-
"contao",
6-
"metamodels",
7-
"attribute",
8-
"article",
9-
"content element"
10-
],
11-
"type": "contao-bundle",
12-
"homepage": "http://now.metamodel.me/",
13-
"license": "LGPL-3.0-or-later",
14-
"authors": [
15-
{
16-
"name": "Andreas Dziemba",
17-
"email": "dziemba@men-at-work.de",
18-
"homepage": "http://www.men-at-work.de/",
19-
"role": "Developer"
20-
}
21-
],
22-
"support": {
23-
"email": "mail@metamodel.me",
24-
"issues": "https://github.com/MetaModels/attribute_contentarticle/issues",
25-
"wiki": "http://de.contaowiki.org/MetaModels",
26-
"irc": "irc://irc.freenode.org/contao.mm",
27-
"source": "https://github.com/MetaModels/attribute_contentarticle"
28-
},
29-
"require": {
30-
"php": "^7.1",
31-
"contao-community-alliance/dc-general": "^2.1.3",
32-
"contao/core-bundle": "^4.4.8",
33-
"metamodels/core": "^2.1.1",
34-
"symfony/dependency-injection": "^3.3 || ^4.1.12",
35-
"symfony/http-kernel": "^3.3 || ^4.0",
36-
"ext-pdo": "*"
37-
},
38-
"require-dev": {
39-
"contao/manager-plugin": "^2.1",
40-
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
41-
"phpcq/all-tasks": "^1.2"
42-
},
43-
"autoload": {
44-
"psr-4": {
45-
"MetaModels\\AttributeContentArticleBundle\\": "src/"
46-
}
47-
},
48-
"extra": {
49-
"contao-manager-plugin": "MetaModels\\AttributeContentArticleBundle\\ContaoManager\\Plugin",
50-
"branch-alias": {
51-
"dev-master": "2.1.x-dev"
52-
}
53-
}
54-
}
1+
{
2+
"name": "metamodels/attribute_contentarticle",
3+
"description": "MetaModels attribute for content article",
4+
"keywords": [
5+
"contao",
6+
"metamodels",
7+
"attribute",
8+
"article",
9+
"content element"
10+
],
11+
"type": "contao-bundle",
12+
"homepage": "https://now.metamodel.me/",
13+
"license": "LGPL-3.0-or-later",
14+
"authors": [
15+
{
16+
"name": "Andreas Dziemba",
17+
"email": "dziemba@men-at-work.de",
18+
"homepage": "https://www.men-at-work.de/",
19+
"role": "Developer"
20+
}
21+
],
22+
"support": {
23+
"email": "mail@metamodel.me",
24+
"issues": "https://github.com/MetaModels/attribute_contentarticle/issues",
25+
"wiki": "https://de.contaowiki.org/MetaModels",
26+
"irc": "irc://irc.freenode.org/contao.mm",
27+
"source": "https://github.com/MetaModels/attribute_contentarticle"
28+
},
29+
"require": {
30+
"php": "^7.4",
31+
"ext-pdo": "*",
32+
"contao-community-alliance/dc-general": "^2.2",
33+
"contao/core-bundle": "^4.9.0, <4.13.0",
34+
"metamodels/core": "^2.2",
35+
"symfony/dependency-injection": "^4.4.6",
36+
"symfony/http-kernel": "~4.4.13"
37+
},
38+
"require-dev": {
39+
"contao/manager-plugin": "^2.1",
40+
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
41+
"phpcq/all-tasks": "^1.2"
42+
},
43+
"autoload": {
44+
"psr-4": {
45+
"MetaModels\\AttributeContentArticleBundle\\": "src/"
46+
}
47+
},
48+
"extra": {
49+
"contao-manager-plugin": "MetaModels\\AttributeContentArticleBundle\\ContaoManager\\Plugin",
50+
"branch-alias": {
51+
"dev-feature/2.2.0": "2.2.x-dev"
52+
}
53+
},
54+
"config": {
55+
"allow-plugins": {
56+
"contao-components/installer": false,
57+
"contao/manager-plugin": false
58+
},
59+
"sort-packages": true
60+
}
61+
}

phpunit.xml.dist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.1/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
55
colors="true"
66
forceCoversAnnotation="true"
77
failOnRisky="true"
@@ -17,10 +17,10 @@
1717
<directory>./tests</directory>
1818
</testsuite>
1919
</testsuites>
20-
<filter>
21-
<whitelist>
22-
<directory>./driver</directory>
23-
<directory>./src</directory>
24-
</whitelist>
25-
</filter>
20+
<coverage>
21+
<include>
22+
<directory>./driver</directory>
23+
<directory>./src</directory>
24+
</include>
25+
</coverage>
2626
</phpunit>

src/Attribute/AttributeTypeFactory.php

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of MetaModels/attribute_contentarticle.
55
*
6-
* (c) 2012-2019 The MetaModels team.
6+
* (c) 2012-2022 The MetaModels team.
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -14,16 +14,16 @@
1414
* @subpackage AttributeContentArticle
1515
* @author Andreas Dziemba <adziemba@web.de>
1616
* @author Stefan Heimes <stefan_heimes@hotmail.com>
17-
* @copyright 2012-2019 The MetaModels team.
17+
* @author Ingolf Steinhardt <info@e-spin.de>
18+
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
19+
* @copyright 2012-2022 The MetaModels team.
1820
* @license https://github.com/MetaModels/attribute_contentarticle/blob/master/LICENSE LGPL-3.0-or-later
1921
* @filesource
2022
*/
2123

2224
namespace MetaModels\AttributeContentArticleBundle\Attribute;
2325

24-
use MetaModels\Attribute\AbstractAttributeTypeFactory;
2526
use MetaModels\Attribute\AbstractSimpleAttributeTypeFactory;
26-
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
2727
use Doctrine\DBAL\Connection;
2828
use MetaModels\Helper\TableManipulator;
2929

@@ -32,34 +32,25 @@
3232
*/
3333
class AttributeTypeFactory extends AbstractSimpleAttributeTypeFactory
3434
{
35-
/**
36-
* Event dispatcher.
37-
*
38-
* @var EventDispatcherInterface
39-
*/
40-
private $eventDispatcher;
41-
4235
/**
4336
* {@inheritDoc}
4437
*/
4538
public function __construct(
46-
EventDispatcherInterface $eventDispatcher,
4739
Connection $connection,
4840
TableManipulator $tableManipulator
4941
) {
5042
parent::__construct($connection, $tableManipulator);
5143

52-
$this->typeName = 'contentarticle';
53-
$this->typeIcon = 'bundles/metamodelsattributecontentarticle/article.png';
54-
$this->typeClass = ContentArticle::class;
55-
$this->eventDispatcher = $eventDispatcher;
44+
$this->typeName = 'contentarticle';
45+
$this->typeIcon = 'bundles/metamodelsattributecontentarticle/article.png';
46+
$this->typeClass = ContentArticle::class;
5647
}
5748

5849
/**
5950
* {@inheritDoc}
6051
*/
6152
public function createInstance($information, $metaModel)
6253
{
63-
return new $this->typeClass($metaModel, $information, $this->eventDispatcher);
54+
return new $this->typeClass($metaModel, $information);
6455
}
6556
}

0 commit comments

Comments
 (0)