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

Fix bug: exception while creating audit table schema when using single table inheritance #133

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

dmitryuk
Copy link
Contributor

@dmitryuk dmitryuk commented Dec 2, 2022

Closes #132

@codecov
Copy link

codecov bot commented Dec 2, 2022

Codecov Report

Merging #133 (3c04c5b) into 2.x (142ca8c) will decrease coverage by 0.73%.
The diff coverage is 91.34%.

❗ Current head 3c04c5b differs from pull request most recent head d3de2a8. Consider uploading reports for the commit d3de2a8 to get more accurate results

@@            Coverage Diff             @@
##              2.x     #133      +/-   ##
==========================================
- Coverage   93.05%   92.31%   -0.74%     
==========================================
  Files          44       44              
  Lines        1526     1510      -16     
==========================================
- Hits         1420     1394      -26     
- Misses        106      116      +10     
Impacted Files Coverage Δ
src/Configuration.php 100.00% <ø> (ø)
src/EventSubscriber/AuditEventSubscriber.php 90.00% <0.00%> (ø)
src/Provider/AbstractProvider.php 100.00% <ø> (ø)
...Provider/Doctrine/Auditing/Annotation/Security.php 100.00% <ø> (ø)
...der/Doctrine/Auditing/Event/DoctrineSubscriber.php 50.00% <ø> (ø)
src/Provider/Doctrine/Auditing/Logger/Logger.php 0.00% <ø> (ø)
...ctrine/Auditing/Logger/Middleware/DHConnection.php 100.00% <ø> (ø)
...octrine/Persistence/Event/CreateSchemaListener.php 87.50% <0.00%> (-3.81%) ⬇️
...ctrine/Persistence/Event/TableSchemaSubscriber.php 100.00% <ø> (ø)
...rine/Persistence/Reader/Filter/DateRangeFilter.php 81.81% <ø> (ø)
... and 22 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dmitryuk
Copy link
Contributor Author

dmitryuk commented Dec 2, 2022

@DamienHarper please take a look, since I have the same issue in the latest release.

Copy link
Owner

@DamienHarper DamienHarper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @dmitryuk for this PR.

I started working on version 3.0.0 in master branch a few days ago (it will drop PHP 7.4 support, Symfony 4.x support etc.)

I also created a 2.x branch since I started working on 3.0 so, could you target this PR to 2.x branch please?

I'll backport the fix to master branch once merged and released as 2.3.1

src/Provider/Doctrine/Configuration.php Outdated Show resolved Hide resolved
src/Provider/Doctrine/Configuration.php Outdated Show resolved Hide resolved
@dmitryuk dmitryuk closed this Dec 2, 2022
@dmitryuk dmitryuk deleted the topic-132 branch December 2, 2022 09:29
@dmitryuk dmitryuk restored the topic-132 branch December 2, 2022 09:29
@dmitryuk dmitryuk reopened this Dec 2, 2022
@dmitryuk dmitryuk changed the base branch from master to 2.x December 2, 2022 09:32
@dmitryuk
Copy link
Contributor Author

dmitryuk commented Dec 2, 2022

Thanks again @dmitryuk for this PR.

I started working on version 3.0.0 in master branch a few days ago (it will drop PHP 7.4 support, Symfony 4.x support etc.)

I also created a 2.x branch since I started working on 3.0 so, could you target this PR to 2.x branch please?

I'll backport the fix to master branch once merged and released as 2.3.1

Done

@dmitryuk dmitryuk requested a review from DamienHarper December 2, 2022 09:38
@dmitryuk
Copy link
Contributor Author

dmitryuk commented Dec 2, 2022

Don't understand why Github workflow not run after push

@DamienHarper DamienHarper merged commit 9391c73 into DamienHarper:2.x Dec 2, 2022
@DamienHarper
Copy link
Owner

Don't understand why Github workflow not run after push

Fixed now but CI is failing now

@DamienHarper
Copy link
Owner

