Code Monkey home page Code Monkey logo

Comments (5)

glensc avatar glensc commented on May 8, 2024

@mnapoli am i using something wrong, or just not compatible with symfony 4.2?

from silly.

glensc avatar glensc commented on May 8, 2024

downgraded symfony/console:

  • v4.1.10 same
  • v4.0.15 same
  • v3.4.21 same
  • v3.3.18 same
  • v3.2.14 same
  • v3.1.10 same
  • v3.0.9 same

i'm not able to downgrade further with mnapoli/silly=1.7.1

from silly.

glensc avatar glensc commented on May 8, 2024

had to downgrade to 1.5 for error to go away:

➔ composer require symfony/console:^2 mnapoli/silly:~1.5.1 php-di/invoker:~1.2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 3 updates, 0 removals
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Downgrading php-di/invoker (2.0.0 => 1.3.3): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Downgrading symfony/console (v4.2.2 => v2.8.11): Loading from cache
  - Downgrading mnapoli/silly (1.7.1 => 1.5.1): Loading from cache
  - Installing symfony/debug (v3.4.21): Loading from cache
Generating autoload files
➔ ./test.php
➔

from silly.

glensc avatar glensc commented on May 8, 2024

i'm able to avoid the error by renaming the option:

➔ git diff
diff --git a/MailDownloadCommand.php b/MailDownloadCommand.php
index c4de6d7..1a4412e 100644
--- a/MailDownloadCommand.php
+++ b/MailDownloadCommand.php
@@ -16,7 +16,7 @@ namespace Eventum\Console\Command;
 class MailDownloadCommand
 {
     const DEFAULT_COMMAND = 'mail:download';
-    const USAGE = self::DEFAULT_COMMAND . ' [username] [hostname] [mailbox] [--limit=] [--no-lock]';
+    const USAGE = self::DEFAULT_COMMAND . ' [username] [hostname] [mailbox] [--limit=] [--nolock]';

     /**
      * @param string $username

but this would be backwards incompatible change for the application.

➔ ./test.php
array:5 [
  "username" => null
  "hostname" => null
  "mailbox" => null
  "limit" => 0
  "no-lock" => false
]
➔ ./test.php --nolock
array:5 [
  "username" => null
  "hostname" => null
  "mailbox" => null
  "limit" => 0
  "no-lock" => true
]
➔

from silly.

glensc avatar glensc commented on May 8, 2024

removing default value for $noLock = false also helper:

➔ ./test.php
array:5 [
  "username" => null
  "hostname" => null
  "mailbox" => null
  "limit" => 0
  "no-lock" => false
]
➔ ./test.php --no-lock
array:5 [
  "username" => null
  "hostname" => null
  "mailbox" => null
  "limit" => 0
  "no-lock" => true
]
➔ git diff
diff --git a/MailDownloadCommand.php b/MailDownloadCommand.php
index c4de6d7..65246a2 100644
--- a/MailDownloadCommand.php
+++ b/MailDownloadCommand.php
@@ -22,10 +22,10 @@ class MailDownloadCommand
      * @param string $username
      * @param string $hostname
      * @param string $mailbox
-     * @param int $limit
      * @param bool $noLock
+     * @param int $limit
      */
-    public function execute($username, $hostname, $mailbox, $limit = 0, $noLock = false)
+    public function execute($username, $hostname, $mailbox, $noLock, $limit = 0)
     {
         dump([
             'username' => $username,
➔

from silly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.