Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer warning "Package zendframework/zend-code is abandoned"

Tags:

symfony

I get a warning from composer:

Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead. Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.

However, I can't see any reference to zend in my composer.json (see below). Should I be worrying about it? Can I simply install laminas/laminas-code, etc to make it go away?

Any info welcome.

Thanks

Martyn

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "easycorp/easyadmin-bundle": "^2.0",
        "edwin-luijten/oauth2-strava": "^1.3",
        "egulias/email-validator": "^2.1",
        "knpuniversity/oauth2-client-bundle": "^1.32",
        "martynwheeler/oauth2-komoot": "dev-master",
        "sensio/framework-extra-bundle": "^5.2",
        "symfony/apache-pack": "^1.0",
        "symfony/asset": "4.4.*",
        "symfony/console": "4.4.*",
        "symfony/dotenv": "4.4.*",
        "symfony/expression-language": "4.4.*",
        "symfony/filesystem": "4.4.*",
        "symfony/flex": "^1.1",
        "symfony/form": "4.4.*",
        "symfony/framework-bundle": "4.4.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/orm-pack": "*",
        "symfony/process": "4.4.*",
        "symfony/security-bundle": "4.4.*",
        "symfony/serializer-pack": "*",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/translation": "4.4.*",
        "symfony/twig-bundle": "4.4.*",
        "symfony/validator": "4.4.*",
        "symfony/web-link": "4.4.*",
        "symfony/yaml": "4.4.*"
    },
    "require-dev": {
        "symfony/debug-pack": "*",
        "symfony/maker-bundle": "^1.0",
        "symfony/profiler-pack": "*",
        "symfony/test-pack": "*",
        "symfony/web-server-bundle": "4.4.*"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.4.*"
        }
    }
}
like image 739
MartynW Avatar asked Jan 26 '20 22:01

MartynW


2 Answers

To check which package depends on it, run:

composer depends zendframework/zend-code

Result:

ocramius/proxy-manager  2.2.3  requires  zendframework/zend-code (^3.3.0)

ocramius/proxy-manager is used by doctrine migrations, it comes with symfony/orm-pack. You should not worry about it, but you should be able to update it by running composer upgrade

composer upgrade
...

composer depends zendframework/zend-code

Result:

laminas/laminas-code  3.4.1  replaces  zendframework/zend-code (self.version)
like image 63
Iwan Wijaya Avatar answered Oct 17 '22 05:10

Iwan Wijaya


Try to run this 2 commands called in composer warning:

composer require laminas/laminas-eventmanager

and

composer require laminas/laminas-code

It will update:

laminas/laminas-code 3.4.1 replaces zendframework/zend-code (self.version) ocramius/proxy-manager 2.2.3 requires zendframework/zend-code (^3.3.0) (check by "composer depends zendframework/zend-code")

like image 21
wioladak Avatar answered Oct 17 '22 06:10

wioladak