You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ composer show --latest 'doctrine/*'
Color legend:
- patch or minor release available - update recommended
- major release available - update possible
- up to date version
Direct dependencies required in composer.json:
doctrine/annotations 2.0.1 2.0.1 Docblock Annotations Parser
doctrine/doctrine-bundle 2.12.0 2.12.0 Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 3.3.0 3.3.0 Symfony DoctrineMigrationsBundle
doctrine/mongodb-odm-bundle 5.0.1 5.0.1 Symfony Doctrine MongoDB Bundle
doctrine/orm 3.1.1 3.1.2 Object-Relational-Mapper for PHP
Transitive dependencies not required in composer.json:
doctrine/cache 2.2.0 2.2.0 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.
doctrine/collections 2.2.1 2.2.2 PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common 3.4.3 3.4.4 PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and muc...
doctrine/dbal 4.0.1 4.0.1 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/deprecations 1.1.3 1.1.3 A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.
doctrine/event-manager 2.0.0 2.0.0 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector 2.0.10 2.0.10 PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.
doctrine/instantiator 2.0.0 2.0.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer 3.0.1 3.0.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations 3.7.4 3.7.4 PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying c...
doctrine/mongodb-odm 2.7.0 2.7.0 PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.
doctrine/persistence 3.3.2 3.3.2 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/sql-formatter 1.2.0 1.2.0 a PHP SQL highlighting library
PHP version
$ php -v
PHP 8.3.6 (cli) (built: Apr 11 2024 15:12:15) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
Subject
It appears that Loggable's LogEntryInterface::getObjectClass() is missing a null type from the @phpstan-return annotation.
/**
* @return string|null
*
* @phpstan-return class-string<T>
*/
public function getObjectClass();
------------------------------
No errors found!
------------------------------
Actual results
ERROR: ImplementedReturnTypeMismatch - The inherited return type 'class-string<T:MyClass as object>' for
Gedmo\Loggable\LogEntryInterface::getObjectClass is different to the implemented return type for
App\Document\Log::getobjectclass '(class-string<T:MyClass as object>)|null' (see https://psalm.dev/123)
* @return class-string<T>|null
------------------------------
1 errors found
------------------------------
Suggested fix
/**
* @return string|null
*
- * @phpstan-return class-string<T>
+ * @phpstan-return class-string<T>|null
*/
public function getObjectClass();
Environment
Package
show
Doctrine packages
show
PHP version
Subject
It appears that Loggable's
LogEntryInterface::getObjectClass()
is missing anull
type from the@phpstan-return
annotation.https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Loggable/LogEntryInterface.php#L61
This is backed up by:
https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Loggable/Entity/MappedSuperclass/AbstractLogEntry.php#L68
And:
https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Loggable/Document/MappedSuperclass/AbstractLogEntry.php#L64
This can be highlighted by running psalm.
Minimal repository with the bug
https://github.com/doctrine-extensions/DoctrineExtensions/tree/main
Steps to reproduce
Expected results
Actual results
Suggested fix
https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Loggable/LogEntryInterface.php#L61
The text was updated successfully, but these errors were encountered: