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
Enh: Rename column status
to state
in User, Space, & Membership
#6517
Draft
martin-rueegg
wants to merge
27
commits into
humhub:statable
Choose a base branch
from
metaworx:enh/1-statable-2
base: statable
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
* Fix module form "Set as default" * Display status bar after save module form "Set as default" --------- Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
…red in the web application too (humhub#6505)
…x/humhub into metaworx-enh/allow-event-data-from-config
* Fix humhub#6509: Fix online status position on people page * Fix humhub#6510: Fix online status position on people page
martin-rueegg
force-pushed
the
enh/1-statable-2
branch
from
August 16, 2023 14:59
4de30f8
to
b8ee6b7
Compare
Normal use will not do anything other than succeed! ``` php $HUMHUB_VENDOR_BIN/codecept run unit LoadDbTest ``` However, if run with the environment variable HUMHUB_DB_INITIALIZE set, then the default fixtures will be loaded and not unloaded after the test. ``` HUMHUB_DB_INITIALIZE= php $HUMHUB_VENDOR_BIN/codecept run unit LoadDbTest ```
martin-rueegg
force-pushed
the
enh/1-statable-2
branch
2 times, most recently
from
August 16, 2023 17:40
4fbc382
to
e4617c8
Compare
martin-rueegg
force-pushed
the
enh/1-statable-2
branch
from
August 16, 2023 22:34
e4617c8
to
a18730e
Compare
``` - ReadableContentQueryTest: Global content guest non guest mode Destroying application Starting application [ConnectionWatcher] watching new connections [Fixtures] Loading fixtures [ConnectionWatcher] watching new connections [ConnectionWatcher] no longer watching new connections [ConnectionWatcher] closing all (0) connections [Fixtures] Done [yii\web\Session::open] 'Session started' [queue] 'Could not execute queued job! Message: Argument 2 passed to Symfony\\Component\\Mime\\Address::__construct() must be of the type string, null given, called in /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php on line 368 Trace:#0 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php(368): Symfony\\Component\\Mime\\Address->__construct() humhub#1 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php(51): yii\\symfonymailer\\Message->convertStringsToAddresses() humhub#2 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/targets/MailTarget.php(71): yii\\symfonymailer\\Message->setFrom() humhub#3 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/targets/BaseTarget.php(161): humhub\\modules\\notification\\targets\\MailTarget->handle() humhub#4 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/components/NotificationManager.php(101): humhub\\modules\\notification\\targets\\BaseTarget->send() humhub#5 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/jobs/SendBulkNotification.php(38): humhub\\modules\\notification\\components\\NotificationManager->sendBulk() humhub#6 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/queue/ActiveJob.php(33): humhub\\modules\\notification\\jobs\\SendBulkNotification->run() humhub#7 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-queue/src/Queue.php(246): humhub\\modules\\queue\\ActiveJob->execute() humhub#8 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/queue/driver/Instant.php(31): yii\\queue\\Queue->handleMessage() humhub#9 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-queue/src/Queue.php(196): humhub\\modules\\queue\\driver\\Instant->pushMessage() humhub#10 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/components/BaseNotification.php(210): yii\\queue\\Queue->push() humhub#11 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(370): humhub\\modules\\notification\\components\\BaseNotification->sendBulk() humhub#12 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(321): humhub\\modules\\content\\models\\Content->notifyContentCreated() humhub#13 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(268): humhub\\modules\\content\\models\\Content->processNewContent() humhub#14 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(615): humhub\\modules\\content\\models\\Content->afterSave() humhub#15 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(570): yii\\db\\ActiveRecord->insertInternal() humhub#16 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(676): yii\\db\\ActiveRecord->insert() humhub#17 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/components/ContentActiveRecord.php(476): yii\\db\\BaseActiveRecord->save() humhub#18 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/post/models/Post.php(97): humhub\\modules\\content\\components\\ContentActiveRecord->afterSave() humhub#19 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(615): humhub\\modules\\post\\models\\Post->afterSave() humhub#20 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(570): yii\\db\\ActiveRecord->insertInternal() humhub#21 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(676): yii\\db\\ActiveRecord->insert() humhub#22 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/tests/codeception/unit/ReadableContentQueryTest.php(70): yii\\db\\BaseActiveRecord->save() humhub#23 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Test/Unit.php(57): tests\\codeception\\unit\\modules\\content\\ReadableContentQueryTest->_before() humhub#24 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/phpunit-wrapper/src/TestCase.php(12): Codeception\\Test\\Unit->_setUp() humhub#25 /home/mdr/projects/humhub/htdocs/protected/humhub/tests/codeception/_support/HumHubDbTestCase.php(60): Codeception\\PHPUnit\\TestCase->setUp() humhub#26 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestCase.php(1207): tests\\codeception\\_support\\HumHubDbTestCase->setUp() humhub#27 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestResult.php(728): PHPUnit\\Framework\\TestCase->runBare() humhub#28 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestCase.php(964): PHPUnit\\Framework\\TestResult->run() humhub#29 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestSuite.php(684): PHPUnit\\Framework\\TestCase->run() humhub#30 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/phpunit-wrapper/src/Runner.php(117): PHPUnit\\Framework\\TestSuite->run() humhub#31 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/SuiteManager.php(161): Codeception\\PHPUnit\\Runner->doEnhancedRun() humhub#32 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Codecept.php(208): Codeception\\SuiteManager->run() humhub#33 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Codecept.php(162): Codeception\\Codecept->runSuite() humhub#34 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Command/Run.php(401): Codeception\\Codecept->run() humhub#35 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Command/Command.php(298): Codeception\\Command\\Run->execute() humhub#36 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(1040): Symfony\\Component\\Console\\Command\\Command->run() humhub#37 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand() humhub#38 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun() humhub#39 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Application.php(117): Symfony\\Component\\Console\\Application->run() humhub#40 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/app.php(46): Codeception\\Application->run() humhub#41 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/app.php(47): {closure}() humhub#42 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/codecept(6): require(\'/home/mdr/proje...\') humhub#43 /home/mdr/projects/humhub/htdocs/protected/vendor/bin/codecept(112): include(\'/home/mdr/proje...\') humhub#44 {main}' [queue] 'Could not execute queued job! Message: Argument 2 passed to Symfony\\Component\\Mime\\Address::__construct() must be of the type string, null given, called in /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php on line 368 Trace:#0 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php(368): Symfony\\Component\\Mime\\Address->__construct() humhub#1 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-symfonymailer/src/Message.php(51): yii\\symfonymailer\\Message->convertStringsToAddresses() humhub#2 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/targets/MailTarget.php(71): yii\\symfonymailer\\Message->setFrom() humhub#3 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/targets/BaseTarget.php(161): humhub\\modules\\notification\\targets\\MailTarget->handle() humhub#4 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/components/NotificationManager.php(101): humhub\\modules\\notification\\targets\\BaseTarget->send() humhub#5 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/jobs/SendBulkNotification.php(38): humhub\\modules\\notification\\components\\NotificationManager->sendBulk() humhub#6 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/queue/ActiveJob.php(33): humhub\\modules\\notification\\jobs\\SendBulkNotification->run() humhub#7 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-queue/src/Queue.php(246): humhub\\modules\\queue\\ActiveJob->execute() humhub#8 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/queue/driver/Instant.php(31): yii\\queue\\Queue->handleMessage() humhub#9 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2-queue/src/Queue.php(196): humhub\\modules\\queue\\driver\\Instant->pushMessage() humhub#10 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/notification/components/BaseNotification.php(210): yii\\queue\\Queue->push() humhub#11 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(370): humhub\\modules\\notification\\components\\BaseNotification->sendBulk() humhub#12 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(321): humhub\\modules\\content\\models\\Content->notifyContentCreated() humhub#13 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/models/Content.php(268): humhub\\modules\\content\\models\\Content->processNewContent() humhub#14 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(615): humhub\\modules\\content\\models\\Content->afterSave() humhub#15 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(570): yii\\db\\ActiveRecord->insertInternal() humhub#16 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(676): yii\\db\\ActiveRecord->insert() humhub#17 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/components/ContentActiveRecord.php(476): yii\\db\\BaseActiveRecord->save() humhub#18 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/post/models/Post.php(97): humhub\\modules\\content\\components\\ContentActiveRecord->afterSave() humhub#19 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(615): humhub\\modules\\post\\models\\Post->afterSave() humhub#20 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/ActiveRecord.php(570): yii\\db\\ActiveRecord->insertInternal() humhub#21 /home/mdr/projects/humhub/htdocs/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(676): yii\\db\\ActiveRecord->insert() humhub#22 /home/mdr/projects/humhub/htdocs/protected/humhub/modules/content/tests/codeception/unit/ReadableContentQueryTest.php(76): yii\\db\\BaseActiveRecord->save() humhub#23 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Test/Unit.php(57): tests\\codeception\\unit\\modules\\content\\ReadableContentQueryTest->_before() humhub#24 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/phpunit-wrapper/src/TestCase.php(12): Codeception\\Test\\Unit->_setUp() humhub#25 /home/mdr/projects/humhub/htdocs/protected/humhub/tests/codeception/_support/HumHubDbTestCase.php(60): Codeception\\PHPUnit\\TestCase->setUp() humhub#26 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestCase.php(1207): tests\\codeception\\_support\\HumHubDbTestCase->setUp() humhub#27 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestResult.php(728): PHPUnit\\Framework\\TestCase->runBare() humhub#28 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestCase.php(964): PHPUnit\\Framework\\TestResult->run() humhub#29 /home/mdr/projects/humhub/htdocs/protected/vendor/phpunit/phpunit/src/Framework/TestSuite.php(684): PHPUnit\\Framework\\TestCase->run() humhub#30 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/phpunit-wrapper/src/Runner.php(117): PHPUnit\\Framework\\TestSuite->run() humhub#31 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/SuiteManager.php(161): Codeception\\PHPUnit\\Runner->doEnhancedRun() humhub#32 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Codecept.php(208): Codeception\\SuiteManager->run() humhub#33 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Codecept.php(162): Codeception\\Codecept->runSuite() humhub#34 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Command/Run.php(401): Codeception\\Codecept->run() humhub#35 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Command/Command.php(298): Codeception\\Command\\Run->execute() humhub#36 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(1040): Symfony\\Component\\Console\\Command\\Command->run() humhub#37 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand() humhub#38 /home/mdr/projects/humhub/htdocs/protected/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun() humhub#39 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/src/Codeception/Application.php(117): Symfony\\Component\\Console\\Application->run() humhub#40 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/app.php(46): Codeception\\Application->run() humhub#41 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/app.php(47): {closure}() humhub#42 /home/mdr/projects/humhub/htdocs/protected/vendor/codeception/codeception/codecept(6): require(\'/home/mdr/proje...\') humhub#43 /home/mdr/projects/humhub/htdocs/protected/vendor/bin/codecept(112): include(\'/home/mdr/proje...\') humhub#44 {main}' [tests\codeception\_support\HumHubDbTestCase::setUp] Initializing Modules [tests\codeception\_support\HumHubDbTestCase::setUp] Reloading settings [tests\codeception\_support\HumHubDbTestCase::setUp] Flushing cache [tests\codeception\_support\HumHubDbTestCase::setUp] Deleting mails [yii\mail\BaseMailer::send] 'Sending email "Sara Tester just wrote post "Public Space Public Post" in space Space 3" to "user1@example.com"' [yii\mail\BaseMailer::send] 'Sending email "Sara Tester just wrote post "Public Space Private Post" in space Space 3" to "user1@example.com"' [yii\web\User::logout] 'User \'2\' logged out from .' ✔ ReadableContentQueryTest: Global content guest non guest mode (3.06s) ^ ``` rather than ``` - ReadableContentQueryTest: Global content guest non guest mode Destroying application Starting application [ConnectionWatcher] watching new connections [Fixtures] Loading fixtures [ConnectionWatcher] watching new connections [ConnectionWatcher] no longer watching new connections [ConnectionWatcher] closing all (0) connections [Fixtures] Done [tests\codeception\_support\HumHubDbTestCase::setUp] Initializing Modules [tests\codeception\_support\HumHubDbTestCase::setUp] Reloading settings [tests\codeception\_support\HumHubDbTestCase::setUp] Flushing cache [tests\codeception\_support\HumHubDbTestCase::setUp] Deleting mails [yii\web\Session::open] 'Session started' [yii\mail\BaseMailer::send] 'Sending email "Sara Tester just wrote post "Public Space Public Post" in space Space 3" to "user1@example.com"' [yii\mail\BaseMailer::send] 'Sending email "Sara Tester just wrote post "Public Space Private Post" in space Space 3" to "user1@example.com"' [yii\web\User::logout] 'User \'2\' logged out from .' ✔ ReadableContentQueryTest: Global content guest non guest mode (1.51s) Destroying application [ConnectionWatcher] no longer watching new connections [ConnectionWatcher] closing all (0) connections - ```
…ntActiveRecord class
…dInstance()` call, rather than `$model::FindOne()`
martin-rueegg
force-pushed
the
enh/1-statable-2
branch
from
August 16, 2023 23:49
a18730e
to
ac7c2e1
Compare
martin-rueegg
force-pushed
the
enh/1-statable-2
branch
from
August 17, 2023 11:51
ac7c2e1
to
75b458d
Compare
This was referenced Aug 17, 2023
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.
Part of
FindInstanceInterface
- Part 1.a: Creating base classes #6503FindInstanceInterface
- Part 2: Implementing throughout the code #6463status
tostate
in User, Space, & Membership #6517 (this PR)file
table and implement interfaces #6523What kind of change does this PR introduce?
Does this PR introduce a breaking change?
If yes, please describe the impact and migration path for existing applications:
Module developers who have not used the constants to refer to a status, but rather hard-coded a numeric value, or have used status codes from the reserved range, have to revisit the table of new status codes and update the status values or preferrably use the appropriate constants.
The PR fulfills these requirements
statable
branchOther information:
See #6430 (comment)