Skip to content

Commit 4b8bc8f

Browse files
authored
Merge branch '4.9' into bugfix/fragment-children
2 parents a0b92bb + ffebcd7 commit 4b8bc8f

File tree

76 files changed

+344
-290
lines changed

Some content is hidden

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

76 files changed

+344
-290
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
- name: Setup PHP
2020
uses: shivammathur/setup-php@v2
2121
with:
22-
php-version: 7.3
22+
php-version: 7.4
2323
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
24-
tools: prestissimo, flex
24+
tools: flex
2525
coverage: pcov
2626

2727
- name: Checkout
2828
uses: actions/checkout@v1
2929

3030
- name: Install the dependencies
31-
run: composer install --no-interaction --no-suggest
31+
run: composer install --no-interaction
3232

3333
- name: Generate the coverage report
3434
run: php -d pcov.enabled=1 vendor/bin/phpunit --testsuite=coverage --coverage-clover=clover.xml --colors=always
@@ -47,16 +47,16 @@ jobs:
4747
- name: Setup PHP
4848
uses: shivammathur/setup-php@v2
4949
with:
50-
php-version: 7.3
50+
php-version: 7.4
5151
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
52-
tools: prestissimo, flex
52+
tools: flex
5353
coverage: none
5454

5555
- name: Checkout
5656
uses: actions/checkout@v1
5757

5858
- name: Install the dependencies
59-
run: composer install --no-interaction --no-suggest
59+
run: composer install --no-interaction
6060

6161
- name: Check the coding style
6262
run: |
@@ -87,7 +87,39 @@ jobs:
8787
with:
8888
php-version: ${{ matrix.php }}
8989
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
90-
tools: prestissimo, flex
90+
tools: flex
91+
coverage: none
92+
93+
- name: Initialize the database
94+
run: |
95+
sudo /etc/init.d/mysql start
96+
mysql -uroot -proot -e "CREATE database contao_test"
97+
98+
- name: Checkout
99+
uses: actions/checkout@v1
100+
101+
- name: Install the dependencies
102+
run: composer install --no-interaction
103+
104+
- name: Run the unit tests
105+
run: vendor/bin/phpunit --colors=always
106+
107+
- name: Run the functional tests
108+
run: vendor/bin/phpunit --testsuite=functional --colors=always
109+
env:
110+
DATABASE_URL: mysql://root:root@127.0.0.1:3306/contao_test
111+
112+
php8:
113+
name: PHP 8.0
114+
runs-on: ubuntu-latest
115+
if: github.event_name != 'push'
116+
steps:
117+
- name: Setup PHP
118+
uses: shivammathur/setup-php@v2
119+
with:
120+
php-version: 8.0
121+
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
122+
tools: flex
91123
coverage: none
92124

93125
- name: Initialize the database
@@ -99,15 +131,15 @@ jobs:
99131
uses: actions/checkout@v1
100132

101133
- name: Install the dependencies
102-
run: composer install --no-interaction --no-suggest
134+
run: composer install --ignore-platform-reqs --no-interaction
103135

104136
- name: Run the unit tests
105137
run: vendor/bin/phpunit --colors=always
106138

107139
- name: Run the functional tests
108140
run: vendor/bin/phpunit --testsuite=functional --colors=always
109141
env:
110-
DATABASE_URL: mysql://root:root@localhost:3306/contao_test
142+
DATABASE_URL: mysql://root:root@127.0.0.1:3306/contao_test
111143

112144
prefer-lowest:
113145
name: Prefer Lowest
@@ -119,7 +151,7 @@ jobs:
119151
with:
120152
php-version: 7.3
121153
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib
122-
tools: prestissimo, flex
154+
tools: flex
123155
coverage: none
124156

125157
- name: Initialize the database
@@ -131,15 +163,15 @@ jobs:
131163
uses: actions/checkout@v1
132164

133165
- name: Install the dependencies
134-
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest
166+
run: composer update --prefer-lowest --prefer-stable --no-interaction
135167

136168
- name: Run the unit tests
137169
run: vendor/bin/phpunit --colors=always
138170

139171
- name: Run the functional tests
140172
run: vendor/bin/phpunit --testsuite=functional --colors=always
141173
env:
142-
DATABASE_URL: mysql://root:root@localhost:3306/contao_test
174+
DATABASE_URL: mysql://root:root@127.0.0.1:3306/contao_test
143175

144176
bundles:
145177
name: Bundles
@@ -149,9 +181,9 @@ jobs:
149181
- name: Setup PHP
150182
uses: shivammathur/setup-php@v2
151183
with:
152-
php-version: 7.3
184+
php-version: 7.4
153185
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib
154-
tools: prestissimo, flex
186+
tools: flex
155187
coverage: none
156188

