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

[WIP] v3 release cleanup #1326

Draft
wants to merge 137 commits into
base: develop
Choose a base branch
from
Draft

Conversation

sreichel
Copy link
Collaborator

@sreichel sreichel commented Oct 10, 2023

Final tests:

  • removed Magento 2 related code
  • removed Magento 1 EE related code
  • added strict types
  • added type hints for parameters/return values
  • simplified code for list commands (added a new interface) (Updated list commands #1458 may added later)
  • simplified code for config toggle commands
  • prepared for symfony 6.1 (php >8.1)
  • pass phpstan level 9
  • Check: disable initMagento for DB-list commands?
  • use symfony/filesystem
  • add shortcuts to options
  • FIX: @TODO(sr) ... two supressed PHPstan errors ...

Available commands:

  • completion Dump the shell completion script
  • help Display help for a command
  • install Install magento
  • list List commands
  • open-browser Open current project in browser (experimental)
  • script Runs multiple n98-magerun commands
  • shell Runs n98-magerun as shell - Removed with symfony3?
  • uninstall Uninstall magento (drops database and empties current folder or folder set via installationFolder)

admin ✔️

  • admin:notifications Toggles admin notifications
  • admin:user:change-password Changes the password of a adminhtml user.
  • admin:user:change-status Set active status of an adminhtml user. If no option is set the status will be toggled.
  • admin:user:create Create admin user.
  • admin:user:delete Delete the account of a adminhtml user.
  • admin:user:list List admin users.

cache ✔️

  • cache:clean Clean magento cache
  • cache:dir:flush Flush (empty) Magento cache directory
  • cache:disable Disables magento caches
  • cache:enable Enables magento caches
  • cache:flush Flush magento cache storage
  • cache:list Lists all magento caches
  • cache:report View inside the cache
  • cache:view Prints a cache entry

category

  • category:create:dummy Create a dummy category

cms ✔️

  • cms:block:list List all cms blocks
  • cms:block:toggle Toggle a cms block

composer - removed

  • composer:diagnose Diagnoses the system to identify common errors.
  • composer:init Creates a basic composer.json file in current directory.
  • composer:install [i] Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
  • composer:require Adds required packages to your composer.json and installs them.
  • composer:search Searches for packages.
  • composer:update [u|upgrade] Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.
  • composer:validate Validates a composer.json and composer.lock.

config ✔️

  • config:delete Deletes a store config item
  • config:dump Dump merged xml config
  • config:get Get a core config item
  • config:search Search system configuration descriptions.
  • config:set Set a core config item

customer ✔️

  • customer:change-password Changes the password of a customer.
  • customer:create Creates a new customer/user for shop frontend.
  • customer:create:dummy Generate dummy customers. You can specify a count and a locale.
  • customer:delete Delete Customer/s
  • customer:info Loads basic customer info by email address.
  • customer:list Lists customers

db

  • db:console [mysql-client] 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
  • 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

design ✔️

  • design:demo-notice Toggles demo store notice for a store view

dev

  • dev:class:lookup Resolves a grouped class name
  • dev:code:model:method Code annotations: Reads the columns from a table and writes the getter and setter methods into the class file for @methods.
  • dev:console Opens PHP interactive shell with initialized Mage::app() (Experimental)
  • dev:email-template:usage Display database transactional email template usage
  • dev:ide:phpstorm:meta Generates meta data file for PhpStorm auto completion (default version : 2019.1+)
  • dev:log Toggle development log (system.log, exception.log)
  • dev:log:db Turn on/off database query logging
  • dev:log:size Get size of log file
  • dev:merge-css Toggles CSS Merging
  • dev:merge-js Toggles JS Merging
  • dev:module:create Create and register a new magento module.
  • dev:module:dependencies:from Show list of modules which depend on %s module
  • dev:module:dependencies:on Show list of modules which given module depends on
  • dev:module:disable Disable a module or all modules in codePool
  • dev:module:enable Enable a module or all modules in codePool
  • dev:module:list List all installed modules
  • dev:module:observer:list Lists all registered observers
  • dev:module:rewrite:conflicts Lists all magento rewrite conflicts
  • dev:module:rewrite:list Lists all magento rewrites
  • dev:module:update Update a Magento module.
  • dev:profiler Toggles profiler for debugging
  • dev:report:count Get count of report files
  • dev:setup:script:attribute Creates attribute script for a given attribute code
  • dev:symlinks Toggle allow symlinks setting
  • dev:template-hints Toggles template hints
  • dev:template-hints-blocks Toggles template hints block names
  • dev:theme:duplicates Find duplicate files (templates, layout, locale, etc.) between two themes.
  • dev:theme:info Displays settings of current design on particular store view
  • dev:theme:list Lists all available themes
  • dev:translate:admin Toggle inline translation tool for admin
  • dev:translate:export Export inline translations
  • dev:translate:set Adds a translation to core_translate table. Globally for locale
  • dev:translate:shop Toggle inline translation tool for shop

eav ✔️

  • eav:attribute:create-dummy-values Create a dummy values for dropdown attributes
  • eav:attribute:list Lists all EAV attributes
  • eav:attribute:remove Removes attribute for a given attribute code
  • eav:attribute:view View informations about an EAV attribute

index ✔️

  • index:list Lists all magento indexes
  • index:reindex Reindex a magento index by code
  • index:reindex:all Reindex all magento indexes

local-config ✔️

  • local-config:generate Generates local.xml config

media ✔️

  • media:cache:image:clear Clears image cache
  • media:cache:jscss:clear Clears JS/CSS cache
  • media:dump Creates an archive with content of media folder.

script ✔️

  • script:repo:list Lists all scripts in repository
  • script:repo:run Run script from repository

sys

  • sys:check Checks Magento System
  • sys:cron:history Last executed cronjobs with status.
  • sys:cron:list Lists all cronjobs
  • sys:cron:run Runs a cronjob by job code
  • sys:info Prints infos about the current magento system.
  • sys:maintenance Toggles maintenance mode.
  • sys:modules:list List all installed modules
  • sys:setup:change-version Change module setup resource version
  • sys:setup:compare-versions Compare module version with core_resource table.
  • sys:setup:incremental List new setup scripts to run, then runs one script
  • sys:setup:remove Remove module setup resource entry
  • sys:setup:run Runs all new setup scripts.
  • sys:store:config:base-url:list Lists all base urls
  • sys:store:list Lists all installed store-views
  • sys:url:list Get all urls.
  • sys:website:list Lists all websites

Removed EE commands: ✔️

  • admin:user:lock Enforce a lock on an admin user account. Specify the username and an optional lifetime parameter in seconds.
  • admin:user:lockdown Lock every admin user account for the optionally specified lifetime (in days). If not provided, defaults to one month.
  • admin:user:unlock Release lock on admin user for one or all users
  • cms:banner:toggle Toggle a banner (Enterprise only)
  • cms:page:publish Publish a CMS page revision (Enterprise only)
  • giftcard:pool:generate Generate giftcard pool)
  • giftcard:create Create a gift card with a specified amount
  • giftcard:info Get gift card account information by code
  • giftcard:remove Remove a gift card account by code
  • index:list:mview Lists all magento mview indexes
  • index:reindex:mview Reindex a magento index by code using the materialised view functionality

