Skip to content

Commit 5ac3eab

Browse files
committed
Merge tag '2.1.0'
Stable release 2.1.0 This brings full Contao 4 support. Additionally there have been performance improvements and various bugfixes.
2 parents bfc007c + 5e4f04c commit 5ac3eab

File tree

62 files changed

+1044
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1044
-327
lines changed

.check-author.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ignore:
22
- 'Mini Model <minimodel@metamodel.me>'
33

44
exclude:
5-
- /^contao\/languages/
5+
- /^src\/Resources\/contao\/languages/
66

77
mapping:
88
'Andreas Isaak <info@andreas-isaak.de>': 'Andreas Isaak <andy.jared@googlemail.com>'

.travis.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,42 @@ php:
1111
- "7.3"
1212
- "7.2"
1313
- "7.1"
14-
- "7.0"
15-
- "5.6"
1614

1715
env:
18-
- CONTAO_VERSION=~3.5.5
16+
- CONTAO_VERSION=~4.7.0
17+
- CONTAO_VERSION=~4.6.0
18+
- CONTAO_VERSION=~4.5.0
19+
- CONTAO_VERSION=~4.4.0
20+
21+
# Exclude impossible Contao Version combinations.
22+
matrix:
23+
exclude:
24+
fast_finish: true
25+
allow_failures:
26+
- env: CONTAO_VERSION=~4.7.0
27+
- env: CONTAO_VERSION=~4.6.0
28+
- env: CONTAO_VERSION=~4.5.0
1929

2030
before_script:
2131
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
2232
- travis_retry composer self-update && composer --version
23-
- travis_retry composer require contao/core $CONTAO_VERSION --no-update
33+
- travis_retry composer require contao/core-bundle $CONTAO_VERSION --no-update
2434
- >
2535
if [ "x${TRAVIS_TAG}" != "x" ]; then
2636
export COMPOSER_ROOT_VERSION=${TRAVIS_TAG}
2737
else
28-
export COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ hotfix/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \
29-
&& echo ${BASH_REMATCH[1]} \
38+
export COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ (hotfix|release)/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \
39+
&& echo ${BASH_REMATCH[2]} \
3040
|| echo dev-${TRAVIS_BRANCH})
3141
fi
3242
- echo "Using root version ${COMPOSER_ROOT_VERSION}"
33-
- travis_retry composer update --prefer-dist --no-interaction
43+
- >
44+
echo "PHP version: ${TRAVIS_PHP_VERSION}";
45+
if [ "x${TRAVIS_PHP_VERSION}" == "xnightly" ]; then
46+
travis_retry composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-suggest
47+
else
48+
travis_retry composer update --prefer-dist --no-interaction --no-suggest
49+
fi
3450
3551
script: ant -keep-going
3652

build.default.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
#####################################################
77

88
phpcs.standard=${basedir}/vendor/phpcq/coding-standard/phpcs/PhpCodeQuality/ruleset.xml
9-
phpmd.ruleset=${basedir}/vendor/phpcq/coding-standard/phpmd/ruleset.xml
9+
phpmd.ruleset=${basedir}/vendor/phpcq/coding-standard/phpmd/ruleset.xml
10+
11+
phpcs.excluded=src/Resources/contao/languages