157189
- name: Checkout
@@ -174,7 +206,7 @@ jobs:
174206
}
175207
file_put_contents(__DIR__."/composer.json", json_encode($data, JSON_UNESCAPED_SLASHES));
176208
'
177-
COMPOSER_ROOT_VERSION=dev-${{ env.GITHUB_SHA }} composer install --no-interaction --no-suggest
209+
COMPOSER_ROOT_VERSION=dev-${{ env.GITHUB_SHA }} composer install --no-interaction
178210
vendor/bin/phpunit --colors=always
179211
cd ..
180212
done
@@ -187,10 +219,10 @@ jobs:
187219
- name: Setup PHP
188220
uses: shivammathur/setup-php@v2
189221
with:
190-
php-version: 7.3
222+
php-version: 7.4
191223
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, mysqli, pcre, pdo_mysql, zlib
192224
ini-values: memory_limit=1G
193-
tools: prestissimo, flex
225+
tools: flex
194226
coverage: none
195227

196228
- name: Adjust the Git autocrlf setting
@@ -200,7 +232,7 @@ jobs:
200232
uses: actions/checkout@v1
201233

202234
- name: Install the dependencies
203-
run: composer install --no-interaction --no-suggest --no-progress
235+
run: composer install --no-interaction --no-progress
204236

205237
- name: Run the unit tests
206238
run: vendor/bin/phpunit.bat --colors=always
@@ -213,9 +245,8 @@ jobs:
213245
- name: Setup PHP
214246
uses: shivammathur/setup-php@v2
215247
with:
216-
php-version: 7.3
248+
php-version: 7.4
217249
extensions: json, zlib
218-
tools: prestissimo
219250
coverage: none
220251

221252
- name: Checkout
@@ -224,7 +255,7 @@ jobs:
224255
- name: Install the dependencies
225256
run: |
226257
composer global require contao/monorepo-tools:dev-master
227-
composer install --no-interaction --no-suggest
258+
composer install --no-interaction
228259
229260
- name: Validate the composer.json files
230261
run: $HOME/.composer/vendor/bin/monorepo-tools composer-json --validate --ansi
@@ -237,9 +268,8 @@ jobs:
237268
- name: Setup PHP
238269
uses: shivammathur/setup-php@v2
239270
with:
240-
php-version: 7.3
271+
php-version: 7.4
241272
extensions: json, zlib
242-
tools: prestissimo
243273
coverage: none
244274

245275
- name: Checkout

calendar-bundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.2",
18+
"php": "^7.2 || ^8.0",
1919
"contao/core-bundle": "self.version",
2020
"friendsofsymfony/http-cache": "^2.4",
2121
"patchwork/utf8": "^1.2",
@@ -32,7 +32,7 @@
3232
"require-dev": {
3333
"contao/manager-plugin": "^2.3.1",
3434
"contao/test-case": "^4.0",
35-
"phpunit/phpunit": "^8.4",
35+
"phpunit/phpunit": "^8.5",
3636
"symfony/http-client": "4.4.*",
3737
"symfony/phpunit-bridge": "4.4.*"
3838
},

calendar-bundle/src/DependencyInjection/ContaoCalendarExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class ContaoCalendarExtension extends Extension
2121
{
22-
public function load(array $mergedConfig, ContainerBuilder $container): void
22+
public function load(array $configs, ContainerBuilder $container): void
2323
{
2424
$loader = new YamlFileLoader(
2525
$container,

calendar-bundle/src/Resources/contao/modules/ModuleEventReader.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ protected function compile()
109109
}
110110

111111
throw new InternalServerErrorException('Invalid "jumpTo" value or target page not public');
112-
break;
113112

114113
case 'article':
115114
if (($article = ArticleModel::findByPk($objEvent->articleId)) && ($page = PageModel::findPublishedById($article->pid)))
@@ -118,7 +117,6 @@ protected function compile()
118117
}
119118

120119
throw new InternalServerErrorException('Invalid "articleId" value or target page not public');
121-
break;
122120

123121
case 'external':
124122
if ($objEvent->url)
@@ -127,7 +125,6 @@ protected function compile()
127125
}
128126

129127
throw new InternalServerErrorException('Empty target URL');
130-
break;
131128
}
132129

133130
// Overwrite the page title (see #2853, #4955 and #87)

