Skip to content

Instantly share code, notes, and snippets.

@weierophinney weierophinney/README.md Secret
Last active Dec 3, 2019

Embed
What would you like to do?
How to test migration to Laminas.

How to test Laminas Migration

It's time to start testing Laminas migration!

DO NOT USE IN PRODUCTION

The packages we are providing currently are not the final packages, and provided for testing purposes only. We are strictly looking for feedback on the migration process and its impact on your applications. Deploy at your own risk!

First off, huge kudos to Michał Bundyra (@michalbundyra and @webimpress on GitHub), for the huge amount of effort he has put into making this happen. Anything I throw at him, he has found a solution for, and the ability to migrate the repos would not be anywhere near where it is today without what he has done.

The bits and pieces

There are a few pieces to make it possible to do this testing, and I think it's important to know what they are.

  • I have taken all repositories we plan to migrate, and applied our rewrite tool to each tag and the HEAD commits of the master and develop branches ONLY. Since tarballs are only created for tagged releases, you cannot use dev-(master|develop) or * constraints.

  • From that, I have created a Composer repository at the URL https://laminas.mwop.net/repo/testing

  • We have created three userland tools to help facilitate migrations:

    • laminas/laminas-zendframework-bridge is a helper package that intercepts autoload requests for ZF classes and, if an equivalent Laminas class is present, autoloads that instead; additionally, it aliases the original ZF class to the Laminas version. This package is added to every Laminas package at every release currently, and is what allows them to be used as replacements, since the aliasing means that normal inheritance continues to work just as it did previously.

      Additionally, it provides a configuration post processor that can be registered both with zend-config-aggregator (Expressive applications) or zend-modulemanager (MVC applications) for the purposes of rewriting known keys and values to their Laminas equivalents. This feature, when used, makes most third party libraries de facto forwards compatible with Laminas.

    • laminas/laminas-dependency-plugin is a Composer plugin that intercepts install and update operations. If a request for a ZF package is detected, it will slip-stream in the equivalent Laminas package instead. This is particularly of interest following a migration to ensure that nested dependencies on ZF packages use Laminas versions.

    • laminas/laminas-migration is a command line tool to facilitate migrating a project or third-party library to target Laminas. It will update the composer.json to target Laminas packages, and rewrite references to ZF classes and configuration throughout your application to the Laminas equivalents, add a dependency on laminas/laminas-dependency-plugin, and inject the configuration post processor provided by laminas/laminas-zendframework-bridge into your MVC or Expressive application if it can.

Testing migration

Required PHP version

The migration tooling, as well as the dependency plugin and bridge package, requires PHP 5.6 and up.

While many of the package versions support previous PHP versions, we chose to support only versions supported either by PHP.net or commercially. The lowest supported version we could find was PHP 5.6. As such, you will need to update to at least that version of PHP before attempting a migration.

Ideally, we recommend upgrading to the latest stable version of PHP whenever possible.

0. Ensure you have an up-to-date Composer

Due to features of Composer our dependency plugin uses, we require Composer 1.7.0 and up. If you're unsure what version you are on, run composer --version. If you are on an older version, run composer self-update.

1. Install laminas-migration

To migrate a project, first install the laminas/laminas-migration package.

Via Composer

Install the library globally using Composer:

$ composer global require laminas/laminas-migration

If you choose this option, you will need to ensure that the vendor/bin/ subdirectory of your > global Composer installation is in your environment $PATH.

You can find where the global Composer installation is by executing:

$ composer global config home

On Linux and Mac operating systems, update your shell configuration to add that path to your $PATH environment variable.

Adding to the PATH

The mechanism for adding to your environment $PATH variable depends on your operating system.

For Linux, Mac, and other *nix variants, you can do so by adding a line like the following at the end of your profile configuration file (e.g., $HOME/.bashrc, $HOME/.zshrc, $HOME/.profile, etc.):

export PATH={path to add}:$PATH

For Windows, the situation is a bit more involved; this HOWTO provides a good tutorial on the subject.

Via cloning

Clone the repository somewhere:

$ git clone https://github.com/laminas/laminas-migration.git

Install dependencies:

$ cd laminas-migration
$ composer install

From there, either add the bin/ directory to your $PATH (see the note on adding to the PATH, above), symlink the bin/laminas-migration script to a directory in your $PATH, or create an alias to the bin/laminas-migration script using your shell:

# Adding to PATH:
$ export PATH=/path/to/laminas-migration/bin:$PATH
# Symlinking to a directory in your PATH:
$ cd $HOME/bin && ln -s /path/to/laminas-migration/bin/laminas-migration .
# creating an alias:
$ alias laminas-migration=/path/to/laminas-migration/bin/laminas-migration

Updating the migration tooling

  • Last updates: 2019-12-02

If you are not a first-time tester, and you last installed the migration tooling before the date listed above, you will need to upgrade your tooling in order to test.

Global composer installations

Run the following commands:

$ composer global remove laminas/laminas-migration
$ composer global require laminas/laminas-migration

Git checkout installations

Run the following commands:

$ cd path/to/laminas-migration
$ git fetch origin
$ git rebase origin/master
# or checkout the latest tag:
$ git checkout 0.2.0
$ composer install

2. Run the migration command

From there, enter a project you wish to migrate, and run the following:

$ laminas-migration migrate

You may want to use the --exclude or -e option one or more times for directories to exclude from the rewrite; on the ZF website and my own, I used -e data, for instance:

$ laminas-migration migrate -e data

Module and Config Post Processor injection

If you are migrating an MVC, Apigility, or Expressive application, the migration tooling attempts to inject some code in your application. This can fail if you have non-standard configuration.

  • For MVC and Apigility applications, the migration tooling attempts to add Laminas\ZendFrameworkBridge as a module to the top of the config/modules.config.php file. If injection fails, add the module in a way appropriate to your application.

  • For Expressive applications, the migration tooling attempts to add Laminas\ZendFrameworkBridge\ConfigPostProcessor as a post processor class to the ConfigAggregator constructor. The ConfigAggregator constructor has the following signature:

    public function __construct(
        array $providers = [],
        ?string $cachedConfigFile = null,
        array $postProcessors = []
    )

    Typically, the structure of the config/config.php file in an Expressive application looks like the following:

    $cacheConfig = [
        'config_cache_path' => 'data/cache/app_config.php',
    ];
    
    $aggregator = new ConfigAggregator([
        // config providers from 3rd party code
        // ...
    
        // App-specific modules
        // ...
    
        // Include cache configuration
        new ArrayProvider($cacheConfig),
    
        // Load application config in a pre-defined order in such a way that local settings
        // overwrite global settings. (Loaded as first to last):
        //   - `global.php`
        //   - `*.global.php`
        //   - `local.php`
        //   - `*.local.php`
        new PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
    
        // Load development config if it exists
        new PhpFileProvider('config/development.config.php'),
    ], $cacheConfig['config_cache_path']);
    
    return $aggregator->getMergedConfig();

    As such, the migration tooling rewrites the second to last line to read:

    ], $cacheConfig['config_cache_path'], [\Laminas\ZendFrameworkBridge\ConfigPostProcessor::class]);

    In most cases, failure to inject means that the individual arguments have been pushed to their own line. In such cases, add the third argument as detailed above.

    In other cases, applications may already be using post processors. If so, add \Laminas\ZendFrameworkBridge\ConfigPostProcessor::class to the list of post processors.

3. Add the Laminas composer repository

This step will go away once we migrate the repositories to their final resting places on GitHub. However, until then, we need to add the custom repository I created:

$ composer config repositories.laminas composer https://laminas.mwop.net/repo/testing

4. Install dependencies

Once migration is done and you've added the repository, you can install dependencies:

$ composer install

5. Test

Run your unit tests, do end-to-end tests, whatever — but exercise the application in some way, and let us know if anything does not work. The more specific you can be, the better!

Please report your experiences in the #laminas-migration-testing channel on the ZF Slack.

Clear your caches

If your application is not running in development mode, you will need to clear any configuration caches you have before testing. If you are using zf-development-mode (which becomes laminas-development-mode!), try enabling development mode:

$ composer development-enable

Expressive users can use the clear-config-cache command:

$ composer clear-config-cache

Summary

To summarize the steps to test:

$ composer global require laminas/laminas-migration
$ cd some/project
$ laminas-migration migrate -e data
$ composer config repositories.laminas composer https://laminas.mwop.net/repo/testing
$ composer install

and report to the #laminas-migration-testing channel on the ZF Slack.

We want to hear ALL experiences, both if it worked and if it failed, as well as the type of application you tested migrations against. The more information we have about use cases, the more we know about how well the tool covers the various projects in the ecosystem.

Feel free to invite others to test!

Happy testing!

@Lansoweb

This comment has been minimized.

Copy link

Lansoweb commented Oct 30, 2019

Great, I'm testing first with one small API here.
The first composer should be composer global require laminas/laminas-migration.

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Oct 31, 2019

@Lansoweb - thanks - I've updated now!

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 1, 2019

Some known issues:

  • If you are migrating a zend-mvc application, and a module defines a getModuleDependencies() that references a ZF module, you could have issues. E.g.: SanSessionToolbar depends on ZendDeveloperTools. While LaminasDeveloperTools is installed, because the module manager does not look at class names but module names, it does not see the dependency as fulfilled.

    This will be primarily an issue with 3rd party libraries and ZendDeveloperTools. The solution is to not define getModuleDependencies() (use Composer for dependency management!) and to add conditional checks in any bootstrapping logic that works with 3rd-party dependencies.

  • Update: configuration post processing was added 2019-11-07! Configuration keys in 3rd party code that reference ZF configuration keys. E.g., 'zend-expressive' => [/*...*/]. We will be working on configuration post-processing next week. In the meantime, you can copy any such configuration, and rewrite the keys to reference the new keys from the Laminas packages.

@dominikzogg

This comment has been minimized.

Copy link

dominikzogg commented Nov 2, 2019

Project: https://github.com/chubbyphp/petstore/tree/expressive (my skeleton, in the branch that is expressive based)

petstore-php ~/html www-data $ laminas-migration migrate
petstore-php ~/html www-data $ composer update
    1/1:        http://repo.packagist.org/p/provider-latest$ca98c82361204b95110a0b3d8dc18dbf6d3e87009f20da3fd1e95c76beb92a20.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package laminas/laminas-code could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package laminas/laminas-diactoros could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package expressive/expressive-fastroute could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package expressive/expressive could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
@acelaya

This comment has been minimized.

Copy link

acelaya commented Nov 3, 2019

I have tested the migration with a slightly bigger project, and these are the issues I faced:

  • The first one is basically related with this:

    • Configuration keys in 3rd party code that reference ZF configuration keys. E.g., 'zend-expressive' => [/*...*/]. We will be working on configuration post-processing next week. In the meantime, you can copy any such configuration, and rewrite the keys to reference the new keys from the Laminas packages.

    Third party libraries making use of Zend\... classes as the config keys, do not get properly parsed/aliased.

    I exprienced this with libraries using ConfigAbstractFactory. All the services using this factory in the main project get properly mapped, but the ones in libraries are still registered under Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory and therefore, they are not found.

    I managed to workaround it by doing this when loading the config just before the ServiceManager is created:

    // ...
    
    $config = // ... coming from somewhere as an array
    
    $config[ConfigAbstractFactory::class] = array_merge(
        $config[ConfigAbstractFactory::class] ?? [],
        $config['Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory'] ?? []
    );
    
    $container = new ServiceManager($config['dependencies']);
    
    // ...
  • The second one is produced because of a lazy service I have, which is also coming from an external library, but I don't think it affects in this case.

    The moment that service needs to be created, I get this error:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Laminas\ServiceManager\Proxy\LazyServiceFactory::__construct(), 0 passed in /home/shlink/vendor/laminas/laminas-servicemanager/src/ServiceManager.php on line 714 and exactly 2 expected in /home/shlink/vendor/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php:39
    Stack trace:
    #0 /home/shlink/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(714): Laminas\ServiceManager\Proxy\LazyServiceFactory->__construct()
    #1 /home/shlink/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(766): Laminas\ServiceManager\ServiceManager->createDelegatorFromName('Psr\\EventDispat...', NULL)
    #2 /home/shlink/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(200): Laminas\ServiceManager\ServiceManager->doCreate('Psr\\EventDispat...')
    #3 /home/shlink/vendor/phly/phly-event-dispatcher/src/EventDispatcherFactory.php(28): Laminas\ServiceManager\ServiceManager->get('Psr\\EventDispat...')
    #4 /home/shlink/vendor/laminas/laminas-servicemana in /home/shlink/vendor/laminas/laminas-servicemanager/src/Proxy/LazyServiceFactory.php on line 39
    

    This one I still didn't find the reason or a workaround. I will continue debugging and update this as soon as I have more info.

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 4, 2019

@acelaya I think both scenarios will be addressed by the work I'm doing to provide configuration post processors for both MVC and Expressive applications. I'll ping you in Slack when those tools are available.

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 5, 2019

@dominikzogg You skipped this step between running laminas-migrate and composer install:

  1. Add the Laminas composer repository

This step will go away once we migrate the repositories to their final resting places on GitHub. However, until then, we need to add the custom repository I created:

$ composer config repositories.laminas composer https://laminas.mwop.net/repo/testing

Try that, and then see what you are able to do from there.

@dominikzogg

This comment has been minimized.

Copy link

dominikzogg commented Nov 5, 2019

@weierophinney works like a charm! thanks

@rennasalvarw

This comment has been minimized.

Copy link

rennasalvarw commented Nov 7, 2019

In laminas-text package under Figlet I found file zend-framework.flf so

$this->_loadFont(DIR . '/laminas-framework.flf'); in Laminas\Text\Figlet\Figlet

throw an exception

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 7, 2019

@rennasalvarw Thanks for the report - getting patches ready now, which will resolve that issue!

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 7, 2019

@rennasalvarw We've pushed fixes! To test:

  • If you installed the migration tool globally, try:
    • composer global update --with-dependencies laminas/laminas-migration
    • Or, if that doesn't show an update to laminas/laminas-zendframework-bridge, composer global remove laminas/laminas-migration && composer global require laminas/laminas-migration.
  • If you are using a local checkout of the tool: cd path/to/laminas-migration && composer update

When you get to the composer install step, verify that you receive version 0.3.6 or later of laminas/laminas-zendframework-bridge. If you do not, try a composer update and/or a composer install --no-cache.

@rennasalvarw

This comment has been minimized.

Copy link

rennasalvarw commented Nov 8, 2019

Thank Matthew!

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 9, 2019

migrate existing installed ZendDeveloperTools seems got error: Unable to render template "laminas-developer-tools/toolbar/laminas";

laminas-developer-tools

@shughi94

This comment has been minimized.

Copy link

shughi94 commented Nov 12, 2019

Hi, thanks for this tool.

Trying to migrate our open source project passwordcockpit.

Specifics and more information of the full migration are written here in this markdown.

When I call the laminas-migration migrate I get the following output:

Injecting laminas-dependency-plugin into composer.json
Performing migration replacements
Injecting Laminas\ZendFrameworkBridge\ConfigPostProcessor into /var/www/html/config/config.php

[ERROR] - File is not in expected format; aborting injection       

You will need to manually add the "Laminas\ZendFrameworkBridge\ConfigPostProcessor" in your ConfigAggregator initialization.
                                                                                                                     
[OK] Migration complete! 

What kind of format does the executable expect?
It seems to not affect the backend though.

I went on with the migration, and everything installed correctly.

The problems:
Tests fails whenever I throw a ProblemDetailsException . It returns 500 instead of the specific HTTP code and message (more information on the markdown cited above).
Now, we create ProblemDetailsException through a custom class with the constructor, while the documentation now uses a static function create(), so it might probably be that the problem is due to this difference.
I'm going to try to switch on the static function and see if that changes something.

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 12, 2019

@shughi94:

What kind of format does the executable expect?

In most Expressive applications, the config/config.php has a structure that includes something like the following:

$aggregator = new ConfigAggregator([
    // your config providers here

    // Include cache configuration
    new ArrayProvider($cachConfig);

    // Load application config in a pre-defined order in such a way that local settings
    // overwrite global settings. (Loaded as first to last):
    //   - `global.php`
    //   - `*.global.php`
    //   - `local.php`
    //   - `*.local.php`
    new PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),

    // Load development config if it exists
    new PhpFileProvider('config/development.config.php'),
], $cacheConfig['config_cache_path']);

return $aggregator->getMergedConfig();

The important line is the one that reads:

], $cacheConfig['config_cache_path']);

The plugin is looking for that line so it can inject an additional argument:

], $cacheConfig['config_cache_path'], [\Laminas\ZendFrameworkBridge\ConfigPostProcessor::class]);

If the tool cannot detect that specific format, you need to add the ConfigPostProcessor manually. Generally, if it cannot match that line, it means that you're either (a) doing something completely different in that file, (b) you have different formatting within that file, or (c) you're already registering other config post processors, in which case you'd just add this one to the list. In your case, it's (b). Change this line in your config file to read:

    $cacheConfig['config_cache_path'],
    [
        \Laminas\ZendFrameworkBridge\ConfigPostProcessor::class,
    ]

Regarding your problem as noted above, there's a chance it could be fixed by adding that post processor. One of the things it does is rewrite keys in your configuration during runtime from known ZF values to their Laminas equivalents. This includes class names used as keys in dependency configuration, as ::class notation does not trigger autoloading, and, as such, they end up staying exactly as they were previously. If you could try adding that, and then reverting the changes you made to your code to make it work, I'd love to see your report on the results.

@shughi94

This comment has been minimized.

Copy link

shughi94 commented Nov 12, 2019

@weierophinney, thanks for the quick response!
I've updated the config.php file, went back to the original structure of the ProblemDetailsException class but the problem still stands.
One thing that I noticed:
throwing directly throw new \Exception("test", 401); returns on Postman the correct 401 code, but still show the stack trace

