Bei Update auf 4.11.6: ParameterBag.php: non-existent parameter "kernel.root_dir"
Hallo,
bin gerade dabei, meine Seiten upzudaten, zuerst die gespiegelten Kopien der Seiten, dann kämen die richtigen dran.
Bei 3 Seiten sind das 6 Updates, soweit okay.
Eine Instanz (mirror + original) lief sauber durch, bei den zwei anderen bekomme ich folgenden Fehler bei der Testseite:
Code:
In ParameterBag.php line 93:
You have requested a non-existent parameter "kernel.root_dir". Did you mean
one of these: "kernel.project_dir", "kernel.build_dir", "kernel.cache_dir"
, "kernel.logs_dir"?
Per FTP die Datei gesucht, es sind zwei vorhanden:
/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
PHP-Code:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\ParameterBag;
use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
/**
* Holds parameters.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParameterBag implements ParameterBagInterface
{
protected $parameters = [];
protected $resolved = false;
public function __construct(array $parameters = [])
{
$this->add($parameters);
}
/**
* {@inheritdoc}
*/
public function clear()
{
$this->parameters = [];
}
/**
* {@inheritdoc}
*/
public function add(array $parameters)
{
foreach ($parameters as $key => $value) {
$this->set($key, $value);
}
}
/**
* {@inheritdoc}
*/
public function all()
{
return $this->parameters;
}
/**
* {@inheritdoc}
*/
public function get(string $name)
{
if (!\array_key_exists($name, $this->parameters)) {
if (!$name) {
throw new ParameterNotFoundException($name);
}
$alternatives = [];
foreach ($this->parameters as $key => $parameterValue) {
$lev = levenshtein($name, $key);
if ($lev <= \strlen($name) / 3 || str_contains($key, $name)) {
$alternatives[] = $key;
}
}
$nonNestedAlternative = null;
if (!\count($alternatives) && str_contains($name, '.')) {
$namePartsLength = array_map('strlen', explode('.', $name));
$key = substr($name, 0, -1 * (1 + array_pop($namePartsLength)));
while (\count($namePartsLength)) {
if ($this->has($key)) {
if (\is_array($this->get($key))) {
$nonNestedAlternative = $key;
}
break;
}
$key = substr($key, 0, -1 * (1 + array_pop($namePartsLength)));
}
}
throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative);
}
return $this->parameters[$name];
}
/**
* {@inheritdoc}
*/
public function set(string $name, $value)
{
$this->parameters[$name] = $value;
}
/**
* {@inheritdoc}
*/
public function has(string $name)
{
return \array_key_exists((string) $name, $this->parameters);
}
/**
* {@inheritdoc}
*/
public function remove(string $name)
{
unset($this->parameters[$name]);
}
/**
* {@inheritdoc}
*/
public function resolve()
{
if ($this->resolved) {
return;
}
$parameters = [];
foreach ($this->parameters as $key => $value) {
try {
$value = $this->resolveValue($value);
$parameters[$key] = $this->unescapeValue($value);
} catch (ParameterNotFoundException $e) {
$e->setSourceKey($key);
throw $e;
}
}
$this->parameters = $parameters;
$this->resolved = true;
}
/**
* Replaces parameter placeholders (%name%) by their values.
*
* @param mixed $value A value
* @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
*
* @return mixed The resolved value
*
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
* @throws ParameterCircularReferenceException if a circular reference if detected
* @throws RuntimeException when a given parameter has a type problem
*/
public function resolveValue($value, array $resolving = [])
{
if (\is_array($value)) {
$args = [];
foreach ($value as $k => $v) {
$args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving);
}
return $args;
}
if (!\is_string($value) || 2 > \strlen($value)) {
return $value;
}
return $this->resolveString($value, $resolving);
}
/**
* Resolves parameters inside a string.
*
* @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
*
* @return mixed The resolved string
*
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
* @throws ParameterCircularReferenceException if a circular reference if detected
* @throws RuntimeException when a given parameter has a type problem
*/
public function resolveString(string $value, array $resolving = [])
{
// we do this to deal with non string values (Boolean, integer, ...)
// as the preg_replace_callback throw an exception when trying
// a non-string in a parameter value
if (preg_match('/^%([^%\s]+)%$/', $value, $match)) {
$key = $match[1];
if (isset($resolving[$key])) {
throw new ParameterCircularReferenceException(array_keys($resolving));
}
$resolving[$key] = true;
return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving);
}
return preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving, $value) {
// skip %%
if (!isset($match[1])) {
return '%%';
}
$key = $match[1];
if (isset($resolving[$key])) {
throw new ParameterCircularReferenceException(array_keys($resolving));
}
$resolved = $this->get($key);
if (!\is_string($resolved) && !is_numeric($resolved)) {
throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".', $key, get_debug_type($resolved), $value));
}
$resolved = (string) $resolved;
$resolving[$key] = true;
return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving);
}, $value);
}
public function isResolved()
{
return $this->resolved;
}
/**
* {@inheritdoc}
*/
public function escapeValue($value)
{
if (\is_string($value)) {
return str_replace('%', '%%', $value);
}
if (\is_array($value)) {
$result = [];
foreach ($value as $k => $v) {
$result[$k] = $this->escapeValue($v);
}
return $result;
}
return $value;
}
/**
* {@inheritdoc}
*/
public function unescapeValue($value)
{
if (\is_string($value)) {
return str_replace('%%', '%', $value);
}
if (\is_array($value)) {
$result = [];
foreach ($value as $k => $v) {
$result[$k] = $this->unescapeValue($v);
}
return $result;
}
return $value;
}
}
/vendor/symfony/http-foundation/ParameterBag.php
PHP-Code:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpFoundation;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
/**
* ParameterBag is a container for key/value pairs.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class ParameterBag implements \IteratorAggregate, \Countable
{
/**
* Parameter storage.
*/
protected $parameters;
public function __construct(array $parameters = [])
{
$this->parameters = $parameters;
}
/**
* Returns the parameters.
*
* @param string|null $key The name of the parameter to return or null to get them all
*
* @return array An array of parameters
*/
public function all(/*string $key = null*/)
{
$key = \func_num_args() > 0 ? func_get_arg(0) : null;
if (null === $key) {
return $this->parameters;
}
if (!\is_array($value = $this->parameters[$key] ?? [])) {
throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value)));
}
return $value;
}
/**
* Returns the parameter keys.
*
* @return array An array of parameter keys
*/
public function keys()
{
return array_keys($this->parameters);
}
/**
* Replaces the current parameters by a new set.
*/
public function replace(array $parameters = [])
{
$this->parameters = $parameters;
}
/**
* Adds parameters.
*/
public function add(array $parameters = [])
{
$this->parameters = array_replace($this->parameters, $parameters);
}
/**
* Returns a parameter by name.
*
* @param mixed $default The default value if the parameter key does not exist
*
* @return mixed
*/
public function get(string $key, $default = null)
{
return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default;
}
/**
* Sets a parameter by name.
*
* @param mixed $value The value
*/
public function set(string $key, $value)
{
$this->parameters[$key] = $value;
}
/**
* Returns true if the parameter is defined.
*
* @return bool true if the parameter exists, false otherwise
*/
public function has(string $key)
{
return \array_key_exists($key, $this->parameters);
}
/**
* Removes a parameter.
*/
public function remove(string $key)
{
unset($this->parameters[$key]);
}
/**
* Returns the alphabetic characters of the parameter value.
*
* @return string The filtered value
*/
public function getAlpha(string $key, string $default = '')
{
return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default));
}
/**
* Returns the alphabetic characters and digits of the parameter value.
*
* @return string The filtered value
*/
public function getAlnum(string $key, string $default = '')
{
return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default));
}
/**
* Returns the digits of the parameter value.
*
* @return string The filtered value
*/
public function getDigits(string $key, string $default = '')
{
// we need to remove - and + because they're allowed in the filter
return str_replace(['-', '+'], '', $this->filter($key, $default, \FILTER_SANITIZE_NUMBER_INT));
}
/**
* Returns the parameter value converted to integer.
*
* @return int The filtered value
*/
public function getInt(string $key, int $default = 0)
{
return (int) $this->get($key, $default);
}
/**
* Returns the parameter value converted to boolean.
*
* @return bool The filtered value
*/
public function getBoolean(string $key, bool $default = false)
{
return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN);
}
/**
* Filter key.
*
* @param mixed $default Default = null
* @param int $filter FILTER_* constant
* @param mixed $options Filter options
*
* @see https://php.net/filter-var
*
* @return mixed
*/
public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = [])
{
$value = $this->get($key, $default);
// Always turn $options into an array - this allows filter_var option shortcuts.
if (!\is_array($options) && $options) {
$options = ['flags' => $options];
}
// Add a convenience check for arrays.
if (\is_array($value) && !isset($options['flags'])) {
$options['flags'] = \FILTER_REQUIRE_ARRAY;
}
if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) {
trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__);
// throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null)));
}
return filter_var($value, $filter, $options);
}
/**
* Returns an iterator for parameters.
*
* @return \ArrayIterator An \ArrayIterator instance
*/
public function getIterator()
{
return new \ArrayIterator($this->parameters);
}
/**
* Returns the number of parameters.
*
* @return int The number of parameters
*/
public function count()
{
return \count($this->parameters);
}
}
Logfile vom CM
Code:
$ /usr/bin/php74 -q -dmax_execution_time=0 -dmemory_limit=-1 -dallow_url_fopen=1 -ddisable_functions= -ddate.timezone=Europe/Berlin /www/htdocs/xxyyzz00/_neu/web/contao-manager.phar.php composer update --with-dependencies --prefer-dist --no-dev --no-progress --no-ansi --no-interaction --optimize-autoloader
Loading composer repositories with package information
Updating dependencies
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
Lock file operations: 1 install, 63 updates, 0 removals
- Upgrading contao/calendar-bundle (4.11.5 => 4.11.6)
- Upgrading contao/comments-bundle (4.11.5 => 4.11.6)
- Upgrading contao/core-bundle (4.11.5 => 4.11.6)
- Upgrading contao/faq-bundle (4.11.5 => 4.11.6)
- Upgrading contao/installation-bundle (4.11.5 => 4.11.6)
- Upgrading contao/listing-bundle (4.11.5 => 4.11.6)
- Upgrading contao/manager-bundle (4.11.5 => 4.11.6)
- Upgrading contao/news-bundle (4.11.5 => 4.11.6)
- Upgrading contao/newsletter-bundle (4.11.5 => 4.11.6)
- Upgrading doctrine/cache (2.0.3 => 2.1.1)
- Upgrading inspiredminds/contao-include-info (1.0.1 => 1.0.2)
- Upgrading knplabs/knp-time-bundle (v1.16.0 => v1.16.1)
- Upgrading markocupic/be_email (3.3.4 => 3.3.11)
- Upgrading monolog/monolog (2.3.0 => 2.3.2)
- Upgrading nikic/php-parser (v4.11.0 => v4.12.0)
- Upgrading php-http/message (1.11.1 => 1.11.2)
- Locking psr/event-dispatcher (1.0.0)
- Upgrading symfony/asset (v5.2.10 => v5.2.12)
- Upgrading symfony/cache (v5.2.11 => v5.2.12)
- Upgrading symfony/config (v4.4.26 => v5.2.12)
- Upgrading symfony/console (v4.4.26 => v5.2.14)
- Upgrading symfony/debug (v4.4.25 => v4.4.27)
- Upgrading symfony/debug-bundle (v4.4.20 => v5.2.12)
- Upgrading symfony/dependency-injection (v4.4.26 => v5.2.12)
- Upgrading symfony/doctrine-bridge (v4.4.25 => v5.2.12)
- Upgrading symfony/dom-crawler (v5.2.10 => v5.2.12)
- Upgrading symfony/dotenv (v5.2.10 => v5.2.14)
- Upgrading symfony/error-handler (v4.4.26 => v5.3.4)
- Upgrading symfony/event-dispatcher (v4.4.25 => v5.2.12)
- Upgrading symfony/event-dispatcher-contracts (v1.1.9 => v2.4.0)
- Upgrading symfony/expression-language (v5.2.10 => v5.2.12)
- Upgrading symfony/filesystem (v5.2.11 => v5.2.12)
- Upgrading symfony/finder (v5.2.10 => v5.2.12)
- Upgrading symfony/framework-bundle (v4.4.26 => v5.2.12)
- Upgrading symfony/http-client (v5.2.11 => v5.2.12)
- Upgrading symfony/http-foundation (v5.2.11 => v5.2.14)
- Upgrading symfony/http-kernel (v4.4.26 => v5.2.14)
- Upgrading symfony/lock (v5.2.11 => v5.2.12)
- Upgrading symfony/mailer (v5.2.11 => v5.2.12)
- Upgrading symfony/mime (v5.3.2 => v5.3.4)
- Upgrading symfony/monolog-bridge (v5.2.11 => v5.2.12)
- Upgrading symfony/options-resolver (v5.3.0 => v5.3.4)
- Upgrading symfony/polyfill-intl-grapheme (v1.23.0 => v1.23.1)
- Upgrading symfony/polyfill-mbstring (v1.23.0 => v1.23.1)
- Upgrading symfony/polyfill-php80 (v1.23.0 => v1.23.1)
- Upgrading symfony/process (v5.2.11 => v5.2.12)
- Upgrading symfony/property-access (v5.3.0 => v5.3.4)
- Upgrading symfony/property-info (v5.3.1 => v5.3.4)
- Upgrading symfony/proxy-manager-bridge (v4.4.25 => v5.2.12)
- Upgrading symfony/routing (v4.4.25 => v5.2.12)
- Upgrading symfony/security-bundle (v4.4.26 => v5.2.12)
- Upgrading symfony/security-core (v4.4.26 => v5.2.14)
- Upgrading symfony/security-csrf (v5.2.10 => v5.2.12)
- Upgrading symfony/security-guard (v4.4.26 => v5.2.12)
- Upgrading symfony/security-http (v4.4.26 => v5.2.12)
- Upgrading symfony/stopwatch (v5.2.10 => v5.2.12)
- Upgrading symfony/translation (v4.4.26 => v5.2.12)
- Upgrading symfony/twig-bridge (v4.4.26 => v5.2.12)
- Upgrading symfony/twig-bundle (v4.4.26 => v5.2.12)
- Upgrading symfony/var-dumper (v5.2.11 => v5.2.12)
- Upgrading symfony/var-exporter (v5.3.3 => v5.3.4)
- Upgrading symfony/web-profiler-bundle (v4.4.26 => v5.2.13)
- Upgrading symfony/yaml (v5.2.11 => v5.2.14)
- Upgrading terminal42/escargot (1.1.0 => 1.2.0)
Writing lock file
Installing dependencies from lock file
Nothing to install, update or remove
Package eikona-media/contao-password-policy is abandoned, you should avoid using it. Use terminal42/contao-password-validation instead.
Package league/uri-hostname-parser is abandoned, you should avoid using it. No replacement was suggested.
Package league/uri-schemes is abandoned, you should avoid using it. No replacement was suggested.
Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead.
Generating optimized autoload files
Class League\Uri\Schemes\AbstractUri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Data located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\File located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Ftp located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Http located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Uri located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\UriException located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
Class League\Uri\Schemes\Ws located in ./vendor/league/uri-schemes/src/Schemes/deprecated.php does not comply with psr-4 autoloading standard. Skipping.
87 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
contao/manager-plugin: Generating plugin class...
contao/manager-plugin: ...done generating plugin class
> @php vendor/bin/contao-setup
In ParameterBag.php line 93:
You have requested a non-existent parameter "kernel.root_dir". Did you mean
one of these: "kernel.project_dir", "kernel.build_dir", "kernel.cache_dir"
, "kernel.logs_dir"?
Script @php vendor/bin/contao-setup handling the post-update-cmd event returned with error code 1
# Process terminated with exit code 1
# Result: General error
composer.json der Seite, die funktioniert hat:
Code:
{
"type": "project",
"require": {
"christianbarkowsky/rel-canonical": "^3.3",
"cliffparnitzky/user-member-bridge": "^1.2",
"codefog/contao-cookiebar": "^2.1",
"contao/calendar-bundle": "4.11.*",
"contao/comments-bundle": "4.11.*",
"contao/conflicts": "*@dev",
"contao/listing-bundle": "4.11.*",
"contao/manager-bundle": "4.11.*",
"contao/news-bundle": "4.11.*",
"contao/newsletter-bundle": "4.11.*",
"eikona-media/contao-password-policy": "^1.0",
"felixpfeiffer/subcolumns": "^3.1",
"inspiredminds/contao-include-info": "^1.0",
"inspiredminds/contao-sibling-navigation": "^1.1",
"martin-kozianka/contao-timetags": "^1.0",
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
"markocupic/be_email": "^3.3",
"netzmacht/contao-leaflet-maps": "^3.1"
},
"minimum-stability": "stable",
"prefer-stable": true,
"extra": {
"contao-component-dir": "assets"
},
"conflict": {
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
composer.json der beiden nicht funktionierenden:
Code:
{
"type": "project",
"require": {
"christianbarkowsky/rel-canonical": "^3.3",
"cliffparnitzky/user-member-bridge": "^1.2",
"codefog/contao-cookiebar": "^2.1",
"contao/calendar-bundle": "4.11.*",
"contao/comments-bundle": "4.11.*",
"contao/conflicts": "*@dev",
"contao/listing-bundle": "4.11.*",
"contao/manager-bundle": "4.11.*",
"contao/news-bundle": "4.11.*",
"contao/newsletter-bundle": "4.11.*",
"eikona-media/contao-password-policy": "^1.0",
"felixpfeiffer/subcolumns": "^3.1",
"inspiredminds/contao-include-info": "^1.0",
"inspiredminds/contao-sibling-navigation": "^1.1",
"martin-kozianka/contao-timetags": "^1.0",
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
"markocupic/be_email": "^3.3",
"srhinow/srlayer": "^3.1"
},
"minimum-stability": "stable",
"prefer-stable": true,
"extra": {
"contao-component-dir": "assets"
},
"conflict": {
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
{
"type": "project",
"require": {
"christianbarkowsky/rel-canonical": "^3.3",
"cliffparnitzky/user-member-bridge": "^1.2",
"codefog/contao-cookiebar": "^2.1",
"contao/calendar-bundle": "4.11.*",
"contao/comments-bundle": "4.11.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "4.11.*",
"contao/listing-bundle": "4.11.*",
"contao/manager-bundle": "4.11.*",
"contao/news-bundle": "4.11.*",
"contao/newsletter-bundle": "4.11.*",
"eikona-media/contao-password-policy": "^1.0",
"felixpfeiffer/subcolumns": "^3.1",
"inspiredminds/contao-include-info": "^1.0",
"inspiredminds/contao-sibling-navigation": "^1.1",
"martin-kozianka/contao-timetags": "^1.0",
"markocupic/be_email": "^3.3",
"menatwork/contao-multicolumnwizard-bundle": "^3.4"
},
"minimum-stability": "stable",
"prefer-stable": true,
"extra": {
"contao-component-dir": "assets"
},
"conflict": {
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/contao-setup"
],
"post-update-cmd": [
"@php vendor/bin/contao-setup"
]
}
}
Ich habe auch schon per FTP folgende Verzeichnisse gelöscht, um eine komplette Neuinstallation anzustossen: /vendor, /var, /contao-manager (ausser *.json files), /assets
Leider auch erfolglos...
Besteht da irgendein Konflikt?
Danke schonmal vorab für Ideen und Hilfe :cool:
ToM