Update breaks injection?

sthomas's Avatar


05 Jun, 2013 02:32 AM


Before I start, let me just say you guys have built a fantastic framework - absolutely kick arse!

Ok, my AppConfig looks something like this:

import robotlegs.bender.extensions.eventCommandMap.api.IEventCommandMap;
import robotlegs.bender.framework.api.IConfig;

public class AppConfig extends BaseActor implements IConfig
    [Inject] public var commandMap  :IEventCommandMap;
    public function configure():void
        commandMap.map(FrameworkMappingEvent.START_MAPPING, FrameworkMappingEvent).toCommand(MappingModelsCommand);

Then - MappingModelsCommand - looks something like this:

import org.swiftsuspenders.Injector;
import robotlegs.bender.bundles.mvcs.Command;

public class MappingModelsCommand extends Command
    [Inject] public var injector    :Injector;
    override public function execute():void

The error below occurs in MappingModelsCommand - attempting to inject injector

"Injector is missing a mapping to handle injection into property "injector"  blah, blah, blah     Target dependency: "org.swiftsuspenders::Injector|"
If I revert back to the build I pulled from GitHub a couple of weeks back, all is well.

Thank you for your time!

  1. Support Staff 1 Posted by creynders on 05 Jun, 2013 07:48 AM

    creynders's Avatar

    Yeah, we introduced a major API change between v2b7 and v2b8, but it's easily solved.
    The Injector no longer maps itself as Injector, but as IInjector, so best solution is to update all Injector references to IInjector (FQN: robotlegs.bender.framework.api.IInjector) - or - if you need a quick fix you can do the old mapping yourself in an extension, see https://gist.github.com/creynders/5712266

    Just install this after the MVCSBundle, but before any of your own configs etc. and everything will work as before

  2. 2 Posted by sthomas on 05 Jun, 2013 08:01 AM

    sthomas's Avatar

    Perfect, that solved it - updating references to IInjector

    Thank you for awesome support!

  3. sthomas closed this discussion on 05 Jun, 2013 08:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac