-
-
Notifications
You must be signed in to change notification settings - Fork 399
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-PHP81] Checklist #1275
Comments
For next PR ...Tasks
Errors
|
A real work to be appreciated to keep this tool up to date which was heavily used during Magento 1. OpenMage continues Magento 1 and doesn't stop at being an LTS. |
@cmuench PR is ready. Did not touch composer related commands. Do we still need them? Install/Uninstall needs to be tested by someone else (does not work in my DDEV environment) Unittests have to be adjusted. Some help would be nice here :) |
@sreichel I do not work with Magento 1 anymore on a daily base. Maybe we should remove the Composer library from Magerun 1. |
It would have been easier to backport magerun2 🤣 Install/CI fails b/c composer dowload does not work. @cmuench can we/you backport install cmd from magerun2? |
For next PR ...Backport from n89-magerun2 ... Updates
Tasks
Errors
|
@sreichel I tested the installation on my local machine and it works in the provided ddev environment. Currently I don't know why it's failing in CI. |
@cmuench package download does not work for me too. Install dir
|
@cmuench ok, interesting. We will find the issue :-) |
@sreichel I can reproduce it! That's good. |
@sreichel I guess Composer 2.2 is not compatible. I will try to backport the downloader logic from Magerun 2. |
@sreichel I started to backport the installer command. The main issue is that the installer of n98-magerun2 works stricly with Composer packages. N98\Magento\Command\Installer\InstallCommand:
magento-packages:
- name: mage-os-2.4.5-p1
package: magento/project-community-edition
version: 2.4.5-p1
options:
repository-url: https://mirror.mage-os.org In n98-magerun1 we have a different structure: N98\Magento\Command\Installer\InstallCommand:
magento-packages:
- name: openmage-20.0.14
version: 20.0.14
dist:
url: https://github.com/OpenMage/magento-lts/archive/v20.0.14.zip
type: zip
shasum: 15172228925d2f03db00712e591f14b15210bea1
extra:
sample-data: sample-data-1.9.2.4 Currently we use the internal Composer library to handle that. |
@cmuench can we use https://github.com/firegento/magento for composer installable packages instead of magento-mirror? |
@sreichel Installer is now working in the Github Actions. |
Seems that most of the tests are currently not compatible with the new console "ask" method. |
@cmuench thanks for working on this. Unfortunately my ddev env has some problems ... https://stackoverflow.com/q/76366191/5703627 My changes are very similar to magerun2, may we can reuse some code for unit tests? |
@cmuench Working on this next days. Will also update to phpunit 9. |
Hello, i wanted to mention following errors which occured during switching from OpenMage PHP7.4 to PHP8.1, maybe its useful for your checklist (n98-magerun --version: 2.3.0): 2023-08-15T03:32:21+00:00 ERR (3): Deprecated functionality: Return type of N98\Magento\Modules::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/bin/n98-magerun.phar/src/N98/Magento/Modules.php on line 96 2023-08-15T03:32:21+00:00 ERR (3): Deprecated functionality: Return type of N98\Magento\Modules::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/bin/n98-magerun.phar/src/N98/Magento/Modules.php on line 108 2023-08-15T06:05:29+00:00 ERR (3): Deprecated functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in phar:///usr/bin/n98-magerun.phar/src/N98/Magento/Command/System/Url/ListCommand.php on line 83 |
@sreichel Spent some time to fix the tests and already did the upgrade to PHPUnit 9. |
@sreichel I merged the current state to develop branch. I did this to get the Github Actions running. The old Ubuntu Version in the Github Actions was not supported anymore. |
@sreichel Phar build is also fixed and files.magerun.net is updated with the latest dev version if n98-magerun1. |
@sreichel sample data "no" should work in the next minutes. Pushed a fix to develop branch. |
@sreichel You ask about we can handle the DB port... I used port 3306 in the container in the install command. |
@sreichel I added functional tests to the Github Actions. This helps to find issues which cannot be found in the Unit Tests. |
@sreichel - Could you please allocate some time to complete this checklist? For everyone who uses OpenMage it would be a gift to be able to continue using n98-magerun. We could also add some custom commands to DDEV as you wanted. |
@sreichel @addison74 The develop version is already "green" in all tests. Feel free to test it in a real project. I sadly have not any real OpenMage project. |
@addison74 i will update during next days. |
@cmuench how about to drop support for php < 8.1 for v3? v2.3 works up to php 8.0, right? We dont need any backward compatibilty and could make use of php 8.1 features. |
@cmuench work on some cleanup ... (and phpstan L9)
|
@sreichel thanks for working on the finalization of the release. In the EE command should be a check. We can add a constraint to current the PHP version there and skip the tests The M2 related switches are to provide a hint if the wrong version is used. I think after 10 years we can remove that. |
@cmuench do we need to support something below php8.1 for v3? For php7-8.0 you can still use v2.3. For a php8.1 release we can update to symfony 6.4. EE commands can be moved into an add-on. I know there are commands the are EE-only snare disabled for CE, but others that have different behavior inside the command. This causes some problems with phpstan, that can't find EE-related classes. However ... I have to split my work into smaller PRs ... hope it's okay to not doing it in one big PR. |
@sreichel The plan is that the current release is still compatible with the latest Magento Open Source 1.9 with PHP 7.4. Let's bring first the build in production. I want to stay on Symfony LTS releases which is currently 5.4. |
Okay. :) What about EE-commands? Is it fine to move them into a separate repo? (already removed that code for phpstan and have to revert it ...) |
@sreichel They will never be called and registered in OpenMage due to this code: public function isEnabled()
{
return $this->getApplication()->isMagentoEnterprise();
} We can just ignore them and remove the test setup. |
@cmuench i know, but im sure there are commands that work for EE and CE, but have different behavior inside the command. (e.g. create admin user - adding roles) |
We can drop support for EE this release. And deprecate then the old Magento CE 1.9 for the next major release. |
Okay ... PRs incoming next days :) |
Maybe some OM users want to join for help? At least with tests? |
@cmuench killed my work with I'll try to split my PRs into small chunks ... sorry for extra work, but maybe PRs are much more clear. |
@cmuench think we can close this. All my changes in pipeline are only code style improvments. No functional changes. I'll provide updates step by step, but i thinks its ready to make a php81 release. |
Based on https://github.com/cmuench/n98-magerun/tree/feature/php81
Available commands:
completion
Dump the shell completion scripthelp
Display help for a commandinstall
Install magentolist
List commandsopen-browser
Open current project in browser (experimental)script
Runs multiple n98-magerun commands- Removed with symfony3?shell
Runs n98-magerun as shelluninstall
Uninstall magento (drops database and empties current folder or folder set via installationFolder)admin ✔️
admin:notifications
Toggles admin notificationsadmin: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 cachecache:dir:flush
Flush (empty) Magento cache directorycache:disable
Disables magento cachescache:enable
Enables magento cachescache:flush
Flush magento cache storagecache:list
Lists all magento cachescache:report
View inside the cachecache:view
Prints a cache entrycategory ✔️
category:create:dummy
Create a dummy categorycms ✔️
cms:block:list
List all cms blockscms:block:toggle
Toggle a cms blockcomposer - 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 itemconfig:dump
Dump merged xml configconfig:get
Get a core config itemconfig:search
Search system configuration descriptions.config:set
Set a core config itemcustomer ✔️
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/scustomer:info
Loads basic customer info by email address.customer:list
Lists customersdb ✔️
db:console
[mysql-client] Opens mysql client by database config from local.xmldb:create
Create currently configured databasedb:drop
Drop current databasedb:dump
Dumps database with mysqldump cli clientdb:import
Imports database with mysql cli client according to database defined in local.xmldb:info
Dumps database informationsdb:maintain:check-tables
Check database tablesdb:query
Executes an SQL query on the database defined in local.xmldb:status
Shows important server status information or custom selected status valuesdb:variables
Shows important variables or custom selecteddesign ✔️
design:demo-notice
Toggles demo store notice for a store viewdev ✔️
dev:class:lookup
Resolves a grouped class namedev: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 usagedev: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 loggingdev:log:size
Get size of log filedev:merge-css
Toggles CSS Mergingdev:merge-js
Toggles JS Mergingdev:module:create
Create and register a new magento module.dev:module:dependencies:from
Show list of modules which depend on %s moduledev:module:dependencies:on
Show list of modules which given module depends ondev:module:disable
Disable a module or all modules in codePooldev:module:enable
Enable a module or all modules in codePooldev:module:list
List all installed modulesdev:module:observer:list
Lists all registered observersdev:module:rewrite:conflicts
Lists all magento rewrite conflictsdev:module:rewrite:list
Lists all magento rewritesdev:module:update
Update a Magento module.dev:profiler
Toggles profiler for debuggingdev:report:count
Get count of report filesdev:setup:script:attribute
Creates attribute script for a given attribute codedev:symlinks
Toggle allow symlinks settingdev:template-hints
Toggles template hintsdev:template-hints-blocks
Toggles template hints block namesdev:theme:duplicates
Find duplicate files (templates, layout, locale, etc.) between two themes.dev:theme:info
Displays settings of current design on particular store viewdev:theme:list
Lists all available themesdev:translate:admin
Toggle inline translation tool for admindev:translate:export
Export inline translationsdev:translate:set
Adds a translation to core_translate table. Globally for localedev:translate:shop
Toggle inline translation tool for shopeav ✔️
eav:attribute:create-dummy-values
Create a dummy values for dropdown attributeseav:attribute:list
Lists all EAV attributeseav:attribute:remove
Removes attribute for a given attribute codeeav:attribute:view
View informations about an EAV attributeindex ✔️
index:list
Lists all magento indexesindex:reindex
Reindex a magento index by codeindex:reindex:all
Reindex all magento indexeslocal-config ✔️
local-config:generate
Generates local.xml configmedia ✔️
media:cache:image:clear
Clears image cachemedia:cache:jscss:clear
Clears JS/CSS cachemedia:dump
Creates an archive with content of media folder.script ✔️
script:repo:list
Lists all scripts in repositoryscript:repo:run
Run script from repositorysys ✔️
sys:check
Checks Magento Systemsys:cron:history
Last executed cronjobs with status.sys:cron:list
Lists all cronjobssys:cron:run
Runs a cronjob by job codesys:info
Prints infos about the current magento system.sys:maintenance
Toggles maintenance mode.sys:modules:list
List all installed modulessys:setup:change-version
Change module setup resource versionsys:setup:compare-versions
Compare module version with core_resource table.sys:setup:incremental
List new setup scripts to run, then runs one scriptsys:setup:remove
Remove module setup resource entrysys:setup:run
Runs all new setup scripts.sys:store:config:base-url:list
Lists all base urlssys:store:list
Lists all installed store-viewssys:url:list
Get all urls.sys:website:list
Lists all websitesThe text was updated successfully, but these errors were encountered: