Skip to content
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

Zend / Laminas Codegenerator not found on doctrine:migrations:migrate #300

Closed
mmarton opened this issue Mar 9, 2020 · 4 comments
Closed

Comments

@mmarton
Copy link

mmarton commented Mar 9, 2020

Hi!

When i try to run the command
> bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration

i get the exception:

PHP Fatal error: Class 'Zend\Code\Generator\ClassGenerator' not found in ...../vendor/ocramius/proxy-manager/src/ProxyManager/Generator/ClassGenerator.php on line 15

It's the same issue that was reported here, but i think it is the right place:
symfony/symfony#35934

If I understand correctly:
migrationsbundle requires doctrine migrations that requires ocramious proxy manager
orcamius/proxy manager looks for "ClassGenerator" from namespace "Zend\Code\Generator" from package zend/code-generator but looks like it doesn't exists (or the zend framework bridge isn't working correctly)

extra infos:
packages installed by
> composer install --ignore-platform-reqs --no-progress --no-scripts --prefer-dist

> composer why-not zendframework/zend-code
ocramius/proxy-manager 2.2.3 requires zendframework/zend-code (^3.3.0)

> composer why laminas/laminas-code
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)

> composer show | grep zend
laminas/laminas-zendframework-bridge 1.0.1 Alias legacy ZF class names to Laminas Project equivalents.

> php -v
PHP 7.2.28-3+ubuntu18.04.1+deb.sury.org+1

> composer show