CI should be ok now

DamienHarper pushed a commit that referenced this pull request Dec 2, 2022
…e table inheritance (#133)

* fix #132

* entity

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>
DamienHarper added a commit that referenced this pull request Dec 2, 2022
* Fix bug: exception while creating audit table schema when using single table inheritance (#133)

* fix #132

* entity

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>

* Fixed annotations in tests

* Removed annotations from cherrypicked commits

Co-authored-by: Alexander Dmitryuk <xakzona@bk.ru>
Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>
DamienHarper added a commit that referenced this pull request Jul 14, 2024
* Fix bug: exception while creating audit table schema when using single table inheritance (#133)

* fix #132

* entity

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>

* Updated README.md

* Updated CI

* Fixed annotations in tests

* Regression fix.

Fixes DamienHarper/auditor-bundle#334

* Updated CI

* Performance issues with metadatas (#137)

* Cache DH Annotations
* speed
* remove getOwner call

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>

* CreateSchemaListener not updating inheritance tables (#139)

* Fix: Attempted to call an undefined method named "getMetadataCache" of class "Doctrine\ORM\Configuration". (#144)

* Fix: Attempted to call an undefined method named "introspectSchema" of class "Doctrine\DBAL\Schema\PostgreSQLSchemaManager" (#143)

* Fixed invokable storage mapper (see #146) (#148)

* Fixed broken annotation registration since doctrine/orm 2.14

* improved the TransactionProcessor to convert encoding of diff properly (#152)

* improved the TransactionProcessor to convert encoding of diff properly

* adapted quotes in TransactionProcessor to single quotes

* Fixed compatibility issue with doctrine/event-manager ^2.0 (#157)

* PHP-CS-Fixer

* Validate that diff is a string before passing to mb_convert_encoding (#156)

* PHP-CS-Fixer

* Support  doctrine annotations 2.0 (#158)

* topic 344  doctrine annotations 2.0

---------

Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>

* PHP-CS-Fixer

* Fix failing CI (lock related)

* PHP-CS-Fixer

* Fixes `diffs` column type when JSON type is supported

* Fixed CI (2.x)

* Fixed CI (2.x)

* Fixed CI (2.x)

* Fixed CI (2.x)

* Fixed CI (2.x)

* Fix 185 (#186)

* fixes #185

* PHP-CS-Fixer

---------

Co-authored-by: Damien Harper <damien.harper@gmail.com>

* skip embedded class from schema listener (#189)

Co-authored-by: Guillaume Sainthillier <guillaume.sainthillier@gmail.com>

* Fixed CI (2.x)

* Typo

* PHP-CS-Fixer

* Update deps + PHP-CS-Fixer

* PHP-CS-Fixer

* PHP-CS-Fixer (3.48.0)

* Detected wrapped driver (#195)

* - updated DHDriver and use parent::connect instead of dedicated field
- added getWrappedDriver to extract wrapped driver.
- tests

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* Fixed PHPStan error

---------

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>
Co-authored-by: Damien Harper <damien.harper@gmail.com>

* fix

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* php-cs-fixer

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* removed getSubscribedEvents from CreateSchemaListener

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* phpstan

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* fix DoctrineSubscriber + tests

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* fix Issue174Test

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

* removed duplicate code, fixed test

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>

---------

Signed-off-by: Oleg Andreyev <oleg@andreyev.lv>
Co-authored-by: Alexander Dmitryuk <xakzona@bk.ru>
Co-authored-by: a.dmitryuk <a.dmitryuk@movavi.com>
Co-authored-by: damienharper <damien.harper@gmail.com>
Co-authored-by: Jörn Dyherrn <joern@dyherrn.dev>
Co-authored-by: Martijn Boers <2955898+martijnboers@users.noreply.github.com>
Co-authored-by: Guillaume Sainthillier <guillaume.sainthillier@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exception while creating audit table schema when using single table inheritance
2 participants