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
[Acl] Fix for issue #9433 #9485
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabpot
added a commit
that referenced
this pull request
Nov 22, 2013
This PR was squashed before being merged into the 2.2 branch (closes #9485). Discussion ---------- [Acl] Fix for issue #9433 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9433 | License | MIT | Doc PR | Two new test for issue #9433 : `testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()` `testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()` The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database. All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database. Commits ------- a38fab9 [Acl] Fix for issue #9433
jderusse
pushed a commit
to jderusse/symfony
that referenced
this pull request
Dec 15, 2020
This PR was squashed before being merged into the 2.2 branch (closes symfony#9485). Discussion ---------- [Acl] Fix for issue symfony#9433 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#9433 | License | MIT | Doc PR | Two new test for issue symfony#9433 : `testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()` `testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()` The change to `updateAces()` line 857 is enough to make the first test succeed. When changing the `order` field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of the `order` field in the database. All the other changes are for the second test. In the former `updateAcl()` method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of the `order` field in the database. Commits ------- a38fab9 [Acl] Fix for issue symfony#9433
derrabus
added a commit
to symfony/security-acl
that referenced
this pull request
Apr 23, 2021
This PR was merged into the 3.0-dev branch. Discussion ---------- Github actions setup and test fixes Fixes #59 and closes #61 - This PR adds a github action setup, so that the test suite is actually executed on pr's (and pushes) - Test fixes as there are quite some failing or risky tests The github actions result can be viewed here before merge (https://github.com/acrobat/security-acl/actions) There are 2 risky tests left, but I don't know what to do with them or how to fix them. The test names indicate that there should be an exception thrown but that doesn't happen and there are no asserts performed in those tests. The tests/fix for an issue were added in symfony/symfony#9485 Commits ------- 8b94a32 Github actions setup and test fixes
derrabus
added a commit
to symfony/security-acl
that referenced
this pull request
Apr 23, 2021
This PR was merged into the 3.x-dev branch. Discussion ---------- Fix risky tests and deprecation warnings This PR fixes the two risky tests and should (hopefully) give us a green CI. The two tests in question were added in symfony/symfony#9485. As far as I read the PR, the tests should ensure that no exception is thrown. But because they don't assert anything, modern PHPUnit versions would flag the tests as risky. I avoid this issue by bumping the asserion count at the end of each test. Commits ------- 6fd230c Fix risky tests and deprecation warnings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two new test for issue #9433 :
testUpdateAclInsertingMultipleObjectFieldAcesThrowsDBConstraintViolations()
testUpdateAclDeletingObjectFieldAcesThrowsDBConstraintViolations()
The change to
updateAces()
line 857 is enough to make the first test succeed. When changing theorder
field value to a higher value, we must first change the value of the next entry (and all the next entries recursively) to preserve uniqueness of theorder
field in the database.All the other changes are for the second test. In the former
updateAcl()
method, we commit the changes of the existing ACEs to the database before deleting or adding the new ones. We must delete the old ACEs before changing the existing ACEs in order to preserve uniqueness of theorder
field in the database.