Merge branch '2.8' into 3.4

* 2.8:
  [travis] cache composer.lock files for deps=low
  [Security] Remove wrong sentence about ACL
  Update validators.nl.xlf
This commit is contained in:
Nicolas Grekas 2018-08-07 11:33:53 +02:00
commit 87fff65cd0
4 changed files with 87 additions and 3 deletions

View File

@ -0,0 +1,80 @@
<?php
array_shift($_SERVER['argv']);
$dirs = $_SERVER['argv'];
function getContentHash($composerJson)
{
$relevantKeys = array(
'name',
'require',
'require-dev',
'conflict',
'replace',
'provide',
'minimum-stability',
'prefer-stable',
'repositories',
'extra',
);
$relevantContent = array();
foreach (array_intersect($relevantKeys, array_keys($composerJson)) as $key) {
$relevantContent[$key] = $composerJson[$key];
}
if (isset($composerJson['config']['platform'])) {
$relevantContent['config']['platform'] = $composerJson['config']['platform'];
}
ksort($relevantContent);
return md5(json_encode($relevantContent));
}
$composerLocks = array();
foreach ($dirs as $dir) {
if (!file_exists($dir.'/composer.lock') || !$composerLock = @json_decode(file_get_contents($dir.'/composer.lock'), true)) {
echo "$dir/composer.lock not found or invalid.\n";
@unlink($dir.'/composer.lock');
continue;
}
if (!file_exists($dir.'/composer.json') || !$composerJson = @json_decode(file_get_contents($dir.'/composer.json'), true)) {
echo "$dir/composer.json not found or invalid.\n";
@unlink($dir.'/composer.lock');
continue;
}
if (!isset($composerLock['content-hash']) || getContentHash($composerJson) !== $composerLock['content-hash']) {
echo "$dir/composer.lock is outdated.\n";
@unlink($dir.'/composer.lock');
continue;
}
$composerLocks[$composerJson['name']] = array($dir, $composerLock, $composerJson);
}
foreach ($composerLocks as list($dir, $composerLock)) {
foreach ($composerLock['packages'] as $composerJson) {
if (0 !== strpos($version = $composerJson['version'], 'dev-') && '-dev' !== substr($version, -4)) {
continue;
}
if (!isset($composerLocks[$name = $composerJson['name']])) {
echo "$dir/composer.lock references missing $name.\n";
@unlink($dir.'/composer.lock');
continue 2;
}
foreach (array('minimum-stability', 'prefer-stable', 'repositories') as $key) {
if (array_key_exists($key, $composerLocks[$name][2])) {
$composerJson[$key] = $composerLocks[$name][2][$key];
}
}
if (getContentHash($composerJson) !== $composerLocks[$name][1]['content-hash']) {
echo "$dir/composer.lock is not in sync with $name.\n";
@unlink($dir.'/composer.lock');
continue 2;
}
}
}

View File

@ -237,7 +237,11 @@ install:
if [[ $deps = high ]]; then
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
elif [[ $deps = low ]]; then
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && $COMPOSER_UP --prefer-lowest --prefer-stable && $PHPUNIT_X'"
[[ -e ~/php-ext/composer-lowest.lock.tar ]] && tar -xf ~/php-ext/composer-lowest.lock.tar
tar -cf ~/php-ext/composer-lowest.lock.tar --files-from /dev/null
php .github/rm-invalid-lowest-lock-files.php $COMPONENTS
echo "$COMPONENTS" | parallel --gnu -j10% "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
elif [[ $PHP = hhvm* ]]; then
$PHPUNIT --exclude-group no-hhvm,benchmark,intl-data
else

View File

@ -6,7 +6,7 @@ application. It ships with facilities for authenticating using HTTP basic or
digest authentication, interactive form login or X.509 certificate login, but
also allows you to implement your own authentication strategies. Furthermore,
the component provides ways to authorize authenticated users based on their
roles, and it contains an advanced ACL system.
roles.
Resources
---------

View File

@ -316,7 +316,7 @@
</trans-unit>
<trans-unit id="83">
<source>This is not a valid UUID.</source>
<target>Deze waarde is geen geldige UUID waarde.</target>
<target>Dit is geen geldige UUID.</target>
</trans-unit>
</body>
</file>