发表文章

[PHP] 执行./n98-magerun phar selfupdate 的错误 Error after executing ./n98-magerun.phar selfupdate[n98-magerun]

tylerssn 2017-10-9 35

./n98-magerun.phar --version: n98-magerun 版1.98.0 由 netz98 有限公司

我收到下面的错误。我为解决这一问题所做的唯一努力是禁用app/lib/n98-magerun

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Console\Command\HelpCommand::isHidden() in /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php:122
Stack trace:
#0 /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php(89): Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication()
#1 /var/www/us/vendor/symfony/console/Descriptor/TextDescriptor.php(194): Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands()
#2 /var/www/us/vendor/symfony/console/Descriptor/Descriptor.php(55): Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication(Object(N98\Magento\Application), Array)
#3 /var/www/us/vendor/symfony/console/Helper/DescriptorHelper.php(72): Symfony\Component\Console\Descriptor\Descriptor->describe(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(N98\Magento\Application), Array)
#4 phar:///var/www/us/n98-magerun.phar/vendor/symfony/console/Command/ListCommand.php(81): Symfony\Component\Cons in /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php on line 122
原文:

./n98-magerun.phar --version: n98-magerun version 1.98.0 by netz98 GmbH

I receive the error below. The only effort that I have made to resolve this is disabling app/lib/n98-magerun

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Console\Command\HelpCommand::isHidden() in /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php:122
Stack trace:
#0 /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php(89): Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication()
#1 /var/www/us/vendor/symfony/console/Descriptor/TextDescriptor.php(194): Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands()
#2 /var/www/us/vendor/symfony/console/Descriptor/Descriptor.php(55): Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication(Object(N98\Magento\Application), Array)
#3 /var/www/us/vendor/symfony/console/Helper/DescriptorHelper.php(72): Symfony\Component\Console\Descriptor\Descriptor->describe(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(N98\Magento\Application), Array)
#4 phar:///var/www/us/n98-magerun.phar/vendor/symfony/console/Command/ListCommand.php(81): Symfony\Component\Cons in /var/www/us/vendor/symfony/console/Descriptor/ApplicationDescription.php on line 122
相关推荐
最新评论 (21)
jeroenboersma 2017-10-9
1

我有相同的更新后, 再次降级..。

PHP Fatal error:  Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php:43
Stack trace:
#0 phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php(580): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('n98-magerun.app...', Object(N98\Magento\Application\Console\Event))
#1 phar:///usr/local/bin/n98-magerun/vendor/symfony/console/Application.php(122): N98\Magento\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php(625): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /usr/local/bin/n98-magerun(22): N98\Magento\Application->run()
#4 {main}
  thrown in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Fatal error: Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Call Stack:
    0.0001     418280   1. {main}() /usr/local/bin/n98-magerun:0
    0.0385    2571624   2. N98\Magento\Application->run() /usr/local/bin/n98-magerun:22
    0.2866   11933608   3. N98\Magento\Application->run() phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php:625
    0.2867   11933608   4. N98\Magento\Application->doRun() phar:///usr/local/bin/n98-magerun/vendor/symfony/console/Application.php:122
    0.2869   11941912   5. Symfony\Component\EventDispatcher\EventDispatcher->dispatch() phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php:580

我认为此更新已更改了命令构造函数, 甚至可能是Symfony Command

原文:

I've the same after updating, downgraded again...

PHP Fatal error:  Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php:43
Stack trace:
#0 phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php(580): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('n98-magerun.app...', Object(N98\Magento\Application\Console\Event))
#1 phar:///usr/local/bin/n98-magerun/vendor/symfony/console/Application.php(122): N98\Magento\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php(625): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /usr/local/bin/n98-magerun(22): N98\Magento\Application->run()
#4 {main}
  thrown in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Fatal error: Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///usr/local/bin/n98-magerun/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

Call Stack:
    0.0001     418280   1. {main}() /usr/local/bin/n98-magerun:0
    0.0385    2571624   2. N98\Magento\Application->run() /usr/local/bin/n98-magerun:22
    0.2866   11933608   3. N98\Magento\Application->run() phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php:625
    0.2867   11933608   4. N98\Magento\Application->doRun() phar:///usr/local/bin/n98-magerun/vendor/symfony/console/Application.php:122
    0.2869   11941912   5. Symfony\Component\EventDispatcher\EventDispatcher->dispatch() phar:///usr/local/bin/n98-magerun/src/N98/Magento/Application.php:580

I think this update has changed the command constructor, maybe even the Symfony Command

convenient 2017-10-9
2

我已经设法进一步隔离这个问题, 完全是偶然的, 因为我实际上是试图演示#939 , 我相信是链接¯ \(ツ)

请参阅此存储库中的详细信息我刚刚抛出的: https://github.com/convenient/n98-magerun-1-98-0-broken/

我认为1.98.0 与此模块不兼容: https://github.com/Cotya/magento-composer-installer, 特别是它对的加载修改 app/Mage.php

#939中所述, 我很确定它是这个提交的3f015d2 , 它与该 app/Mage.php 模块添加的黑客游戏没有很好的配合。

原文:

I've managed to isolate this issue a bit further, entirely by accident as I was actually trying to demonstrate #939 which I believe is linked ¯\(ツ)

See the details in this repository I've just thrown together: https://github.com/convenient/n98-magerun-1-98-0-broken/

I believe 1.98.0 to be incompatible with this module: https://github.com/Cotya/magento-composer-installer, particularly the autoloader modifications it does to app/Mage.php.

As mentioned in #939 I'm pretty sure it's this commit 3f015d2 which doesn't play well with the app/Mage.php hack added by that module.

convenient 2017-10-9
3

我想我得到了这个, 虽然我想我可能会有点疯狂。我没有真正的工作与 .phar 文件的引擎盖之前, 但这是我认为发生的基础上的实验。

  1. https://github.com/Cotya/magento-composer-installer -修改, app/Mage.php 以便它执行 require_once 项目 vendor/autoload.php 之后的 app/Mage.php 是必需的, 但在 magento 实例化之前。

    Varien_Autoload::register();
    
    /** AUTOLOADER PATCH **/
    if (file_exists($autoloaderPath = BP . DS . 'vendor/autoload.php') ||
        file_exists($autoloaderPath = BP . DS . '../vendor/autoload.php')
    ) {
        require $autoloaderPath;
    }
    /** AUTOLOADER PATCH **/
    
    /**
     * Main Mage hub class
     *
     * @author      Magento Core Team <core@magentocommerce.com>
     */
    final class Mage
    {
  2. 3f015d2 -magerun 的更新, 它比以前更早地在请求中实例化 magento。

  3. 如果project有一个版本的 vendor/symfony/console 它是在实例化 magerun 命令类时将使用的项目文件, 而不是 vendor/symfony/console 与 magerun 捆绑在一起的类。

  4. 这意味着, 当 magerun 被实例化时, 项目供应商文件会在加载中跳转, 并将其搞乱。这意味着我们从两个不同的位置和两个不同的版本加载 symfony/console 一半。

这意味着此问题和#939都是相同的问题, 您看到的输出的错误实际上取决于 symfony/console 与项目捆绑在一起的版本。

项目 Smyfony 版本 错误信息
2.5。0 Fatal error: Call to undefined method Symfony\Component\Console\Event\ConsoleCommandEvent::commandShouldRun()
3.3。8 Fatal error: Call to undefined method Symfony\Component\Console\Command\HelpCommand::isHidden()
??? Fatal error: Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName()

@JeroenBoersma您使用的是 magento 马拉松安装程序, 以及您的 symfony/console 项目中的是什么版本 composer.lock 文件?

您可以通过以下操作快速检查它

": \"symfony/console\""~/src/project/composer.lock
            "name""symfony/console",
            "version""v2.5.0",

我解决此问题的方法是将我唯一受影响的项目 symfony/console 从升级 v2.5.0 到, v.2.8.16 因为这是最新版本的 magerun中使用的版本。

composer require symfony/console v2.8.16

@ktomk你觉得怎么样?

原文:

I think I got this, although I think I may be going a bit mad. I've not really worked with .phar files under the hood before but this is what I thinks happening based on experimentation.

  1. https://github.com/Cotya/magento-composer-installer - modifies app/Mage.php so that it does a require_once of the projects vendor/autoload.php right after app/Mage.php is required but before Magento is instantiated.

    Varien_Autoload::register();
    
    /** AUTOLOADER PATCH **/
    if (file_exists($autoloaderPath = BP . DS . 'vendor/autoload.php') ||
        file_exists($autoloaderPath = BP . DS . '../vendor/autoload.php')
    ) {
        require $autoloaderPath;
    }
    /** AUTOLOADER PATCH **/
    
    /**
     * Main Mage hub class
     *
     * @author      Magento Core Team <core@magentocommerce.com>
     */
    final class Mage
    {
  2. 3f015d2 - The update to magerun which Instantiates magento earlier in the request earlier than it did before.

  3. If the project has a version of vendor/symfony/console it is the projects files that will be used when instantiating the magerun command classes, not the vendor/symfony/console classes bundled with magerun.

  4. This means that quite early when magerun is instantiated, the projects vendor files jump in and mess things up in the autoloader. Meaning we're half loading symfony/console from two different locations and two different versions.

This means that both this issue and #939 are the same issue, the error that you see output actually depends on the version of symfony/console bundled with the project.

Project Smyfony Version Error message
2.5.0 Fatal error: Call to undefined method Symfony\Component\Console\Event\ConsoleCommandEvent::commandShouldRun()
3.3.8 Fatal error: Call to undefined method Symfony\Component\Console\Command\HelpCommand::isHidden()
??? Fatal error: Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName()

@JeroenBoersma are you using the magento hackathon installer, and what version of symfony/console is in your projects composer.lock file?

You can quickly check it by doing the following

$ grep -A 1 ": \"symfony/console\"" ~/src/project/composer.lock
            "name": "symfony/console",
            "version": "v2.5.0",

My workaround for this issue was to upgrade my only affected projects symfony/console from v2.5.0 to v.2.8.16 as this is the version used in the latest version of magerun.

composer require symfony/console v2.8.16

@ktomk What do you think?

ktomk 2017-10-9
4

@convenient: 谢谢你的详细报告。我试图重现, 但不能由于一些重新安装的问题与回购你。一定是我的错误。从比较变更集我有点怀念其中的变化触发它。我可以看到它从关闭到命名函数的变化, 但否则更改只应移动代码。可悲的是, 现在看不出更详细的, 仍然困惑。

原文:

@convenient: Thanks for the detailed report. I tried to reproduce but couldn't due to some re-install issues with the repo you did. Must be some error on my end. From comparing the changeset I somewhat miss which changes therein triggers it. I can see it changes from a closure to a named function but otherwise the change should only move the code. Sadly can't look more detailed right now and still puzzled.

convenient 2017-10-9
5

@ktomk您是否介意共享您看到的问题?我检查了我的回购和复制/粘贴我的命令, 它似乎工作正常。

我认为在3f015d2中, 该更改是在请求流的前面实例化 Magento 的, 在这个新的情况下, 在请求流中, 它在很早的时候就被例示, 而不是所有的控制台组件都已被时间 require_once app/Mage.php 发生。当与 magento 马拉松安装程序一起使用时, 这会触发一组其他脚本, 它们似乎是通过控制台组件进行项目, 并从其中加载声明。

最终, 我认为这些问题总是可能的, 但只有在图书馆之间的 Magento 项目加载通过作曲家, 也存在于 Magerun。

我测试了我的理论在一个真正的沙包 "的概念证明" 组装方式是强有力地确保所有所有的/控制台类已 include d之前, magento 是实例化。这 "修复" 的问题, 通过获得 magerun 控制台依赖类/接口加载和内存中。这是超级恶心, 但它几乎钉在我头上的这个问题, 我。请参见convenient/n98-magerun

原文:

Hey @ktomk do you mind sharing the issue you saw? I checked out my repo and copy/pasted my commands and it seemed to work okay.

I think in 3f015d2 the change was to instantiate Magento earlier in the request flow, in this new case it is instantiated so early in the request flow that not all symfony console components have been loaded by the time require_once app/Mage.php occurs. When used with the magento hackathon installer, this then triggers a set of other scripts which appear to go through the projects symfony console components and load the declaration from within that.

Ultimately I think these kinds of issues were always possible, but only between libraries that the Magento project loaded in via composer that also existed within Magerun.

I tested out my theory in a really hacky "proof of concept" kludge way be forcefully ensuring that all symfony/console classes have been included before magento is instantiated. This "fixes" the issue by getting magerun symfony console dependency classes/interfaces loaded and in memory. It's super gross but it pretty much nailed this issue down in my head for me. See convenient/n98-magerun@e07113b

ktomk 2017-10-9
6

没有意识到顺序的变化。然后, 这应该被移回到旧的顺序, IIRC 这仅仅是由于重构。

我认为这一条附加的行是罪魁祸首: 3f015d2#diff-733082d0f223a21b50061401f988bf02R320

原文:

Was not aware of the change in order. Then this should be moved back into the old order, IIRC this was only due to refactoring.

I think this one added line is then the culprit: 3f015d2#diff-733082d0f223a21b50061401f988bf02R320

convenient 2017-10-9
7

哈哈@ktomk, 碰巧我在调试上周时突出显示了这一点, 但这更像是一种 "注释出来并祈祷" 的调试方法。

我的一部分, 我的推理, 你的代码以及你的提交消息, 说

此更改可确保法师:: getEdition () 可通过命令及早调用
初始.

无论哪种方式, 现在我有一个解决方法 (使我的版本/控制台版匹配你的), 但这不会帮助大家, 我不认为。我们去看看其他人怎么想

原文:

Haha @ktomk, by chance I highlighted that when I was debugging last week, but that was more of a "comment out and pray" kind of approach to debugging.

I based part of my reasoning on your code as well as your commit message which says

This change ensures Mage::getEdition() is callable early with command
initialisation.

Either way, for now I have a workaround (make my symfony/console version match yours), but that won't help everybody out I don't think. We'll see what others come up with.

jeroenboersma 2017-10-9
8

您可以通过以下操作快速检查它

 $ grep -A 1 ": \"symfony/console\"" ~/src/project/composer.lock
            "name": "symfony/console",
            "version": "v2.5.0",

损坏项目的结果

            "name": "symfony/console",
            "version": "3.4.x-dev",

降级到1.97.latest 是目前最好的解决方案, 并像一个魅力。

原文:

You can quickly check it by doing the following

 $ grep -A 1 ": \"symfony/console\"" ~/src/project/composer.lock
            "name": "symfony/console",
            "version": "v2.5.0",

Results for the broken project

            "name": "symfony/console",
            "version": "3.4.x-dev",

Downgrading to 1.97.latest was the best solution for now and worked like a charm.

ktomk 2017-10-9
9

我现在试图复制与您的测试立场回购反对一个开发建设 (这是 1.98.0), 我不能重现。我也在 github 上提交了它 (执行 ./install.sh 执行像在您的自述文件中的命令, 但针对 src bin/n98-magerun, 根据需要编辑该命令的路径)。这是有点遗憾, 因为我试图重现和修复。我觉得这是依赖于 PHP 版本使用 (或暗示) 至少在构建时。

我试图进一步调查 (是在休假, 所以花了一些天), 我认为版本冲突的要求是相当清楚的, 但我们需要赶上的问题在构建 (可能是好消息)。

回购在这里: https://github.com/ktomk/n98-magerun-issue-938

下一步, 它尝试针对生成脚本。

/E: 我终于可以繁殖了, 这是好消息。安装的安装顺序中出现问题. sh 脚本。

原文:

I now tried to reproduce with your test-stand repo against a development build (which is 1.98.0) and I could not reproduce. I filed it as well on github (execute ./install.sh to execute the commands like in your readme but against the src bin/n98-magerun, edit the path to the command as needed). This is somewhat a pity, as I tried to reproduce and fix. I have the feeling this is depended to the PHP version used (or hinted) at least at build time.

I try to investigate further (was on vacation so it took some days), I think the version conflict on the requirements is quite clear, but we need to catch the issue in the build (might be good news).

Repo is here: https://github.com/ktomk/n98-magerun-issue-938

Next step it to try against the build script.

/E: I can finally reproduce, this is good news. There was a problem in the installation order in my install.sh script.

ktomk 2017-10-9
10

@convenient: 我尚未对#902上的副作用进行检查, 但没有在早期初始化时防止出现致命错误。我在运行一个私人的建设, 我会说这是一个固定的时刻。

原文:

@convenient: I have not yet checked against side-effects on #902 but not initializing early there does prevent the fatal errors. I'm running a private build, and I'd say that is a fix for the moment.

convenient 2017-10-9
11

@ktomk宇:)很高兴你终于能复制了如果您在一个分支中得到了修复, 我可以对照#902来查看它是否适合我。

原文:

@ktomk Woo :) Glad you were finally able to replicate. If you get the fix in a branch I can compare against #902 to see if it works for me.

