Skip to content

ODM Adapter calls setOriginalDocumentProperty() with a string instead of intΒ #2974

@elmoby

Description

@elmoby

Environment

  • Symfony: 6.4
  • PHP: 8.3
  • Doctrine MongoDB ODM: ^2.4
  • gedmo/doctrine-extensions: v3.20.0
  • Translatable Package
$ composer show --latest gedmo/doctrine-extensions
and composer show --latest 'doctrine/*'

Direct dependencies required in composer.json:
alexpechkarev/geometry-library           1.0.5              1.0.5              PHP Geometry library provides utility functions for ...
algolia/search-bundle                    6.0.1              7.0.0             
almasaeed2010/adminlte                   3.2.0              3.2.0              AdminLTE - admin control panel and dashboard that's ...
aws/aws-sdk-php                          3.337.3            3.351.6            AWS SDK for PHP - Use Amazon Web Services in your PH...
beberlei/doctrineextensions              1.5.0              1.5.0              A set of extensions to Doctrine 2 that add support f...
brianium/paratest                        7.8.3              7.8.4              Parallel testing for PHP
doctrine/annotations                     2.0.2              2.0.2              Docblock Annotations Parser
doctrine/doctrine-fixtures-bundle        3.7.1              4.1.0              Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle      3.4.2              3.4.2              Symfony DoctrineMigrationsBundle
doctrine/event-manager                   1.2.0              2.0.1              The Doctrine Event Manager is a simple PHP event sys...
doctrine/inflector                       2.0.10             2.0.10             PHP Doctrine Inflector is a small library that can p...
doctrine/mongodb-odm-bundle              5.3.0              5.3.1              Symfony Doctrine MongoDB Bundle
doctrine/orm                             3.3.3              3.5.0              Object-Relational-Mapper for PHP
endroid/qr-code-bundle                   5.0.2              6.0.0              Endroid QR Code Bundle
fakerphp/faker                           1.24.1             1.24.1             Faker is a PHP library that generates fake data for ...
friendsofsymfony/rest-bundle             3.8.0              3.8.0              This Bundle provides various tools to rapidly develo...
friendsofsymfony/user-bundle             4.0.0              4.0.0              Symfony FOSUserBundle
geocoder-php/google-maps-provider        4.8.0              4.8.0              Geocoder GoogleMaps adapter
giggsey/libphonenumber-for-php           8.13.55            9.0.10             PHP Port of Google's libphonenumber
google/apiclient                         2.18.3             2.18.3             Client library for Google APIs
google/cloud                             0.262.0            0.296.0            Google Cloud Client Library
grpc/grpc                                1.57.0             1.74.0             gRPC library for PHP
gumlet/php-image-resize                  2.1.0              2.1.0              PHP class to re-size and scale images
guzzlehttp/guzzle                        7.9.3              7.9.3              Guzzle is a PHP HTTP client library
guzzlehttp/psr7                          2.7.1              2.7.1              PSR-7 message implementation that also provides comm...
hautelook/alice-bundle                   2.15.1             2.15.1             Symfony bundle to manage fixtures with Alice and Faker.
intervention/image                       3.11.2             3.11.3             PHP image manipulation
jean85/pretty-package-versions           2.1.1              2.1.1              A library to get pretty versions strings of installe...
jms/serializer                           3.32.4             3.32.5             Library for (de-)serializing data of any complexity;...
jms/serializer-bundle                    5.5.1              5.5.1              Allows you to easily serialize, and deserialize data...
klapaudius/oauth-server-bundle           4.0.x-dev 4f0a463  5.1.x-dev 8a1e9a3  Symfony OAuth Server Bundle
knplabs/knp-snappy-bundle                1.10.4             1.10.4             Easily create PDF and images in Symfony by convertin...
kreait/firebase-bundle                   5.6.0              5.6.0              Symfony Bundle for the Firebase Admin SDK
lcobucci/jwt                             5.5.0              5.5.0              A simple library to work with JSON Web Token and JSO...
nelmio/api-doc-bundle                    4.38.2             5.4.0              Generates documentation for your REST API from annot...
nesbot/carbon                            3.9.1              3.10.1             An API extension for DateTime that supports 281 diff...
norkunas/onesignal-php-api               2.15.0             2.15.0             OneSignal API for PHP
nyholm/psr7                              1.8.2              1.8.2              A fast PHP7 implementation of PSR-7
omines/datatables-bundle                 0.8.2              0.10.3             Symfony DataTables Bundle with native Doctrine ORM, ...
payum/payum-bundle                       2.6.1              2.6.2              One million downloads of Payum already! Payum offers...
php-http/message-factory                 1.1.0              1.1.0              Factory interfaces for PSR-7 HTTP Message
Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
phpseclib/phpseclib                      3.0.43             3.0.46             PHP Secure Communications Library - Pure-PHP impleme...
respect/validation                       1.1.31             2.4.4              The most awesome validation engine ever created for PHP
sensio/framework-extra-bundle            6.2.10             6.2.10             This bundle provides a way to configure your control...
Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
sentry/sdk                               4.0.0              4.0.0              This is a meta package of sentry/sentry. We recommen...
sentry/sentry                            4.11.1             4.14.2             PHP SDK for Sentry (http://sentry.io)
sentry/sentry-symfony                    5.2.0              5.3.0              Symfony integration for Sentry (http://getsentry.com)
sonata-project/admin-bundle              4.36.2             4.37.4             The missing Symfony Admin Generator
sonata-project/block-bundle              5.2.0              5.2.0              Symfony SonataBlockBundle
sonata-project/doctrine-orm-admin-bundle 4.18.0             4.18.0             Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/media-bundle              4.16.0             4.16.0             Symfony SonataMediaBundle
sonata-project/translation-bundle        3.4.0              3.4.0              SonataTranslationBundle
sonata-project/user-bundle               5.15.0             5.15.0             Symfony SonataUserBundle
spatie/opening-hours                     4.2.0              4.2.1              A helper to query and format a set of opening hours
stof/doctrine-extensions-bundle          1.14.0             1.14.0             Integration of the gedmo/doctrine-extensions with Sy...
symfony/amqp-messenger                   6.4.13             7.3.0              Symfony AMQP extension Messenger Bridge
symfony/browser-kit                      6.4.19             7.3.0              Simulates the behavior of a web browser, allowing yo...
symfony/cache                            6.4.21             7.3.1              Provides extended PSR-6, PSR-16 (and tags) implement...
symfony/console                          6.4.21             7.3.1              Eases the creation of beautiful and testable command...
symfony/css-selector                     6.4.13             7.3.0              Converts CSS selectors to XPath expressions
symfony/debug-bundle                     6.4.13             7.3.0              Provides a tight integration of the Symfony VarDumpe...
symfony/dotenv                           6.4.16             7.3.0              Registers environment variables from a .env file
symfony/filesystem                       6.4.12             7.3.0              Provides basic utilities for the filesystem
symfony/flex                             2.6.0              2.8.1              Composer plugin for Symfony
symfony/framework-bundle                 6.4.21             7.3.1              Provides a tight integration between Symfony compone...
symfony/google-mailer                    6.4.13             7.3.0              Symfony Google Mailer Bridge
symfony/http-client                      6.4.19             7.3.1              Provides powerful methods to fetch HTTP resources sy...
symfony/lock                             6.4.13             7.3.0              Creates and manages locks, a mechanism to provide ex...
symfony/mailer                           6.4.21             7.3.1              Helps sending emails
symfony/mailgun-mailer                   6.4.13             7.3.1              Symfony Mailgun Mailer Bridge
symfony/maker-bundle                     1.63.0             1.64.0             Symfony Maker helps you create empty commands, contr...
symfony/messenger                        6.4.21             7.3.1              Helps applications send and receive messages to/from...
symfony/monolog-bundle                   3.10.0             3.10.0             Symfony MonologBundle
symfony/phpunit-bridge                   7.2.6              7.3.1              Provides utilities for PHPUnit, especially user depr...
symfony/property-access                  6.4.18             7.3.1              Provides functions to read and write from/to an obje...
symfony/runtime                          6.4.14             7.3.1              Enables decoupling PHP applications from global state
symfony/serializer                       6.4.21             7.3.1              Handles serializing and deserializing data structure...
symfony/stopwatch                        6.4.19             7.3.0              Provides a way to profile code
symfony/templating                       6.4.13             6.4.13             Provides all the tools needed to build any kind of t...
symfony/uid                              6.4.13             7.3.1              Provides an object-oriented API to generate and repr...
symfony/validator                        6.4.21             7.3.1              Provides tools to validate values
symfony/web-profiler-bundle              6.4.19             7.3.1              Provides a development tool that gives detailed info...
symfony/webpack-encore-bundle            2.2.0              2.2.0              Integration of your Symfony app with Webpack Encore
symfony/yaml                             6.4.21             7.3.1              Loads and dumps YAML files
symfonycasts/reset-password-bundle       1.23.1             1.23.1             Symfony bundle that adds password reset functionality.
twig/string-extra                        3.21.0             3.21.0             A Twig extension for Symfony String
twig/twig                                3.21.1             3.21.1             Twig, the flexible, fast, and secure template langua...
v-thru/buildscripts                      2.0.4              2.0.4              V-Thru Buildscripts
v-thru/datatablesbundle                  dev-master d748036 dev-master d748036 Symfony Datatable Bundle For Doctrine2 Entities
v-thru/doctrine-log-bundle               dev-master d36abd0 dev-master d36abd0 Symfony bundle to enable auto logging doctrine entit...
vonage/client                            4.1.1              4.2.0              PHP Client for using Vonage's API.
willdurand/geocoder-bundle               5.23.0             5.23.0             Integration of Geocoder into Symfony

Transitive dependencies not required in composer.json:
alcohol/iso4217                          4.2.0              4.2.0              ISO 4217 PHP Library
algolia/algoliasearch-client-php         3.4.2              4.25.1             Algolia Search API Client for PHP
aws/aws-crt-php                          1.2.7              1.2.7              AWS Common Runtime for PHP
bacon/bacon-qr-code                      3.0.1              3.0.1              BaconQrCode is a QR code generator for PHP.
behat/transliterator                     1.5.0              1.5.0              String transliterator
Package behat/transliterator is abandoned, you should avoid using it. No replacement was suggested.
beste/clock                              3.0.0              3.0.0              A collection of Clock implementations
beste/in-memory-cache                    1.3.1              1.3.1              A PSR-6 In-Memory cache that can be used as a fallba...
beste/json                               1.6.0              1.6.0              A simple JSON helper to decode and encode JSON
brick/math                               0.12.3             0.13.1             Arbitrary-precision arithmetic library
carbonphp/carbon-doctrine-types          3.2.0              3.2.0              Types to use Carbon in Doctrine
clue/stream-filter                       1.7.0              1.7.0              A simple and modern approach to stream filtering in PHP
composer/installers                      1.12.0             2.3.0              A multi-framework Composer library installer
dasprid/enum                             1.0.6              1.0.6              PHP 7.1 enum implementation
doctrine/cache                           2.2.0              2.2.0              PHP Doctrine Cache library is a popular cache implem...
doctrine/collections                     2.3.0              2.3.0              PHP Doctrine Collections library that adds additiona...
doctrine/common                          3.5.0              3.5.0              PHP Doctrine Common project is a library that provid...
doctrine/data-fixtures                   2.0.2              2.0.3              Data Fixtures for all Doctrine Object Managers
doctrine/dbal                            4.2.3              4.3.1              Powerful PHP database abstraction layer (DBAL) with ...
doctrine/deprecations                    1.1.5              1.1.5              A small layer on top of trigger_error(E_USER_DEPRECA...
doctrine/doctrine-bundle                 2.14.0             2.15.0             Symfony DoctrineBundle
doctrine/instantiator                    2.0.0              2.0.0              A small, lightweight utility to instantiate objects ...
doctrine/lexer                           3.0.1              3.0.1              PHP Doctrine Lexer parser library that can be used i...
doctrine/migrations                      3.9.0              3.9.1              PHP Doctrine Migrations project offer additional fun...
doctrine/mongodb-odm                     2.11.1             2.11.2             PHP Doctrine MongoDB Object Document Mapper (ODM) pr...
doctrine/persistence                     3.4.0              4.0.0              The Doctrine Persistence project is a set of shared ...
doctrine/sql-formatter                   1.5.2              1.5.2              a PHP SQL highlighting library
egulias/email-validator                  4.0.4              4.0.4              A library for validating emails against several RFCs
endroid/installer                        1.5.0              1.5.0              Composer plugin for installing configuration files
endroid/qr-code                          5.1.0              6.0.9              Endroid QR Code
fidry/cpu-core-counter                   1.2.0              1.2.0              Tiny utility to get the number of CPU cores.
fig/http-message-util                    1.1.5              1.1.5              Utility classes and constants for use with PSR-7 (ps...
firebase/php-jwt                         6.11.1             6.11.1             A simple library to encode and decode JSON Web Token...
friendsofphp/proxy-manager-lts           1.0.18             1.0.18             Adding support for a wider range of PHP versions to ...
friendsofsymfony/jsrouting-bundle        3.5.2              3.5.2              A pretty nice way to expose your Symfony routing to ...
gedmo/doctrine-extensions                3.20.0             3.20.0             Doctrine behavioral extensions
geocoder-php/common-http                 4.7.0              4.7.0              Common files for HTTP based Geocoders
geocoder-php/plugin                      1.6.0              1.6.0              Plugins to Geocoder providers
giggsey/locale                           2.8.0              2.8.0              Locale functions required by libphonenumber-for-php
google/apiclient-services                0.396.0            0.404.0            Client library for Google APIs
google/auth                              1.47.0             1.47.1             Google Auth Library for PHP
google/gax                               1.36.1             1.36.1             Google API Core for PHP
google/grpc-gcp                          0.4.1              0.4.1              gRPC GCP library for channel management
google/protobuf                          4.31.0             4.31.1             proto library for PHP
guzzlehttp/promises                      2.2.0              2.2.0              Guzzle promises library
imagine/imagine                          1.5.0              1.5.0              Image processing for PHP
intervention/gif                         4.2.2              4.2.2              Native PHP GIF Encoder/Decoder
jms/metadata                             2.8.0              2.8.0              Class/method/property metadata management in PHP
klapaudius/oauth2-php                    1.8.0              1.8.0              OAuth2 library
knplabs/gaufrette                        0.11.1             0.11.1             PHP library that provides a filesystem abstraction l...
knplabs/knp-menu                         3.7.0              3.8.0              An object oriented menu library
knplabs/knp-menu-bundle                  3.5.0              3.6.0              This bundle provides an integration of the KnpMenu l...
knplabs/knp-snappy                       1.5.1              1.5.1              PHP library allowing thumbnail, snapshot or PDF gene...
kreait/firebase-php                      7.16.0             7.21.1             Firebase Admin SDK
kreait/firebase-tokens                   5.2.1              5.2.1              A library to work with Firebase tokens
laminas/laminas-code                     4.16.0             4.16.0             Extensions to the PHP Reflection API, static code sc...
laminas/laminas-diactoros                3.6.0              3.6.0              PSR HTTP Message implementations
league/uri                               6.8.0              7.5.1              URI manipulation library
league/uri-components                    2.4.2              7.5.1              URI components manipulation library
league/uri-interfaces                    2.3.0              7.5.0              Common interface for URI representation
masterminds/html5                        2.9.0              2.10.0             An HTML5 parser and serializer.
mongodb/mongodb                          2.0.0              2.0.0              MongoDB driver library
monolog/monolog                          3.9.0              3.9.0              Sends your logs to files, sockets, inboxes, database...
mtdowling/jmespath.php                   2.8.0              2.8.0              Declaratively specify how to extract elements from a...
myclabs/deep-copy                        1.13.1             1.13.3             Create deep copies (clones) of your objects
nelmio/alice                             3.14.2             3.14.2             Expressive fixtures generator
nikic/php-parser                         5.4.0              5.5.0              A PHP parser written in PHP
paragonie/constant_time_encoding         3.0.0              3.0.0              Constant-time Implementations of RFC 4648 Encoding (...
paragonie/random_compat                  9.99.100           9.99.100           PHP 5.x polyfill for random_bytes() and random_int()...
payum/core                               1.7.5              1.7.6              One million downloads of Payum already! Payum offers...
payum/iso4217                            1.0.2              1.0.2              ISO 4217 PHP Library
phar-io/manifest                         2.0.4              2.0.4              Component for reading phar.io manifest information f...
phar-io/version                          3.2.1              3.2.1              Library for handling version information and constra...
php-http/curl-client                     2.3.3              2.3.3              PSR-18 and HTTPlug Async client with cURL
php-http/discovery                       1.20.0             1.20.0             Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug...
php-http/httplug                         2.4.1              2.4.1              HTTPlug, the HTTP client abstraction for PHP
php-http/message                         1.16.2             1.16.2             HTTP Message related tools
php-http/promise                         1.3.1              1.3.1              Promise used for asynchronous HTTP requests
phpcompatibility/php-compatibility       9.3.5              9.3.5              A set of sniffs for PHP_CodeSniffer that checks for ...
phpdocumentor/reflection-common          2.2.0              2.2.0              Common reflection classes used by phpdocumentor to r...
phpdocumentor/reflection-docblock        5.6.2              5.6.2              With this component, a library can provide support f...
phpdocumentor/type-resolver              1.10.0             1.10.0             A PSR-5 based resolver of Class names, Types and Str...
phpstan/phpdoc-parser                    2.1.0              2.2.0              PHPDoc parser with support for nullable, intersectio...
phpunit/php-code-coverage                11.0.9             11.0.10            Library that provides collection, processing, and re...
phpunit/php-file-iterator                5.1.0              5.1.0              FilterIterator implementation that filters files bas...
phpunit/php-invoker                      5.0.1              5.0.1              Invoke callables with a timeout
phpunit/php-text-template                4.0.1              4.0.1              Simple template engine.
phpunit/php-timer                        7.0.1              7.0.1              Utility class for timing
phpunit/phpunit                          11.5.21            11.5.27            The PHP Unit Testing framework.
psr/cache                                3.0.0              3.0.0              Common interface for caching libraries
psr/clock                                1.0.0              1.0.0              Common interface for reading the clock.
psr/container                            2.0.2              2.0.2              Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher                     1.0.0              1.0.0              Standard interfaces for event handling.
psr/http-client                          1.0.3              1.0.3              Common interface for HTTP clients
psr/http-factory                         1.1.0              1.1.0              PSR-17: Common interfaces for PSR-7 HTTP message fac...
psr/http-message                         1.1                2.0                Common interface for HTTP messages
psr/log                                  3.0.2              3.0.2              Common interface for logging libraries
psr/simple-cache                         3.0.0              3.0.0              Common interfaces for simple caching
ralouphie/getallheaders                  3.0.3              3.0.3              A polyfill for getallheaders.
ramsey/collection                        2.1.1              2.1.1              A PHP library for representing and manipulating coll...
ramsey/uuid                              4.7.6              4.9.0              A PHP library for generating and working with univer...
rize/uri-template                        0.4.0              0.4.0              PHP URI Template (RFC 6570) supports both expansion ...
sebastian/cli-parser                     3.0.2              3.0.2              Library for parsing CLI options
sebastian/code-unit                      3.0.3              3.0.3              Collection of value objects that represent the PHP c...
sebastian/code-unit-reverse-lookup       4.0.1              4.0.1              Looks up which function or method a line of code bel...
sebastian/comparator                     6.3.1              6.3.1              Provides the functionality to compare PHP values for...
sebastian/complexity                     4.0.1              4.0.1              Library for calculating the complexity of PHP code u...
sebastian/diff                           6.0.2              6.0.2              Diff implementation
sebastian/environment                    7.2.1              7.2.1              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                       6.3.0              6.3.0              Provides the functionality to export PHP variables f...
sebastian/global-state                   7.0.2              7.0.2              Snapshotting of global state
sebastian/lines-of-code                  3.0.1              3.0.1              Library for counting the lines of code in PHP source...
sebastian/object-enumerator              6.0.1              6.0.1              Traverses array structures and object graphs to enum...
sebastian/object-reflector               4.0.1              4.0.1              Allows reflection of object attributes, including in...
sebastian/recursion-context              6.0.2              6.0.2              Provides functionality to recursively process PHP va...
sebastian/type                           5.1.2              5.1.2              Collection of value objects that represent the types...
sebastian/version                        5.0.2              5.0.2              Library that helps with managing the version number ...
sonata-project/doctrine-extensions       2.5.0              2.5.0              Doctrine2 behavioral extensions
sonata-project/exporter                  3.3.1              3.3.1              Lightweight Exporter library
sonata-project/form-extensions           2.5.0              2.5.0              Symfony form extensions
sonata-project/twig-extensions           2.5.0              2.5.0              Sonata twig extensions
squizlabs/php_codesniffer                3.13.0             3.13.2             PHP_CodeSniffer tokenizes PHP, JavaScript and CSS fi...
staabm/side-effects-detector             1.0.5              1.0.5              A static analysis tool to detect side effects in PHP...
symfony/asset                            6.4.13             7.3.0              Manages URL generation and versioning of web assets ...
symfony/cache-contracts                  3.5.1              3.6.0              Generic abstractions related to caching
symfony/clock                            6.4.13             7.3.0              Decouples applications from the system clock
symfony/config                           6.4.14             7.3.0              Helps you find, load, combine, autofill and validate...
symfony/dependency-injection             6.4.20             7.3.1              Allows you to standardize and centralize the way obj...
symfony/deprecation-contracts            3.5.1              3.6.0              A generic function and convention to trigger depreca...
symfony/doctrine-bridge                  6.4.21             7.3.1              Provides integration for Doctrine with various Symfo...
symfony/dom-crawler                      6.4.19             7.3.1              Eases DOM navigation for HTML and XML documents
symfony/error-handler                    6.4.20             7.3.1              Provides tools to manage errors and ease debugging P...
symfony/event-dispatcher                 6.4.13             7.3.0              Provides tools that allow your application component...
symfony/event-dispatcher-contracts       3.5.1              3.6.0              Generic abstractions related to dispatching event
symfony/expression-language              6.4.13             7.3.0              Provides an engine that can compile and evaluate exp...
symfony/finder                           6.4.17             7.3.0              Finds files and directories via an intuitive fluent ...
symfony/form                             6.4.21             7.3.1              Allows to easily create, process and reuse HTML forms
symfony/http-client-contracts            3.5.2              3.6.0              Generic abstractions related to HTTP clients
symfony/http-foundation                  6.4.21             7.3.1              Defines an object-oriented layer for the HTTP specif...
symfony/http-kernel                      6.4.21             7.3.1              Provides a structured process for converting a Reque...
symfony/intl                             6.4.21             7.3.1              Provides access to the localization data of the ICU ...
symfony/mime                             6.4.21             7.3.0              Allows manipulating MIME messages
symfony/monolog-bridge                   6.4.13             7.3.0              Provides integration for Monolog with various Symfon...
symfony/options-resolver                 6.4.16             7.3.0              Provides an improved replacement for the array_repla...
symfony/orm-pack                         2.4.0              2.4.1              A pack for the Doctrine ORM
symfony/password-hasher                  6.4.13             7.3.0              Provides password hashing utilities
symfony/polyfill-intl-grapheme           1.32.0             1.32.0             Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu                1.32.0             1.32.0             Symfony polyfill for intl's ICU-related data and cla...
symfony/polyfill-intl-idn                1.32.0             1.32.0             Symfony polyfill for intl's idn_to_ascii and idn_to_...
symfony/polyfill-intl-normalizer         1.32.0             1.32.0             Symfony polyfill for intl's Normalizer class and rel...
symfony/polyfill-mbstring                1.32.0             1.32.0             Symfony polyfill for the Mbstring extension
symfony/polyfill-php83                   1.32.0             1.32.0             Symfony polyfill backporting some PHP 8.3+ features ...
symfony/polyfill-php84                   1.32.0             1.32.0             Symfony polyfill backporting some PHP 8.4+ features ...
symfony/polyfill-uuid                    1.32.0             1.32.0             Symfony polyfill for uuid functions
symfony/process                          6.4.20             7.3.0              Executes commands in sub-processes
symfony/property-info                    6.4.18             7.3.1              Extracts information about PHP class' properties usi...
symfony/psr-http-message-bridge          6.4.13             7.3.0              PSR HTTP message bridge
symfony/routing                          6.4.18             7.3.0              Maps an HTTP request to a set of configuration varia...
symfony/security-acl                     3.3.4              3.3.4              Symfony Security Component - ACL (Access Control List)
symfony/security-bundle                  6.4.21             7.3.1              Provides a tight integration of the Security compone...
symfony/security-core                    6.4.21             7.3.1              Symfony Security Component - Core Library
symfony/security-csrf                    6.4.13             7.3.0              Symfony Security Component - CSRF Library
symfony/security-http                    6.4.21             7.3.1              Symfony Security Component - HTTP Integration
symfony/service-contracts                3.5.1              3.6.0              Generic abstractions related to writing services
symfony/stimulus-bundle                  2.25.2             2.27.0             Integration with your Symfony app & Stimulus!
symfony/string                           6.4.21             7.3.0              Provides an object-oriented API to strings and deals...
symfony/translation                      6.4.21             7.3.1              Provides tools to internationalize your application
symfony/translation-contracts            3.5.1              3.6.0              Generic abstractions related to translation
symfony/twig-bridge                      6.4.21             7.3.0              Provides integration for Twig with various Symfony c...
symfony/twig-bundle                      6.4.13             7.3.1              Provides a tight integration of Twig into the Symfon...
symfony/var-dumper                       6.4.21             7.3.1              Provides mechanisms for walking through any arbitrar...
symfony/var-exporter                     6.4.21             7.3.0              Allows exporting any serializable PHP data structure...
theofidry/alice-data-fixtures            1.7.2              1.7.2              Nelmio alice extension to persist the loaded fixtures.
theseer/tokenizer                        1.2.3              1.2.3              A small library for converting tokenized PHP source ...
vonage/client-core                       4.11.2             4.11.2             PHP Client for using Vonage's API.
vonage/jwt                               0.5.1              0.5.1              A standalone package for creating JWTs for Vonage APIs
vonage/nexmo-bridge                      0.1.2              0.1.2              Provides a bridge for using the Vonage PHP SDK with ...
webmozart/assert                         1.11.0             1.11.0             Assertions to validate method input/output with nice...
willdurand/geocoder                      5.0.0              5.0.0              Common files for PHP Geocoder
willdurand/jsonp-callback-validator      2.0.0              2.0.0              JSONP callback validator.
willdurand/negotiation                   3.1.0              3.1.0              Content Negotiation tools for PHP provided as a stan...
zircote/swagger-php                      5.1.3              5.1.4              Generate interactive documentation for your RESTful ...

Subject

πŸ› Bug: ODM Adapter calls setOriginalDocumentProperty() with a string instead of int

When using Gedmo extensions with Doctrine MongoDB ODM, an exception is thrown due to a type mismatch in the Doctrine\ODM\MongoDB\UnitOfWork::setOriginalDocumentProperty() method.


πŸ’₯ Error

TypeError

Doctrine\ODM\MongoDB\UnitOfWork::setOriginalDocumentProperty(): 
Argument #1 ($oid) must be of type int, string given, 
called in vendor/gedmo/doctrine-extensions/src/Mapping/Event/Adapter/ODM.php

Trace points to this line:

$uow->setOriginalDocumentProperty(spl_object_hash($object), $property, $value);

This is caused by using spl_object_hash(), which returns a string, while the expected type is int.

Steps to reproduce

Use mongo translatable extension and get the results.

Expected results

Mongo data translated

Actual results

Error

"Doctrine\\ODM\\MongoDB\\UnitOfWork::setOriginalDocumentProperty(): Argument #1 ($oid) must be of type int, string given, called in /var/www/vt/vendor/gedmo/doctrine-extensions/src/Mapping/Event/Adapter/ODM.php on line 153"

βœ… Suggested Fix

Change the call to use spl_object_id() instead of spl_object_hash().

- $uow->setOriginalDocumentProperty(spl_object_hash($object), $property, $value);
+ $uow->setOriginalDocumentProperty(spl_object_id($object), $property, $value);

This is supported in PHP 7.2+ and returns an integer, which matches the expected parameter type.

βœ… Justification

According to PHP docs, spl_object_id() provides a unique object ID as an int, which is exactly what Doctrine expects for object identification in its internal tracking (UnitOfWork::originalDocumentData).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA confirmed bug in Extensions that needs fixing.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions