Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage generic persistence event classes #9633

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Apr 6, 2022

@derrabus derrabus added this to the 2.12.0 milestone Apr 6, 2022
composer.json Outdated Show resolved Hide resolved
@greg0ire
Copy link
Member

Either we release 2.12.0 now or this should be retargeted to 2.11.x, as it fixes the build

@derrabus
Copy link
Member Author

The build on 2.11.x has been fixed by #9648 already.

@derrabus derrabus merged commit 36ab133 into doctrine:2.12.x Apr 11, 2022
@derrabus derrabus deleted the types/generic-events branch April 11, 2022 09:58
derrabus added a commit to derrabus/orm that referenced this pull request Apr 11, 2022
* 2.12.x:
  Leverage generic persistence event classes (doctrine#9633)
  Fix static analysis for Persistence 2.5 (doctrine#9648)
  Improve exception message (doctrine#9646)
  Deprecate console helper (doctrine#9641)
  Use charset/collation from column or table default when creating relations (doctrine#9636)
  Support Enum IDs and search by Enum fields (doctrine#9629)
  Fix composer install in contributing readme
@michnovka
Copy link
Contributor

Still getting Psalm errors

vendor/bin/psalm --show-info=false --stats --output-format=github
Target PHP version: 8.1 (set by config file)
Scanning files...
Analyzing files...

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  60 / 118 (50%)
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
::error file=lib/Doctrine/ORM/Event/LifecycleEventArgs.php,line=31,col=16,title=MoreSpecificReturnType::lib/Doctrine/ORM/Event/LifecycleEventArgs.php:31:16: MoreSpecificReturnType: The declared return type 'Doctrine\ORM\EntityManagerInterface' for Doctrine\ORM\Event\LifecycleEventArgs::getEntityManager is more specific than the inferred return type 'Doctrine\Persistence\ObjectManager' (see https://psalm.dev/070)
::error file=lib/Doctrine/ORM/Event/LifecycleEventArgs.php,line=35,col=16,title=LessSpecificReturnStatement::lib/Doctrine/ORM/Event/LifecycleEventArgs.php:35:16: LessSpecificReturnStatement: The type 'Doctrine\Persistence\ObjectManager' is more general than the declared return type 'Doctrine\ORM\EntityManagerInterface' for Doctrine\ORM\Event\LifecycleEventArgs::getEntityManager (see https://psalm.dev/129)
::error file=lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php,line=21,col=16,title=MoreSpecificReturnType::lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php:21:16: MoreSpecificReturnType: The declared return type 'Doctrine\ORM\EntityManagerInterface' for Doctrine\ORM\Event\LoadClassMetadataEventArgs::getEntityManager is more specific than the inferred return type 'Doctrine\Persistence\ObjectManager' (see https://psalm.dev/070)
::error file=lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php,line=25,col=16,title=LessSpecificReturnStatement::lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php:25:16: LessSpecificReturnStatement: The type 'Doctrine\Persistence\ObjectManager' is more general than the declared return type 'Doctrine\ORM\EntityManagerInterface' for Doctrine\ORM\Event\LoadClassMetadataEventArgs::getEntityManager (see https://psalm.dev/129)

@derrabus
Copy link
Member Author

You did upgrade to Persistence 2.5?

@michnovka
Copy link
Contributor

composer show doctrine/persistence
name     : doctrine/persistence
descrip. : The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
keywords : mapper, object, odm, orm, persistence
versions : * 2.5.0
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : https://doctrine-project.org/projects/persistence.html
source   : [git] https://github.com/doctrine/persistence.git f8776dd9a0bdcd838812951a75f4ada72065a82a
dist     : [zip] https://api.github.com/repos/doctrine/persistence/zipball/f8776dd9a0bdcd838812951a75f4ada72065a82a f8776dd9a0bdcd838812951a75f4ada72065a82a
path     : /home/superuser/scripts/orm/vendor/doctrine/persistence
names    : doctrine/persistence

support
issues : https://github.com/doctrine/persistence/issues
source : https://github.com/doctrine/persistence/tree/2.5.0

autoload
psr-4
Doctrine\Common\ => src/Common
Doctrine\Persistence\ => src/Persistence

requires
doctrine/cache ^1.11 || ^2.0
doctrine/collections ^1.0
doctrine/deprecations ^0.5.3
doctrine/event-manager ^1.0
php ^7.1 || ^8.0
psr/cache ^1.0 || ^2.0 || ^3.0

requires (dev)
composer/package-versions-deprecated ^1.11
doctrine/annotations ^1.0
doctrine/coding-standard ^9.0
doctrine/common ^3.0
phpstan/phpstan ~1.4.10 || 1.5.0
phpunit/phpunit ^7.5.20 || ^8.5 || ^9.5
symfony/cache ^4.4 || ^5.4 || ^6.0
vimeo/psalm 4.22.0

conflicts
doctrine/annotations <1.0 || >=2.0
doctrine/common <2.10

@derrabus
Copy link
Member Author

Okay, but the CI job is green. Something must be off on your side. https://github.com/doctrine/orm/runs/5970318458?check_suite_focus=true

@michnovka
Copy link
Contributor

Yea, seems some cache issue.

vendor/bin/psalm --clear-cache

Fixed it. Sorry for wasting your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants