Skip to content

Commit

Permalink
Merge tag '2.1.0' into master
Browse files Browse the repository at this point in the history
This is a maintenance release.

Refer to #17
  • Loading branch information
baumannsven committed Mar 15, 2019
2 parents f5e168c + 3c74323 commit 8534878
Show file tree
Hide file tree
Showing 41 changed files with 424 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .check-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ignore:
- 'Scrutinizer Auto-Fixer <[email protected]>'

exclude:
- /^contao\/languages/
- /^src\/Resources\/contao\/languages/

mapping:
'Andreas Isaak <[email protected]>': 'Andreas Isaak <[email protected]>'
Expand Down
30 changes: 23 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,42 @@ php:
- "7.3"
- "7.2"
- "7.1"
- "7.0"
- "5.6"

env:
- CONTAO_VERSION=~3.5.5
- CONTAO_VERSION=~4.7.0
- CONTAO_VERSION=~4.6.0
- CONTAO_VERSION=~4.5.0
- CONTAO_VERSION=~4.4.0

# Exclude impossible Contao Version combinations.
matrix:
exclude:
fast_finish: true
allow_failures:
- env: CONTAO_VERSION=~4.7.0
- env: CONTAO_VERSION=~4.6.0
- env: CONTAO_VERSION=~4.5.0

before_script:
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- travis_retry composer self-update && composer --version
- travis_retry composer require contao/core $CONTAO_VERSION --no-update
- travis_retry composer require contao/core-bundle $CONTAO_VERSION --no-update
- >
if [ "x${TRAVIS_TAG}" != "x" ]; then
export COMPOSER_ROOT_VERSION=${TRAVIS_TAG}
else
export COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ hotfix/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \
&& echo ${BASH_REMATCH[1]} \
export COMPOSER_ROOT_VERSION=$([[ ${TRAVIS_BRANCH} =~ (hotfix|release)/([0-9.]*(-(alpha|beta|rc)[0-9]+)?) ]] \
&& echo ${BASH_REMATCH[2]} \
|| echo dev-${TRAVIS_BRANCH})
fi
- echo "Using root version ${COMPOSER_ROOT_VERSION}"
- travis_retry composer update --prefer-dist --no-interaction
- >
echo "PHP version: ${TRAVIS_PHP_VERSION}";
if [ "x${TRAVIS_PHP_VERSION}" == "xnightly" ]; then
travis_retry composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-suggest
else
travis_retry composer update --prefer-dist --no-interaction --no-suggest
fi
script: ant -keep-going

Expand Down
2 changes: 2 additions & 0 deletions build.default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@

phpcs.standard=${basedir}/vendor/phpcq/coding-standard/phpcs/PhpCodeQuality/ruleset.xml
phpmd.ruleset=${basedir}/vendor/phpcq/coding-standard/phpmd/ruleset.xml