An unexpected error occurred; stack trace:

Exception raised in file /var/www/html/src/Authentication/src/Api/V1/Action/AuthenticationCreateAction.php line 254:
Message: test
Stack Trace:
#0 /var/www/html/vendor/laminas/laminas-stratigility/src/Middleware/RequestHandlerMiddleware.php(53):
Authentication\Api\V1\Action\AuthenticationCreateAction->handle(Object(Laminas\Diactoros\ServerRequest))
#1 /var/www/html/vendor/expressive/expressive/src/Middleware/LazyLoadingMiddleware.php(46):
Laminas\Stratigility\Middleware\RequestHandlerMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
....

while using

throw new ProblemDetailsException(
                    401,
                    'Wrong username or password',
                    'Unauthorized',
                    'https://httpstatus.es/401'
                );

still returns 500 with a different stack-trace:

An unexpected error occurred; stack trace:

App\Service\ProblemDetailsException raised in file
/var/www/html/src/Authentication/src/Api/V1/Action/AuthenticationCreateAction.php line 255:
Message:
Stack Trace:
#0 /var/www/html/vendor/laminas/laminas-stratigility/src/Middleware/RequestHandlerMiddleware.php(53):
Authentication\Api\V1\Action\AuthenticationCreateAction->handle(Object(Laminas\Diactoros\ServerRequest))
#1 /var/www/html/vendor/expressive/expressive/src/Middleware/LazyLoadingMiddleware.php(46):
Laminas\Stratigility\Middleware\RequestHandlerMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#2 /var/www/html/vendor/laminas/laminas-stratigility/src/Next.php(60):
Expressive\Middleware\LazyLoadingMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))

I will look more deeply into this tomorrow and let you know.

Have a nice day!

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 12, 2019

@samsonasik:

migrate existing installed ZendDeveloperTools seems got error: Unable to render template "laminas-developer-tools/toolbar/laminas";

I think we have this resolved now. Can you re-try running the migration? Make sure you do a composer global update laminas/laminas-migration beforehand, and then run the migration. Let us know if you have any further issues!

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 12, 2019

@weierophinney i run composer global update laminas/laminas-migration and re-run composer update with output:

Package operations: 1 install, 2 updates, 0 removals
  - Updating doctrine/instantiator (1.2.0 => 1.3.0): Loading from cache
  - Updating laminas/laminas-zendframework-bridge (0.3.6 => 0.3.7): Loading from cache
  - Installing laminas/laminas-developer-tools (1.2.3): Loading from cache

and still got error:

Unable to render template "laminas-developer-tools/toolbar/laminas";

It seems the view directory still uses "zend-developer-tools", and the file pointed "zendframework.phtml" still there. After manually update directory and file in the vendor, the css seems doesn't apply for the toolbar. It seems the css naming need update as well.

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 12, 2019

@samsonasik — It looks like you got cached versions of the package; try running the install command using --no-cache. I've installed the package locally and checked the contents, and the files are renamed correctly, have appropriately named CSS selectors, etc., which leads me to believe that your issue will be resolved if you bypass the Composer cache.

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 12, 2019

@weierophinney it seems "--no-cache" is not a composer command as I got " mkdir(): No such file or directory" error. I cleared composer cache with run composer clear-cache first and still got laminas-developer-tools v1.2.3:

$ composer clear-cache
Cache directory does not exist (cache-vcs-dir):
Clearing cache (cache-repo-dir): C:\Users\samsonasik\AppData\Local\Composer\repo
Clearing cache (cache-files-dir): C:\Users\samsonasik\AppData\Local\Composer\files
Clearing cache (cache-dir): C:\Users\samsonasik\AppData\Local\Composer
All caches cleared.

samsonasik@samsonasik-PC MINGW64 /d/Github/zf-to-laminas
$ composer update
    1/12:       http://repo.packagist.org/p/provider-archived$f87c6b240bff8b508c75240fba1a80bd37b4e866f18cfcad053e9dec578da551.json
    2/12:       http://repo.packagist.org/p/provider-latest$650ef77158b69e4541171ec04de2b2b12a791de2f1215b674df2cfb1419cbcd4.json
    3/12:       http://repo.packagist.org/p/provider-2013$0203c4461d002a56aecb25720bc47e6f0bcdfce9f6818a12999ff76c9a4da3a2.json
    4/12:       http://repo.packagist.org/p/provider-2014$891f3d75258effbb9ce7d2c3789834632a7f742dc93f60b242648bccafdae36e.json
    5/12:       http://repo.packagist.org/p/provider-2019-01$d240f266d122a58b1c14d8bc06813870213015037d89ba8a97b617ea9e508612.json
    6/12:       http://repo.packagist.org/p/provider-2019-10$501f6d0d86e4cac2408cc2b9707ec0cccd9c368498cc18f20e77370177a89c89.json
    7/12:       http://repo.packagist.org/p/provider-2015$44c9459084014b73af927845253e5f73901d161128137f1faab0cafb5a506821.json
    8/12:       http://repo.packagist.org/p/provider-2019-07$f13834a2bc50fa5cc0956adce15effec7836f1f0066c62d61ccd5c7e8c9bc39f.json
    9/12:       http://repo.packagist.org/p/provider-2019-04$0c1c5d0aee38badb9933667234cdcd045e3241cfdef226090b25d298bac8345c.json
    10/12:      http://repo.packagist.org/p/provider-2016$1838c2deca87cc774292c157fda23b67a082d36b46df0f9fc6ca23cde6baaf1a.json
    11/12:      http://repo.packagist.org/p/provider-2017$bca04e5743d3e1bd467fee32ba507cd5a6eba97f1f38451165e0024e117e7fd1.json
    12/12:      http://repo.packagist.org/p/provider-2018$0b2e51db616c0c02bf84f8730474db659d7804ce53e91048bb0b630a2ce85ed7.json
    Finished: success: 12, skipped: 0, failure: 0, total: 12
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/1:        https://laminas.mwop.net/repo/testing/dist/laminas/laminas-developer-tools/laminas-laminas-developer-tools-1.2.3-d2449c.tar
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Package operations: 1 install, 0 updates, 0 removals
  - Installing laminas/laminas-developer-tools (1.2.3): Loading from cache
laminas/laminas-developer-tools suggests installing aist/aist-git-tools (Show you informations about current GIT repository)
laminas/laminas-developer-tools suggests installing bjyoungblood/bjy-profiler (Version: dev-master, allows the usage of the (Laminas) Db collector.)
laminas/laminas-developer-tools suggests installing doctrine/doctrine-orm-module (Profile DoctrineORM queries)
laminas/laminas-developer-tools suggests installing jhuet/zdt-logger-module (Show you log data from Laminas\Log)
laminas/laminas-developer-tools suggests installing ocramius/ocra-service-manager (OcraServiceManager can help you track dependencies within your application.)
laminas/laminas-developer-tools suggests installing snapshotpl/apigility-snap-event-debugger (LaminasSnapEventDebugger can help you debug events from Laminas\EventManager)
Writing lock file
Generating autoload files

I tried dev-master and dev-develop and got error:

 [RuntimeException]
  Failed to execute git clone --no-checkout  "D:\Github\zf-to-laminas\vendor\
  laminas\laminas-developer-tools" && cd /D "D:\Github\zf-to-laminas\vendor\l
  aminas\laminas-developer-tools" && git remote add composer  && git fetch co
  mposer && git remote set-url origin "" && git remote set-url composer ""

  Cloning into 'laminas-developer-tools'...
  fatal: 'D:\Github\zf-to-laminas\vendor\laminas\laminas-developer-tools' doe
  s not appear to be a git repository
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 12, 2019

@samsonasik You'll get the same version - the contents will differ, though, as I rewrote them after we applied updates to our repo migration tooling. What I wanted you to test is if the updated packages fix your problem.

Did you test after re-installing?

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 12, 2019

@weierophinney yes, I tested and still got error " Unable to render template "laminas-developer-tools/toolbar/laminas";". I removed the vendor/laminas/laminas-developer-tools and re-run the composer update.

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 13, 2019

@weierophinney I just retried in another OS (macOS Sierra), clear cache first, and still get error : "Unable to render template "laminas-developer-tools/toolbar/laminas".

Here is the steps:

  • clear cache
~ composer clear-cache
Clearing cache (cache-vcs-dir): /Users/samsonasik/.composer/cache/vcs
Clearing cache (cache-repo-dir): /Users/samsonasik/.composer/cache/repo
Clearing cache (cache-files-dir): /Users/samsonasik/.composer/cache/files
Clearing cache (cache-dir): /Users/samsonasik/.composer/cache
All caches cleared.
  • Install ZF-Skeleton App
