diff --git a/Dockerfile b/Dockerfile index 43dab7e633..1380f03508 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-fpm-alpine +FROM php:8.2-fpm-alpine ENV FOP_HOME=/usr/share/fop-2.1 \ COMPOSER_ALLOW_SUPERUSER=1 \ @@ -15,6 +15,7 @@ RUN set -xe \ autoconf \ build-base \ openldap-dev \ + linux-headers \ && docker-php-ext-install \ calendar \ gettext \ @@ -28,10 +29,10 @@ RUN set -xe \ zip \ ldap \ && pecl install apcu pcov \ - && curl -Ls https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.tar.gz | tar xz -C / \ - && cd /pecl-memcache-NON_BLOCKING_IO_php7 \ + && curl -Ls https://github.com/websupport-sk/pecl-memcache/archive/refs/tags/8.2.tar.gz | tar xz -C / \ + && cd /pecl-memcache-8.2 \ && phpize && ./configure && make && make install \ - && cd / && rm -rf /pecl-memcache-NON_BLOCKING_IO_php7 \ + && cd / && rm -rf /pecl-memcache-8.2 \ && docker-php-ext-enable apcu memcache pcov \ && apk add --no-cache --virtual .phpext-rundeps \ gettext \ diff --git a/apps/qubit/modules/repository/actions/browseAction.class.php b/apps/qubit/modules/repository/actions/browseAction.class.php index 6be51aaf5b..a4f274d2f2 100644 --- a/apps/qubit/modules/repository/actions/browseAction.class.php +++ b/apps/qubit/modules/repository/actions/browseAction.class.php @@ -211,7 +211,7 @@ private function getAdvancedFilterTerms() private function setI18nFieldCultures() { foreach (self::$AGGS as $key => &$value) { - if (false !== array_search('i18n.%s', $value['field'])) { + if (is_array($value['field']) && false !== array_search('i18n.%s', $value['field'])) { $value['field'] = sprintf($value['field'], $this->context->user->getCulture()); } } diff --git a/lib/QubitCsvImport.class.php b/lib/QubitCsvImport.class.php index 5734446a01..bd29ff0bff 100644 --- a/lib/QubitCsvImport.class.php +++ b/lib/QubitCsvImport.class.php @@ -169,7 +169,7 @@ public function import($csvFile, $type = null, $csvOrigFileName = null) // Throw exception if exit code is greater than zero. if (0 < $exitCode) { - $output = implode(array_filter($output), '; '); + $output = implode('; ', array_filter($output)); throw new sfException($output); } diff --git a/lib/helper/QubitHelper.php b/lib/helper/QubitHelper.php index 8d1c26e640..9861abe5aa 100644 --- a/lib/helper/QubitHelper.php +++ b/lib/helper/QubitHelper.php @@ -102,7 +102,7 @@ function render_b5_field($field, $translation = null, $options = []) $widget = $field->getWidget(); if ( - in_array($field->type, ['checkbox', 'radio']) + in_array($widget->getOption('type'), ['checkbox', 'radio']) || $widget instanceof sfWidgetFormSelectRadio || ( $widget instanceof sfWidgetFormChoice @@ -113,7 +113,7 @@ function render_b5_field($field, $translation = null, $options = []) $isFormCheck = true; $inputClass = 'form-check-input'; $labelClass = 'form-check-label'; - } elseif ('color' == $field->type) { + } elseif ('color' == $widget->getOption('type')) { $inputClass .= ' form-control-color'; } @@ -773,7 +773,7 @@ function render_autocomplete_string($hit) } if (0 < count($levelOfDescriptionAndIdentifier)) { - $string[] = implode($levelOfDescriptionAndIdentifier, ' '); + $string[] = implode(' ', $levelOfDescriptionAndIdentifier); } $titleAndPublicationStatus = []; @@ -787,7 +787,7 @@ function render_autocomplete_string($hit) } if (0 < count($titleAndPublicationStatus)) { - $string[] = implode($titleAndPublicationStatus, ' '); + $string[] = implode(' ', $titleAndPublicationStatus); } return implode(' - ', $string); diff --git a/lib/job/arGearman.class.php b/lib/job/arGearman.class.php index 36292f2858..4840ce52b6 100644 --- a/lib/job/arGearman.class.php +++ b/lib/job/arGearman.class.php @@ -98,7 +98,7 @@ public static function getAbilities($options = []) $abilities = array_merge($abilities, $config['worker_types'][$type]); } } else { - $abilities = call_user_func_array('array_merge', $config['worker_types']); + $abilities = call_user_func_array('array_merge', array_values($config['worker_types'])); } return $abilities; diff --git a/lib/model/QubitActor.php b/lib/model/QubitActor.php index 632d977e41..cf4141d0bd 100644 --- a/lib/model/QubitActor.php +++ b/lib/model/QubitActor.php @@ -70,7 +70,7 @@ public function __get($name) return []; } - return call_user_func_array([$this, 'BaseActor::__get'], $args); + return call_user_func_array('BaseActor::__get', $args); } public function __set($name, $value) @@ -104,7 +104,7 @@ public function __set($name, $value) return $this; } - return call_user_func_array([$this, 'BaseActor::__set'], $args); + return call_user_func_array('BaseActor::__set', $args); } public function save($connection = null) diff --git a/lib/model/QubitInformationObject.php b/lib/model/QubitInformationObject.php index 72d980dbf3..0c3acb752e 100644 --- a/lib/model/QubitInformationObject.php +++ b/lib/model/QubitInformationObject.php @@ -123,7 +123,7 @@ public function __get($name) case 'sourceStandard': foreach ($this->ancestors->andSelf()->orderBy('rgt') as $item) { if (isset($item->sourceStandard)) { - return call_user_func_array([$item, 'QubitObject::__get'], $args); + return call_user_func_array('QubitObject::__get', $args); } // Stop iteration before the root object is reached @@ -135,7 +135,7 @@ public function __get($name) break; default: - return call_user_func_array([$this, 'BaseInformationObject::__get'], $args); + return call_user_func_array('BaseInformationObject::__get', $args); } } @@ -172,7 +172,7 @@ public function __set($name, $value) return $this; default: - return call_user_func_array([$this, 'BaseInformationObject::__set'], $args); + return call_user_func_array('BaseInformationObject::__set', $args); } } diff --git a/lib/model/QubitObject.php b/lib/model/QubitObject.php index c7dad3e80e..68eff619cf 100644 --- a/lib/model/QubitObject.php +++ b/lib/model/QubitObject.php @@ -43,7 +43,7 @@ public function __isset($name) return isset($this->values['slug']); default: - return call_user_func_array([$this, 'BaseObject::__isset'], $args); + return call_user_func_array('BaseObject::__isset', $args); } } @@ -69,7 +69,7 @@ public function __get($name) return $this->values['slug']; default: - return call_user_func_array([$this, 'BaseObject::__get'], $args); + return call_user_func_array('BaseObject::__get', $args); } } @@ -84,7 +84,7 @@ public function __set($name, $value) return $this; default: - return call_user_func_array([$this, 'BaseObject::__set'], $args); + return call_user_func_array('BaseObject::__set', $args); } } diff --git a/lib/model/QubitRepository.php b/lib/model/QubitRepository.php index b0fd5cdb3c..ea06fac1c2 100644 --- a/lib/model/QubitRepository.php +++ b/lib/model/QubitRepository.php @@ -53,7 +53,7 @@ public function __get($name) break; default: - return call_user_func_array([$this, 'BaseRepository::__get'], $args); + return call_user_func_array('BaseRepository::__get', $args); } } @@ -88,7 +88,7 @@ public function __set($name, $value) return $this; default: - return call_user_func_array([$this, 'BaseRepository::__set'], $args); + return call_user_func_array('BaseRepository::__set', $args); } } diff --git a/lib/model/QubitSlug.php b/lib/model/QubitSlug.php index ed4f1444d1..2d933a790d 100644 --- a/lib/model/QubitSlug.php +++ b/lib/model/QubitSlug.php @@ -78,7 +78,7 @@ public static function slugify($slug, $creationType = null) $slugCreation = (null === $creationType) ? sfConfig::get('app_permissive_slug_creation', QubitSlug::SLUG_RESTRICTIVE) : $creationType; // Remove apostrophes from slug - $slug = preg_replace('/\'/', '', $slug); + $slug = preg_replace('/\'/', '', (string) $slug); switch ($slugCreation) { case QubitSlug::SLUG_PERMISSIVE: diff --git a/lib/model/om/BaseActor.php b/lib/model/om/BaseActor.php index 63a969725e..a7389eca71 100644 --- a/lib/model/om/BaseActor.php +++ b/lib/model/om/BaseActor.php @@ -90,7 +90,7 @@ public function __isset($name) try { - return call_user_func_array(array($this, 'QubitObject::__isset'), $args); + return call_user_func_array('QubitObject::__isset', $args); } catch (sfException $e) { @@ -149,7 +149,7 @@ public function __get($name) try { - return call_user_func_array(array($this, 'QubitObject::__get'), $args); + return call_user_func_array('QubitObject::__get', $args); } catch (sfException $e) { @@ -242,7 +242,7 @@ public function __get($name) try { - if (1 > strlen($value = call_user_func_array(array($this->getCurrentactorI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) + if (1 > strlen((string) $value = call_user_func_array(array($this->getCurrentactorI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrentactorI18n(array('sourceCulture' => true) + $options), '__get'), $args); } @@ -266,7 +266,7 @@ public function __set($name, $value) $options = $args[2]; } - call_user_func_array(array($this, 'QubitObject::__set'), $args); + call_user_func_array('QubitObject::__set', $args); call_user_func_array(array($this->getCurrentactorI18n($options), '__set'), $args); @@ -283,7 +283,7 @@ public function __unset($name) $options = $args[1]; } - call_user_func_array(array($this, 'QubitObject::__unset'), $args); + call_user_func_array('QubitObject::__unset', $args); call_user_func_array(array($this->getCurrentactorI18n($options), '__unset'), $args); diff --git a/lib/model/om/BaseActorI18n.php b/lib/model/om/BaseActorI18n.php index 1490a70b67..264fed2297 100644 --- a/lib/model/om/BaseActorI18n.php +++ b/lib/model/om/BaseActorI18n.php @@ -209,6 +209,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -250,6 +251,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -304,6 +306,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -335,6 +338,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseContactInformation.php b/lib/model/om/BaseContactInformation.php index 1435914ed7..ff6423788d 100644 --- a/lib/model/om/BaseContactInformation.php +++ b/lib/model/om/BaseContactInformation.php @@ -228,6 +228,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -299,6 +300,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -355,6 +357,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -396,6 +399,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseInformationObject.php b/lib/model/om/BaseInformationObject.php index 6196665d8b..1920c5352e 100644 --- a/lib/model/om/BaseInformationObject.php +++ b/lib/model/om/BaseInformationObject.php @@ -119,7 +119,7 @@ public function __isset($name) try { - return call_user_func_array(array($this, 'QubitObject::__isset'), $args); + return call_user_func_array('QubitObject::__isset', $args); } catch (sfException $e) { @@ -178,7 +178,7 @@ public function __get($name) try { - return call_user_func_array(array($this, 'QubitObject::__get'), $args); + return call_user_func_array('QubitObject::__get', $args); } catch (sfException $e) { @@ -237,7 +237,7 @@ public function __get($name) try { - if (1 > strlen($value = call_user_func_array(array($this->getCurrentinformationObjectI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) + if (1 > strlen((string) $value = call_user_func_array(array($this->getCurrentinformationObjectI18n($options), '__get'), $args)) && !empty($options['cultureFallback'])) { return call_user_func_array(array($this->getCurrentinformationObjectI18n(array('sourceCulture' => true) + $options), '__get'), $args); } @@ -301,7 +301,7 @@ public function __set($name, $value) $options = $args[2]; } - call_user_func_array(array($this, 'QubitObject::__set'), $args); + call_user_func_array('QubitObject::__set', $args); call_user_func_array(array($this->getCurrentinformationObjectI18n($options), '__set'), $args); @@ -318,7 +318,7 @@ public function __unset($name) $options = $args[1]; } - call_user_func_array(array($this, 'QubitObject::__unset'), $args); + call_user_func_array('QubitObject::__unset', $args); call_user_func_array(array($this->getCurrentinformationObjectI18n($options), '__unset'), $args); diff --git a/lib/model/om/BaseInformationObjectI18n.php b/lib/model/om/BaseInformationObjectI18n.php index f979610bd1..dfa52ca05e 100644 --- a/lib/model/om/BaseInformationObjectI18n.php +++ b/lib/model/om/BaseInformationObjectI18n.php @@ -225,6 +225,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -266,6 +267,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -320,6 +322,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -351,6 +354,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseNote.php b/lib/model/om/BaseNote.php index 740a8bbb31..68337e19f3 100644 --- a/lib/model/om/BaseNote.php +++ b/lib/model/om/BaseNote.php @@ -208,6 +208,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -279,6 +280,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -335,6 +337,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -376,6 +379,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseOtherName.php b/lib/model/om/BaseOtherName.php index 0475c7e114..c7a399688f 100644 --- a/lib/model/om/BaseOtherName.php +++ b/lib/model/om/BaseOtherName.php @@ -208,6 +208,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -279,6 +280,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -335,6 +337,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -376,6 +379,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseProperty.php b/lib/model/om/BaseProperty.php index b11f8bd9d7..c64d7d860d 100644 --- a/lib/model/om/BaseProperty.php +++ b/lib/model/om/BaseProperty.php @@ -206,6 +206,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -277,6 +278,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -333,6 +335,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -374,6 +377,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseRepository.php b/lib/model/om/BaseRepository.php index 594418dba8..99866d1e7a 100644 --- a/lib/model/om/BaseRepository.php +++ b/lib/model/om/BaseRepository.php @@ -86,7 +86,7 @@ public function __isset($name) try { - return call_user_func_array(array($this, 'QubitActor::__isset'), $args); + return call_user_func_array('QubitActor::__isset', $args); } catch (sfException $e) { @@ -130,7 +130,7 @@ public function __get($name) try { - return call_user_func_array(array($this, 'QubitActor::__get'), $args); + return call_user_func_array('QubitActor::__get', $args); } catch (sfException $e) { @@ -196,7 +196,7 @@ public function __set($name, $value) $options = $args[2]; } - call_user_func_array(array($this, 'QubitActor::__set'), $args); + call_user_func_array('QubitActor::__set', $args); call_user_func_array(array($this->getCurrentrepositoryI18n($options), '__set'), $args); @@ -213,7 +213,7 @@ public function __unset($name) $options = $args[1]; } - call_user_func_array(array($this, 'QubitActor::__unset'), $args); + call_user_func_array('QubitActor::__unset', $args); call_user_func_array(array($this->getCurrentrepositoryI18n($options), '__unset'), $args); diff --git a/lib/model/om/BaseRepositoryI18n.php b/lib/model/om/BaseRepositoryI18n.php index 33534905ec..c332cda8ea 100644 --- a/lib/model/om/BaseRepositoryI18n.php +++ b/lib/model/om/BaseRepositoryI18n.php @@ -213,6 +213,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -254,6 +255,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -308,6 +310,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -339,6 +342,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseSettingI18n.php b/lib/model/om/BaseSettingI18n.php index 5abc44701d..f5ad7238b8 100644 --- a/lib/model/om/BaseSettingI18n.php +++ b/lib/model/om/BaseSettingI18n.php @@ -185,6 +185,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -226,6 +227,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -280,6 +282,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -311,6 +314,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/model/om/BaseStatus.php b/lib/model/om/BaseStatus.php index 402aa14e85..179a7d4b7f 100644 --- a/lib/model/om/BaseStatus.php +++ b/lib/model/om/BaseStatus.php @@ -186,6 +186,7 @@ public function __isset($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetExists($offset) { $args = func_get_args(); @@ -227,6 +228,7 @@ public function __get($name) throw new sfException("Unknown record property \"$name\" on \"".get_class($this).'"'); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { $args = func_get_args(); @@ -281,6 +283,7 @@ public function __set($name, $value) return $this; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $args = func_get_args(); @@ -312,6 +315,7 @@ public function __unset($name) return $this; } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { $args = func_get_args(); diff --git a/lib/search/QubitSearchEngine.class.php b/lib/search/QubitSearchEngine.class.php index d6ab172996..446c499d7a 100644 --- a/lib/search/QubitSearchEngine.class.php +++ b/lib/search/QubitSearchEngine.class.php @@ -22,6 +22,9 @@ */ abstract class QubitSearchEngine { + private $dispatcher; + private $event; + /** * Constructor. */ diff --git a/lib/task/digitalobject/digitalObjectRegenDerivativesTask.class.php b/lib/task/digitalobject/digitalObjectRegenDerivativesTask.class.php index 98775a2d13..ccc96644f2 100644 --- a/lib/task/digitalobject/digitalObjectRegenDerivativesTask.class.php +++ b/lib/task/digitalobject/digitalObjectRegenDerivativesTask.class.php @@ -19,6 +19,8 @@ class digitalObjectRegenDerivativesTask extends arBaseTask { + private $validTypes = []; + public static function regenerateDerivatives(&$digitalObject, $options = []) { // Determine usage ID from type flag diff --git a/lib/task/import/csvAccessionImportTask.class.php b/lib/task/import/csvAccessionImportTask.class.php index 20b4a4e4dd..17275a9815 100644 --- a/lib/task/import/csvAccessionImportTask.class.php +++ b/lib/task/import/csvAccessionImportTask.class.php @@ -225,7 +225,9 @@ public function execute($arguments = [], $options = []) if (!empty($identifiers) || !empty($identifierNotes)) { $identifierTypes = $self->rowStatusVars['alternativeIdentifierTypes']; - for ($index = 0; $index < max(count($identifiers), count($identifierNotes)); ++$index) { + $identifierCount = empty($identifiers) ? 0 : count($identifiers); + $identifierNotesCount = empty($identifierNotes) ? 0 : count($identifierNotes); + for ($index = 0; $index < max($identifierCount, $identifierNotesCount); ++$index) { $identifier = (empty($identifiers[$index])) ? null : $identifiers[$index]; if (!empty($identifier) || !empty($identifierNotes[$index])) { diff --git a/lib/task/migrate/QubitMigrate.class.php b/lib/task/migrate/QubitMigrate.class.php index 5b49ed9d02..ff434c39f3 100644 --- a/lib/task/migrate/QubitMigrate.class.php +++ b/lib/task/migrate/QubitMigrate.class.php @@ -245,6 +245,10 @@ public static function findForeignKeys(array $tables, $configuration) continue; } + if (!is_array($column)) { + continue; + } + if ('integer' != $column['type']) { continue; } @@ -481,12 +485,16 @@ public static function addColumn($table, $column, array $options = []) $connection->exec($query); } } catch (Exception $e) { - $connection->rollback(); + if ($connection->inTransaction()) { + $connection->rollback(); + } throw $e; } - $connection->commit(); + if ($connection->inTransaction()) { + $connection->commit(); + } } public static function dropColumn($table, $column) diff --git a/lib/task/tools/unlinkCreatorTask.class.php b/lib/task/tools/unlinkCreatorTask.class.php index 6a57b8bc8b..4ef2828332 100644 --- a/lib/task/tools/unlinkCreatorTask.class.php +++ b/lib/task/tools/unlinkCreatorTask.class.php @@ -190,7 +190,7 @@ private function unlinkCreators($criteria) } if ($deleteCreators) { - self::removeCreator($io, $creatorIds); + self::removeCreator($creatorIds, $io); } } } @@ -201,7 +201,7 @@ private function unlinkCreators($criteria) * @param null|mixed $infoObj * @param mixed $creatorIds */ - private function removeCreator($infoObj = null, $creatorIds) + private function removeCreator($creatorIds, $infoObj = null) { // This will unlink this Actor from all creation events on this IO. foreach ($infoObj->getActorEvents(['eventTypeId' => QubitTerm::CREATION_ID]) as $event) { diff --git a/plugins/arDominionB5Plugin/modules/digitalobject/templates/editSuccess.php b/plugins/arDominionB5Plugin/modules/digitalobject/templates/editSuccess.php index 7c8b07f828..035dabe63f 100644 --- a/plugins/arDominionB5Plugin/modules/digitalobject/templates/editSuccess.php +++ b/plugins/arDominionB5Plugin/modules/digitalobject/templates/editSuccess.php @@ -106,11 +106,11 @@ mediaTypeId || QubitTerm::AUDIO_ID == $resource->mediaTypeId) { ?> - + $videoTrack) { ?> mediaTypeId && QubitTerm::SUBTITLES_ID == $usageId) { ?> - + $resource, 'subtitles' => $videoTrack, 'form' => $form, 'usageId' => $usageId]); ?> @@ -132,7 +132,7 @@ - + diff --git a/plugins/arDominionB5Plugin/modules/sfIsdiahPlugin/templates/indexSuccess.php b/plugins/arDominionB5Plugin/modules/sfIsdiahPlugin/templates/indexSuccess.php index 61af4dd234..9b28d86978 100644 --- a/plugins/arDominionB5Plugin/modules/sfIsdiahPlugin/templates/indexSuccess.php +++ b/plugins/arDominionB5Plugin/modules/sfIsdiahPlugin/templates/indexSuccess.php @@ -278,7 +278,7 @@
(.*)<\/code>$/s', '$1', highlight_file($file, true)));
diff --git a/vendor/symfony/lib/form/sfForm.class.php b/vendor/symfony/lib/form/sfForm.class.php
index f602950c52..e4d2b20036 100644
--- a/vendor/symfony/lib/form/sfForm.class.php
+++ b/vendor/symfony/lib/form/sfForm.class.php
@@ -1051,6 +1051,7 @@ public function __isset($name)
return isset($this->widgetSchema[$name]);
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
$args = func_get_args();
@@ -1095,6 +1096,7 @@ public function __get($name)
return $this->formFields[$name];
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$args = func_get_args();
@@ -1110,6 +1112,7 @@ public function offsetGet($offset)
*
* @throws LogicException
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new LogicException('Cannot update form fields.');
@@ -1136,6 +1139,7 @@ public function __unset($name)
$this->resetFormFields();
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$args = func_get_args();
@@ -1193,6 +1197,7 @@ public function getFormFieldSchema()
/**
* Resets the field names array to the beginning (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
$this->fieldNames = $this->widgetSchema->getPositions();
@@ -1206,6 +1211,7 @@ public function rewind()
*
* @return string The key
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return current($this->fieldNames);
@@ -1216,6 +1222,7 @@ public function key()
*
* @return mixed The escaped value
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return $this[current($this->fieldNames)];
@@ -1224,6 +1231,7 @@ public function current()
/**
* Moves to the next form field (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function next()
{
next($this->fieldNames);
@@ -1235,6 +1243,7 @@ public function next()
*
* @return boolean The validity of the current element; true if it is valid
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->count > 0;
@@ -1245,6 +1254,7 @@ public function valid()
*
* @return integer The number of embedded form fields
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return count($this->getFormFieldSchema());
diff --git a/vendor/symfony/lib/form/sfFormField.class.php b/vendor/symfony/lib/form/sfFormField.class.php
index ff496c9e16..0c7b4c5bbb 100644
--- a/vendor/symfony/lib/form/sfFormField.class.php
+++ b/vendor/symfony/lib/form/sfFormField.class.php
@@ -316,11 +316,11 @@ public function getError()
/**
* Returns true is the field has an error.
*
- * @return Boolean true if the field has some errors, false otherwise
+ * @return bool true if the field has some errors, false otherwise
*/
public function hasError()
{
- return null !== $this->error && count($this->error);
+ return !empty($this->error);
}
public function __call($name, $args)
@@ -329,7 +329,10 @@ public function __call($name, $args)
array_unshift($args, $name);
- call_user_func_array(array($clone->parent->getWidget()->__get($clone->name), 'setOption'), $args);
+ if ($clone->parent && $clone->parent->getWidget()->__get($clone->name))
+ {
+ call_user_func_array(array($clone->parent->getWidget()->__get($clone->name), 'setOption'), $args);
+ }
return $clone;
}
diff --git a/vendor/symfony/lib/form/sfFormFieldSchema.class.php b/vendor/symfony/lib/form/sfFormFieldSchema.class.php
index a30483a38a..0f4dd180c6 100644
--- a/vendor/symfony/lib/form/sfFormFieldSchema.class.php
+++ b/vendor/symfony/lib/form/sfFormFieldSchema.class.php
@@ -91,6 +91,7 @@ public function getHiddenFields($recursive = true)
*
* @return Boolean true if the widget exists, false otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
return isset($this->widget[$name]);
@@ -103,6 +104,7 @@ public function offsetExists($name)
*
* @return sfFormField A form field instance
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
if (!isset($this->fields[$name]))
@@ -142,6 +144,7 @@ public function offsetGet($name)
*
* @throws LogicException
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new LogicException('Cannot update form fields (read-only).');
@@ -154,6 +157,7 @@ public function offsetSet($offset, $value)
*
* @throws LogicException
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
throw new LogicException('Cannot remove form fields (read-only).');
@@ -162,6 +166,7 @@ public function offsetUnset($offset)
/**
* Resets the field names array to the beginning (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
reset($this->fieldNames);
@@ -173,6 +178,7 @@ public function rewind()
*
* @return string The key
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return current($this->fieldNames);
@@ -183,6 +189,7 @@ public function key()
*
* @return mixed The escaped value
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return $this[current($this->fieldNames)];
@@ -191,6 +198,7 @@ public function current()
/**
* Moves to the next form field (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function next()
{
next($this->fieldNames);
@@ -202,6 +210,7 @@ public function next()
*
* @return boolean The validity of the current element; true if it is valid
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->count > 0;
@@ -212,6 +221,7 @@ public function valid()
*
* @return integer The number of embedded form fields
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return count($this->fieldNames);
diff --git a/vendor/symfony/lib/generator/sfModelGenerator.class.php b/vendor/symfony/lib/generator/sfModelGenerator.class.php
index 10d32e1397..672f584787 100644
--- a/vendor/symfony/lib/generator/sfModelGenerator.class.php
+++ b/vendor/symfony/lib/generator/sfModelGenerator.class.php
@@ -177,7 +177,7 @@ public function getPrimaryKeyUrlParams($prefix = '', $full = false)
return implode(".'&", $params);
}
- /**
+ /**
* Configures this generator.
*/
abstract protected function configure();
@@ -271,7 +271,7 @@ public function renderField($field)
}
else if ('Date' == $field->getType())
{
- $html = sprintf("false !== strtotime($html) ? format_date(%s, \"%s\") : ' '", $html, $field->getConfig('date_format', 'f'));
+ $html = sprintf("is_string($html) && false !== strtotime($html) ? format_date(%s, \"%s\") : ' '", $html, $field->getConfig('date_format', 'f'));
}
else if ('Boolean' == $field->getType())
{
diff --git a/vendor/symfony/lib/helper/DateHelper.php b/vendor/symfony/lib/helper/DateHelper.php
index d46f317e6f..e523359207 100644
--- a/vendor/symfony/lib/helper/DateHelper.php
+++ b/vendor/symfony/lib/helper/DateHelper.php
@@ -17,7 +17,7 @@
* @version SVN: $Id: DateHelper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
-function format_daterange($start_date, $end_date, $format = 'd', $full_text, $start_text, $end_text, $culture = null, $charset = null)
+function format_daterange($start_date, $end_date, $format = 'd', $full_text = '', $start_text = '', $end_text = '', $culture = null, $charset = null)
{
if ($start_date != '' && $end_date != '')
{
diff --git a/vendor/symfony/lib/helper/I18NHelper.php b/vendor/symfony/lib/helper/I18NHelper.php
index 0c7545fe67..51ec52e9c9 100644
--- a/vendor/symfony/lib/helper/I18NHelper.php
+++ b/vendor/symfony/lib/helper/I18NHelper.php
@@ -60,7 +60,7 @@ function __($text, $args = array(), $catalogue = 'messages')
*
* @return string Result of the translation
*/
-function format_number_choice($text, $args = array(), $number, $catalogue = 'messages')
+function format_number_choice($text, $args = array(), $number = null, $catalogue = 'messages')
{
$translated = __($text, $args, $catalogue);
diff --git a/vendor/symfony/lib/i18n/sfCultureInfo.class.php b/vendor/symfony/lib/i18n/sfCultureInfo.class.php
index ef0f2c772e..d63725b7af 100644
--- a/vendor/symfony/lib/i18n/sfCultureInfo.class.php
+++ b/vendor/symfony/lib/i18n/sfCultureInfo.class.php
@@ -516,7 +516,7 @@ public function getEnglishName()
$culture = $this->getInvariantCulture();
$language = $culture->findInfo("Languages/{$lang}");
- if (count($language) == 0)
+ if (is_array($language) && count($language) == 0)
{
return $this->culture;
}
diff --git a/vendor/symfony/lib/i18n/sfDateFormat.class.php b/vendor/symfony/lib/i18n/sfDateFormat.class.php
index 56292122b9..b0ad468c5c 100644
--- a/vendor/symfony/lib/i18n/sfDateFormat.class.php
+++ b/vendor/symfony/lib/i18n/sfDateFormat.class.php
@@ -239,9 +239,10 @@ public function format($time, $pattern = 'F', $inputPattern = null, $charset = '
}
else
{
- $function = ucfirst($this->getFunctionName($pattern));
+ $function = $this->getFunctionName($pattern);
if ($function != null)
{
+ $function = ucfirst($function);
$fName = 'get'.$function;
if (in_array($fName, $this->methods))
{
diff --git a/vendor/symfony/lib/i18n/sfI18N.class.php b/vendor/symfony/lib/i18n/sfI18N.class.php
index b5c8b6b141..fd6c26d7ae 100644
--- a/vendor/symfony/lib/i18n/sfI18N.class.php
+++ b/vendor/symfony/lib/i18n/sfI18N.class.php
@@ -271,6 +271,11 @@ public function getTimestampForCulture($dateTime, $culture = null)
list($day, $month, $year) = $this->getDateForCulture($dateTime, null === $culture ? $this->culture : $culture);
list($hour, $minute) = $this->getTimeForCulture($dateTime, null === $culture ? $this->culture : $culture);
+ // mktime behavior change with php8
+ // $hour become not nullable
+ $hour = null !== $hour ? $hour : 0;
+ $minute = null !== $minute ? $minute : 0;
+
return null === $day ? null : mktime($hour, $minute, 0, $month, $day, $year);
}
diff --git a/vendor/symfony/lib/log/sfFileLogger.class.php b/vendor/symfony/lib/log/sfFileLogger.class.php
index bc94a48094..b62964ab98 100644
--- a/vendor/symfony/lib/log/sfFileLogger.class.php
+++ b/vendor/symfony/lib/log/sfFileLogger.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -96,7 +96,7 @@ protected function doLog($message, $priority)
fwrite($this->fp, strtr($this->format, array(
'%type%' => $this->type,
'%message%' => $message,
- '%time%' => strftime($this->timeFormat),
+ '%time%' => self::strftime($this->timeFormat),
'%priority%' => $this->getPriority($priority),
'%EOL%' => PHP_EOL,
)));
@@ -125,4 +125,60 @@ public function shutdown()
fclose($this->fp);
}
}
+
+ /**
+ * @param $format
+ * @return false|string
+ */
+ public static function strftime($format)
+ {
+ if (version_compare(PHP_VERSION, '8.1.0') < 0) {
+ return strftime($format);
+ }
+ return date(self::_strftimeFormatToDateFormat($format));
+ }
+
+ /**
+ * Try to Convert a strftime to date format
+ *
+ * Unable to find a perfect implementation, based on those one (Each contains some errors)
+ * https://github.com/Fabrik/fabrik/blob/master/plugins/fabrik_element/date/date.php
+ * https://gist.github.com/mcaskill/02636e5970be1bb22270
+ * https://stackoverflow.com/questions/22665959/using-php-strftime-using-date-format-string
+ *
+ * Limitation:
+ * - Do not apply translation
+ * - Some few strftime format could be broken (low probability to be used on logs)
+ *
+ * Private: because it should not be used outside of this scope
+ *
+ * A better solution is to use : IntlDateFormatter, but it will require to load a new php extension, which could break some setup.
+ *
+ * @return array|string|string[]
+ */
+ private static function _strftimeFormatToDateFormat($strftimeFormat) {
+
+ // Missing %V %C %g %G
+ $search = array(
+ '%a', '%A', '%d', '%e', '%u',
+ '%w', '%W', '%b', '%h', '%B',
+ '%m', '%y', '%Y', '%D', '%F',
+ '%x', '%n', '%t', '%H', '%k',
+ '%I', '%l', '%M', '%p', '%P',
+ '%r' /* %I:%M:%S %p */, '%R' /* %H:%M */, '%S', '%T' /* %H:%M:%S */, '%X', '%z', '%Z',
+ '%c', '%s', '%j',
+ '%%');
+
+ $replace = array(
+ 'D', 'l', 'd', 'j', 'N',
+ 'w', 'W', 'M', 'M', 'F',
+ 'm', 'y', 'Y', 'm/d/y', 'Y-m-d',
+ 'm/d/y', "\n", "\t", 'H', 'G',
+ 'h', 'g', 'i', 'A', 'a',
+ 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s', 'O', 'T',
+ 'D M j H:i:s Y' /*Tue Feb 5 00:45:10 2009*/, 'U', 'z',
+ '%');
+
+ return str_replace($search, $replace, $strftimeFormat);
+ }
}
diff --git a/vendor/symfony/lib/plugin/sfPearRest.class.php b/vendor/symfony/lib/plugin/sfPearRest.class.php
index 0cdca659ed..d1b63aca12 100644
--- a/vendor/symfony/lib/plugin/sfPearRest.class.php
+++ b/vendor/symfony/lib/plugin/sfPearRest.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -23,7 +23,7 @@ class sfPearRest extends PEAR_REST
/**
* @see PEAR_REST::downloadHttp()
*/
- public function downloadHttp($url, $lastmodified = null, $accept = false)
+ public function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
{
return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : array(), array("\r\nX-SYMFONY-VERSION: ".SYMFONY_VERSION)));
}
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php
index 007c391bf7..358577aa00 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionListener.class.php
@@ -20,6 +20,10 @@
*/
class sfDoctrineConnectionListener extends Doctrine_EventListener
{
+ protected
+ $connection,
+ $encoding;
+
public function __construct($connection, $encoding)
{
$this->connection = $connection;
@@ -31,4 +35,4 @@ public function postConnect(Doctrine_Event $event)
$this->connection->setCharset($this->encoding);
$this->connection->setDateFormat();
}
-}
\ No newline at end of file
+}
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php
index a79ce70f72..3743d8e8bf 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php
@@ -195,7 +195,7 @@ static public function fixParams($params)
{
foreach ($params as $key => $param)
{
- if (strlen($param) >= 255)
+ if ($param && strlen($param) >= 255)
{
$params[$key] = '['.number_format(strlen($param) / 1024, 2).'Kb]';
}
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php
index 29e064314a..8faedd303d 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php
@@ -68,7 +68,7 @@ static public function listenToAddPanelEvent(sfEvent $event)
/**
* Returns an array of Doctrine query events.
- *
+ *
* @return array
*/
protected function getDoctrineEvents()
@@ -116,7 +116,7 @@ protected function getSqlLogs()
// interpolate parameters
foreach ($params as $param)
{
- $param = htmlspecialchars($param, ENT_QUOTES, sfConfig::get('sf_charset'));
+ $param = htmlspecialchars((string) $param, ENT_QUOTES, sfConfig::get('sf_charset'));
$query = join(var_export(is_scalar($param) ? $param : (string) $param, true), explode('?', $query, 2));
}
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineColumn.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineColumn.class.php
index 6f77fa1064..7810c9bb67 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineColumn.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/generator/sfDoctrineColumn.class.php
@@ -309,23 +309,27 @@ public function getTable()
return $this->table;
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->definition[$offset]);
}
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->definition[$offset] = $value;
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->definition[$offset];
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->definition[$offset]);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/pager/sfDoctrinePager.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/pager/sfDoctrinePager.class.php
index 27b2553959..03478db89d 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/pager/sfDoctrinePager.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/pager/sfDoctrinePager.class.php
@@ -52,9 +52,7 @@ public function setTableMethod($tableMethodName)
*/
public function serialize()
{
- $vars = get_object_vars($this);
- unset($vars['query']);
- return serialize($vars);
+ return serialize($this->__serialize());
}
/**
@@ -66,12 +64,35 @@ public function unserialize($serialized)
{
$array = unserialize($serialized);
- foreach ($array as $name => $values)
+ return $this->__unserialize($array);
+ }
+
+ /**
+ * Serializes the current instance for php 7.4+
+ *
+ * @return array
+ */
+ public function __serialize()
+ {
+ $vars = get_object_vars($this);
+ unset($vars['query']);
+ return $vars;
+ }
+
+ /**
+ * Unserializes a sfDoctrinePager instance for php 7.4+
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+
+ foreach ($data as $name => $values)
{
- $this->$name = $values;
+ $this->$name = $values;
}
- $this->tableMethodCalled = false;
+ $this->tableMethodCalled = false;
}
/**
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/test/sfTesterDoctrine.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/test/sfTesterDoctrine.class.php
index 2e6678a2a1..5d98975ef4 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/test/sfTesterDoctrine.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/test/sfTesterDoctrine.class.php
@@ -65,7 +65,7 @@ public function check($model, $query, $value = true)
}
$operator = '=';
- if ('!' == $condition[0])
+ if (strlen($condition) && '!' == substr($condition, 0, 1))
{
$operator = false !== strpos($condition, '%') ? 'NOT LIKE' : '!=';
$condition = substr($condition, 1);
@@ -103,7 +103,7 @@ public function check($model, $query, $value = true)
/**
* Outputs some debug information about queries run during the current request.
- *
+ *
* @param integer|string $limit Either an integer to return the last many queries, a regular expression or a substring to search for
*/
public function debug($limit = null)
diff --git a/vendor/symfony/lib/plugins/sfDoctrinePlugin/test/functional/AdminGenBrowser.class.php b/vendor/symfony/lib/plugins/sfDoctrinePlugin/test/functional/AdminGenBrowser.class.php
index a5efd75f70..cb29fe83e3 100644
--- a/vendor/symfony/lib/plugins/sfDoctrinePlugin/test/functional/AdminGenBrowser.class.php
+++ b/vendor/symfony/lib/plugins/sfDoctrinePlugin/test/functional/AdminGenBrowser.class.php
@@ -152,7 +152,7 @@ protected function _testEnumDropdown()
$this->
get('/subscriptions/new')->
with('response')->begin()->
- checkElement('select', 'NewActivePendingExpired')->
+ checkElement('select', '/^New\R?Active\R?Pending\R?Expired\R?$/m')->
end()
;
}
@@ -237,7 +237,7 @@ protected function _runAdminGenModuleSanityCheck($model, $module)
}
protected function _generateAdminGenModule($model, $module)
- {
+ {
$this->info('Generating admin gen module "' . $module . '"');
$task = new sfDoctrineGenerateAdminTask($this->getContext()->getEventDispatcher(), new sfFormatter());
$task->run(array('application' => 'backend', 'route_or_model' => $model));
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php
index f45a972f01..986559b818 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php
@@ -114,7 +114,9 @@ public function loadDataFromArray($data)
}
// foreign key?
- if (isset($column) && $column->isForeignKey() && isset($this->object_references[$value]))
+ $columnCheck = !empty($column) && (isset($column) ? true : false);
+- $objectCheck = !empty($value) && is_string($value) && (isset($this->object_references[$value]) ? true : false);
+ if ($columnCheck && $column->isForeignKey() && $objectCheck)
{
$value = $this->object_references[$value]->getPrimaryKey();
}
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/database/model/XMLElement.php b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/database/model/XMLElement.php
index 7e57128dc1..e9b827f67f 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/database/model/XMLElement.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/database/model/XMLElement.php
@@ -19,8 +19,6 @@
* .
*/
-include_once 'propel/engine/database/model/VendorInfo.php';
-
/**
* An abstract class for elements represented by XML tags (e.g. Column, Table).
*
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/Criteria.php b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/Criteria.php
index 42f11be63e..984f2d12ea 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/Criteria.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/Criteria.php
@@ -1349,7 +1349,7 @@ public function init(Criteria $criteria)
//init $this->realtable
$realtable = $criteria->getTableForAlias($this->table);
- if (! strlen ( $realtable ) ) {
+ if (! strlen ( (string) $realtable ) ) {
$realtable = $this->table;
}
$this->realtable = $realtable;
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelConfiguration.php b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelConfiguration.php
index d802fc9243..a9c3606eaf 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelConfiguration.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelConfiguration.php
@@ -57,6 +57,7 @@ public function __construct(array $parameters = array())
/**
* @see http://www.php.net/ArrayAccess
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->parameter[$offset]) || array_key_exists($offset, $this->parameters);
@@ -65,6 +66,7 @@ public function offsetExists($offset)
/**
* @see http://www.php.net/ArrayAccess
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->parameter[$offset] = $value;
@@ -73,6 +75,7 @@ public function offsetSet($offset, $value)
/**
* @see http://www.php.net/ArrayAccess
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->parameters[$offset];
@@ -81,6 +84,7 @@ public function offsetGet($offset)
/**
* @see http://www.php.net/ArrayAccess
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->parameters[$offset]);
diff --git a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelPDO.php b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelPDO.php
index b51fa10703..46a42f1786 100644
--- a/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelPDO.php
+++ b/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/PropelPDO.php
@@ -120,6 +120,7 @@ public function isInTransaction()
/**
* Overrides PDO::beginTransaction() to prevent errors due to already-in-progress transaction.
*/
+ #[\ReturnTypeWillChange]
public function beginTransaction()
{
$return = true;
@@ -136,6 +137,7 @@ public function beginTransaction()
* Overrides PDO::commit() to only commit the transaction if we are in the outermost
* transaction nesting level.
*/
+ #[\ReturnTypeWillChange]
public function commit()
{
$return = true;
@@ -158,6 +160,7 @@ public function commit()
* transaction nesting level
* @return boolean Whether operation was successful.
*/
+ #[\ReturnTypeWillChange]
public function rollBack()
{
$return = true;
@@ -203,6 +206,7 @@ public function forceRollBack()
* @param int $attribute The attribute to set (e.g. PropelPDO::PROPEL_ATTR_CACHE_PREPARES).
* @param mixed $value The attribute value.
*/
+ #[\ReturnTypeWillChange]
public function setAttribute($attribute, $value)
{
switch($attribute) {
@@ -222,6 +226,7 @@ public function setAttribute($attribute, $value)
*
* @param int $attribute The attribute to get (e.g. PropelPDO::PROPEL_ATTR_CACHE_PREPARES).
*/
+ #[\ReturnTypeWillChange]
public function getAttribute($attribute)
{
switch($attribute) {
@@ -241,6 +246,7 @@ public function getAttribute($attribute)
* @param array
* @return PDOStatement
*/
+ #[\ReturnTypeWillChange]
public function prepare($sql, $driver_options = array())
{
if ($this->cachePreparedStatements) {
diff --git a/vendor/symfony/lib/request/sfRequest.class.php b/vendor/symfony/lib/request/sfRequest.class.php
index 562d0e7fd1..6771d7558e 100644
--- a/vendor/symfony/lib/request/sfRequest.class.php
+++ b/vendor/symfony/lib/request/sfRequest.class.php
@@ -155,6 +155,7 @@ public function __isset($name)
return $this->parameterHolder->has($name);
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
$args = func_get_args();
@@ -174,6 +175,7 @@ public function __get($name)
return $this->parameterHolder->get($name);
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$args = func_get_args();
@@ -192,6 +194,7 @@ public function __set($name, $value)
return $this->parameterHolder->set($name, $value);
}
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$args = func_get_args();
@@ -209,6 +212,7 @@ public function __unset($name)
return $this->parameterHolder->remove($name);
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$args = func_get_args();
diff --git a/vendor/symfony/lib/request/sfWebRequest.class.php b/vendor/symfony/lib/request/sfWebRequest.class.php
index b4a50917d2..2278446258 100644
--- a/vendor/symfony/lib/request/sfWebRequest.class.php
+++ b/vendor/symfony/lib/request/sfWebRequest.class.php
@@ -164,7 +164,7 @@ public function getContentType($trim = true)
{
$contentType = $this->getHttpHeader('Content-Type', null);
- if ($trim && false !== $pos = strpos($contentType, ';'))
+ if ($trim && false !== $pos = strpos((string) $contentType, ';'))
{
$contentType = substr($contentType, 0, $pos);
}
@@ -802,6 +802,9 @@ static public function convertFileInformation(array $taintedFiles)
static protected function fixPhpFilesArray($data)
{
+ // remove full_path added on php8.1
+ unset($data['full_path']);
+
$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
$keys = array_keys($data);
sort($keys);
diff --git a/vendor/symfony/lib/response/sfResponse.class.php b/vendor/symfony/lib/response/sfResponse.class.php
index 44e73b4e8f..bc85a548c8 100644
--- a/vendor/symfony/lib/response/sfResponse.class.php
+++ b/vendor/symfony/lib/response/sfResponse.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -147,7 +147,7 @@ public function __call($method, $arguments)
/**
* Serializes the current instance.
*
- * @return array Objects instance
+ * @return string Objects instance
*/
public function serialize()
{
@@ -166,4 +166,23 @@ public function unserialize($serialized)
{
$this->content = unserialize($serialized);
}
+
+ /**
+ * Serializes the current instance for php 7.4+
+ *
+ * @return array
+ */
+ public function __serialize() {
+ return array('content' => $this->content);
+ }
+
+ /**
+ * Unserializes a sfResponse instance for php 7.4+
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+ $this->content = $data['content'];
+ }
}
diff --git a/vendor/symfony/lib/response/sfWebResponse.class.php b/vendor/symfony/lib/response/sfWebResponse.class.php
index 71ddb1147c..4b769bf288 100644
--- a/vendor/symfony/lib/response/sfWebResponse.class.php
+++ b/vendor/symfony/lib/response/sfWebResponse.class.php
@@ -312,7 +312,7 @@ public function getCharset()
/**
* Gets response content type.
*
- * @return array
+ * @return string
*/
public function getContentType()
{
@@ -365,7 +365,8 @@ public function sendHttpHeaders()
// cookies
foreach ($this->cookies as $cookie)
{
- setrawcookie($cookie['name'], $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
+ $expire = isset($cookie['expire']) ? $cookie['expire'] : 0;
+ setrawcookie($cookie['name'], $cookie['value'], $expire, $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httpOnly']);
if ($this->options['logging'])
{
@@ -822,7 +823,7 @@ public function merge(sfWebResponse $response)
*/
public function serialize()
{
- return serialize(array($this->content, $this->statusCode, $this->statusText, $this->options, $this->headerOnly, $this->headers, $this->metas, $this->httpMetas, $this->stylesheets, $this->javascripts, $this->slots));
+ return serialize($this->__serialize());
}
/**
@@ -830,7 +831,25 @@ public function serialize()
*/
public function unserialize($serialized)
{
- list($this->content, $this->statusCode, $this->statusText, $this->options, $this->headerOnly, $this->headers, $this->metas, $this->httpMetas, $this->stylesheets, $this->javascripts, $this->slots) = unserialize($serialized);
+ $this->__unserialize(unserialize($serialized));
+ }
+
+ /**
+ * @see sfResponse
+ * @return array
+ */
+ public function __serialize()
+ {
+ return array($this->content, $this->statusCode, $this->statusText, $this->options, $this->headerOnly, $this->headers, $this->metas, $this->httpMetas, $this->stylesheets, $this->javascripts, $this->slots);
+ }
+
+ /**
+ * @see sfResponse
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+ list($this->content, $this->statusCode, $this->statusText, $this->options, $this->headerOnly, $this->headers, $this->metas, $this->httpMetas, $this->stylesheets, $this->javascripts, $this->slots) = $data;
}
/**
diff --git a/vendor/symfony/lib/routing/sfRoute.class.php b/vendor/symfony/lib/routing/sfRoute.class.php
index d2385beb36..2597d83a0f 100644
--- a/vendor/symfony/lib/routing/sfRoute.class.php
+++ b/vendor/symfony/lib/routing/sfRoute.class.php
@@ -35,6 +35,8 @@ class sfRoute implements Serializable
$requirements = array(),
$tokens = array(),
$customToken = false,
+ $firstOptional = null,
+ $segments = array(),
$params = array();
/**
@@ -262,7 +264,7 @@ public function generate($params, $context = array(), $absolute = false)
static private function generateCompareVarsByStrlen($a, $b)
{
- return strlen($a) < strlen($b);
+ return (strlen($a) < strlen($b)) ? 1 : -1;
}
/**
@@ -281,7 +283,7 @@ protected function generateWithTokens($parameters)
switch ($token[0])
{
case 'variable':
- if (!$optional || !isset($this->defaults[$token[3]]) || $parameters[$token[3]] != $this->defaults[$token[3]])
+ if (!$optional || !isset($this->defaults[$token[3]]) || (isset($parameters[$token[3]]) && $parameters[$token[3]] != $this->defaults[$token[3]]))
{
$url[] = urlencode($parameters[$token[3]]);
$optional = false;
@@ -796,7 +798,7 @@ protected function fixDefaults()
}
else
{
- $this->defaults[$key] = $this->params[$key] = urldecode($value);
+ $this->defaults[$key] = $this->params[$key] = urldecode((string) $value);
}
}
}
@@ -855,15 +857,37 @@ protected function fixSuffix()
public function serialize()
{
+ return serialize($this->__serialize());
+ }
+
+ public function unserialize($data)
+ {
+ $array = unserialize($serialized);
+
+ $this->__unserialize($array);
+ }
+
+ /**
+ * Serializes the current instance for php 7.4+
+ *
+ * @return array
+ */
+ public function __serialize() {
// always serialize compiled routes
$this->compile();
// sfPatternRouting will always re-set defaultParameters, so no need to serialize them
- return serialize(array($this->tokens, $this->defaultOptions, $this->options, $this->pattern, $this->staticPrefix, $this->regex, $this->variables, $this->defaults, $this->requirements, $this->suffix, $this->params));
+ return array($this->tokens, $this->defaultOptions, $this->options, $this->pattern, $this->staticPrefix, $this->regex, $this->variables, $this->defaults, $this->requirements, $this->suffix, $this->params);
}
- public function unserialize($data)
+ /**
+ * Unserializes a sfRoute instance for php 7.4+
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
{
- list($this->tokens, $this->defaultOptions, $this->options, $this->pattern, $this->staticPrefix, $this->regex, $this->variables, $this->defaults, $this->requirements, $this->suffix, $this->params) = unserialize($data);
+ list($this->tokens, $this->defaultOptions, $this->options, $this->pattern, $this->staticPrefix, $this->regex, $this->variables, $this->defaults, $this->requirements, $this->suffix, $this->params) = $data;
+
$this->compiled = true;
}
}
diff --git a/vendor/symfony/lib/routing/sfRouteCollection.class.php b/vendor/symfony/lib/routing/sfRouteCollection.class.php
index e332f0f48f..08000ee13e 100644
--- a/vendor/symfony/lib/routing/sfRouteCollection.class.php
+++ b/vendor/symfony/lib/routing/sfRouteCollection.class.php
@@ -61,6 +61,7 @@ public function getOptions()
/**
* Reset the error array to the beginning (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
reset($this->routes);
@@ -73,6 +74,7 @@ public function rewind()
*
* @return string The key
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return key($this->routes);
@@ -83,6 +85,7 @@ public function key()
*
* @return mixed The escaped value
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return current($this->routes);
@@ -91,6 +94,7 @@ public function current()
/**
* Moves to the next route (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function next()
{
next($this->routes);
@@ -103,6 +107,7 @@ public function next()
*
* @return boolean The validity of the current route; true if it is valid
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->count > 0;
diff --git a/vendor/symfony/lib/storage/sfSessionStorage.class.php b/vendor/symfony/lib/storage/sfSessionStorage.class.php
index aa66c427a1..4790fa6582 100644
--- a/vendor/symfony/lib/storage/sfSessionStorage.class.php
+++ b/vendor/symfony/lib/storage/sfSessionStorage.class.php
@@ -181,5 +181,6 @@ public function shutdown()
{
// don't need a shutdown procedure because read/write do it in real-time
session_write_close();
+ self::$sessionStarted = false;
}
}
diff --git a/vendor/symfony/lib/task/help/sfHelpTask.class.php b/vendor/symfony/lib/task/help/sfHelpTask.class.php
index da9c4c0ddc..adb9a57918 100644
--- a/vendor/symfony/lib/task/help/sfHelpTask.class.php
+++ b/vendor/symfony/lib/task/help/sfHelpTask.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -96,7 +96,7 @@ protected function outputAsText(sfTask $task)
foreach ($task->getArguments() as $argument)
{
$default = null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault())) ? $this->formatter->format(sprintf(' (default: %s)', is_array($argument->getDefault()) ? str_replace("\n", '', print_r($argument->getDefault(), true)): $argument->getDefault()), 'COMMENT') : '';
- $messages[] = sprintf(" %-${max}s %s%s", $this->formatter->format($argument->getName(), 'INFO'), $argument->getHelp(), $default);
+ $messages[] = sprintf(" %-{$max}s %s%s", $this->formatter->format($argument->getName(), 'INFO'), $argument->getHelp(), $default);
}
$messages[] = '';
diff --git a/vendor/symfony/lib/task/help/sfListTask.class.php b/vendor/symfony/lib/task/help/sfListTask.class.php
index 7d6852bfef..dcd7f37120 100644
--- a/vendor/symfony/lib/task/help/sfListTask.class.php
+++ b/vendor/symfony/lib/task/help/sfListTask.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -120,7 +120,7 @@ protected function outputAsText($namespace, $tasks)
$aliases = $task->getAliases() ? $this->formatter->format(' ('.implode(', ', $task->getAliases()).')', 'COMMENT') : '';
- $messages[] = sprintf(" %-${width}s %s%s", $this->formatter->format(':'.$task->getName(), 'INFO'), $task->getBriefDescription(), $aliases);
+ $messages[] = sprintf(" %-{$width}s %s%s", $this->formatter->format(':'.$task->getName(), 'INFO'), $task->getBriefDescription(), $aliases);
}
$this->log($messages);
diff --git a/vendor/symfony/lib/task/project/sfProjectPermissionsTask.class.php b/vendor/symfony/lib/task/project/sfProjectPermissionsTask.class.php
index 6820f7c66f..ddf26017b5 100644
--- a/vendor/symfony/lib/task/project/sfProjectPermissionsTask.class.php
+++ b/vendor/symfony/lib/task/project/sfProjectPermissionsTask.class.php
@@ -112,7 +112,7 @@ protected function chmod($file, $mode, $umask = 0000)
*
* @see http://www.php.net/set_error_handler
*/
- public function handleError($no, $string, $file, $line, $context)
+ public function handleError($no, $string, $file, $line, $context = null)
{
$this->failed[] = $this->current;
}
diff --git a/vendor/symfony/lib/task/sfBaseTask.class.php b/vendor/symfony/lib/task/sfBaseTask.class.php
index 774ed24979..cdcba670c3 100644
--- a/vendor/symfony/lib/task/sfBaseTask.class.php
+++ b/vendor/symfony/lib/task/sfBaseTask.class.php
@@ -20,7 +20,9 @@ abstract class sfBaseTask extends sfCommandApplicationTask
{
protected
$configuration = null,
- $pluginManager = null;
+ $pluginManager = null,
+ $filesystem = null,
+ $tokens = array();
/**
* @see sfTask
diff --git a/vendor/symfony/lib/test/sfTestFunctionalBase.class.php b/vendor/symfony/lib/test/sfTestFunctionalBase.class.php
index 335f7af82c..fd564992da 100644
--- a/vendor/symfony/lib/test/sfTestFunctionalBase.class.php
+++ b/vendor/symfony/lib/test/sfTestFunctionalBase.class.php
@@ -478,7 +478,7 @@ static public function handlePhpError($errno, $errstr, $errfile, $errline)
/**
* Exception handler for the current test browser instance.
*
- * @param Exception $exception The exception
+ * @param Throwable $exception The exception
*/
function handleException(Exception $exception)
{
diff --git a/vendor/symfony/lib/test/sfTesterResponse.class.php b/vendor/symfony/lib/test/sfTesterResponse.class.php
index c621cd41ec..cc3ece1aba 100644
--- a/vendor/symfony/lib/test/sfTesterResponse.class.php
+++ b/vendor/symfony/lib/test/sfTesterResponse.class.php
@@ -49,7 +49,9 @@ public function initialize()
}
else
{
- @$this->dom->loadHTML($this->response->getContent());
+ if($this->response->getContent()) {
+ @$this->dom->loadHTML($this->response->getContent());
+ }
}
$this->domCssSelector = new sfDomCssSelector($this->dom);
}
@@ -120,10 +122,10 @@ public function checkElement($selector, $value = true, $options = array())
/**
* Checks that a form is rendered correctly.
- *
+ *
* @param sfForm|string $form A form object or the name of a form class
* @param string $selector CSS selector for the root form element for this form
- *
+ *
* @return sfTestFunctionalBase|sfTester
*/
public function checkForm($form, $selector = 'form')
@@ -333,11 +335,11 @@ public function isHeader($key, $value)
/**
* Tests if a cookie was set.
- *
+ *
* @param string $name
* @param string $value
* @param array $attributes Other cookie attributes to check (expires, path, domain, etc)
- *
+ *
* @return sfTestFunctionalBase|sfTester
*/
public function setsCookie($name, $value = null, $attributes = array())
diff --git a/vendor/symfony/lib/user/sfUser.class.php b/vendor/symfony/lib/user/sfUser.class.php
index 4dcc477533..e9eb8b934c 100644
--- a/vendor/symfony/lib/user/sfUser.class.php
+++ b/vendor/symfony/lib/user/sfUser.class.php
@@ -221,6 +221,7 @@ public function getCulture()
*
* @return Boolean true if the user attribute exists, false otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
return $this->hasAttribute($name);
@@ -233,6 +234,7 @@ public function offsetExists($name)
*
* @return mixed The user attribute if exists, null otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
return $this->getAttribute($name, false);
@@ -244,6 +246,7 @@ public function offsetGet($name)
* @param string $offset The parameter name
* @param string $value The parameter value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->setAttribute($offset, $value);
@@ -254,6 +257,7 @@ public function offsetSet($offset, $value)
*
* @param string $offset The parameter name
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->getAttributeHolder()->remove($offset);
diff --git a/vendor/symfony/lib/util/sfBrowser.class.php b/vendor/symfony/lib/util/sfBrowser.class.php
index dcb4d1157c..0daa822741 100644
--- a/vendor/symfony/lib/util/sfBrowser.class.php
+++ b/vendor/symfony/lib/util/sfBrowser.class.php
@@ -21,18 +21,20 @@ class sfBrowser extends sfBrowserBase
protected
$listeners = array(),
$context = null,
- $currentException = null;
+ $currentException = null,
+ $rawConfiguration = array();
/**
* Calls a request to a uri.
*/
protected function doCall()
{
+ // Before getContext, it can trigger some
+ sfConfig::set('sf_test', true);
+
// recycle our context object
$this->context = $this->getContext(true);
- sfConfig::set('sf_test', true);
-
// we register a fake rendering filter
sfConfig::set('sf_rendering_filter', array('sfFakeRenderingFilter', null));
diff --git a/vendor/symfony/lib/util/sfBrowserBase.class.php b/vendor/symfony/lib/util/sfBrowserBase.class.php
index 9420b65907..f1f72a2431 100644
--- a/vendor/symfony/lib/util/sfBrowserBase.class.php
+++ b/vendor/symfony/lib/util/sfBrowserBase.class.php
@@ -364,7 +364,9 @@ public function call($uri, $method = 'get', $parameters = array(), $changeStack
}
else
{
- @$this->dom->loadHTML($response->getContent());
+ if($response->getContent()) {
+ @$this->dom->loadHTML($response->getContent());
+ }
}
$this->domCssSelector = new sfDomCssSelector($this->dom);
}
@@ -906,7 +908,7 @@ public function doClickElement(DOMElement $item, $arguments = array(), $options
}
else
{
- $queryString = http_build_query($arguments, null, '&');
+ $queryString = is_array($arguments) ? http_build_query($arguments, '', '&') : '';
$sep = false === strpos($url, '?') ? '?' : '&';
return array($url.($queryString ? $sep.$queryString : ''), 'get', array());
diff --git a/vendor/symfony/lib/util/sfContext.class.php b/vendor/symfony/lib/util/sfContext.class.php
index 05315bed05..76085f5055 100644
--- a/vendor/symfony/lib/util/sfContext.class.php
+++ b/vendor/symfony/lib/util/sfContext.class.php
@@ -448,6 +448,7 @@ public function getConfigCache()
*
* @return Boolean true if the context object exists, false otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
return $this->has($name);
@@ -460,6 +461,7 @@ public function offsetExists($name)
*
* @return mixed The context object if exists, null otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
return $this->get($name);
@@ -471,6 +473,7 @@ public function offsetGet($name)
* @param string $offset The parameter name
* @param string $value The parameter value
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->set($offset, $value);
@@ -481,6 +484,7 @@ public function offsetSet($offset, $value)
*
* @param string $offset The parameter name
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->factories[$offset]);
diff --git a/vendor/symfony/lib/util/sfDomCssSelector.class.php b/vendor/symfony/lib/util/sfDomCssSelector.class.php
index 1a401d3d05..bbd5df53df 100644
--- a/vendor/symfony/lib/util/sfDomCssSelector.class.php
+++ b/vendor/symfony/lib/util/sfDomCssSelector.class.php
@@ -563,6 +563,7 @@ protected function nth($cur, $result = 1, $dir = 'nextSibling')
/**
* Reset the array to the beginning (as required for the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
reset($this->nodes);
@@ -575,6 +576,7 @@ public function rewind()
*
* @return string The key
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return key($this->nodes);
@@ -585,6 +587,7 @@ public function key()
*
* @return mixed The escaped value
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return current($this->nodes);
@@ -593,6 +596,7 @@ public function current()
/**
* Moves to the next element (as required by the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function next()
{
next($this->nodes);
@@ -609,6 +613,7 @@ public function next()
*
* @return bool The validity of the current element; true if it is valid
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->count > 0;
@@ -619,6 +624,7 @@ public function valid()
*
* @param integer The number of matching nodes
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return count($this->nodes);
diff --git a/vendor/symfony/lib/util/sfInflector.class.php b/vendor/symfony/lib/util/sfInflector.class.php
index 1d5bccc4d3..c792cce7aa 100644
--- a/vendor/symfony/lib/util/sfInflector.class.php
+++ b/vendor/symfony/lib/util/sfInflector.class.php
@@ -27,7 +27,7 @@ class sfInflector
*/
public static function camelize($lower_case_and_underscored_word)
{
- return strtr(ucwords(strtr($lower_case_and_underscored_word, array('/' => '::', '_' => ' ', '-' => ' ', '.' => '_ '))), array(' ' => ''));
+ return strtr(ucwords(strtr((string) $lower_case_and_underscored_word, array('/' => '::', '_' => ' ', '-' => ' ', '.' => '_ '))), array(' ' => ''));
}
/**
@@ -39,7 +39,7 @@ public static function camelize($lower_case_and_underscored_word)
*/
public static function underscore($camel_cased_word)
{
- $tmp = $camel_cased_word;
+ $tmp = (string) $camel_cased_word;
$tmp = str_replace('::', '/', $tmp);
$tmp = sfToolkit::pregtr($tmp, array('/([A-Z]+)([A-Z][a-z])/' => '\\1_\\2',
'/([a-z\d])([A-Z])/' => '\\1_\\2'));
diff --git a/vendor/symfony/lib/util/sfNamespacedParameterHolder.class.php b/vendor/symfony/lib/util/sfNamespacedParameterHolder.class.php
index 1d551c0c13..ba40b2bb1f 100644
--- a/vendor/symfony/lib/util/sfNamespacedParameterHolder.class.php
+++ b/vendor/symfony/lib/util/sfNamespacedParameterHolder.class.php
@@ -362,11 +362,11 @@ public function addByRef(& $parameters, $ns = null)
/**
* Serializes the current instance.
*
- * @return array Objects instance
+ * @return string Objects instance
*/
public function serialize()
{
- return serialize(array($this->default_namespace, $this->parameters));
+ return serialize($this->__serialize());
}
/**
@@ -376,9 +376,27 @@ public function serialize()
*/
public function unserialize($serialized)
{
- $data = unserialize($serialized);
+ $this->__unserialize(unserialize($serialized));
+ }
- $this->default_namespace = $data[0];
- $this->parameters = $data[1];
+ /**
+ * Serializes the current instance for PHP 7.4+
+ *
+ * @return array
+ */
+ public function __serialize()
+ {
+ return array($this->default_namespace, $this->parameters);
+ }
+
+ /**
+ * Unserializes a sfParameterHolder instance. for PHP 7.4
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+ $this->default_namespace = $data[0];
+ $this->parameters = $data[1];
}
}
diff --git a/vendor/symfony/lib/util/sfParameterHolder.class.php b/vendor/symfony/lib/util/sfParameterHolder.class.php
index f57dbfd634..ed4702fac4 100644
--- a/vendor/symfony/lib/util/sfParameterHolder.class.php
+++ b/vendor/symfony/lib/util/sfParameterHolder.class.php
@@ -181,11 +181,11 @@ public function addByRef(& $parameters)
/**
* Serializes the current instance.
*
- * @return array Objects instance
+ * @return string Objects instance
*/
public function serialize()
{
- return serialize($this->parameters);
+ return serialize($this->__serialize());
}
/**
@@ -195,6 +195,26 @@ public function serialize()
*/
public function unserialize($serialized)
{
- $this->parameters = unserialize($serialized);
+ $this->__unserialize(unserialize($serialized));
+ }
+
+ /**
+ * Serializes the current instance for PHP 7.4+
+ *
+ * @return Array
+ */
+ public function __serialize() {
+
+ return $this->parameters;
+ }
+
+ /**
+ * Unserializes a sfParameterHolder instance. for PHP 7.4
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+ $this->parameters = $data;
}
}
diff --git a/vendor/symfony/lib/util/sfToolkit.class.php b/vendor/symfony/lib/util/sfToolkit.class.php
index bc34df41a7..55f42e18d8 100644
--- a/vendor/symfony/lib/util/sfToolkit.class.php
+++ b/vendor/symfony/lib/util/sfToolkit.class.php
@@ -361,7 +361,7 @@ public static function replaceConstants($value)
*/
public static function pregtr($search, $replacePairs)
{
- return preg_replace(array_keys($replacePairs), array_values($replacePairs), $search);
+ return preg_replace(array_keys($replacePairs), array_values($replacePairs), (string) $search);
}
/**
diff --git a/vendor/symfony/lib/validator/sfValidatorError.class.php b/vendor/symfony/lib/validator/sfValidatorError.class.php
index 24326b2da1..36292c99db 100644
--- a/vendor/symfony/lib/validator/sfValidatorError.class.php
+++ b/vendor/symfony/lib/validator/sfValidatorError.class.php
@@ -109,7 +109,7 @@ public function getArguments($raw = false)
* error messages:
*
* $i18n->__($error->getMessageFormat(), $error->getArguments());
- *
+ *
* If no message format has been set in the validator, the exception standard
* message is returned.
*
@@ -140,7 +140,7 @@ public function getMessageFormat()
*/
public function serialize()
{
- return serialize(array($this->validator, $this->arguments, $this->code, $this->message));
+ return serialize($this->__serialize());
}
/**
@@ -151,6 +151,28 @@ public function serialize()
*/
public function unserialize($serialized)
{
- list($this->validator, $this->arguments, $this->code, $this->message) = unserialize($serialized);
+ $array = unserialize($serialized);
+
+ $this->__unserialize($array);
+ }
+
+ /**
+ * Serializes the current instance for php 7.4+
+ *
+ * @return array
+ */
+ public function __serialize()
+ {
+ return array($this->validator, $this->arguments, $this->code, $this->message);
+ }
+
+ /**
+ * Unserializes a sfValidatorError instance for php 7.4+
+ *
+ * @param string $serialized A serialized sfValidatorError instance
+ */
+ public function __unserialize($data)
+ {
+ list($this->validator, $this->arguments, $this->code, $this->message) = $data;
}
}
diff --git a/vendor/symfony/lib/validator/sfValidatorErrorSchema.class.php b/vendor/symfony/lib/validator/sfValidatorErrorSchema.class.php
index 751b66ef21..2c7f063aa2 100644
--- a/vendor/symfony/lib/validator/sfValidatorErrorSchema.class.php
+++ b/vendor/symfony/lib/validator/sfValidatorErrorSchema.class.php
@@ -194,6 +194,7 @@ public function getMessageFormat()
*
* @return int The number of array
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return count($this->errors);
@@ -202,6 +203,7 @@ public function count()
/**
* Reset the error array to the beginning (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
reset($this->errors);
@@ -214,6 +216,7 @@ public function rewind()
*
* @return string The key
*/
+ #[\ReturnTypeWillChange]
public function key()
{
return key($this->errors);
@@ -224,6 +227,7 @@ public function key()
*
* @return mixed The escaped value
*/
+ #[\ReturnTypeWillChange]
public function current()
{
return current($this->errors);
@@ -232,6 +236,7 @@ public function current()
/**
* Moves to the next error (implements the Iterator interface).
*/
+ #[\ReturnTypeWillChange]
public function next()
{
next($this->errors);
@@ -244,6 +249,7 @@ public function next()
*
* @return boolean The validity of the current element; true if it is valid
*/
+ #[\ReturnTypeWillChange]
public function valid()
{
return $this->count > 0;
@@ -256,6 +262,7 @@ public function valid()
*
* @return bool true if the error exists, false otherwise
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
return isset($this->errors[$name]);
@@ -268,6 +275,7 @@ public function offsetExists($name)
*
* @return sfValidatorError A sfValidatorError instance
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
return isset($this->errors[$name]) ? $this->errors[$name] : null;
@@ -281,6 +289,7 @@ public function offsetGet($name)
*
* @throws LogicException
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
throw new LogicException('Unable update an error.');
@@ -291,6 +300,7 @@ public function offsetSet($offset, $value)
*
* @param string $offset (ignored)
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
}
diff --git a/vendor/symfony/lib/validator/sfValidatorSchema.class.php b/vendor/symfony/lib/validator/sfValidatorSchema.class.php
index 6943e8ad75..b3be586459 100644
--- a/vendor/symfony/lib/validator/sfValidatorSchema.class.php
+++ b/vendor/symfony/lib/validator/sfValidatorSchema.class.php
@@ -306,6 +306,7 @@ public function __isset($name)
return isset($this->fields[$name]);
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
$args = func_get_args();
@@ -325,6 +326,7 @@ public function __get($name)
return isset($this->fields[$name]) ? $this->fields[$name] : null;
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$args = func_get_args();
@@ -348,6 +350,7 @@ public function __set($name, $validator)
$this->fields[$name] = clone $validator;
}
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$args = func_get_args();
@@ -365,6 +368,7 @@ public function __unset($name)
unset($this->fields[$name]);
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$args = func_get_args();
diff --git a/vendor/symfony/lib/vendor/lime/lime.php b/vendor/symfony/lib/vendor/lime/lime.php
index 6c6ac81ccb..91d3befc60 100644
--- a/vendor/symfony/lib/vendor/lime/lime.php
+++ b/vendor/symfony/lib/vendor/lime/lime.php
@@ -508,11 +508,11 @@ public function error($message, $file = null, $line = null, array $traces = arra
{
$this->output->error($message, $file, $line, $traces);
- $this->results['stats']['errors'][] = array(
- 'message' => $message,
- 'file' => $file,
- 'line' => $line,
- );
+ $this->results['stats']['errors'][] = array(
+ 'message' => $message,
+ 'file' => $file,
+ 'line' => $line,
+ );
}
protected function update_stats()
@@ -536,7 +536,9 @@ protected function find_caller($traces)
$t = array_reverse($traces);
foreach ($t as $trace)
{
- if (isset($trace['object']) && $trace['object'] instanceof lime_test)
+ // In internal calls, like error_handle, 'file' will be missing
+ if (isset($trace['object']) && $trace['object'] instanceof lime_test
+ && $this->is_test_object($trace['object']) && isset($trace['file']))
{
return array($trace['file'], $trace['line']);
}
@@ -547,7 +549,7 @@ protected function find_caller($traces)
return array($traces[$last]['file'], $traces[$last]['line']);
}
- public function handle_error($code, $message, $file, $line, $context)
+ public function handle_error($code, $message, $file, $line, $context = null)
{
if (!$this->options['error_reporting'] || ($code & error_reporting()) == 0)
{
@@ -570,7 +572,11 @@ public function handle_error($code, $message, $file, $line, $context)
$this->error($type.': '.$message, $file, $line, $trace);
}
- public function handle_exception(Exception $exception)
+ /**
+ * @param Throwable $exception only available on php7
+ * @return bool
+ */
+ public function handle_exception($exception)
{
$this->error(get_class($exception).': '.$exception->getMessage(), $exception->getFile(), $exception->getLine(), $exception->getTrace());
@@ -1070,7 +1076,9 @@ function lime_shutdown()
$this->output->comment(sprintf(' at %s line %s', $this->get_relative_file($testsuite['tests'][$testcase]['file']).$this->extension, $testsuite['tests'][$testcase]['line']));
$this->output->info(' '.$testsuite['tests'][$testcase]['message']);
- $this->output->echoln($testsuite['tests'][$testcase]['error'], null, false);
+ if(isset($testsuite['tests'][$testcase]['error'])) {
+ $this->output->echoln($testsuite['tests'][$testcase]['error'], null, false);
+ }
}
}
}
diff --git a/vendor/symfony/lib/view/sfViewCacheManager.class.php b/vendor/symfony/lib/view/sfViewCacheManager.class.php
index f43ee63ed1..45cb96567b 100644
--- a/vendor/symfony/lib/view/sfViewCacheManager.class.php
+++ b/vendor/symfony/lib/view/sfViewCacheManager.class.php
@@ -1005,8 +1005,8 @@ public function getCurrentCacheKey()
if ($getParameters = $this->request->getGetParameters())
{
- $cacheKey .= false === strpos($cacheKey, '?') ? '?' : '&';
- $cacheKey .= http_build_query($getParameters, null, '&');
+ $cacheKey .= false === strpos((string) $cacheKey, '?') ? '?' : '&';
+ $cacheKey .= http_build_query($getParameters, '', '&');
}
return $cacheKey;
diff --git a/vendor/symfony/lib/view/sfViewParameterHolder.class.php b/vendor/symfony/lib/view/sfViewParameterHolder.class.php
index 31096e1a4b..a91d1c3b03 100644
--- a/vendor/symfony/lib/view/sfViewParameterHolder.class.php
+++ b/vendor/symfony/lib/view/sfViewParameterHolder.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -165,11 +165,11 @@ public function setEscapingMethod($method)
/**
* Serializes the current instance.
*
- * @return array Objects instance
+ * @return string Objects instance
*/
public function serialize()
{
- return serialize(array($this->getAll(), $this->escapingMethod, $this->escaping));
+ return serialize($this->__serialize());
}
/**
@@ -179,8 +179,27 @@ public function serialize()
*/
public function unserialize($serialized)
{
- list($this->parameters, $escapingMethod, $escaping) = unserialize($serialized);
+ $this->__unserialize(unserialize($serialized));
+ }
+
+ /**
+ * Serializes the current instance for PHP 7.4+
+ *
+ * @return array
+ */
+ public function __serialize()
+ {
+ return array($this->getAll(), $this->escapingMethod, $this->escaping);
+ }
+ /**
+ * Unserializes a sfParameterHolder instance. for PHP 7.4
+ *
+ * @param array $data
+ */
+ public function __unserialize($data)
+ {
+ list($this->parameters, $escapingMethod, $escaping) = $data;
$this->initialize(sfContext::hasInstance() ? sfContext::getInstance()->getEventDispatcher() : new sfEventDispatcher());
$this->setEscapingMethod($escapingMethod);
diff --git a/vendor/symfony/lib/widget/sfWidgetFormSchema.class.php b/vendor/symfony/lib/widget/sfWidgetFormSchema.class.php
index d7cbd28b48..48f3bff5d4 100644
--- a/vendor/symfony/lib/widget/sfWidgetFormSchema.class.php
+++ b/vendor/symfony/lib/widget/sfWidgetFormSchema.class.php
@@ -703,6 +703,7 @@ public function __isset($name)
return isset($this->fields[$name]);
}
+ #[\ReturnTypeWillChange]
public function offsetExists($offset)
{
$args = func_get_args();
@@ -722,6 +723,7 @@ public function __get($name)
return isset($this->fields[$name]) ? $this->fields[$name] : null;
}
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$args = func_get_args();
@@ -758,6 +760,7 @@ public function __set($name, $widget)
}
}
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$args = func_get_args();
@@ -781,6 +784,7 @@ public function __unset($name)
}
}
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$args = func_get_args();
diff --git a/vendor/symfony/lib/widget/sfWidgetFormSchemaDecorator.class.php b/vendor/symfony/lib/widget/sfWidgetFormSchemaDecorator.class.php
index 28bfeeb333..c7a034bfaa 100644
--- a/vendor/symfony/lib/widget/sfWidgetFormSchemaDecorator.class.php
+++ b/vendor/symfony/lib/widget/sfWidgetFormSchemaDecorator.class.php
@@ -319,6 +319,7 @@ public function moveField($field, $action, $pivot = null)
/**
* @see sfWidgetFormSchema
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($name)
{
return isset($this->widget[$name]);
@@ -327,6 +328,7 @@ public function offsetExists($name)
/**
* @see sfWidgetFormSchema
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($name)
{
return $this->widget[$name];
@@ -335,6 +337,7 @@ public function offsetGet($name)
/**
* @see sfWidgetFormSchema
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($name, $widget)
{
$this->widget[$name] = $widget;
@@ -343,6 +346,7 @@ public function offsetSet($name, $widget)
/**
* @see sfWidgetFormSchema
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($name)
{
unset($this->widget[$name]);
diff --git a/vendor/symfony/lib/widget/sfWidgetFormTime.class.php b/vendor/symfony/lib/widget/sfWidgetFormTime.class.php
index 38fbd0b598..de593802cf 100644
--- a/vendor/symfony/lib/widget/sfWidgetFormTime.class.php
+++ b/vendor/symfony/lib/widget/sfWidgetFormTime.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -72,7 +72,7 @@ public function render($name, $value = null, $attributes = array(), $errors = ar
}
else
{
- $value = ctype_digit($value) ? (integer) $value : strtotime($value);
+ $value = ctype_digit((string) $value) ? (integer) $value : strtotime((string) $value);
if (false === $value)
{
$value = $default;
diff --git a/vendor/symfony/lib/yaml/sfYamlInline.php b/vendor/symfony/lib/yaml/sfYamlInline.php
index 405a853808..a6c7b9a035 100644
--- a/vendor/symfony/lib/yaml/sfYamlInline.php
+++ b/vendor/symfony/lib/yaml/sfYamlInline.php
@@ -98,9 +98,9 @@ static public function dump($value)
return 'true';
case false === $value:
return 'false';
- case ctype_digit($value):
+ case ctype_digit((string) $value):
return is_string($value) ? "'$value'" : (int) $value;
- case is_numeric($value):
+ case is_numeric($value) && false === strpbrk($value, "\f\n\r\t\v"):
return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value);
case false !== strpos($value, "\n") || false !== strpos($value, "\r"):
return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value));
@@ -273,7 +273,7 @@ static protected function parseSequence($sequence, &$i = 0)
$isQuoted = in_array($sequence[$i], array('"', "'"));
$value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i);
- if (!$isQuoted && false !== strpos($value, ': '))
+ if (!$isQuoted && false !== strpos((string) $value, ': '))
{
// embedded mapping?
try
diff --git a/vendor/symfony/lib/yaml/sfYamlParser.php b/vendor/symfony/lib/yaml/sfYamlParser.php
index 03bd0b8ae0..c3175cc3fc 100644
--- a/vendor/symfony/lib/yaml/sfYamlParser.php
+++ b/vendor/symfony/lib/yaml/sfYamlParser.php
@@ -396,7 +396,7 @@ protected function parseValue($value)
{
$modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
- return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers)));
+ return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs((int) $modifiers)));
}
else
{
@@ -449,7 +449,7 @@ protected function parseFoldedScalar($separator, $indicator = '', $indentation =
if (preg_match('#^(?P {'.strlen($textIndent).',})(?P.+)$#u', $this->currentLine, $matches))
{
- if (' ' == $separator && $previousIndent != $matches['indent'])
+ if (' ' == $separator && ($previousIndent && $previousIndent != $matches['indent']))
{
$text = substr($text, 0, -1)."\n";
}
diff --git a/vendor/symfony/test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php b/vendor/symfony/test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php
index 58e5205326..9b0b90c902 100644
--- a/vendor/symfony/test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php
+++ b/vendor/symfony/test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php
@@ -11,7 +11,7 @@ public function configure()
public function filter_parameters(sfEvent $event, $parameters)
{
- if (false !== stripos($event->getSubject()->getHttpHeader('user-agent'), 'iPhone'))
+ if (false !== stripos((string) $event->getSubject()->getHttpHeader('user-agent'), 'iPhone'))
{
$event->getSubject()->setRequestFormat('iphone');
}
diff --git a/vendor/symfony/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php b/vendor/symfony/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php
index c876505208..99e0a114cb 100644
--- a/vendor/symfony/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php
+++ b/vendor/symfony/test/unit/escaper/sfOutputEscaperObjectDecoratorTest.php
@@ -74,6 +74,7 @@ class Foo
class FooCountable implements Countable
{
+ #[\ReturnTypeWillChange]
public function count()
{
return 2;
diff --git a/vendor/symfony/test/unit/plugin/sfPearRestTest.class.php b/vendor/symfony/test/unit/plugin/sfPearRestTest.class.php
index 82d7c8b228..e2872daf1e 100644
--- a/vendor/symfony/test/unit/plugin/sfPearRestTest.class.php
+++ b/vendor/symfony/test/unit/plugin/sfPearRestTest.class.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -21,7 +21,7 @@ class sfPearRestTest extends sfPearRest
/**
* @see PEAR_REST::downloadHttp()
*/
- public function downloadHttp($url, $lastmodified = null, $accept = false)
+ public function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false)
{
try
{
diff --git a/vendor/symfony/test/unit/response/sfResponseTest.php b/vendor/symfony/test/unit/response/sfResponseTest.php
index 61a9c6cd51..8e3e30614f 100644
--- a/vendor/symfony/test/unit/response/sfResponseTest.php
+++ b/vendor/symfony/test/unit/response/sfResponseTest.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -14,6 +14,8 @@ class myResponse extends sfResponse
{
function serialize() {}
function unserialize($serialized) {}
+ function __serialize() {}
+ function __unserialize($data) {}
}
class fakeResponse
diff --git a/vendor/symfony/test/unit/response/sfWebResponseTest.php b/vendor/symfony/test/unit/response/sfWebResponseTest.php
index f3a581fe51..2875b2a609 100644
--- a/vendor/symfony/test/unit/response/sfWebResponseTest.php
+++ b/vendor/symfony/test/unit/response/sfWebResponseTest.php
@@ -3,7 +3,7 @@
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier
- *
+ *
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@@ -132,7 +132,7 @@ public function normalizeHeaderName($name)
$response->setContentType('text/xml');
$response->setContentType('text/html');
-$t->is(count($response->getHttpHeader('content-type')), 1, '->setContentType() overrides previous content type if replace is true');
+$t->is($response->getHttpHeader('content-type'), 'text/html; charset=ISO-8859-1', '->setContentType() overrides previous content type if replace is true');
// ->getTitle() ->setTitle()
$t->diag('->getTitle() ->setTitle()');
diff --git a/vendor/symfony/test/unit/sfNoRouting.class.php b/vendor/symfony/test/unit/sfNoRouting.class.php
index 625adb5e93..4b1f8ff332 100644
--- a/vendor/symfony/test/unit/sfNoRouting.class.php
+++ b/vendor/symfony/test/unit/sfNoRouting.class.php
@@ -29,7 +29,7 @@ public function getCurrentInternalUri($with_route_name = false)
// other parameters
unset($parameters['module'], $parameters['action']);
ksort($parameters);
- $parameters = count($parameters) ? '?'.http_build_query($parameters, null, '&') : '';
+ $parameters = count($parameters) ? '?'.http_build_query($parameters, '', '&') : '';
return sprintf('%s%s', $action, $parameters);
}
@@ -49,7 +49,7 @@ public function generate($name, $params = array(), $absolute = false)
unset($parameters['action']);
}
- $parameters = http_build_query($parameters, null, '&');
+ $parameters = http_build_query($parameters, '', '&');
return $this->fixGeneratedUrl('/'.($parameters ? '?'.$parameters : ''), $absolute);
}
diff --git a/vendor/symfony/test/unit/storage/sfSessionStorageTest.php b/vendor/symfony/test/unit/storage/sfSessionStorageTest.php
index 1b9f7f6da0..d7be8a9ba7 100644
--- a/vendor/symfony/test/unit/storage/sfSessionStorageTest.php
+++ b/vendor/symfony/test/unit/storage/sfSessionStorageTest.php
@@ -26,6 +26,7 @@
{
$storage = new sfSessionStorage();
$t->pass('->__construct() does not throw an exception when not provided with options');
+ $storage->shutdown();
}
catch (InvalidArgumentException $e)
{
diff --git a/vendor/symfony/test/unit/validator/sfValidatorErrorSchemaTest.php b/vendor/symfony/test/unit/validator/sfValidatorErrorSchemaTest.php
index d2bc24cbdc..23a9a5bb93 100644
--- a/vendor/symfony/test/unit/validator/sfValidatorErrorSchemaTest.php
+++ b/vendor/symfony/test/unit/validator/sfValidatorErrorSchemaTest.php
@@ -143,6 +143,16 @@ public function unserialize($serialized)
{
throw new Exception('Not serializable');
}
+
+ public function __serialize()
+ {
+ throw new Exception('Not serializable');
+ }
+
+ public function __unserialize($data)
+ {
+ throw new Exception('Not serializable');
+ }
}
function will_crash($a)
diff --git a/vendor/symfony/test/unit/validator/sfValidatorErrorTest.php b/vendor/symfony/test/unit/validator/sfValidatorErrorTest.php
index 35f8e3b9d7..301e5e8073 100644
--- a/vendor/symfony/test/unit/validator/sfValidatorErrorTest.php
+++ b/vendor/symfony/test/unit/validator/sfValidatorErrorTest.php
@@ -65,6 +65,16 @@ public function unserialize($serialized)
{
throw new Exception('Not serializable');
}
+
+ public function __serialize()
+ {
+ throw new Exception('Not serializable');
+ }
+
+ public function __unserialize($data)
+ {
+ throw new Exception('Not serializable');
+ }
}
function will_crash($a)
diff --git a/vendor/symfony/test/unit/validator/sfValidatorFileTest.php b/vendor/symfony/test/unit/validator/sfValidatorFileTest.php
index fb4ad41347..bd8141b86c 100644
--- a/vendor/symfony/test/unit/validator/sfValidatorFileTest.php
+++ b/vendor/symfony/test/unit/validator/sfValidatorFileTest.php
@@ -97,7 +97,7 @@ public function getMimeTypesFromCategory($category)
$v = new testValidatorFile();
$t->is($v->guessFromFileBinary($tmpDir.'/test.txt'), 'text/plain', '->guessFromFileBinary() guesses the type of a given file');
$t->is($v->guessFromFileBinary($tmpDir.'/foo.txt'), null, '->guessFromFileBinary() returns null if the file type is not guessable');
-$t->is($v->guessFromFileBinary('/bin/ls'), (PHP_OS != 'Darwin') ? 'application/x-executable' : 'application/octet-stream', '->guessFromFileBinary() returns correct type if file is guessable');
+$t->like($v->guessFromFileBinary('/bin/ls'), (PHP_OS != 'Darwin') ? '/^application\/x-(pie-executable|executable|sharedlib)$/' : '/^application/octet-stream$/', '->guessFromFileBinary() returns correct type if file is guessable');
// ->getMimeType()
$t->diag('->getMimeType()');