basz / SlmLocale

Auto detection of locale through different strategies for Zend Framework 2
Other
68 stars 34 forks source link

ZF3 compatibility #74

Closed Rockstar04 closed 6 years ago

Rockstar04 commented 8 years ago

The ZF3 Service manager and Event manager are finally out.

The ServiceLocatorAwareInterface has been removed and it is currenlty used in SlmLocale/Strategy/UriPathStrategy.php

Service Manager 3.0.0 Release Notes

sebfek commented 8 years ago

+1

tdutrion commented 8 years ago

I am currently looking into it, there will also be a problem soon with the event aggregate: EventManagerInterface::attachAggregate() and detachAggregate() removed for file Locale\Detector

juriansluiman commented 8 years ago

+1 Yeah we need to look into these things for zf3 compatibility.

Rockstar04 commented 8 years ago

Just an update for this issue, ZF3 has officially been released: https://framework.zend.com/blog/2016-06-28-zend-framework-3.html

flod1 commented 8 years ago

+1

CreativeNative commented 7 years ago

@tdutrion Do you found a solution for the event aggregate problem? @juriansluiman Are you planning to update your project for zf3? Would be really cool.

tdutrion commented 7 years ago

I haven't be working on it for a while, but getting back on it at the moment (though I'll be at ForumPHP for two days and then organising ScotlandPHP on Saturday, so don't expect results soon :) )

neo-rainboy commented 7 years ago

@tdutrion @juriansluiman Can you guys provide me with a clue how to handle aggregate problem, that would be much appreciated ;) EDIT: Actually I managed to handle the aggregate part by following migration guide in Detector.php as ` public function addStrategy(StrategyInterface $strategy, $priority = 1) {
-- $this->getEventManager()->attachAggregate($strategy, $priority);

++ $strategy->attach($this->getEventManager()); }` but another problem is with detect function's trigger calls!!! I hope you can give me a little bit information if I am on the right tracks or not ;-) Cheers :)

CreativeNative commented 7 years ago

@tdutrion @juriansluiman no progress here? :-(

svycka commented 7 years ago

I have added ServiceManager and EventManager 3.0 support can you test it https://github.com/juriansluiman/SlmLocale/pull/77

basz commented 7 years ago

closing as this now is available in master.

ps. maintenance of this package has been taken over by me. If you still feel this issue is valid please go ahead and create a PR or contribute in an other manner.

svycka commented 7 years ago

@basz that's not really correct, we still don't support zend-mvc 3.0. Well I didn't added this because this would be BC break but if we will release 2.0 we can do it.

the fix should be simple I guess only namespace of zend-router changed eveything else should work but not tested yet

basz commented 7 years ago

ok, thanks for pointing this out, reopening

basz commented 7 years ago

Since we are stil below an 1.0.0 release I'm not to concerned about breaking changes between releases. These installs are not automatically updated by composer.

I'll tag 0.2.0 soon.

svycka commented 7 years ago

I din't noticed that we are still in 0.1 version :D I guess we can release 0.2

But I don't like that we have this install instruction in readme

{
    "require": {
        "slm/locale": ">=0.1.0,<1.2.0-dev"
    }
}

if someone used like this then we have BC break :( but it is 0.* releases maybe not a big problem? also if we will add correct composer dependencies this version will not be installed anyway.

svycka commented 7 years ago

also I would like to have version 1.0 since I use this in production (I don't like 0.x versions :D it's like stable but not really then what it is? I think better release 2.0.0... 5.0.0... 199.0.0 if needed but would be clear that it is stable. Unless we are under heavy development, but this is not the case)

so maybe instead of 0.2 we can have 1.0? what do you think @basz

basz commented 7 years ago
"slm/locale": ">=0.1.0,<1.2.0-dev"

that strange indeed. When you see something you don't like, open an issue or create a PR.

I don't forsee much refactoring besides the zf3-mvc and dropping php55 support. But that could be 2.0.0, so I'm ok with releasing a 1.0.0-beta1 as is...

svycka commented 7 years ago

I know.. just don't have much time at the moment, but I will try :D

svycka commented 6 years ago

ZF3 added in #95