composer create-project -sdev zendframework/skeleton-application zf-to-laminas
    1/12:	https://php.cnpkg.org/p/provider-archived$755dca94ee44bef454d0656ef51938324ee3ceab6db349ac59721c535359f5db.json
    2/12:	https://php.cnpkg.org/p/provider-latest$850aa221582fc4f5fbfeaeadf39dcf0aa455a58d62a7108e204fd6e10d7c4ec5.json
    3/12:	https://php.cnpkg.org/p/provider-2014$cb558b835e9cacba2666f9f79599319ca5da4299cd2b52a2d0e895674d5ce04a.json
    4/12:	https://php.cnpkg.org/p/provider-2019-10$3c23a3e839b5ad19003aa3a0227a760a21375ad2d55d8c80cc2825e78df9a133.json
    5/12:	https://php.cnpkg.org/p/provider-2013$5d548ff8a50ba01e37d313f35742f2da481edf1a1e2a9ec449aa2713a13cb9be.json
    6/12:	https://php.cnpkg.org/p/provider-2015$fd0db709b0e48bd82dc19c8b922583c2a8a03ef54e9aac0f4bac8880a2d0836c.json
    7/12:	https://php.cnpkg.org/p/provider-2019-04$92b648a2ef658a952ab9d821ec3f385a378cbe1b0648efb65ca7229e56da6d28.json
    8/12:	https://php.cnpkg.org/p/provider-2019-07$123825d1d512919ef7148b121760e84a22e01539e80305b08cb4e0302f53feb3.json
    9/12:	https://php.cnpkg.org/p/provider-2019-01$087895d8cf6578669aa61641563ba7680332c894e042dee2693ccfbc99ef84a5.json
    10/12:	https://php.cnpkg.org/p/provider-2016$eccc046efcd110172e777e32c3ee457c3b5c9ed38b1ba4eab3c6bef2f7150934.json
    11/12:	https://php.cnpkg.org/p/provider-2017$850b3c76aed933f8ccf42026e117a479f0e026f60efa30d88fdbe5a20cad510e.json
    12/12:	https://php.cnpkg.org/p/provider-2018$9e0c63e6b03fac063d5f5c614e886fe1b75dedf0ca729f7eb811b4e92fbbeedb.json
    Finished: success: 12, skipped: 0, failure: 0, total: 12
Installing zendframework/skeleton-application (dev-master cda8fa6d07690cd07cb0e41f9831f1ae4acfee6c)
  - Installing zendframework/skeleton-application (dev-master cda8fa6): Cloning cda8fa6d07 from cache
Created project in zf-to-laminas
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
    1/3:	https://codeload.github.com/zendframework/zend-validator/legacy.zip/99b528e01276054458da9553b587cfb959dfa436
    2/3:	https://codeload.github.com/zendframework/zend-http/legacy.zip/09f4d279f46d86be63171ff62ee0f79eca878678
    3/3:	https://codeload.github.com/zendframework/zend-view/legacy.zip/71b4ebd0c4c9a2d0e0438f9d3a435e08dd769ff8
    Finished: success: 3, skipped: 0, failure: 0, total: 3
Package operations: 18 installs, 0 updates, 0 removals
  - Installing zendframework/zend-component-installer (0.7.0): Loading from cache
  - Installing zendframework/zend-skeleton-installer (0.1.4): Loading from cache
  - Installing zendframework/zend-stdlib (3.1.0): Loading from cache
  - Installing zendframework/zend-config (2.6.0): Loading from cache
  - Installing zendframework/zend-loader (2.5.1): Loading from cache
  - Installing zendframework/zend-eventmanager (3.1.0): Loading from cache
  - Installing zendframework/zend-view (2.8.1): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing zendframework/zend-servicemanager (3.3.0): Loading from cache
  - Installing zendframework/zend-validator (2.8.2): Loading from cache
  - Installing zendframework/zend-escaper (2.5.2): Loading from cache
  - Installing zendframework/zend-uri (2.5.2): Loading from cache
  - Installing zendframework/zend-http (2.6.0): Loading from cache
  - Installing zendframework/zend-router (3.0.2): Loading from cache
  - Installing zendframework/zend-modulemanager (2.7.2): Loading from cache
  - Installing zendframework/zend-mvc (3.0.4): Loading from cache
  - Installing zfcampus/zf-development-mode (3.1.0): Loading from cache