bacon/bacon-qr-code                  2.0.0              BaconQrCode is a QR code generator for PHP.
behat/transliterator                 v1.3.0             String transliterator
dasprid/enum                         1.0.0              PHP 7.1 enum implementation
doctrine/annotations                 v1.8.0             Docblock Annotations Parser
doctrine/cache                       1.10.0             PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.
doctrine/collections                 1.6.4              PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                      2.12.0             PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and ...
doctrine/dbal                        v2.10.1            Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/doctrine-bundle             2.0.7              Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle  2.1.2              Symfony DoctrineMigrationsBundle
doctrine/event-manager               1.1.0              The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                   1.3.1              Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                1.3.0              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                       1.2.0              PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                  2.2.1              PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to ...
doctrine/orm                         v2.7.1             Object-Relational-Mapper for PHP
doctrine/persistence                 1.3.6              The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/reflection                  v1.1.0             The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some additional functionality on top of the reflection functionality that comes with PHP. It allows you...
egulias/email-validator              2.1.17             A library for validating emails against several RFCs
gedmo/doctrine-extensions            v2.4.39            Doctrine2 behavioral extensions
guzzlehttp/psr7                      1.6.1              PSR-7 message implementation that also provides common utility methods
intervention/image                   2.5.1              Image handling and manipulation library with support for Laravel integration
jdorn/sql-formatter                  v1.2.17            a PHP SQL highlighting library
knplabs/doctrine-behaviors           v2.0.1             Doctrine Behavior Traits
laminas/laminas-code                 3.4.1              Extensions to the PHP Reflection API, static code scanning, and code generation
laminas/laminas-eventmanager         3.2.1              Trigger and listen to events within a PHP application
laminas/laminas-zendframework-bridge 1.0.1              Alias legacy ZF class names to Laminas Project equivalents.
monolog/monolog                      2.0.2              Sends your logs to files, sockets, inboxes, databases and various web services
mpdf/mpdf                            v8.0.5             PHP library generating PDF files from UTF-8 encoded HTML
myclabs/deep-copy                    1.9.5              Create deep copies (clones) of your objects
nette/finder                         v2.5.2             🔍 Nette Finder: find files and directories with an intuitive API.
nette/utils                          v3.1.1             🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.
ocramius/package-versions            1.4.2              Composer plugin that provides efficient querying for installed package versions (no runtime IO)
ocramius/proxy-manager               2.2.3              A library providing utilities to generate, instantiate and generally operate with Object Proxies
psr/cache                            1.0.1              Common interface for caching libraries
psr/container                        1.0.0              Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher                 1.0.0              Standard interfaces for event handling.
psr/http-message                     1.0.1              Common interface for HTTP messages
psr/log                              1.1.2              Common interface for logging libraries
ralouphie/getallheaders              3.0.3              A polyfill for getallheaders.
ramsey/uuid                          3.9.3              Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
sensio/framework-extra-bundle        v5.5.3             This bundle provides a way to configure your controllers with annotations
setasign/fpdi                        v2.3.0             FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fi...
swiftmailer/swiftmailer              v6.2.3             Swiftmailer, free feature-rich PHP mailer
symfony/apache-pack                  v1.0.1             A pack for Apache support in Symfony
symfony/asset                        v5.0.5             Symfony Asset Component
symfony/cache                        v5.0.5             Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts              v2.0.1             Generic abstractions related to caching
symfony/config                       v5.0.5             Symfony Config Component
symfony/console                      v5.0.5             Symfony Console Component
symfony/css-selector                 v5.0.5             Symfony CssSelector Component
symfony/dependency-injection         v5.0.5             Symfony DependencyInjection Component
symfony/doctrine-bridge              v5.0.5             Symfony Doctrine Bridge
symfony/dotenv                       v5.0.5             Registers environment variables from a .env file
symfony/error-handler                v5.0.5             Symfony ErrorHandler Component
symfony/event-dispatcher             v5.0.5             Symfony EventDispatcher Component
symfony/event-dispatcher-contracts   v2.0.1             Generic abstractions related to dispatching event
symfony/expression-language          v5.0.5             Symfony ExpressionLanguage Component
symfony/filesystem                   v5.0.5             Symfony Filesystem Component
symfony/finder                       v5.0.5             Symfony Finder Component
symfony/flex                         v1.6.2             Composer plugin for Symfony
symfony/form                         v5.0.5             Symfony Form Component
symfony/framework-bundle             v5.0.5             Symfony FrameworkBundle
symfony/http-client                  v5.0.5             Symfony HttpClient component
symfony/http-client-contracts        v2.0.1             Generic abstractions related to HTTP clients
symfony/http-foundation              v5.0.5             Symfony HttpFoundation Component
symfony/http-kernel                  v5.0.5             Symfony HttpKernel Component
symfony/inflector                    v5.0.5             Symfony Inflector Component
symfony/intl                         v5.0.5             A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/mailer                       v5.0.5             Symfony Mailer Component
symfony/mime                         v5.0.5             A library to manipulate MIME messages
symfony/monolog-bridge               v5.0.5             Symfony Monolog Bridge
symfony/monolog-bundle               v3.5.0             Symfony MonologBundle
symfony/options-resolver             v5.0.5             Symfony OptionsResolver Component
symfony/orm-pack                     v1.0.8             A pack for the Doctrine ORM
symfony/polyfill-intl-grapheme       v1.14.0            Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu            v1.14.0            Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn            v1.14.0            Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer     v1.14.0            Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring            v1.14.0            Symfony polyfill for the Mbstring extension
symfony/polyfill-php73               v1.14.0            Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/property-access              v5.0.5             Symfony PropertyAccess Component
symfony/property-info                v5.0.5             Symfony Property Info Component
symfony/routing                      v5.0.5             Symfony Routing Component
symfony/security-bundle              v5.0.5             Symfony SecurityBundle
symfony/security-core                v5.0.5             Symfony Security Component - Core Library
symfony/security-csrf                v5.0.5             Symfony Security Component - CSRF Library
symfony/security-guard               v5.0.5             Symfony Security Component - Guard
symfony/security-http                v5.0.5             Symfony Security Component - HTTP Integration
symfony/serializer                   v5.0.5             Symfony Serializer Component
symfony/service-contracts            v2.0.1             Generic abstractions related to writing services
symfony/stopwatch                    v5.0.5             Symfony Stopwatch Component
symfony/string                       v5.0.5             Symfony String component
symfony/swiftmailer-bundle           v3.4.0             Symfony SwiftmailerBundle
symfony/translation                  v5.0.5             Symfony Translation Component
symfony/translation-contracts        v2.0.1             Generic abstractions related to translation
symfony/twig-bridge                  v5.0.5             Symfony Twig Bridge
symfony/twig-bundle                  v5.0.5             Symfony TwigBundle
symfony/twig-pack                    v1.0.0             A Twig pack for Symfony projects
symfony/validator                    v5.0.5             Symfony Validator Component
symfony/var-dumper                   v5.0.5             Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter                 v5.0.5             A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/webpack-encore-bundle        v1.7.3             Integration with your Symfony app & Webpack Encore!
symfony/yaml                         v5.0.5             Symfony Yaml Component
symplify/package-builder             v7.2.3             Dependency Injection, Console and Kernel toolkit for Symplify packages.
twig/extra-bundle                    v3.0.3             A Symfony bundle for extra Twig extensions
twig/intl-extra                      v3.0.3             A Twig extension for Intl
twig/twig                            v3.0.3             Twig, the flexible, fast, and secure template language for PHP
@goetas
Copy link
Member

goetas commented Mar 9, 2020

See my comment in symfony/symfony#35934 (comment)

@goetas
Copy link
Member

goetas commented Apr 2, 2020

Related to symfony/symfony#35934 (comment)

@stof
Copy link
Member

stof commented Apr 2, 2020

According to the laminas team, this might have been caused by a bug in composer. Make sure that you use Composer 1.10+ to generate the autoloader, to have the fixed version.

@goetas
Copy link
Member

goetas commented Apr 4, 2020

Closing this as it seems not related to this bundle

@goetas goetas closed this as completed Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants