Direct IMAP management - kolabd replacement
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rKbb9264e33104: Direct IMAP backend
rK4bdca819e942: [DRAFT] Direct IMAP backend
./phpunit
Diff Detail
- Repository
- rK kolab
- Lint
Lint Errors Severity Location Code Message Error src/include/rcube_imap_generic.php:33 PHPCS.E.PSR1.Classes.ClassDeclaration.MissingNamespace PSR1.Classes.ClassDeclaration.MissingNamespace Error src/include/rcube_imap_generic.php:33 PHPCS.E.Squiz.Classes.ValidClassName.NotCamelCaps Squiz.Classes.ValidClassName.NotCamelCaps Error src/include/rcube_imap_generic.php:89 phpstan PHPDoc tag @param has invalid value (int Number of bytes sent, False on error): Unexpected token "Number", expected variable at offset 317 Error src/include/rcube_imap_generic.php:100 PHPCS.E.Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Error src/include/rcube_imap_generic.php:103 PHPCS.E.Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace Error src/include/rcube_imap_generic.php:134 PHPCS.E.Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals Error src/include/rcube_imap_generic.php:134 PHPCS.E.Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals Error src/include/rcube_imap_generic.php:134 PHPCS.E.Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals Error src/include/rcube_imap_generic.php:134 PHPCS.E.Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:146 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:147 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:147 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:147 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:147 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:150 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:150 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:153 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:153 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceAfter PSR12.Operators.OperatorSpacing.NoSpaceAfter Error src/include/rcube_imap_generic.php:153 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore Error src/include/rcube_imap_generic.php:153 PHPCS.E.PSR12.Operators.OperatorSpacing.NoSpaceBefore PSR12.Operators.OperatorSpacing.NoSpaceBefore - Unit
No Test Coverage - Build Status
Buildable 40442 Build 16364: arc lint + arc unit
Event Timeline
- Fix test regressions
- More tests and unification
- Add more job:* commands
- ACL handling
Optional IMAP backend, pass tests with imap backend disabled, fixed IMAP::verifyAccount.
verifyAccount does not throw an exception for me (perhaps because of the httpform auth I'm using).
I ran into issues with just listing all folders because some shared folders shared with anyone were still returned.
Just listing the INBOX also seems less fragile.
src/app/Backends/IMAP.php | ||
---|---|---|
458 | We throw exceptions on imap errors because worker will handle this as a job failure and try again. If we just return false the job is not retried. That being said... verifyAccount() (and VerifyJob) is not used anymore in this branch. With app.with_imap introduction we should call IMAP::verifyAccount() (not the job, the job could be removed later) from the CreateJob for "app.with_imap is disabled" case. | |
src/app/Jobs/SharedFolder/DeleteJob.php | ||
32 | This line was important to be there. If the exception below is thrown the status update wouldn't happen, and we don't want that. | |
src/app/Jobs/User/CreateJob.php | ||
86 | It should be app.with_imap here. |
src/app/Backends/IMAP.php | ||
---|---|---|
458 | verifyAccount is currently primarily used in the tests, so let's throw in the job if necessary I propose. |
src/app/Backends/IMAP.php | ||
---|---|---|
458 | It was invoked from the observer https://git.kolab.org/source/kolab/browse/master/src/app/Observers/UserObserver.php$69 With this whole refactor I propose to call IMAP::verifyAccount() from the CreateJob. |