composer.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"checkbox",
99
"nontranslatable"
1010
],
11-
"type": "contao-module",
11+
"type": "contao-bundle",
1212
"homepage": "http://now.metamodel.me/",
1313
"license": "LGPL-3.0-or-later",
1414
"authors": [
@@ -32,34 +32,35 @@
3232
"source": "https://github.com/MetaModels/attribute_checkbox"
3333
},
3434
"require": {
35-
"php": "^5.6 || ^7.0",
36-
"contao-community-alliance/composer-plugin": "^2.4",
37-
"contao-community-alliance/dc-general": "^2.0.0",
38-
"contao/core": "^3.5.5",
39-
"metamodels/core": "^2.0"
35+
"php": "^7.1",
36+
"contao-community-alliance/dc-general": "^2.1.0",
37+
"contao/core-bundle": "^4.4.8",
38+
"metamodels/core": "^2.1",
39+
"symfony/dependency-injection": "^3.3 || ^4.0",
40+
"symfony/http-kernel": "^3.3 || ^4.0"
4041
},
4142
"require-dev": {
43+
"contao/manager-plugin": "^2.1",
44+
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
4245
"phpcq/all-tasks": "^1.2"
4346
},
4447
"autoload": {
45-
"psr-0": {
46-
"MetaModels\\": "src"
47-
}
48+
"psr-4": {
49+
"MetaModels\\AttributeCheckboxBundle\\": "src"
50+
},
51+
"files": [
52+
"src/deprecated-autoload.php"
53+
]
4854
},
4955
"autoload-dev": {
50-
"psr-0": {
51-
"MetaModels\\Test\\": "tests"
56+
"psr-4": {
57+
"MetaModels\\AttributeCheckboxBundle\\Test\\": "tests/Test"
5258
}
5359
},
5460
"extra": {
55-
"contao": {
56-
"symlinks": {
57-
"contao": "system/modules/metamodelsattribute_checkbox"
58-
}
59-
},
61+
"contao-manager-plugin": "MetaModels\\AttributeCheckboxBundle\\ContaoManager\\Plugin",
6062
"branch-alias": {
61-
"dev-master": "2.0.x-dev",
62-
"dev-develop": "2.1.x-dev"
63+
"dev-master": "2.1.x-dev"
6364
}
6465
},
6566
"config": {

contao/config/autoload.ini

Lines changed: 0 additions & 7 deletions
This file was deleted.

contao/config/event_listeners.php

Lines changed: 0 additions & 86 deletions
This file was deleted.

contao/html/.htaccess

Lines changed: 0 additions & 7 deletions
This file was deleted.

ctb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"transifex": {
33
"project": "metamodels",
44
"prefix": "attribute_checkbox-",
5-
"languages_cto": "contao/languages",
5+
"languages_cto": "src/Resources/contao/languages",
66
"languages_tx": ".tx",
77
"php-file-header": [
88
"This file is part of MetaModels/attribute_checkbox.",
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
3+
/**
4+
* This file is part of MetaModels/attribute_checkbox.
5+
*
6+
* (c) 2012-2019 The MetaModels team.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*
11+
* This project is provided in good faith and hope to be usable by anyone.
12+
*
13+
* @package MetaModels/attribute_checkbox
14+
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
15+
* @author Sven Baumann <baumann.sv@gmail.com>
16+
* @author David Molineus <david.molineus@netzmacht.de>
17+
* @copyright 2012-2019 The MetaModels team.
18+
* @license https://github.com/MetaModels/attribute_checkbox/blob/master/LICENSE LGPL-3.0-or-later
19+
* @filesource
20+
*/
21+
22+
namespace MetaModels\AttributeCheckboxBundle\Attribute;
23+
24+
use Doctrine\DBAL\Connection;
25+
use MetaModels\Attribute\IAttributeTypeFactory;
26+
use MetaModels\Helper\TableManipulator;
27+
28+
/**
29+
* Attribute type factory for checkbox attributes.
30+
*/
31+
class AttributeTypeFactory implements IAttributeTypeFactory
32+
{
33+
/**
34+
* The database connection.
35+
*
36+
* @var Connection
37+
*/
38+
private $connection;
39+
40+
/**
41+
* The table manipulator.
42+
*
43+
* @var TableManipulator
44+
*/
45+
private $tableManipulator;
46+
47+
/**
48+
* {@inheritDoc}
49+
*/
50+
public function __construct(Connection $connection, TableManipulator $tableManipulator)
51+
{
52+
$this->connection = $connection;
53+
$this->tableManipulator = $tableManipulator;
54+
}
55+
56+
/**
57+
* {@inheritDoc}
58+
*/
59+
public function getTypeName()
60+
{
61+
return 'checkbox';
62+
}
63+
64+
/**
65+
* {@inheritDoc}
66+
*/
67+
public function getTypeIcon()
68+
{
69+
return 'bundles/metamodelsattributecheckbox/checkbox.png';
70+
}
71+
72+
/**
73+
* {@inheritDoc}
74+
*/
75+
public function createInstance($information, $metaModel)
76+
{
77+
return new Checkbox($metaModel, $information, $this->connection, $this->tableManipulator);
78+
}
79+
80+
/**
81+
* {@inheritDoc}
82+
*/
83+
public function isTranslatedType()
84+
{
85+
return false;
86+
}
87+
88+
/**
89+
* {@inheritDoc}
90+
*/
91+
public function isSimpleType()
92+
{
93+
return true;
94+
}
95+
96+
/**
97+
* {@inheritDoc}
98+
*/
99+
public function isComplexType()
100+
{
101+
return false;
102+
}
103+
}

0 commit comments

Comments
 (0)