doctrine-dbal
doctrine-dbal copied to clipboard
Release a version with PHP 8.2 support
Please, when will the new version with PHP 8.2 support be released?
Hi @hason-kosik, max one week. I am finishing testing on my projects.
@f3l1x Do you possibly have example how to replace EventSubscriber (e.g. like this one) with Middleware?
It used to register itself, thanks to these lines probably, now it does not...
Hey @haltuf, thank you for pointing that.
I've implement EventManager support (again). Can you test it?
https://github.com/contributte/doctrine-dbal/commit/52b85b8fe5097a0ea90594ba48511c0e8d2abe03
@f3l1x Thanks! It works now as before.
@f3l1x Seems like schemaAssetsFilter changed its behaviour. Previously:
schemaAssetsFilter: PorovnavacZajezdu\Model\ORM\SchemaFilter::filter
with public static function filter(string|AbstractAsset $assetName): bool worked well.
Now it returns
Failed assertion #0 for item 'nettrine.dbal › configuration › schemaAssetsFilter' with value 'PorovnavacZa...
Is it a bug, or feature?
It's a bug. Will repair.
Fixed here https://github.com/contributte/doctrine-dbal/commit/00c5783c57a8d3ac742d40171c4d2fd143de7fd3.
Please test it.
Sorry, did not notice you have edited your last comment (no futher notification). I have tested it now and the problem has been solved by this commit.
Good news. :-)
Hi @f3l1x , I have trouble with sortable injected through this package.
Trying to call:
$rec = $this->em->getRepository(SuggestedTransformation::class);
Versions 0.9@dev dbal+orm, cache 0.4, annotations 0.8 leads to the error message:
This repository can be attached only to ORM sortable listener
with failure in here
This is how dump of $em->getEventManager()->getAllListeners() looks like:
In versions 0.8 dbal+orm, cache 0.3, annotations 0.7 it works just fine.
This is how dump of $em->getEventManager()->getAllListeners() looks like in these:
When updating from old (working) version to new (problematic) version, these are the packages that get updated:
Lock file operations: 0 installs, 4 updates, 0 removals
- Upgrading nettrine/annotations (v0.7.0 => v0.8.1)
- Upgrading nettrine/cache (v0.3.0 => v0.4.1)
- Upgrading nettrine/dbal (v0.8.2 => dev-master 00c5783)
- Upgrading nettrine/orm (v0.8.4 => dev-master 9e2cd91)
@f3l1x Do you have idea, where I should be searching for the source of the problem? I can try to fix myself.
UPDATE: so the problem seems to be linked with dropping ContainerAwareEventManager and introducing ContainerEventManager with these lines creating anonymous class instead of class of a neccessary type.
UPDATE2: I have fixed the issue by replacing these lines with:
public function addServiceSubscriber(string|array $events, string $service): void
{
$this->addEventListener($events, $this->container->getService($service));
}
I might have introduced some new problems, but this issue seems to be solved by this. The only behaviour that changed now, is that hash [email protected] changed to the result of spl_object_hash($listener);, but I think this should not cause any trouble.
Thanks, I will take a look. addServiceSubscriber has special purpose to be lazy and not instance all subscribers at once.
Can you please take a look @haltuf https://github.com/contributte/doctrine-dbal/commit/5053516ade579534de3fb3b401f316a1049644f5 and try latest version?
Thanks @f3l1x , the problem seems to be fixed now.
@f3l1x Not sure if my problem, or bug, I've noticed that Debug panel is empty when using this branch. I have:
nettrine.dbal:
debug:
panel: %debugMode%
sourcePaths: [%appDir%/Model/ORM/Entity]
Yet Tracy says:
Will investigate further.
Yes, it's empty. I must reimplement it, because there is no logger in DBAL anymore. I must use middlewares and custom classes.