comments-bundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.2",
18+
"php": "^7.2 || ^8.0",
1919
"contao/core-bundle": "self.version",
2020
"patchwork/utf8": "^1.2",
2121
"symfony/http-kernel": "4.4.*"

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.2",
18+
"php": "^7.2 || ^8.0",
1919
"ext-dom": "*",
2020
"ext-gd": "*",
2121
"ext-hash": "*",
@@ -49,7 +49,6 @@
4949
"contao/manager-plugin": "^2.6.2",
5050
"doctrine/dbal": "^2.10",
5151
"doctrine/doctrine-bundle": "^1.8 || ^2.0",
52-
"doctrine/doctrine-cache-bundle": "^1.3.1",
5352
"doctrine/orm": "^2.6.3",
5453
"dragonmantank/cron-expression": "^2.3",
5554
"friendsofsymfony/http-cache": "^2.6",
@@ -112,7 +111,7 @@
112111
"symfony/yaml": "4.4.*",
113112
"terminal42/escargot": "^0.6.0 || ^1.0",
114113
"terminal42/service-annotation-bundle": "^1.1",
115-
"toflar/psr6-symfony-http-cache-store": "^2.1",
114+
"toflar/psr6-symfony-http-cache-store": "^2.1 || ^3.0",
116115
"true/punycode": "^2.1",
117116
"twig/twig": "^2.7",
118117
"ua-parser/uap-php": "^3.9",
@@ -149,11 +148,12 @@
149148
"contao/test-case": "^4.0",
150149
"doctrine/event-manager": "^1.0",
151150
"monolog/monolog": "^1.24",
152-
"phpunit/phpunit": "^8.4",
151+
"phpunit/phpunit": "^8.5",
153152
"psr/event-dispatcher": "^1.0",
154153
"slam/phpstan-extensions": "^5.0",
155154
"symfony/browser-kit": "4.4.*",
156-
"symfony/phpunit-bridge": "4.4.*"
155+
"symfony/phpunit-bridge": "4.4.*",
156+
"thecodingmachine/phpstan-strict-rules": "^0.12"
157157
},
158158
"extra": {
159159
"contao-manager-plugin": {

core-bundle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ framework:
5858
```
5959
6060
Add the Contao routes to your `config/routing.yaml` file, and be sure to load
61-
the `ContaoCoreBundle` at the very end, so the catch all route does not catch
61+
the `ContaoCoreBundle` at the very end, so the catch-all route does not catch
6262
your application routes.
6363

6464
```yml

core-bundle/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.2",
18+
"php": "^7.2 || ^8.0",
1919
"ext-dom": "*",
2020
"ext-gd": "*",
2121
"ext-hash": "*",
@@ -48,7 +48,6 @@
4848
"contao/imagine-svg": "^0.2.3 || ^1.0",
4949
"doctrine/dbal": "^2.10",
5050
"doctrine/doctrine-bundle": "^1.8 || ^2.0",
51-
"doctrine/doctrine-cache-bundle": "^1.3.1",
5251
"doctrine/orm": "^2.6.3",
5352
"dragonmantank/cron-expression": "^2.3",
5453
"friendsofsymfony/http-cache": "^2.6",
@@ -121,7 +120,7 @@
121120
"doctrine/event-manager": "^1.0",
122121
"lexik/maintenance-bundle": "^2.1.5",
123122
"monolog/monolog": "^1.24",
124-
"phpunit/phpunit": "^8.4",
123+
"phpunit/phpunit": "^8.5",
125124
"psr/event-dispatcher": "^1.0",
126125
"symfony/browser-kit": "4.4.*",
127126
"symfony/http-client": "4.4.*",

core-bundle/src/Command/InstallCommand.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ class InstallCommand extends Command
3333
*/
3434
private $fs;
3535

36-
/**
37-
* @var SymfonyStyle
38-
*/
39-
private $io;
40-
4136
/**
4237
* @var array
4338
*/
@@ -83,14 +78,14 @@ protected function configure(): void
8378
protected function execute(InputInterface $input, OutputInterface $output): int
8479
{
8580
$this->fs = new Filesystem();
86-
$this->io = new SymfonyStyle($input, $output);
8781
$this->webDir = rtrim($input->getArgument('target'), '/');
8882

8983
$this->addEmptyDirs();
9084

9185
if (!empty($this->rows)) {
92-
$this->io->newLine();
93-
$this->io->listing($this->rows);
86+
$io = new SymfonyStyle($input, $output);
87+
$io->newLine();
88+
$io->listing($this->rows);
9489
}
9590

9691
return 0;

core-bundle/src/Command/MigrateCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ private function getCommandHashes(array $commands, bool $withDrops): array
288288
if (!$withDrops) {
289289
foreach ($commands as $hash => $command) {
290290
if (
291-
(0 === strncmp($command, 'DROP ', 5) && 0 !== strncmp($command, 'DROP INDEX', 10))
292-
|| preg_match('/^ALTER TABLE [^ ]+ DROP /', $command, $matches)
291+
preg_match('/^ALTER TABLE [^ ]+ DROP /', $command, $matches)
292+
|| (0 === strncmp($command, 'DROP ', 5) && 0 !== strncmp($command, 'DROP INDEX', 10))
293293
) {
294294
unset($commands[$hash]);
295295
}

0 commit comments

Comments
 (0)