@sreichel sreichel changed the title Remove Magento2 related code [WIP] Remove Magento2 & EE related code Oct 10, 2023
@sreichel sreichel changed the title [WIP] Remove Magento2 & EE related code [WIP] v3 release cleaup Oct 16, 2023
@sreichel sreichel changed the title [WIP] v3 release cleaup [WIP] v3 release cleanup Oct 17, 2023
@sreichel
Copy link
Collaborator Author

From #1424 (comment)

The currently development version is related to the PR #1326 [...] Sadly there is not much progress here.

Working on it! Maybe someone gimme some boost 🤣

Support Support

@cmuench
Copy link
Member

cmuench commented Jun 29, 2024

@sreichel oh wow, that is be a huge cleanup here.

@sreichel
Copy link
Collaborator Author

sreichel commented Jul 2, 2024

@cmuench phpstan level 9 is tough. Also try to add some better interaction (and validation) for missinng/wrong arguments. Takes me some days.

@cmuench
Copy link
Member

cmuench commented Jul 2, 2024

@cmuench phpstan level 9 is tough. Also try to add some better interaction (and validation) for missinng/wrong arguments. Takes me some days.

That's hard. Magento 2 is tested with level 3.

@sreichel
Copy link
Collaborator Author

sreichel commented Jul 12, 2024

@cmuench can you please set it to draft status?

I think its better to update the commands in small chunks, to make reviews easier. Leave this as personal checklist.

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.

2 participants