Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Drop zend loader, module loader and autoloader provider features. #78

Open
wants to merge 2 commits into
base: dev-v3
Choose a base branch
from

Conversation

Xerkus
Copy link
Member

@Xerkus Xerkus commented Dec 2, 2017

Composer has became a de-facto standard for managing dependencies and autoloading, Zend Framework itself distributes and manages its dependencies via composer. That makes Composer virtually guaranteed to be present for any application.

This PR drops autoloader support in zend-modulemanager in favor of composer autoloader.

This change opens a way for more Module Manager improvements to follow.

Copy link
Member

@michalbundyra michalbundyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

### Composer installed modules

For composer installed modules, autoloading rules will be automatically picked
by composer from the module's composer.json and no extra effort is needed:.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove . at the end of the line please.

@@ -13,7 +13,7 @@
use Zend\EventManager\EventManager;
use Zend\EventManager\SharedEventManager;
use Zend\ModuleManager\Listener\LocatorRegistrationListener;
use Zend\ModuleManager\Listener\ModuleResolverListener;
use Zend\ModuleManager\Listener\DefaultListenerAggregate;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetical order please.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, this is weird. I don't remember doing that change

{
public function getAutoloaderConfig()
{
return array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use short array notation in that example

@Xerkus Xerkus force-pushed the feature/drop-zend-loader branch 2 times, most recently from 5186cea to 9873682 Compare December 3, 2017 00:53
@@ -0,0 +1,84 @@
# Upgrading to 3.0

## Module autoloading
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The migration guide is very good, but only here the autoloading is included. No code example for autoloading in the other documents. Only a note in the introduction.
I think a code example (composer.json) in the module class chapter will help a lot.

@weierophinney weierophinney added this to the 3.0.0 milestone May 14, 2018
@michalbundyra michalbundyra changed the base branch from develop to dev-v3 October 18, 2019 21:06
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-modulemanager; a new issue has been opened at laminas/laminas-modulemanager#4.

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-modulemanager. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-modulemanager to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-modulemanager.
  • In your clone of laminas/laminas-modulemanager, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants