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 #15
  • Loading branch information
baumannsven committed Mar 15, 2019
2 parents 2fb683e + b9361a6 commit ad6b496
Show file tree
Hide file tree
Showing 40 changed files with 906 additions and 482 deletions.
2 changes: 1 addition & 1 deletion .check-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ignore:
- 'Mini Model <[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
41 changes: 21 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url",
"translatable"
],
"type": "contao-module",
"type": "contao-bundle",
"homepage": "http://now.metamodel.me/",
"license": "LGPL-3.0-or-later",
"authors": [
Expand All @@ -32,34 +32,35 @@
"source": "https://github.com/MetaModels/metamodelsattribute_translatedurl"
},
"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/attribute_url": "^2.0",
"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"
},
"autoload": {
"psr-0": {
"MetaModels": "src"
"psr-4": {
"MetaModels\\AttributeTranslatedUrlBundle\\": "src"
},
"files": [
"src/deprecated-autoload.php"
]
},
"autoload-dev": {
"psr-4": {
"MetaModels\\AttributeTranslatedUrlBundle\\Test\\": "tests"
}
},
"extra": {
"contao": {
"symlinks": {
"contao": "system/modules/metamodelsattribute_translatedurl"
},
"runonce": [
"runonce/runonce.php"
]
},
"contao-manager-plugin": "MetaModels\\AttributeTranslatedUrlBundle\\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
12 changes: 0 additions & 12 deletions contao/config/autoload.ini

This file was deleted.

32 changes: 0 additions & 32 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_translatedurl-",
"languages_cto": "contao/languages",
"languages_cto": "src/Resources/contao/languages",
"languages_tx": ".tx",
"php-file-header": [
"This file is part of MetaModels/attribute_translatedurl.",
Expand Down
105 changes: 105 additions & 0 deletions src/Attribute/AttributeTypeFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php

/**
* This file is part of MetaModels/attribute_translatedurl.
*
* (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_translatedurl
* @author David Molineus <[email protected]>
* @author Christian Schiffler <[email protected]>
* @copyright 2012-2019 The MetaModels team.
* @license https://github.com/MetaModels/attribute_translatedurl/blob/master/LICENSE LGPL-3.0-or-later
* @filesource
*/

namespace MetaModels\AttributeTranslatedUrlBundle\Attribute;

use Doctrine\DBAL\Connection;
use MetaModels\Attribute\IAttributeTypeFactory;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;

/**
* Attribute type factory for translated url attributes.
*/
class AttributeTypeFactory implements IAttributeTypeFactory
{
/**
* Database connection.
*
* @var Connection
*/
private $connection;

/**
* Event dispatcher.
*
* @var EventDispatcherInterface
*/
private $eventDispatcher;

/**
* Construct.
*
* @param Connection $connection Database connection.
* @param EventDispatcherInterface $eventDispatcher Event dispatcher.
*/
public function __construct(Connection $connection, EventDispatcherInterface $eventDispatcher)
{
$this->connection = $connection;
$this->eventDispatcher = $eventDispatcher;
}

/**
* {@inheritdoc}
*/
public function getTypeName()
{
return 'translatedurl';
}

/**
* {@inheritdoc}
*/
public function getTypeIcon()
{
return 'bundles/metamodelsattributetranslatedurl/url.png';
}

/**
* {@inheritdoc}
*/
public function createInstance($information, $metaModel)
{
return new TranslatedUrl($metaModel, $information, $this->connection, $this->eventDispatcher);
}

/**
* {@inheritdoc}
*/
public function isTranslatedType()
{
return true;
}

/**
* {@inheritdoc}
*/
public function isSimpleType()
{
return false;
}

/**
* {@inheritdoc}
*/
public function isComplexType()
{
return true;
}
}
Loading

0 comments on commit ad6b496

Please sign in to comment.