Commit d5e2a68
committed
bug symfony#61583 [DoctrineBridge] Fix exception catch when deleting temporary table in the sameDatabaseChecker (GromNaN)
This PR was merged into the 6.4 branch.
Discussion
----------
[DoctrineBridge] Fix exception catch when deleting temporary table in the sameDatabaseChecker
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#61579
| License | MIT
When the sameDatabaseChecker tries to delete a table that doesn't exist on MSSQL, it gets a `DatabaseObjectNotFoundException`, that is a parent error of `TableNotFoundException`.
https://github.com/doctrine/dbal/blob/d5a5a2165676e15a1805dc1b43d57c0bec7493bc/src/Exception/TableNotFoundException.php#L10C38-L10C69
The error code is [15151](https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors-15000-to-15999): `Cannot %S_MSG the %S_MSG '%.*ls', because it does not exist or you do not have permission.`. Doctrine DBAL cannot distinguish which object it is: https://github.com/doctrine/dbal/blob/d5a5a2165676e15a1805dc1b43d57c0bec7493bc/src/Driver/API/SQLSrv/ExceptionConverter.php#L43
Commits
-------
261333b Fix exception catch when deleting temporary table in the sameDatabaseCheckerFile tree
1 file changed
+2
-2
lines changed- src/Symfony/Bridge/Doctrine/SchemaListener
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments