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

[meta] Porting of imi-conrun feature which are missing in contao-console #1689

Closed
amenk opened this issue May 21, 2019 · 4 comments
Closed

Comments

@amenk
Copy link

amenk commented May 21, 2019

A while ago we created imi-conrun with the same aim which contao-console is now fulfilling.

These are the commands of imi-conrun:

script                      Runs multiple imi-conrun commands
admin
  admin:user:change-password  Changes the password of a adminhtml user.
  admin:user:create           Create admin user.
  admin:user:delete           Delete the account of a adminhtml user.
  admin:user:list             List admin users.
 cache
  cache:build                 Build internal cache
  cache:flush                 Clean all cache folders
  cache:list                  Lists all Contao caches
 db
  db:console                  Opens mysql client by database config from local.xml
  db:create                   Create currently configured database
  db:drop                     Drop current database
  db:dump                     Dumps database with mysqldump cli client according to informations from local.xml
  db:import                   Imports database with mysql cli client according to database defined in local.xml
  db:info                     Dumps database informations
  db:maintain:check-tables    Check database tables
  db:query                    Executes an SQL query on the database defined in local.xml
  db:status                   Shows important server status information or custom selected status values
  db:variables                Shows important variables or custom selected
 dev
  dev:log:follow              Follow Database Log (tl_log)
 indexer
  indexer:search:build        Build search index
 sys
  sys:info                    Prints infos about the current contao system.
  sys:maintenance             Toggles maintenance mode.
  sys:setup:preview           Compare module version with core_resource table.
  sys:setup:run               Runs all new database update scripts.
 thirdparty
  thirdparty:efg:build-dca    Build DCAs for EFG

We are planning to port the missing features to contao console commands and deprecate imi-conrun (which works fine for Contao 3.x but no longer for 4.x)

Are there any thoughts about this?

Otherwise we would just make according pull requests.

@amenk
Copy link
Author

amenk commented May 21, 2019

About the db:* commands we are not yet sure whether we port them ... if we port them, we would sure use https://github.com/imi-digital/database-helper for providing the functionality.

The first command we would start with would be sys:setup:run to run database upgrades after installing modules.

@m-vo
Copy link
Member

m-vo commented May 21, 2019

Please do not use this repo for opening issues anymore (use the contao/contao mono repo instead).

likely related: contao/contao#404

@leofeyer
Copy link
Member

As discussed in Mumble on August 29th, the following command would be interesting for us:

  • contao:user:create
  • contao:user:list
  • contao:user:delete

The other commands either already exist (e.g. contao:user:password) or there are other tools, which already provide the functionality.

leofeyer added a commit that referenced this issue May 4, 2020
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #1587
| Docs PR or issue | -

Now that @ausi has improved the `Result` class in #1287, we have to use `array_key_exists()` instead of `isset()`, because the values can be `null`.

This causes the problem described in #1587:

```php
$this->arrModified['endDate'] = null; // new value
$this->resultSet[$this->intIndex] = 123456; // old value

// This condition never evaluates to true, therefore the new value is never used
if (isset($this->arrModified[$strKey])) {
    return $this->arrModified[$strKey]; 
}
```

Commits
-------

669a0a6c Use array_key_exists() in the Database\Result class
bff1924c Return "false" in the __isset() method if the modified value is "null"

Co-authored-by: Martin Auswöger <martin@auswoeger.com>
2302b2f5 Add an explaining comment
@leofeyer
Copy link
Member

leofeyer commented Dec 9, 2021

See contao/contao#1463.

@leofeyer leofeyer closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants