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

You must provide either ManagerRegistry or ConnectionRegistry after an upgrade to 0.10.0 #40

Open
kostirez1 opened this issue Feb 1, 2025 · 2 comments

Comments

@kostirez1
Copy link

While trying to upgrade between 0.9.3 and 0.10.0, I encountered the following message:

ERROR: You must provide either ManagerRegistry or ConnectionRegistry.

Both $managerRegistry and $connectionRegistry values in DependencyFactoryCreator::create() are null, but I can't figure out why.

Compiled Nette DI container looks like:

public function createServiceNettrine__migrations__dependencyFactory(): Doctrine\Migrations\DependencyFactory
{
	return Nettrine\Migrations\DependencyFactoryCreator::create(
		$this,
		$this->getService('nettrine.migrations.configuration'),
		logger: $this->getService('monolog.logger.default'),
	);
}

config.neon options look ok to me, at least according to the documentation for 0.10.0.

nettrine.migrations:
  table: migrations
  directories:
      Foo\Bar\Migrations: %appDir%/../sql/migrations
  versionsOrganization: year_and_month
  customTemplate: %appDir%/../sql/migrations/migrations.tpl

Installed composer packages are:

Direct:
  doctrine/dbal: 3.9.4
  nettrine/dbal: 0.9.0
  nettrine/migrations: 0.10.0
Transitive:
  doctrine/cache: 2.2.0
  doctrine/deprecations: 1.1.4
  doctrine/event-manager: 2.0.1
  doctrine/migrations: 3.8.2
  nettrine/cache: 0.5.0

The two use Doctrine\Persistence\ConnectionRegistry and ManagerRegistry definitions don't resolve to anything, possibly due to doctrine/persistence not being installed? Although, even by requiring that, nothing changes. An upgrade of nettrine/dbal (0.9.0 -> 0.10.0) blocks due to my project still being on doctrine/dbal ^3.9.

Is it possible that nettrine/migrations v0.10.0 has some shadow/incorrect dependencies defined in composer.json? Thanks!

@f3l1x
Copy link
Member

f3l1x commented Feb 3, 2025

Thank you for your report. Do you think it would be possible to reproduce it here https://github.com/contributte/doctrine-skeleton ?

@kostirez1
Copy link
Author

Thanks for the quick reply. I will try to post a link to a modified branch, probably later this week.

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

No branches or pull requests

2 participants