ktomk 2017-10-9
12

@convenient: 刚推到开发分支。你的分析击中了钉子的头。我担心我们遇到的问题, #902, 我们应该能够处理这个不同的 (这是瓦特/o 要求法师. php) 不过, 我有问题要测试, 因为我没有一个企业版在手边。

原文:

@convenient: Just pushed to the development branch. Your analysis hits the nail on its head. I fear we run into problems for #902, we should be able to handle this differently (that is w/o requiring Mage.php) however I have problems to test for that as I don't have an enterprise edition at hand.

tylerssn 2017-10-9
13

关于#939 (注释), 是的, 我正在使用这个安装程序。

原文:

In regards to #939 (comment), yes, I am using this installer.

ktomk 2017-10-9
14

我们也许使用的方式太过时版本的控制台组件?如果是这样, 我们也可以提高需求, 以满足要求, 但是, 对于那些使用 Magento 作曲家安装程序的用户来说, 最好将 Magerun 本身作为一个作曲家依赖。此应该工作 (如果不是, 我们应该解决此问题, 这是我们的目标选项)。这可能有助于用户获得两全其美 (这也许是作曲家用户的最佳选择)。

原文:

We perhaps use a way too outdated version of the Symfony Console components? If so, we can raise the requirements as well to match demands, however, for those users using the Magento Composer Installer, it is perhaps best to add Magerun itself as a composer dependency. This should work (if not, we should fix this, this is an option we target). This might help for users to get best of both worlds (and this is perhaps the best option for composer users).

