-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stable release 2.2.0 This brings full Contao 4.9 support. Additionally there have been performance improvements and various bugfixes.
- Loading branch information
Showing
17 changed files
with
537 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,7 @@ mapping: | |
- 'cboelter <[email protected]>' | ||
- 'Christopher Boelter <[email protected]>' | ||
- 'Christopher Bölter <[email protected]>' | ||
'Ingolf Steinhardt <[email protected]>': | ||
- 'xantippe <[email protected]>' | ||
- 'zonky2 <[email protected]>' | ||
- 'zonky <[email protected]>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: MetaModels attribute_text | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**-translation' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [7.4] | ||
contao: [~4.9.0] | ||
|
||
steps: | ||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Pull source | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# see https://github.com/shivammathur/setup-php | ||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Setup PHP. | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
|
||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache composer cache directory | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: composer-cache-dir | ||
with: | ||
path: ~/.cache/composer | ||
key: ${{ runner.os }}-build-${{ env.cache-name }} | ||
|
||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Cache vendor directory | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: composer-vendor | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Install composer dependencies | ||
run: composer update --prefer-dist --no-interaction --no-suggest | ||
|
||
- name: PHP ${{ matrix.php }} ${{ matrix.contao }} Run tests | ||
run: ant -keep-going |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ vendor/ | |
composer.lock | ||
|
||
# build | ||
build/ | ||
build/ | ||
.phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[![Build Status](https://travis-ci.org/MetaModels/attribute_text.svg)](https://travis-ci.org/MetaModels/attribute_text) | ||
[![Build Status](https://github.com/MetaModels/attribute_text/actions/workflows/diagnostics.yml/badge.svg)](https://github.com/MetaModels/attribute_text/actions) | ||
[![Latest Version tagged](http://img.shields.io/github/tag/MetaModels/attribute_text.svg)](https://github.com/MetaModels/attribute_text/tags) | ||
[![Latest Version on Packagist](http://img.shields.io/packagist/v/MetaModels/attribute_text.svg)](https://packagist.org/packages/MetaModels/attribute_text) | ||
[![Installations via composer per month](http://img.shields.io/packagist/dm/MetaModels/attribute_text.svg)](https://packagist.org/packages/MetaModels/attribute_text) | ||
|
||
Text | ||
==== | ||
|
||
The text attribute | ||
The text attribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,13 @@ | |
"nontranslatable" | ||
], | ||
"type": "contao-bundle", | ||
"homepage": "http://now.metamodel.me/", | ||
"homepage": "https://now.metamodel.me/", | ||
"license": "LGPL-3.0-or-later", | ||
"authors": [ | ||
{ | ||
"name": "Christian Schiffler", | ||
"email": "[email protected]", | ||
"homepage": "http://www.cyberspectrum.de", | ||
"homepage": "https://www.cyberspectrum.de", | ||
"role": "Developer" | ||
}, | ||
{ | ||
|
@@ -27,18 +27,19 @@ | |
"support": { | ||
"email": "[email protected]", | ||
"issues": "https://github.com/MetaModels/attribute_text/issues", | ||
"wiki": "http://de.contaowiki.org/MetaModels", | ||
"wiki": "https://de.contaowiki.org/MetaModels", | ||
"irc": "irc://irc.freenode.org/contao.mm", | ||
"source": "https://github.com/MetaModels/attribute_text" | ||
}, | ||
"require": { | ||
"php": "^7.1", | ||
"contao-community-alliance/dc-general": "^2.1.0", | ||
"php": "^7.4", | ||
"contao-community-alliance/contao-polyfill-bundle": "^1.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" | ||
"contao-community-alliance/dc-general": "^2.2", | ||
"contao/core-bundle": "^4.9.0, <4.13.0", | ||
"doctrine/dbal": "^2.11 || ^3.0", | ||
"metamodels/core": "^2.2", | ||
"symfony/dependency-injection": "^4.4.6", | ||
"symfony/http-kernel": "~4.4.13" | ||
}, | ||
"require-dev": { | ||
"contao/manager-plugin": "^2.1", | ||
|
@@ -61,10 +62,14 @@ | |
"extra": { | ||
"contao-manager-plugin": "MetaModels\\AttributeTextBundle\\ContaoManager\\Plugin", | ||
"branch-alias": { | ||
"dev-master": "2.1.x-dev" | ||
"dev-feature/2.2.0": "2.2.x-dev" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"contao-components/installer": false, | ||
"contao/manager-plugin": false | ||
}, | ||
"sort-packages": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of MetaModels/attribute_text. | ||
* | ||
* (c) 2012-2019 The MetaModels team. | ||
* (c) 2012-2021 The MetaModels team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -16,7 +16,7 @@ | |
* @author Christopher Boelter <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @copyright 2012-2021 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -35,6 +35,7 @@ class Text extends BaseSimple | |
*/ | ||
public function getSQLDataType() | ||
{ | ||
// Note the maxlength in getFieldDefinition. | ||
return 'varchar(255) NULL'; | ||
} | ||
|
||
|
@@ -43,30 +44,34 @@ public function getSQLDataType() | |
*/ | ||
public function getAttributeSettingNames() | ||
{ | ||
return array_merge(parent::getAttributeSettingNames(), array( | ||
'isunique', | ||
'searchable', | ||
'filterable', | ||
'mandatory', | ||
'allowHtml', | ||
'preserveTags', | ||
'decodeEntities', | ||
'trailingSlash', | ||
'spaceToUnderscore', | ||
'rgxp' | ||
)); | ||
return array_merge( | ||
parent::getAttributeSettingNames(), | ||
[ | ||
'isunique', | ||
'searchable', | ||
'filterable', | ||
'mandatory', | ||
'allowHtml', | ||
'preserveTags', | ||
'decodeEntities', | ||
'trailingSlash', | ||
'spaceToUnderscore', | ||
'rgxp' | ||
] | ||
); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getFieldDefinition($arrOverrides = array()) | ||
public function getFieldDefinition($arrOverrides = []) | ||
{ | ||
$arrFieldDef = parent::getFieldDefinition($arrOverrides); | ||
$arrFieldDef['inputType'] = 'text'; | ||
|
||
if ($arrOverrides['rgxp']) { | ||
$arrFieldDef['eval']['rgxp'] = $arrOverrides['rgxp']; | ||
$arrFieldDef['eval']['rgxp'] = $arrOverrides['rgxp']; | ||
$arrFieldDef['eval']['maxlength'] = '255'; | ||
} | ||
|
||
return $arrFieldDef; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of MetaModels/attribute_text. | ||
* | ||
* (c) 2012-2019 The MetaModels team. | ||
* (c) 2012-2020 The MetaModels team. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -15,7 +15,7 @@ | |
* @author Christopher Boelter <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @copyright 2012-2019 The MetaModels team. | ||
* @copyright 2012-2020 The MetaModels team. | ||
* @license https://github.com/MetaModels/attribute_text/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -44,14 +44,26 @@ public function getRgxpOptions(GetPropertyOptionsEvent $event) | |
} | ||
|
||
$options = array( | ||
'alnum' => 'alnum', | ||
'alpha' => 'alpha', | ||
'digit' => 'digit', | ||
'email' => 'email', | ||
'emails' => 'emails', | ||
'extnd' => 'extnd', | ||
'friendly' => 'friendly', | ||
'phone' => 'phone', | ||
'digit' => 'digit', | ||
'natural' => 'natural', | ||
'alpha' => 'alpha', | ||
'alnum' => 'alnum', | ||
'extnd' => 'extnd', | ||
'date' => 'date', | ||
'time' => 'time', | ||
'datim' => 'datim', | ||
'friendly' => 'friendly', | ||
'email' => 'email', | ||
'emails' => 'emails', | ||
'url' => 'url', | ||
'alias' => 'alias', | ||
'folderalias' => 'folderalias', | ||
'phone' => 'phone', | ||
'prcnt' => 'prcnt', | ||
'locale' => 'locale', | ||
'language' => 'language', | ||
'google+' => 'google+', | ||
'fieldname' => 'fieldname' | ||
); | ||
|
||
$event->setOptions($options); | ||
|
Oops, something went wrong.