-
Notifications
You must be signed in to change notification settings - Fork 59
DBAL v4, Middleware, Driver, Platform, and SchemaManager implementation #61
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
Conversation
7c34d2b
to
c82761b
Compare
@jsor we have been using this fork with no issues for a while now, any progress/help-needed here? |
9866728
to
1b766d0
Compare
2bc5745
to
07e9d7a
Compare
This latest update should take care of the remaining deprecations to support DBAL v4 (and silence PHPUnit). Tests are passing locally. |
👍 This branch works for me, I was able to upgrade an existing symfony project to DBAL 4, ORM 3. Thanks! |
cd67572
to
1dea92f
Compare
@GwendolenLynch in the documentation you write:
In the example you register ORMSchemaEventSubscriber, if someone just copies it it will fail. |
Also, I am getting this when I am adding ORM subscriber:
|
Thanks for your feedback, @tasselchof. I'm going to try to add some more tests to cover this. What versions of |
I've made a pull request to your branch with those fixes: GwendolenLynch#1. You can merge it to fix those and if I will find anything else - I will do another pull request. It's just one test if you wish to add it.
|
Hey guys! Are there any plans on merging this or should we rollback to DBAL v3? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A CHANGELOG.md or UPGRADE.md would be welcome to list the new classes and especially the BC of deleted or renamed class.
Hello everyone, any news on this MR ? Are the changelog is the only thing missing for merging it ? |
Hello everyone, |
The current @jsor version of this repo doesn't work for me using current versions of Symfony and Doctrine, but this patch does work, so I have forked @GwendolenLynch's repo and I'm using that until the official version is updated. Please consider merging this PR and releasing a new version @jsor . :) |
Hi, I was wondering what’s still missing to get this merged. Is there anything I can help with to move it forward? Many thanks for the work done so far! EDIT: @GwendolenLynch maybe the only thing I would change is to remove final keyword from PostGISPlatform as it takes away the possibility to extend the platform with custom behavior |
@GwendolenLynch Hey, sorry for being unresponsive for so long. I've added you as an collaborator to this repo. So, feel free to merge and release this and also #67. |
@GwendolenLynch please take a look at your formatting and the psalm checks |
@GwendolenLynch @MathisBurger I corrected the CI and reworked the functioning of the spatial index filter. |
lgtm, what do you think @GwendolenLynch ? |
6aec76f
to
e832080
Compare
e832080
to
c1fc2cc
Compare
From DBAL 3.2 the events systems is (mostly?) deprecated in favour of middleware, and custom schema manager + factory combination.
The main purpose of this PR is to migrate as much as possible to this:
Jsor\Doctrine\PostGIS\Driver\Driver
that extendsAbstractPostgreSQLDriver
Jsor\Doctrine\PostGIS\Driver\Middleware
that wraps the lower levelDriver
inside the PostGISDriver
Jsor\Doctrine\PostGIS\Driver\PostGISPlatform
wrapsDoctrine\DBAL\Platforms\PostgreSQLPlatform
and is instantiated by the PostGISDriver
Jsor\Doctrine\PostGIS\Schema\SchemaManager
now extendsDoctrine\DBAL\Schema\PostgreSQLSchemaManager
and handles schema managementJsor\Doctrine\PostGIS\Schema\SchemaManagerFactory
is an implementation ofDoctrine\DBAL\Schema\SchemaManagerFactory
SchemaManager
instance insideConnection
Jsor\Doctrine\PostGIS\Event\DBALSchemaEventSubscriber
moved toPostGISPlatform
Additionally:
@covers
on most tests to get a better view of coveragepsalm.xml
and it passesBonus: It is now possible to extend
Jsor\Doctrine\PostGIS\Types\GeographyType
orJsor\Doctrine\PostGIS\Types\GeometryType
and not have the schema tool throw a tantrum. SeePostGISPlatformTest
Feedback welcome, and I'm happy to add/adjust/drop relevant things.
Edit: Fixes #63