doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.76k stars 224 forks source link

Rely on object manager proxy resolution #421

Closed VincentLanglet closed 1 year ago

VincentLanglet commented 1 year ago

Suggested by https://github.com/doctrine/persistence/pull/326#issuecomment-1374466942 cc @greg0ire

Closes https://github.com/doctrine/data-fixtures/pull/419 Closes https://github.com/doctrine/data-fixtures/issues/417

This would be great to try it in a real project.

greg0ire commented 1 year ago

You can use the Closes keyword for PRs that should be closed if we merge this as well I think. Needs vendor/bin/phpcbf

greg0ire commented 1 year ago

Please improve your commit message according to the contributing guide.

This is hard to understand, so a good commit message is in order. Here, what happens is that several proxy systems can be in use (the one from doctrine/common, and maybe the one Nicolas Grekas recently introduced). By using delegating to the object manager layer, we don't need to know.

greg0ire commented 1 year ago

This would be great to try it in a real project.

@mdevlamynck, can you maybe help with this?

mdevlamynck commented 1 year ago

@greg0ire Works in our project.

greg0ire commented 1 year ago

Might help:

cat .git/hooks/pre-push
#!/bin/bash
set -e
echo ''|vendor/bin/phpcs
vendor/bin/phpstan
vendor/bin/psalm
vendor/bin/phpunit
VincentLanglet commented 1 year ago

Cs is fixed now

greg0ire commented 1 year ago

Thanks @VincentLanglet !