phpcs.excluded=src/Resources/contao/languages
40 changes: 21 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"text",
"nontranslatable"
],
"type": "contao-module",
"type": "contao-bundle",
"homepage": "http://now.metamodel.me/",
"license": "LGPL-3.0-or-later",
"authors": [
Expand All @@ -32,33 +32,35 @@
"source": "https://github.com/MetaModels/attribute_text"
},
"require": {
"php": "^5.6 || ^7.0",
"contao-community-alliance/composer-plugin": "^2.4",
"contao-community-alliance/dc-general": "^2.0.0",
"contao/core": "^3.5.5",
"metamodels/core": "^2.0"
"php": "^7.1",
"contao-community-alliance/dc-general": "^2.1.0",
"contao/core-bundle": "^4.4.8",
"metamodels/core": "^2.1",
"symfony/dependency-injection": "^3.3 || ^4.0",
"symfony/http-kernel": "^3.3 || ^4.0"
},
"require-dev": {
"metamodels/base-unit-tests": "~1.0",
"contao/manager-plugin": "^2.1",
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
"phpcq/all-tasks": "^1.2"
},
"conflict": {
"contao/core": "3.4.0"
},
"autoload": {
"psr-0": {
"MetaModels\\": "src"
"psr-4": {
"MetaModels\\AttributeTextBundle\\": "src"
},
"files": [
"src/deprecated-autoload.php"
]
},
"autoload-dev": {
"psr-4": {
"MetaModels\\AttributeTextBundle\\Test\\": "tests"
}
},
"extra": {
"contao": {
"symlinks": {
"contao": "system/modules/metamodelsattribute_text"
}
},
"contao-manager-plugin": "MetaModels\\AttributeTextBundle\\ContaoManager\\Plugin",
"branch-alias": {
"dev-master": "2.0.x-dev",
"dev-develop": "2.1.x-dev"
"dev-master": "2.1.x-dev"
}
},
"config": {
Expand Down
7 changes: 0 additions & 7 deletions contao/config/autoload.ini

This file was deleted.

40 changes: 0 additions & 40 deletions contao/config/event_listeners.php

This file was deleted.

7 changes: 0 additions & 7 deletions contao/html/.htaccess

This file was deleted.

2 changes: 1 addition & 1 deletion ctb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"transifex": {
"project": "metamodels",
"prefix": "attribute_text-",
"languages_cto": "contao/languages",
"languages_cto": "src/Resources/contao/languages",
"languages_tx": ".tx",
"php-file-header": [
"This file is part of MetaModels/attribute_text.",
Expand Down
48 changes: 48 additions & 0 deletions src/Attribute/AttributeTypeFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

/**
* This file is part of MetaModels/attribute_text.
*
* (c) 2012-2019 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package MetaModels/attribute_text
* @author Christian Schiffler <[email protected]>
* @author Christopher Boelter <[email protected]>
* @author Ingolf Steinhardt <[email protected]>
* @author David Molineus <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\AttributeTextBundle\Attribute;

use Doctrine\DBAL\Connection;
use MetaModels\Attribute\AbstractSimpleAttributeTypeFactory;
use MetaModels\Helper\TableManipulator;

/**
* Attribute type factory for text attributes.
*/
class AttributeTypeFactory extends AbstractSimpleAttributeTypeFactory
{
/**
* {@inheritDoc}
*
* @param Connection $connection The database connection.
* @param TableManipulator $tableManipulator The table manipulator.
*/
public function __construct(Connection $connection, TableManipulator $tableManipulator)
{
parent::__construct($connection, $tableManipulator);

$this->typeName = 'text';
$this->typeIcon = 'bundles/metamodelsattributetext/text.png';
$this->typeClass = Text::class;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
* @author Andreas Isaak <[email protected]>
* @author Christopher Boelter <[email protected]>
* @author Ingolf Steinhardt <[email protected]>
* @author David Molineus <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\Attribute\Text;
namespace MetaModels\AttributeTextBundle\Attribute;

use MetaModels\Attribute\BaseSimple;

Expand Down
50 changes: 50 additions & 0 deletions src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

/**
* This file is part of MetaModels/attribute_text.
*
* (c) 2012-2019 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package MetaModels/attribute_text
* @author Christian Schiffler <[email protected]>
* @author Sven Baumann <[email protected]>
* @author David Molineus <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\AttributeTextBundle\ContaoManager;

use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use MetaModels\AttributeTextBundle\MetaModelsAttributeTextBundle;
use MetaModels\CoreBundle\MetaModelsCoreBundle;

/**
* Plugin for the Contao Manager.
*/
class Plugin implements BundlePluginInterface
{
/**
* {@inheritdoc}
*/
public function getBundles(ParserInterface $parser)
{
return [
BundleConfig::create(MetaModelsAttributeTextBundle::class)
->setLoadAfter(
[
MetaModelsCoreBundle::class
]
)
->setReplace(['metamodelsattribute_text'])
];
}
}
41 changes: 41 additions & 0 deletions src/DependencyInjection/MetaModelsAttributeTextExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/**
* This file is part of MetaModels/attribute_text.
*
* (c) 2012-2019 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package MetaModels/attribute_text
* @author Christian Schiffler <[email protected]>
* @author David Molineus <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\AttributeTextBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader;

/**
* This is the class that loads and manages the bundle configuration
*/
class MetaModelsAttributeTextExtension extends Extension
{
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,24 @@
* This project is provided in good faith and hope to be usable by anyone.
*
* @package MetaModels/attribute_text
* @author Christian Schiffler <[email protected]>
* @author Christopher Boelter <[email protected]>
* @author Ingolf Steinhardt <[email protected]>
* @author David Molineus <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\Attribute\Text;
namespace MetaModels\AttributeTextBundle\EventListener;

use ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent;
use MetaModels\DcGeneral\Events\BaseSubscriber;

/**
* Handles event operations on tl_metamodel_dcasetting.
*/
class BackendSubscriber extends BaseSubscriber
class BackendEventListener
{
/**
* Register all listeners to handle creation of a data container.
*
* @return void
*/
protected function registerEventsInDispatcher()
{
$this
->addListener(
GetPropertyOptionsEvent::NAME,
array($this, 'getRgxpOptions')
);
}

/**
* Retrieve the options for the attributes.
*
Expand Down
Loading

0 comments on commit 8534878

Please sign in to comment.