Showing 2,253 changed files with 145,438 additions and 23,262 deletions.
7 changes: 7 additions & 0 deletions core-bundle/.editorconfig → .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ indent_size = 4

[*.{html5,svg,min.css,min.js}]
insert_final_newline = false

[*/src/Resources/contao/**.{css,js,php}]
indent_style = tab

[*/src/Resources/contao/**.html5]
indent_style = space
indent_size = 2
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Composer
/composer.lock
/vendor/

# Monorepo Tools
/.monorepo-split-cache/

# Node
/node_modules/

# PhpUnit
/phpunit.xml
19 changes: 18 additions & 1 deletion core-bundle/.php_cs.dist → .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,23 @@ EOF;
$finder = PhpCsFixer\Finder::create()
->exclude('Resources')
->exclude('Fixtures')
->in([__DIR__.'/src', __DIR__.'/tests'])
->in([
__DIR__.'/calendar-bundle/src',
__DIR__.'/calendar-bundle/tests',
__DIR__.'/comments-bundle/src',
__DIR__.'/core-bundle/src',
__DIR__.'/core-bundle/tests',
__DIR__.'/faq-bundle/src',
__DIR__.'/faq-bundle/tests',
__DIR__.'/installation-bundle/src',
__DIR__.'/installation-bundle/tests',
__DIR__.'/listing-bundle/src',
__DIR__.'/manager-bundle/src',
__DIR__.'/manager-bundle/tests',
__DIR__.'/news-bundle/src',
__DIR__.'/news-bundle/tests',
__DIR__.'/newsletter-bundle/src',
])
;

return PhpCsFixer\Config::create()
Expand Down Expand Up @@ -43,6 +59,7 @@ return PhpCsFixer\Config::create()
],
'no_null_property_initialization' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
Expand Down
10 changes: 9 additions & 1 deletion ...-bundle/src/Resources/contao/.php_cs.dist → .php_cs.legacy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ $finder = PhpCsFixer\Finder::create()
->exclude('languages')
->exclude('templates')
->exclude('themes')
->in(__DIR__)
->in([
__DIR__.'/calendar-bundle/src/Resources/contao',
__DIR__.'/comments-bundle/src/Resources/contao',
__DIR__.'/core-bundle/src/Resources/contao',
__DIR__.'/faq-bundle/src/Resources/contao',
__DIR__.'/listing-bundle/src/Resources/contao',
__DIR__.'/news-bundle/src/Resources/contao',
__DIR__.'/newsletter-bundle/src/Resources/contao',
])
;

return PhpCsFixer\Config::create()
Expand Down
76 changes: 76 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
language: php

git:
depth: 5

cache:
directories:
- $HOME/.composer/cache
- $HOME/.monorepo-split-cache

sudo: false

env:
global:
- COMPOSER_ALLOW_XDEBUG=0
- SYMFONY_DEPRECATIONS_HELPER='weak_vendors'

jobs:
include:
# Latest dependencies with all PHP versions
- php: 7.1
- php: 7.2

# Ignore the platform requirements for the upcoming PHP version
- php: nightly
env: COMPOSER_FLAGS='--ignore-platform-reqs'

# Lowest dependencies with the oldest and latest PHP versions
- php: 7.1
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: 7.2
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'

# Split the monorepo
- stage: split
if: 'type = push AND branch =~ /^(master|\d+\.\d+)$/'
php: 7.2
install:
- composer update --no-interaction --no-suggest
script:
- php vendor/bin/monorepo-tools composer-json --validate && php vendor/bin/monorepo-tools split $TRAVIS_BRANCH --cache-dir $HOME/.monorepo-split-cache

# Generate the coverage report
- stage: coverage
php: 7.2
before_install: true
install:
- composer update --no-interaction --no-suggest
script:
- php vendor/bin/phpunit -c calendar-bundle --coverage-clover=calendar-bundle.xml
- php vendor/bin/phpunit -c core-bundle --exclude-group contao3 --coverage-clover=core-bundle.xml
- php vendor/bin/phpunit -c faq-bundle --coverage-clover=faq-bundle.xml
- php vendor/bin/phpunit -c manager-bundle --coverage-clover=manager-bundle.xml
- php vendor/bin/phpunit -c news-bundle --coverage-clover=news-bundle.xml
after_script:
- php vendor/bin/php-coveralls -o coveralls-upload.json -x calendar-bundle.xml -x core-bundle.xml -x faq-bundle.xml -x manager-bundle.xml -x news-bundle.xml

allow_failures:
- php: nightly

before_install:
- phpenv config-rm xdebug.ini || true

install:
# To be removed when this is resolved: https://github.com/composer/composer/issues/5355
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --no-interaction --no-suggest; fi
- composer update $COMPOSER_FLAGS --no-interaction --no-suggest

script:
- php vendor/bin/phpunit -c calendar-bundle
- php vendor/bin/phpunit -c core-bundle
- php vendor/bin/phpunit -c faq-bundle
- php vendor/bin/phpunit -c installation-bundle
- php vendor/bin/phpunit -c manager-bundle
- php vendor/bin/phpunit -c news-bundle
- php vendor/bin/phpstan analyse core-bundle/src core-bundle/tests --level=3 --no-progress
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Change log

## 4.6.0-RC1 (2018-07-16)

* Add two factor authentication for the back end login (see contao/core-bundle#1545).
* Add the "markAsCopy" config option to the DCA (see contao/core-bundle#586).
* Sort the custom layout sections by their position (see contao/core-bundle#1529).
* Make the DropZone error messages translatable (see contao/core-bundle#1320).
* Do not stack the buttons if the screen is wide enough (see contao/core#8816).
* Remove registrations that are not activated within 24 hours (see contao/core-bundle#1512).
* Remove the "number of columns" field from the login module (see contao/core-bundle#1577).
* Also use the file meta data in the download element (see contao/core-bundle#1459).
* Purge the system log by default after 7 days (see contao/core-bundle#1512).
* Use "noreferrer noopener" for links that open in a new window (see contao/core-bundle#1125).
* Do not store IP addresses in tl_log (see contao/core-bundle#1512).
* Append the module ID to the form field IDs to prevent duplicate IDs (see contao/core-bundle#1493).
* Add the page picker to the meta fields in file manager (see contao/core-bundle#1568).
* Remove the "flash movie" front end module.
* Add extended video support (see contao/core-bundle#1348).
* Pass all search result data to the search template (see contao/core-bundle#1558).
* Auto-clear the session form data (see contao/core-bundle#1550).
* Add abstract controllers for fragment content elements and front end modules (see contao/core-bundle#1376).
* Handle manifest.json files in public bundle folders (see contao/core-bundle#1510).
* Introduce auto cache tag invalidation on DCAs for better DX (see contao/core-bundle#1478).
* Throw a "page not found" exception if a download file does not exist (see contao/core#8375).
* Allow multi-root and multi-page searches (see contao/core-bundle#1462).
* Handle case-sensitive file names in the file manager (see contao/core-bundle#1433).
* Simplify the slug handling when auto-creating aliases (see contao/core-bundle#1334).
* Do not notify the admin via e-mail if an account is locked (see contao/core-bundle#7728).
* Only start the session if needed to find data in FORM_DATA (see contao/core-bundle#1471).
* Add template blocks to be_login.html5 (see contao/core-bundle#1424).
* Improve cache busting of the .css and .js files (see contao/core-bundle#1404).
* Add a translator insert tag (see contao/core-bundle#1400).
* Distinguish between error 401 and 403 (see contao/core-bundle#1381).
* Enable drag and drop for the file manger (see contao/core-bundle#1394).
* Add drag and drop file upload for the file tree (see contao/core-bundle#1386).
* Hide the end time of open-ended events in the back end form (see contao/calendar-bundle#23).
* Link to the event if no image link has been defined (see contao/news-bundle#30).
* Hide running non-recurring events (see contao/calendar-bundle#30).
* Pass the number of events to the main template (see contao/calendar-bundle#32).
* Make the calendar model available in the event reader (see contao/core#8869).
* Remove subscriptions that are not activated within 24 hours (see contao/core-bundle#1512).
* Append the parent ID to the form field IDs to prevent duplicate IDs (see contao/core-bundle#1493).
* Replace `<div class="quote">` with `<blockquote>` (see contao/core#2244).
* Support sorting enclosures (see contao/calendar-bundle#16).
* Migrate the search module settings (see contao/installation-bundle#89).
* Enable the FOS cache bundle (see contao/manager-bundle#67).
* Add a default robots.txt file (see contao/manager-bundle#56).
* Link to the news article if no image link has been defined (see contao/news-bundle#30).
* Show the 404 page if an external news is opened in the news reader (see contao/news-bundle#33).
* Add a custom text field to the subscribe module (see contao/core-bundle#1512).
* Use type="email" in the default template (see contao/newsletter-bundle#20).
File renamed without changes.
2 changes: 2 additions & 0 deletions core-bundle/CONTRIBUTORS.md → CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
* Torsten Baldes (tobaco)
* Jamie Devine (jamesdevine)
* Adrián Granado (playmono)
* Physiklehrer
* John Brand (brandbrilliance)
* Blair Winans (blairwinans)
* Roland Schütz
* Hendrik Obermayer (henobi)
2 changes: 1 addition & 1 deletion core-bundle/DEPRECATED.md → DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ echo $container->get('contao.assets.files_context')->getStaticUrl();
## Image service

The `Image` and `Picture` classes have been deprecated in favor of the image
and picture services. Here are two examples of how to use the services:
and picture services. Here are three examples of how to use the services:

### Image::get()

Expand Down
165 changes: 165 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
File renamed without changes.
Loading