zendframework/zend-config suggests installing zendframework/zend-filter (Zend\Filter component)
zendframework/zend-config suggests installing zendframework/zend-i18n (Zend\I18n component)
zendframework/zend-config suggests installing zendframework/zend-json (Zend\Json to use the Json reader or writer classes)
zendframework/zend-view suggests installing zendframework/zend-authentication (Zend\Authentication component)
zendframework/zend-view suggests installing zendframework/zend-feed (Zend\Feed component)
zendframework/zend-view suggests installing zendframework/zend-filter (Zend\Filter component)
zendframework/zend-view suggests installing zendframework/zend-i18n (Zend\I18n component)
zendframework/zend-view suggests installing zendframework/zend-json (Zend\Json component)
zendframework/zend-view suggests installing zendframework/zend-navigation (Zend\Navigation component)
zendframework/zend-view suggests installing zendframework/zend-paginator (Zend\Paginator component)
zendframework/zend-view suggests installing zendframework/zend-permissions-acl (Zend\Permissions\Acl component)
zendframework/zend-servicemanager suggests installing ocramius/proxy-manager (ProxyManager 1.* to handle lazy initialization of services)
zendframework/zend-validator suggests installing zendframework/zend-db (Zend\Db component)
zendframework/zend-validator suggests installing zendframework/zend-filter (Zend\Filter component, required by the Digits validator)
zendframework/zend-validator suggests installing zendframework/zend-i18n (Zend\I18n component to allow translation of validation error messages as well as to use the various Date validators)
zendframework/zend-validator suggests installing zendframework/zend-i18n-resources (Translations of validator messages)
zendframework/zend-validator suggests installing zendframework/zend-math (Zend\Math component)
zendframework/zend-validator suggests installing zendframework/zend-session (Zend\Session component)
zendframework/zend-router suggests installing zendframework/zend-i18n (^2.6, if defining translatable HTTP path segments)
zendframework/zend-modulemanager suggests installing zendframework/zend-console (Zend\Console component)
zendframework/zend-mvc suggests installing zendframework/zend-json ((^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-console (zend-mvc-console provides the ability to expose zend-mvc as a console application)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-i18n (zend-mvc-i18n provides integration with zend-i18n, including a translation bridge and translatable route segments)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-fileprg (To provide Post/Redirect/Get functionality around forms that container file uploads)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-flashmessenger (To provide flash messaging capabilities between requests)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-identity (To access the authenticated identity (per zend-authentication) in controllers)
zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-prg (To provide Post/Redirect/Get functionality within controllers)
zendframework/zend-mvc suggests installing zendframework/zend-psr7bridge ((^0.2) To consume PSR-7 middleware within the MVC workflow)
zendframework/zend-mvc suggests installing zendframework/zend-servicemanager-di (zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application)
Generating autoload files

    Do you want a minimal install (no optional packages)? Y/n
n

    Would you like to install the developer toolbar? y/N
y
    Will install zendframework/zend-developer-tools (^1.1.0)
    When prompted to install as a module, select development.config.php.dist

    Would you like to install caching support? y/N
y
    Will install zendframework/zend-cache (^2.7.1)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install database support (installs zend-db)? y/N
y
    Will install zendframework/zend-db (^2.8.1)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install forms support? y/N
y
    Will install zendframework/zend-mvc-form (^1.0)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install JSON de/serialization support? y/N
y
    Will install zendframework/zend-json (^3.0)

    Would you like to install logging support? y/N
y
    Will install zendframework/zend-log (^2.9)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install MVC-based console support? (We recommend migrating to zf-console, symfony/console, or Aura.CLI) y/N
y
    Will install zendframework/zend-mvc-console (^1.1.10)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install i18n support? y/N
y
    Will install zendframework/zend-mvc-i18n (^1.0)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install the official MVC plugins, including PRG support, identity, and flash messages? y/N
y
    Will install zendframework/zend-mvc-plugins (^1.0.1)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to use the PSR-7 middleware dispatcher? y/N
y
    Will install zendframework/zend-psr7bridge (^0.2.2)

    Would you like to install sessions support? y/N
y
    Will install zendframework/zend-session (^2.7.1)
    When prompted to install as a module, select application.config.php or modules.config.php

    Would you like to install testing support? y/N
y
    Will install phpunit/phpunit (^7.5.12 || ^6.5.14 || ^5.7.14)

    Would you like to install MVC testing tools for testing support? y/N
y
    Will install zendframework/zend-test (^3.0.1)

    Would you like to install the zend-di integration for zend-servicemanager? y/N
y
    Will install zendframework/zend-servicemanager-di (^1.0)
    When prompted to install as a module, select application.config.php or modules.config.php
Updating root package
    Running an update to install optional packages
Loading composer repositories with package information
Updating dependencies
Package operations: 60 installs, 0 updates, 0 removals
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing zendframework/zend-diactoros (1.8.7): Downloading (100%)         
  - Installing zendframework/zend-psr7bridge (0.2.2): Downloading (100%)         
  - Installing zendframework/zend-json (3.1.2): Downloading (100%)         
  - Installing zendframework/zend-debug (2.6.0): Downloading (100%)         
  - Installing zendframework/zend-developer-tools (1.2.3): Downloading (100%)         
  - Installing zendframework/zend-cache (2.7.2): Downloading (100%)         
  - Installing zendframework/zend-db (2.10.0): Downloading (100%)         
  - Installing zendframework/zend-i18n (2.9.2): Downloading (100%)         
  - Installing zendframework/zend-hydrator (2.4.2): Downloading (100%)         
  - Installing zendframework/zend-filter (2.7.2): Downloading (100%)         
  - Installing zendframework/zend-inputfilter (2.7.6): Downloading (100%)         
  - Installing zendframework/zend-form (2.10.2): Downloading (100%)         
  - Installing zendframework/zend-code (3.4.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-form (1.0.0)
  - Installing psr/log (1.1.2): Downloading (100%)         
  - Installing zendframework/zend-log (2.11.0): Downloading (100%)         
  - Installing zendframework/zend-text (2.7.1): Downloading (100%)         
  - Installing zendframework/zend-console (2.7.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-console (1.2.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-i18n (1.1.1): Downloading (100%)         
  - Installing zendframework/zend-session (2.8.7): Downloading (100%)         
  - Installing zendframework/zend-mvc-plugin-prg (1.1.0): Downloading (100%)         
  - Installing zendframework/zend-authentication (2.6.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-plugin-identity (1.1.1): Downloading (100%)         
  - Installing zendframework/zend-mvc-plugin-flashmessenger (1.0.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-plugin-fileprg (1.0.0): Downloading (100%)         
  - Installing zendframework/zend-mvc-plugins (1.0.1)
  - Installing sebastian/global-state (2.0.0): Downloading (100%)         
  - Installing zendframework/zend-dom (2.7.2): Downloading (100%)         
  - Installing sebastian/version (2.0.1): Downloading (100%)         
  - Installing phpunit/php-timer (2.1.2): Downloading (100%)         
  - Installing sebastian/environment (4.2.2): Downloading (100%)         
  - Installing sebastian/resource-operations (2.0.1): Downloading (100%)         
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)         
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)         
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)         
  - Installing sebastian/exporter (3.1.2): Downloading (100%)         
  - Installing sebastian/diff (3.0.2): Downloading (100%)         
  - Installing sebastian/comparator (3.0.2): Downloading (100%)         
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         
  - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%)         
  - Installing theseer/tokenizer (1.1.3): Downloading (100%)         
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)         
  - Installing phpunit/php-token-stream (3.1.1): Downloading (100%)         
  - Installing phpunit/php-code-coverage (6.1.4): Downloading (100%)         
  - Installing doctrine/instantiator (1.3.0): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.12.0): Downloading (100%)         
  - Installing webmozart/assert (1.5.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-common (2.0.0): Downloading (100%)         
  - Installing phpdocumentor/type-resolver (1.0.1): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (4.3.2): Downloading (100%)         
  - Installing phpspec/prophecy (1.9.0): Downloading (100%)         
  - Installing phar-io/version (2.0.1): Downloading (100%)         
  - Installing phar-io/manifest (1.0.3): Downloading (100%)         
  - Installing myclabs/deep-copy (1.9.3): Downloading (100%)         
  - Installing phpunit/phpunit (7.5.17): Downloading (100%)         
  - Installing zendframework/zend-test (3.2.1): Downloading (100%)         
  - Installing zendframework/zend-di (2.6.1): Downloading (100%)         
  - Installing zendframework/zend-servicemanager-di (1.2.1): Downloading (100%)         
Writing lock file
Generating autoload files
    Updating composer.json
Updating application configuration...

  Please select which config file you wish to inject 'ZendDeveloperTools' into:
  [0] Do not inject
  [1] config/modules.config.php
  [2] config/development.config.php.dist
  Make your selection (default is 0):1

  Remember this option for other packages of the same type? (y/N)y
Installing ZendDeveloperTools from package zendframework/zend-developer-tools

  Please select which config file you wish to inject 'Zend\Cache' into:
  [0] Do not inject
  [1] config/modules.config.php
  [2] config/development.config.php.dist
  Make your selection (default is 0):1

  Remember this option for other packages of the same type? (y/N)y
Installing Zend\Cache from package zendframework/zend-cache
Installing Zend\Db from package zendframework/zend-db
Installing Zend\Form from package zendframework/zend-mvc-form
Installing Zend\Log from package zendframework/zend-log
Installing Zend\Mvc\Console from package zendframework/zend-mvc-console
Installing Zend\Mvc\I18n from package zendframework/zend-mvc-i18n
Installing Zend\Mvc\Plugin\FilePrg from package zendframework/zend-mvc-plugins
Installing Zend\Mvc\Plugin\FlashMessenger from package zendframework/zend-mvc-plugins
Installing Zend\Mvc\Plugin\Identity from package zendframework/zend-mvc-plugins
Installing Zend\Mvc\Plugin\Prg from package zendframework/zend-mvc-plugins
Installing Zend\Session from package zendframework/zend-session
Installing Zend\ServiceManager\Di from package zendframework/zend-servicemanager-di
Removing zendframework/zend-skeleton-installer...
  - Removing zendframework/zend-skeleton-installer (0.1.4)
    Removed plugin zendframework/zend-skeleton-installer.
    Removing from composer.json
    Complete!
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? Y
> zf-development-mode enable
You are now in development mode.
➜  www cd zf-to-laminas 
➜  zf-to-laminas composer update
    1/3:	https://php.cnpkg.org/p/provider-latest$5f0df63bf2373a50ed76edabf794b7def76b65165dd86ffac213bb667648535d.json
    2/3:	https://php.cnpkg.org/p/provider-2019-10$9f4a7fb64e769aa84550a70843cfc43a58729647f3f86c3c587bf4a819f8be6d.json
    3/3:	https://php.cnpkg.org/p/provider-2019-07$d3937d50a1dbf964a2c952d784657d57313124fe7dbc97ce2ade262229bf9501.json
    Finished: success: 3, skipped: 0, failure: 0, total: 3
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-mvc-plugin-fileprg/zipball/87184f33dbb98eb57c7338a5f026cca29bdd6048
    2/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-mvc-plugin-prg/zipball/090afc28bcf0f7043ed8d7da712ac1b5964ab7d7
    3/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-mvc-plugin-flashmessenger/zipball/b66064eb59d3b124a133d259aac3d9dd7cb81706
    4/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-test/zipball/9cc4ab4c84a7da4c8035087253606b4f3ff1e72f
    5/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-inputfilter/zipball/1f44a2e9bc394a71638b43bc7024b572fa65410e
    6/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-session/zipball/c289c4d733ec23a389e25c7c451f4d062088511f
    7/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-hydrator/zipball/f9987bfa25a89d6191e1dbb0413b3c35613f0271
    8/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-authentication/zipball/1f379f6384fca34b3bfe94d953abd65e9e7ee746
    9/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-filter/zipball/d78f2cdde1c31975e18b2a0753381ed7b61118ef
    10/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-form/zipball/0b1616c59b1f3df194284e26f98c81ad0c377871
    11/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-escaper/zipball/3801caa21b0ca6aca57fa1c42b08d35c395ebd5f
    12/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-modulemanager/zipball/b2596d24b9a4e36a3cd114d35d3ad0918db9a243
    13/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-console/zipball/95817ae78f73c48026972e350a2ecc31c6d9f9ae
    14/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-config/zipball/012341361ae3cc97a99959e7cb7c9ebd04d49572
    15/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-mvc/zipball/236e7e1e3757e988fa06530c0a3f96a148858ae8
    16/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-router/zipball/b113a4cfd910ee4723079fa58a9bcf3198631620
    17/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-http/zipball/4b4983178693a8fdda53b0bbee58552e2d2b1ac0
    18/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-uri/zipball/bfc4a5b9a309711e968d7c72afae4ac50c650083
    19/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-view/zipball/e766457bd6ce13c5354e443bb949511b6904d7f5
    20/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-validator/zipball/fd24920c2afcf2a70d11f67c3457f8f509453a62
    21/29:	https://github-api-proxy.cnpkg.org/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b
    22/29:	https://github-api-proxy.cnpkg.org/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8
    23/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-loader/zipball/91da574d29b58547385b2298c020b257310898c6
    24/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-stdlib/zipball/66536006722aff9e62d1b331025089b7ec71c065
    25/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-servicemanager/zipball/a1ed6140d0d3ee803fec96582593ed024950067b
    26/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd
    27/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-cache/zipball/cffd54a2dc4db094976d3b3f05e418a047cc9110
    28/29:	https://github-api-proxy.cnpkg.org/repos/zfcampus/zf-development-mode/zipball/419004a320bab017d28f2bc5e7857dde7e19aecf
    29/29:	https://github-api-proxy.cnpkg.org/repos/zendframework/zend-component-installer/zipball/5e9beda3b81d29d4d080b110d67f8c8c44d93605
    Finished: success: 29, skipped: 0, failure: 0, total: 29
Package operations: 2 installs, 27 updates, 0 removals
  - Updating zendframework/zend-component-installer (0.7.0 => 1.1.1): Loading from cache
  - Updating zfcampus/zf-development-mode (3.1.0 => 3.2.0): Loading from cache
  - Updating zendframework/zend-stdlib (3.1.0 => 3.2.1): Loading from cache
  - Updating zendframework/zend-servicemanager (3.3.0 => 3.4.0): Loading from cache
  - Updating zendframework/zend-eventmanager (3.1.0 => 3.2.1): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Updating zendframework/zend-cache (2.7.2 => 2.9.0): Loading from cache
  - Updating zendframework/zend-loader (2.5.1 => 2.6.1): Loading from cache
  - Updating zendframework/zend-view (2.8.1 => 2.11.3): Loading from cache
  - Updating zendframework/zend-validator (2.8.2 => 2.12.2): Loading from cache
  - Updating zendframework/zend-escaper (2.5.2 => 2.6.1): Loading from cache
  - Updating zendframework/zend-uri (2.5.2 => 2.7.1): Loading from cache
  - Updating zendframework/zend-http (2.6.0 => 2.10.0): Loading from cache
  - Updating zendframework/zend-router (3.0.2 => 3.3.0): Loading from cache
  - Updating zendframework/zend-config (2.6.0 => 3.3.0): Loading from cache
  - Updating zendframework/zend-modulemanager (2.7.2 => 2.8.4): Loading from cache
  - Updating zendframework/zend-mvc (3.0.4 => 3.1.1): Loading from cache
  - Updating zendframework/zend-console (2.7.0 => 2.8.0): Loading from cache
  - Updating zendframework/zend-test (3.2.1 => 3.3.0): Loading from cache
  - Updating zendframework/zend-hydrator (2.4.2 => 3.0.2): Loading from cache
  - Updating zendframework/zend-session (2.8.7 => 2.9.1): Loading from cache
  - Updating zendframework/zend-filter (2.7.2 => 2.9.2): Loading from cache
  - Updating zendframework/zend-inputfilter (2.7.6 => 2.10.1): Loading from cache
  - Updating zendframework/zend-form (2.10.2 => 2.14.3): Loading from cache
  - Updating zendframework/zend-mvc-plugin-fileprg (1.0.0 => 1.1.0): Loading from cache
  - Updating zendframework/zend-mvc-plugin-flashmessenger (1.0.0 => 1.2.0): Loading from cache
  - Updating zendframework/zend-mvc-plugin-prg (1.1.0 => 1.2.0): Loading from cache
  - Updating zendframework/zend-authentication (2.6.0 => 2.7.0): Loading from cache
Writing lock file
Generating autoload files

What about running composer thanks now?
This will spread some 💖  by sending a ★  to 12 GitHub repositories of your fellow package maintainers.
  • Run Laminas Migrate
laminas-migration migrate

Migrating project at path "/Users/samsonasik/www/zf-to-laminas" to Laminas
==========================================================================

Removing composer.lock
Removing configured vendor directory
Injecting laminas-dependency-plugin into composer.json
Performing migration replacements
Injecting Laminas\ZendFrameworkBridge module into /Users/samsonasik/www/zf-to-laminas/config/modules.config.php

                                                                                                                        
 [OK] Migration complete!                                                                                               
                                                                                                                        

 Next steps:
 - Perform a diff to verify the changes made.
 - Run "composer install".
 - Run any tests (unit tests, integration tests, end-to-end tests, etc.).
  • Register repo testing
composer config repositories.laminas composer https://laminas.mwop.net/repo/testing
  • Run composer install
composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-developer-tools/laminas-laminas-developer-tools-1.2.3-d2449c.tar
    2/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-plugin-identity/laminas-laminas-mvc-plugin-identity-1.1.1-b73736.tar
    3/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-plugin-fileprg/laminas-laminas-mvc-plugin-fileprg-1.1.0-8d3b6e.tar
    4/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-servicemanager-di/laminas-laminas-servicemanager-di-1.2.1-1ce286.tar
    5/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-dom/laminas-laminas-dom-2.7.2-c23b0c.tar
    6/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-debug/laminas-laminas-debug-2.6.0-662ebd.tar
    7/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-authentication/laminas-laminas-authentication-2.7.0-95705d.tar
    8/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-plugin-prg/laminas-laminas-mvc-plugin-prg-1.2.0-c39649.tar
    9/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-test/laminas-laminas-test-3.3.0-41d166.tar
    10/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-plugin-flashmessenger/laminas-laminas-mvc-plugin-flashmessenger-1.2.0-2ec626.tar
    11/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-i18n/laminas-laminas-mvc-i18n-1.1.1-eb05c2.tar
    12/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-modulemanager/laminas-laminas-modulemanager-2.8.4-17a33c.tar
    13/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-di/laminas-laminas-di-2.6.1-75334a.tar
    14/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc-console/laminas-laminas-mvc-console-1.2.0-646546.tar
    15/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-session/laminas-laminas-session-2.9.1-146d08.tar
    16/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-router/laminas-laminas-router-3.3.0-9ff5df.tar
    17/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-mvc/laminas-laminas-mvc-3.1.1-1928dc.tar
    18/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-config/laminas-laminas-config-3.3.0-f190e6.tar
    19/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-json/laminas-laminas-json-3.1.2-a02ff0.tar
    20/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-text/laminas-laminas-text-2.7.1-76f5fb.tar
    21/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-log/laminas-laminas-log-2.11.0-40041e.tar
    22/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-console/laminas-laminas-console-2.8.0-4005a2.tar
    23/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-inputfilter/laminas-laminas-inputfilter-2.10.1-28dd8c.tar
    24/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-hydrator/laminas-laminas-hydrator-3.0.2-d0101e.tar
    25/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-code/laminas-laminas-code-3.4.0-bfe994.tar
    26/47:	https://github-api-proxy.cnpkg.org/repos/laminas/laminas-dependency-plugin/zipball/aec93f9292cdfed4d70cc8b98ea47c92e8c297fb
    27/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-eventmanager/laminas-laminas-eventmanager-3.2.1-c98caa.tar
    28/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-filter/laminas-laminas-filter-2.9.2-a3446c.tar
    29/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-development-mode/laminas-laminas-development-mode-3.2.0-72b5b2.tar
    30/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-psr7bridge/laminas-laminas-psr7bridge-0.2.2-5d774f.tar
    31/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-component-installer/laminas-laminas-component-installer-1.1.1-a5d8b9.tar
    32/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-servicemanager/laminas-laminas-servicemanager-3.4.0-16327c.tar
    33/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-form/laminas-laminas-form-2.14.3-5dd237.tar
    34/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-i18n/laminas-laminas-i18n-2.9.2-cb13da.tar
    35/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-cache/laminas-laminas-cache-2.9.0-38348a.tar
    36/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-view/laminas-laminas-view-2.11.3-9f2565.tar
    37/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-uri/laminas-laminas-uri-2.7.1-a5fb44.tar
    38/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-diactoros/laminas-laminas-diactoros-1.8.7-b2d23c.tar
    39/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-db/laminas-laminas-db-2.10.0-d3b64f.tar
    40/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-escaper/laminas-laminas-escaper-2.6.1-3bbf2f.tar
    41/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-loader/laminas-laminas-loader-2.6.1-fc5f5e.tar
    42/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-stdlib/laminas-laminas-stdlib-3.2.1-d3b5ce.tar
    43/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-http/laminas-laminas-http-2.10.0-9bef53.tar
    44/47:	https://github-api-proxy.cnpkg.org/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f
    45/47:	https://laminas.mwop.net/repo/testing/dist/laminas/laminas-validator/laminas-laminas-validator-2.12.2-f32bd5.tar
    46/47:	https://github-api-proxy.cnpkg.org/repos/laminas/laminas-zendframework-bridge/zipball/6524baeca2a44a7e1423254775f5c41873d9c358
    47/47:	https://github-api-proxy.cnpkg.org/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8
    Finished: success: 47, skipped: 0, failure: 0, total: 47
Package operations: 81 installs, 0 updates, 0 removals
  - Installing laminas/laminas-dependency-plugin (0.1.3): Loading from cache
  - Installing laminas/laminas-zendframework-bridge (0.3.7): Loading from cache
  - Installing laminas/laminas-component-installer (1.1.1): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing laminas/laminas-stdlib (3.2.1): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing container-interop/container-interop (1.2.0): Loading from cache
  - Installing laminas/laminas-validator (2.12.2): Loading from cache
  - Installing laminas/laminas-escaper (2.6.1): Loading from cache
  - Installing laminas/laminas-uri (2.7.1): Loading from cache
  - Installing laminas/laminas-loader (2.6.1): Loading from cache
  - Installing laminas/laminas-http (2.10.0): Loading from cache
  - Installing laminas/laminas-diactoros (1.8.7): Loading from cache
  - Installing laminas/laminas-psr7bridge (0.2.2): Loading from cache
  - Installing laminas/laminas-development-mode (3.2.0): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing psr/cache (1.0.1): Loading from cache
  - Installing laminas/laminas-servicemanager (3.4.0): Loading from cache
  - Installing laminas/laminas-eventmanager (3.2.1): Loading from cache
  - Installing laminas/laminas-cache (2.9.0): Loading from cache
  - Installing laminas/laminas-db (2.10.0): Loading from cache
  - Installing laminas/laminas-i18n (2.9.2): Loading from cache

  Please select which config file you wish to inject 'Laminas\I18n' into:
  [0] Do not inject
  [1] config/modules.config.php
  [2] config/development.config.php.dist
  Make your selection (default is 0):1

  Remember this option for other packages of the same type? (y/N)y
Installing Laminas\I18n from package laminas/laminas-i18n
  - Installing laminas/laminas-filter (2.9.2): Loading from cache
Installing Laminas\Filter from package laminas/laminas-filter
  - Installing laminas/laminas-inputfilter (2.10.1): Loading from cache
Installing Laminas\InputFilter from package laminas/laminas-inputfilter
  - Installing laminas/laminas-hydrator (3.0.2): Loading from cache
Installing Laminas\Hydrator from package laminas/laminas-hydrator
  - Installing laminas/laminas-form (2.14.3): Loading from cache
  - Installing laminas/laminas-code (3.4.0): Loading from cache
  - Installing laminas/laminas-mvc-form (1.0.0)
  - Installing laminas/laminas-json (3.1.2): Loading from cache
  - Installing psr/log (1.1.2): Loading from cache
  - Installing laminas/laminas-log (2.11.0): Loading from cache
  - Installing laminas/laminas-view (2.11.3): Loading from cache
  - Installing laminas/laminas-text (2.7.1): Loading from cache
  - Installing laminas/laminas-router (3.3.0): Loading from cache
  - Installing laminas/laminas-config (3.3.0): Loading from cache
  - Installing laminas/laminas-modulemanager (2.8.4): Loading from cache
  - Installing laminas/laminas-mvc (3.1.1): Loading from cache
  - Installing laminas/laminas-console (2.8.0): Loading from cache
  - Installing laminas/laminas-mvc-console (1.2.0): Loading from cache
  - Installing laminas/laminas-mvc-i18n (1.1.1): Loading from cache
  - Installing laminas/laminas-session (2.9.1): Loading from cache
  - Installing laminas/laminas-mvc-plugin-prg (1.2.0): Loading from cache
  - Installing laminas/laminas-authentication (2.7.0): Loading from cache
  - Installing laminas/laminas-mvc-plugin-identity (1.1.1): Loading from cache
  - Installing laminas/laminas-mvc-plugin-flashmessenger (1.2.0): Loading from cache
  - Installing laminas/laminas-mvc-plugin-fileprg (1.1.0): Loading from cache
  - Installing laminas/laminas-mvc-plugins (1.0.1)
  - Installing laminas/laminas-di (2.6.1): Loading from cache
  - Installing laminas/laminas-servicemanager-di (1.2.1): Loading from cache
  - Installing laminas/laminas-debug (2.6.0): Loading from cache
  - Installing laminas/laminas-developer-tools (1.2.3): Loading from cache
  - Installing sebastian/global-state (2.0.0): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/recursion-context (3.0.0): Loading from cache
  - Installing sebastian/exporter (3.1.2): Loading from cache
  - Installing sebastian/diff (3.0.2): Loading from cache
  - Installing sebastian/comparator (3.0.2): Loading from cache
  - Installing phpunit/php-token-stream (3.1.1): Loading from cache
  - Installing theseer/tokenizer (1.1.3): Loading from cache
  - Installing sebastian/environment (4.2.2): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.12.0): Loading from cache
  - Installing webmozart/assert (1.5.0): Loading from cache
  - Installing phpdocumentor/reflection-common (2.0.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.0.1): Loading from cache
  - Installing phpdocumentor/reflection-docblock (4.3.2): Loading from cache
  - Installing doctrine/instantiator (1.3.0): Loading from cache
  - Installing phpspec/prophecy (1.9.0): Loading from cache
  - Installing sebastian/resource-operations (2.0.1): Loading from cache
  - Installing sebastian/object-reflector (1.1.1): Loading from cache
  - Installing phpunit/php-timer (2.1.2): Loading from cache
  - Installing phar-io/version (2.0.1): Loading from cache
  - Installing phar-io/manifest (1.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.9.3): Loading from cache
  - Installing sebastian/object-enumerator (3.0.3): Loading from cache
  - Installing phpunit/php-code-coverage (6.1.4): Loading from cache
  - Installing phpunit/phpunit (7.5.17): Loading from cache
  - Installing laminas/laminas-dom (2.7.2): Loading from cache
  - Installing laminas/laminas-test (3.3.0): Loading from cache
laminas/laminas-validator suggests installing laminas/laminas-i18n-resources (Translations of validator messages)
laminas/laminas-validator suggests installing laminas/laminas-math (Laminas\Math component, required by the Csrf validator)
laminas/laminas-http suggests installing paragonie/certainty (For automated management of cacert.pem)
laminas/laminas-servicemanager suggests installing ocramius/proxy-manager (ProxyManager 1.* to handle lazy initialization of services)
laminas/laminas-cache suggests installing ext-apc (APC or compatible extension, to use the APC storage adapter)
laminas/laminas-cache suggests installing ext-dba (DBA, to use the DBA storage adapter)
laminas/laminas-cache suggests installing ext-memcache (Memcache >= 2.0.0 to use the Memcache storage adapter)
laminas/laminas-cache suggests installing ext-memcached (Memcached >= 1.0.0 to use the Memcached storage adapter)
laminas/laminas-cache suggests installing ext-mongo (Mongo, to use MongoDb storage adapter)
laminas/laminas-cache suggests installing ext-wincache (WinCache, to use the WinCache storage adapter)
laminas/laminas-cache suggests installing ext-xcache (XCache, to use the XCache storage adapter)
laminas/laminas-cache suggests installing laminas/laminas-serializer (Laminas\Serializer component)
laminas/laminas-cache suggests installing mongodb/mongodb (Required for use with the ext-mongodb adapter)
laminas/laminas-cache suggests installing mongofill/mongofill (Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement)
laminas/laminas-i18n suggests installing laminas/laminas-i18n-resources (Translation resources)
laminas/laminas-filter suggests installing laminas/laminas-crypt (Laminas\Crypt component, for encryption filters)
laminas/laminas-filter suggests installing psr/http-factory-implementation (psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters)
laminas/laminas-hydrator suggests installing laminas/laminas-serializer (^2.9, to use the SerializableStrategy)
laminas/laminas-form suggests installing laminas/laminas-captcha (^2.7.1, required for using CAPTCHA form elements)
laminas/laminas-form suggests installing laminas/laminas-recaptcha (in order to use the ReCaptcha form element)
laminas/laminas-code suggests installing doctrine/annotations (Doctrine\Common\Annotations >=1.0 for annotation features)
laminas/laminas-json suggests installing laminas/laminas-json-server (For implementing JSON-RPC servers)
laminas/laminas-json suggests installing laminas/laminas-xml2json (For converting XML documents to JSON)
laminas/laminas-log suggests installing ext-mongo (mongo extension to use Mongo writer)
laminas/laminas-log suggests installing laminas/laminas-mail (Laminas\Mail component to use the email log writer)
laminas/laminas-view suggests installing laminas/laminas-feed (Laminas\Feed component)
laminas/laminas-view suggests installing laminas/laminas-navigation (Laminas\Navigation component)
laminas/laminas-view suggests installing laminas/laminas-paginator (Laminas\Paginator component)
laminas/laminas-view suggests installing laminas/laminas-permissions-acl (Laminas\Permissions\Acl component)
laminas/laminas-mvc suggests installing http-interop/http-middleware (^0.4.1 to be used together with laminas-stratigility)
laminas/laminas-mvc suggests installing laminas/laminas-paginator (^2.7 To provide pagination functionality via PaginatorPluginManager)
laminas/laminas-mvc suggests installing laminas/laminas-stratigility (laminas-stratigility is required to use middleware pipes in the MiddlewareListener)
laminas/laminas-session suggests installing mongodb/mongodb (If you want to use the MongoDB session save handler)
laminas/laminas-authentication suggests installing laminas/laminas-crypt (Laminas\Crypt component)
laminas/laminas-authentication suggests installing laminas/laminas-ldap (Laminas\Ldap component)
laminas/laminas-developer-tools suggests installing aist/aist-git-tools (Show you informations about current GIT repository)
laminas/laminas-developer-tools suggests installing bjyoungblood/bjy-profiler (Version: dev-master, allows the usage of the (Laminas) Db collector.)
laminas/laminas-developer-tools suggests installing doctrine/doctrine-orm-module (Profile DoctrineORM queries)
laminas/laminas-developer-tools suggests installing jhuet/zdt-logger-module (Show you log data from Laminas\Log)
laminas/laminas-developer-tools suggests installing ocramius/ocra-service-manager (OcraServiceManager can help you track dependencies within your application.)
laminas/laminas-developer-tools suggests installing san/san-session-toolbar (SanSessionToolbar can help you see current Laminas\Session data you're using within your application.)
laminas/laminas-developer-tools suggests installing snapshotpl/apigility-snap-event-debugger (LaminasSnapEventDebugger can help you debug events from Laminas\EventManager)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0)
Writing lock file
Generating autoload files

When I check the laminas-developer-tools, the view still shows zend-developer-tools:

Screen Shot 2019-11-13 at 1 03 48 PM

Now, I copied the laminas-developer-tools/config/zenddevelopertools.local.php.dist to config/autoloa/zenddevelopertools.local.php and when I run php -S localhost:8080 -t public, I got error:

php -S localhost:8080 -t public 
PHP 7.3.8 Development Server started at Wed Nov 13 12:52:18 2019
Listening on http://localhost:8080
Document root is /Users/samsonasik/www/zf-to-laminas/public
Press Ctrl-C to quit.

[Wed Nov 13 12:55:06 2019] PHP Fatal error:  Uncaught Laminas\View\Exception\RuntimeException: Laminas\View\Renderer\PhpRenderer::render: Unable to render template "laminas-developer-tools/toolbar/laminas"; resolver could not resolve to a file in /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php:496
Stack trace:
#0 /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-developer-tools/src/Listener/ToolbarListener.php(161): Laminas\View\Renderer\PhpRenderer->render(NULL)
#1 /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-developer-tools/src/Listener/ToolbarListener.php(113): LaminasDeveloperTools\Listener\ToolbarListener->renderEntries(Object(LaminasDeveloperTools\ProfilerEvent))
#2 /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-developer-tools/src/Listener/ToolbarListener.php(102): LaminasDeveloperTools\Listener\ToolbarListener->injectToolbar(Object(LaminasDeveloperTools\ProfilerEvent))
#3 /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-eventmanager/src/EventManager.php(320 in /Users/samsonasik/www/zf-to-laminas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php on line 496
[Wed Nov 13 12:55:06 2019]

Screen Shot 2019-11-13 at 1 01 15 PM

@shughi94

This comment has been minimized.

Copy link

shughi94 commented Nov 13, 2019

@weierophinney Hi, I solved the problem of the exception and now all the tests works.

Our pipeline was handling the exception with the Laminas\Stratigility\Middleware\ErrorHandler middleware.
I switched to Expressive\ProblemDetails\ProblemDetailsMiddleware, and now all the exception are handled correctly: it returns a json instead of the stack trace, and response http codes are correct instead of being 500.

Ran the tests, got the green light on everything. Tested the application manually and everything seems to be working correctly.

I've updated the migration markdown to show all the steps including this final fix.

Have a good day!

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 13, 2019

@shughi94

Our pipeline was handling the exception with the Laminas\Stratigility\Middleware\ErrorHandler middleware.
I switched to Expressive\ProblemDetails\ProblemDetailsMiddleware, and now all the exception are handled correctly: it returns a json instead of the stack trace, and response http codes are correct instead of being 500.

Thanks for testing again! The Stratigility ErrorHandler should work, but for APIs, you'll definitely want the ProblemDetailsMiddleware. Was the ErrorHandler working prior to the migration? If so, what was it displaying then, versus after?

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 13, 2019

@samsonasik

When I check the laminas-developer-tools, the view still shows zend-developer-tools:

I followed the exact steps you took, and what I found was that the vendor/laminas/laminas-developer-tools/ tree had:

  • A config file named config/laminas-developer-tools.local.php.dist
  • A view directory view/laminas-developer-tools/
  • A view script view/laminas-developer-tools/toolbar/laminas.phtml

I had no errors when I fired up the web server and browsed to the index page.

I then took the additional step of copying the config file into my local config/autoload/ tree (removing the .dist suffix), and browsing again. Not only were there no errors, but the toolbar displayed perfectly.

There's something going wildly wrong on your systems, and I think it's either Composer related, or that the CloudFront region from which you're accessing the testing repository is not invalidating its cache with the rest of the world. Alternately, you have a caching proxy sitting between you and that repository. Either way, I think this issue is resolved, and will go away entirely once we push the repos to GitHub and Packagist is serving them.

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 14, 2019

@weierophinney Thank you. It is working now, the icons somehow do not show up for config and db toolbars:

Untitled

It seems in the base64 img src, there is updated string that make it not works.

I will continue add SanSessionToolbar and test it.

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 14, 2019

I tried install SanSessionToolbar, and got the following error:

Uncaught Error: Class 'ZendDeveloperTools\Collector\AbstractCollector'

It seems the ZendDeveloperTools namespace doesn't applied in the laminas-zendframework-bridge autoload. So, I added the class alias for it:

class_alias('LaminasDeveloperTools\Collector\AbstractCollector', 'ZendDeveloperTools\Collector\AbstractCollector');

temporary in public/index.php, then, the error gone, but the session icon toolbar doesn't show up, so, I checked the config, there are some to update:

  • css class need to be updated from "zdt-" to "laminas-"
  • configuration need to be updated from "zenddevelopertools" to "laminas-developer-tools"
  • directory view needs to be updated to laminas-developer-tools

after that, I got the session toolbar shown up:

Untitled

@shughi94

This comment has been minimized.

Copy link

shughi94 commented Nov 14, 2019

@weierophinney Yes, the ErrorHandler was working before:

  • example of a response before the migration:
{
    "title": "Resource non found",
    "type": "https://httpstatus.es/404",
    "status": 404,
    "detail": "Folder not found"
}
  • while after the migration, every exception catched was returned as a stack trace:
An unexpected error occurred; stack trace:

App\Service\ProblemDetailsException raised in file
/var/www/html/src/Authentication/src/Api/V1/Action/AuthenticationCreateAction.php line 263:
Message:
Stack Trace:
#0 /var/www/html/vendor/laminas/laminas-stratigility/src/Middleware/RequestHandlerMiddleware.php(53):
Authentication\Api\V1\Action\AuthenticationCreateAction->handle(Object(Laminas\Diactoros\ServerRequest))
#1 /var/www/html/vendor/expressive/expressive/src/Middleware/LazyLoadingMiddleware.php(46):
Laminas\Stratigility\Middleware\RequestHandlerMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#2 /var/www/html/vendor/laminas/laminas-stratigility/src/Next.php(60):
Expressive\Middleware\LazyLoadingMiddleware->process(Object(Laminas\Diactoros\ServerRequest),
Object(Laminas\Stratigility\Next))
#3 .............

A thing I noticed was about how http codes were handled by catching a ProblemDetailsException or just an Exception

These were the only problems I encountered in the migration :).

