byjg / php-migration-cli

Command Line Interface for Database Migration
MIT License
8 stars 3 forks source link

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. #3

Open burzum opened 4 years ago

burzum commented 4 years ago

I'm running php 7.3.9 and getting this:

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in C:\xampp\htdocs\wa-next-app\vendor\symfony\console\Command\Command.php on line 611

Call Stack:
    0.0002     417984   1. {main}() C:\xampp\htdocs\wa-next-app\vendor\byjg\migration-cli\scripts\migrate:0
    2.9629    1971912   2. ByJG\DbMigration\Console\InstallCommand->__construct() C:\xampp\htdocs\wa-next-app\vendor\byjg\migration-cli\scripts\migrate:21
    2.9629    1972072   3. ByJG\DbMigration\Console\InstallCommand->configure() C:\xampp\htdocs\wa-next-app\vendor\symfony\console\Command\Command.php:77
    2.9629    1972072   4. ByJG\DbMigration\Console\InstallCommand->configure() C:\xampp\htdocs\wa-next-app\vendor\byjg\migration-cli\src\InstallCommand.php:14
    3.3742    1975352   5. ByJG\DbMigration\Console\InstallCommand->addUsage() C:\xampp\htdocs\wa-next-app\vendor\byjg\migration-cli\src\ConsoleCommand.php:51
    3.3742    1975352   6. strpos() C:\xampp\htdocs\wa-next-app\vendor\symfony\console\Command\Command.php:611

I know it's the Symfony console dependency and not your repo, so my question is can you update the dependency to a version that might have fixed this?

Edit: I actually figured out it is already using v4.3.4 which seems to be the latest version.

byjg commented 4 years ago

Thank you for let us know about this issue. A new version 4.0.2 was created with the fix, however the Symfony package (v4.3.4) still with the deprecation warning :( . As we selected the package version in the composer ^4.3 I expected our project will be automatically fixed as soon the Symfony team fix that.

References: https://travis-ci.org/byjg/migration-cli/jobs/584193582

burzum commented 4 years ago

Thanks for the quick reply. Yes looks like we'll have to wait or use our own implementation. The Symfony console pulls in a lot dependencies we would like to avoid as we try to have as less dependencies as possible.

byjg commented 4 years ago

To be honest, I don't like of the bunch of dependencies as well. If you have some alternative of the console, please let me know. I would love to replace it :)

byjg commented 4 years ago

I fixed the deprecation issue by changing the code. You can download the release 4.0.3.

burzum commented 4 years ago

@byjg check https://github.com/thephpleague/climate/ if you're also looking for something with less dependencies. It won't pull half of the Symfony framework in.

byjg commented 4 years ago

Excellent tip!! Maybe this can help me: https://climate.thephpleague.com/arguments/