convenient 2017-10-9
15

@ktomk

我们也许使用的方式太过时版本的控制台组件?如果是这样, 我们可以提出要求, 以及满足要求

从我的实验以上每一个不同的版本是给一个不同的错误, 虽然, 所以我不认为这将有助于大规模, 因为它将仍然运行不同的项目。

我在 develop 分支中的修复程序的实验

1. 对#902造成倒退

$ ./bin/n98-magerun-1.97.30.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "admin:user:unlock" is not defined.
  Did you mean one of these?
      admin:user:delete
      admin:user:list
      admin:user:change-status
      admin:user:create
      admin:user:change-password


$ ./bin/n98-magerun-1.98.0.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker
luker unlocked

$ ./bin/n98-magerun-1.98.1.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "admin:user:unlock" is not defined.
  Did you mean one of these?
      admin:user:delete
      admin:user:list
      admin:user:change-status
      admin:user:create
      admin:user:change-password

2. 修复#938

$ ./bin/n98-magerun-1.98.0.phar --root-dir=/Users/lukerodgers/src/n98-magerun-broken/htdocs/ admin:user:list

Fatal error: Call to undefined method Symfony\Component\Console\Event\ConsoleCommandEvent::commandShouldRun() in phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php on line 865

Call Stack:
    0.0232    1178048   1. {main}() /Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar:0
    0.0390    2844664   2. N98\Magento\Application->run() /Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar:22
    0.2713   15412664   3. Symfony\Component\Console\Application->run() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/src/N98/Magento/Application.php:625
    0.2714   15412872   4. N98\Magento\Application->doRun() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php:122
    0.2720   15451920   5. Symfony\Component\Console\Application->doRun() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/src/N98/Magento/Application.php:593
    0.2722   15452976   6. Symfony\Component\Console\Application->doRunCommand() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php:191

$ ./bin/n98-magerun-1.98.1.phar --root-dir=/Users/lukerodgers/src/n98-magerun-broken/htdocs/ admin:user:list
+----+----------+----------------------+--------+
| id | username | email                | status |
+----+----------+----------------------+--------+
| 1  | admin    | john.doe@example.com | active |
+----+----------+----------------------+--------+

由于#902只是由于我的大量定制的 Magento 实例而引发的, 因此, 在社区使用 magerun 并强迫他们使用作曲家等其他方式时, 似乎有点过分了, 特别是如果这是他们多年来一直工作的方式:

原文:

@ktomk

We perhaps use a way too outdated version of the Symfony Console components? If so, we can raise the requirements as well to match demands

From my experimentation above each different version was giving a different error though, so I do not think this will help massively as it will still operate differently with different projects.

My experimentation of the fix in the develop branch causes

1. Causes a regression on #902

$ ./bin/n98-magerun-1.97.30.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "admin:user:unlock" is not defined.
  Did you mean one of these?
      admin:user:delete
      admin:user:list
      admin:user:change-status
      admin:user:create
      admin:user:change-password


$ ./bin/n98-magerun-1.98.0.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker
luker unlocked

$ ./bin/n98-magerun-1.98.1.phar --root-dir=/Users/lukerodgers/src/project_name/ admin:user:unlock luker


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "admin:user:unlock" is not defined.
  Did you mean one of these?
      admin:user:delete
      admin:user:list
      admin:user:change-status
      admin:user:create
      admin:user:change-password