@michalbundyra

This comment has been minimized.

Copy link

michalbundyra commented Nov 14, 2019

@samsonasik would you be able to give another try?
We have missed rewriting namespace in bridge library. We decided to go with ZendDeveloperTools -> Laminas\DeveloperTools and it is updated. New version of laminas-developer-tools has been pushed, so please clear composer cache before trying again.

I am going to try ZendSkeletonApplication, argh... LaminasSkeletonApplication with the toolbar, check where we have ZF logos to replace them on the migration as well :)

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 15, 2019

@michalbundyra I retried with re-run composer clear-cache. First, I now get error:

Module (LaminasDeveloperTools) could not be initialized

It seems the module.config.php injection/replace add both "LaminasDeveloperTools" and "Laminas\DeveloperTools". I removed the "LaminasDeveloperTools" from the list, then copy :

cp vendor/laminas/laminas-developer-tools/config/laminas-developer-tools.local.php.dist config/autoload/laminas-developer-tools.local.php

The developer tools show up:

ldt

@samsonasik

This comment has been minimized.

Copy link

samsonasik commented Nov 15, 2019

@michalbundyra the Laminas\DeveloperTools and ZendDeveloperTools namespaces seems now resolved. Thank you.

I created a legacy branch for SanSessionToolbar which can be installed with:

composer require --dev san/san-session-toolbar:dev-legacy

and add SanSessionToolbar after Laminas\DeveloperTools and it shows the session toolbar:

san-session-toolbar

@weierophinney

This comment has been minimized.

Copy link
Owner Author

weierophinney commented Nov 15, 2019

@shughi94

I've tried to reproduce your issue, but so far have not been able to. To reproduce, I did the following:

  • Created a new Expressive application via composer create-project.
  • Added the zendframework/zend-problem-details package.
  • Created a custom exception type that implements ProblemDetailsExceptionInterface and uses the CommonProblemDetailsExceptionTrait to provide the bulk of implementation.
  • Modified the shipped PingHandler to throw this exception.

I then served the application and accessed the /api/ping URL.

Both before and after migration, this returns an HTML page containing the exception stack trace. This is as expected; the shipped ErrorHandler middleware has no facilities for returning errors in any other format currently.

When I modified the route for the /api/ping URL to be a middleware pipeline that includes the ProblemDetailsMiddleware, I received the hoped for JSON output - as I expected. And this was true both before and after migration.

As such, I think perhaps you had a custom ErrorHandler middleware before...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.