2. Fixes #938

$ ./bin/n98-magerun-1.98.0.phar --root-dir=/Users/lukerodgers/src/n98-magerun-broken/htdocs/ admin:user:list

Fatal error: Call to undefined method Symfony\Component\Console\Event\ConsoleCommandEvent::commandShouldRun() in phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php on line 865

Call Stack:
    0.0232    1178048   1. {main}() /Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar:0
    0.0390    2844664   2. N98\Magento\Application->run() /Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar:22
    0.2713   15412664   3. Symfony\Component\Console\Application->run() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/src/N98/Magento/Application.php:625
    0.2714   15412872   4. N98\Magento\Application->doRun() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php:122
    0.2720   15451920   5. Symfony\Component\Console\Application->doRun() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/src/N98/Magento/Application.php:593
    0.2722   15452976   6. Symfony\Component\Console\Application->doRunCommand() phar:///Users/lukerodgers/src/n98-magerun-1-98-0-broken/bin/n98-magerun-1.98.0.phar/vendor/symfony/console/Application.php:191

$ ./bin/n98-magerun-1.98.1.phar --root-dir=/Users/lukerodgers/src/n98-magerun-broken/htdocs/ admin:user:list
+----+----------+----------------------+--------+
| id | username | email                | status |
+----+----------+----------------------+--------+
| 1  | admin    | john.doe@example.com | active |
+----+----------+----------------------+--------+

Since #902 was only raised because of my heavily customised Magento instances it seems a bit excessive to risk the rest of the way the community uses magerun and force them over to using composer etc, especially if its a way they've been working for years :/

convenient 2017-10-9
16

@ktomk我在这里的公关#942似乎解决了此问题, 以及#902

看看你的想法, 但它似乎会让每个人都工作, 因为他们已经没有任何改变工作流程, 以及纠正问题。

原文:

@ktomk My PR here #942 seems to fix this issue, as well as #902.

See what you think, but it seems like it'll allow everyone to work as they have been without any change in workflow as well as correct the issues.

ktomk 2017-10-9
17

我期望回归, 谢谢确认。我将您的最新修补程序#942合并到了开发分支中。也许我们可以看到一个稳定的修复版本在星期一, @cmuench应该在 for 发布决策的循环中。

原文:

I expected the regression, thanks for confirmation. I merged your latest patch #942 into the development branch. Maybe we can see a stable fix version on monday, @cmuench should be in the loop for release decision.

cmuench 2017-10-9
18

@ktomk@convenient谢谢你的伟大调查我会在周末做额外检查。在这种情况下, 我们应该尝试释放一个修补程序。

原文:

@ktomk @convenient Thanks for the great investigation. I will do additional checks on weekend. In this case we should try to release a hotfix.

cmuench 2017-10-9
19

第一次测试是好的。锁定和解锁工作正常。

  • 测试在一个 Magento EE 1.14.2。0
  • 测试在一个 Magento EE 1.14.3。2
原文:

First tests are good. Lock and unlock are working.

  • Tested in a Magento EE 1.14.2.0
  • Tested in a Magento EE 1.14.3.2
cmuench 2017-10-9
20

我在调用 sys: 信息命令时出现了一些致命错误。也许这是另一个问题。

原文:

I got some fatal errors during a call to sys:info command. Maybe this is another problem.

cmuench 2017-10-9
21

还行。可能会修复致命错误。它与 n98-magerun 无关。现在一切正常。

原文:

ok. The fatal error could be fixed. It was not related to n98-magerun. At the moment everything works.

返回
发表文章
tylerssn
文章数
1
评论数
2
注册排名
56315