Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZF3 support #443

Open
Sohorev opened this issue Dec 2, 2016 · 22 comments
Open

ZF3 support #443

Sohorev opened this issue Dec 2, 2016 · 22 comments

Comments

@Sohorev
Copy link

Sohorev commented Dec 2, 2016

When i try to to use error occured:

Fatal error: Class DI\ZendFramework2\Service\PHPDIAbstractFactory contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Zend\ServiceManager\Factory\AbstractFactoryInterface::canCreate, Zend\ServiceManager\Factory\FactoryInterface::__invoke) in /home/sohorev/workspace/multivpn-php/vendor/php-di/zf2-bridge/src/DI/ZendFramework2/Service/PHPDIAbstractFactory.php on line 23

@mnapoli
Copy link
Member

mnapoli commented Dec 2, 2016

Hi there, to my knowledge the ZF2 bridge hasn't been upgraded to work with Zend Framework 3 yet.

@Sohorev
Copy link
Author

Sohorev commented Dec 2, 2016

ok, i am create issue: PHP-DI/ZF2-Bridge#15

@Rastusik
Copy link
Contributor

Well, I have the code, but I would like to push it to a new repository

@mnapoli could you please create a new repository for the ZF3 bridge? Something like https://github.com/PHP-DI/ZF3-Bridge

Thank you

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

@Rastusik is it extremely tied to v3 of Zend Framework? I'm wondering if it's not better to have a ZF-Bridge instead that would support the current major version of Zend Framework?

Just like https://github.com/PHP-DI/Symfony2-Bridge became simply https://github.com/PHP-DI/Symfony-Bridge

@Rastusik
Copy link
Contributor

@mnapoli well, the canges in ZF3 are quite big, I would have to write multiple conditions according to ZF versions and now I'm speaking only about ZF3 and ZF2... ZF1 is completely different. Or I can havo only one condition in the module config file, bud I still think that having multiple repositories would be a better idea.

@Rastusik
Copy link
Contributor

oh you mean like having one repository with multiple version tags ? ... the ZF3 version is based on ZF2 version so that would be possible... but it would be impossible with ZF1 version anyway

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Right, I think we can leave ZF1 where it is indeed. But then we could have one repository for v2, 3 and later, and compatibility would be done through versionning (e.g. v1.x is for ZF2, v2.x is for ZF3, etc.).

Additionally given that for Zend Framework they want to avoid big version numbers in the future and rather have each component have independent major versions, I think it makes more sense. So master would support the latest stable version, and if one person wants to use PHP-DI with an older version of the framework they can checkout an old tag.

@Rastusik
Copy link
Contributor

ok, so I can create tags for versions 2 and 3, I would like to pair them with current zend framework versions - is that OK with you?

do you want to change the repository name to not include the framework version?

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

OK the problem is the version number (2) is everywhere (Packagist/Composer, namespace, repository name, etc.)

I would suggest a simpler solution: create a new ZF-Bridge repository (I can copy ZF2-Bridge to keep all the commit history) where the version name is removed, and in there you can support Zend Framework 3 and above. That way you it's much simpler, and you can focus on making a v1.0 without having to deal with backward compatibility.

Is that good for you?

@Rastusik
Copy link
Contributor

Rastusik commented Mar 26, 2017

So the ZF-Bridge repository would be a new one and I wouldn't have to tag the actual zf2 version in it? I am asking just to be clear that I understand what you mean. This would mean that the ZF2 repo should stay 'as is' without changes ... Or do you want to get rid of the zf2 repo and you want me to tag the zf2 version in the new ZF-Bridge repo?

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Yes, ZF2 would stay as it is and target ZF2 (not be deleted). ZF-Bridge would target ZF3 and later.

@Rastusik
Copy link
Contributor

ok then, agreed - so could you please create the new repository? it would be great if you also registered it with packagist and maybe created a travis job for it as well. thank you very much!

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

👍 I'm on it

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

OK the repository is created and I've imported the history from ZF2-Bridge. I've ended up naming it Zend-Framework-Bridge to match Zend-Expressive-Bridge, I think it's better to be explicit especially given that there are now 2 frameworks with the "Zend" name ^^

You should have push access, I'm setting up Travis and Packagist but feel free to do whatever you want in there from now on.

@Rastusik
Copy link
Contributor

great, thank you! I'm uploading the new code ... what will be the new packagist package name?

@Rastusik
Copy link
Contributor

oh I see, you changed the code, ok

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Yep, I've also opened PHP-DI/Zend-Framework-Bridge#1 if you want to drop support for PHP 5.

@Rastusik
Copy link
Contributor

I merged that, but it seems that I pushed old tags from the old repository ... so I drafted a new release to be 3.0.0 . Is that ok with you? It looks like dhere is no packagist package and travis job

@mnapoli
Copy link
Member

mnapoli commented Mar 26, 2017

Travis is configured (https://travis-ci.org/PHP-DI/Zend-Framework-Bridge), not Packagist yet.

OK for the tags, however I just see that you have re-added the version number everywhere: PHP-DI/Zend-Framework-Bridge@2014192

Since this package is not about Zend Framework 3 specifically everything should be just "Zend Framework" and not "Zend Framework 3" (or ZF3).

@Rastusik
Copy link
Contributor

I know, I did this yesterday, before we agreed on the new package ... I already had to change everything to ZendFramework after merging your changes, no worries ;)

@Rastusik
Copy link
Contributor

@mnapoli is it clear about what I've done? The namespace is still ZendFramework. What about Packagist?

I'm not sure whether you are waiting for me to do something, or just you are too busy.

@mnapoli
Copy link
Member

mnapoli commented Mar 29, 2017

Hi, yes that sounds good about the namespace. I'm still unsure about the releases because Packagist might publish versions with another name (because in older tags the name in composer.json is different).

Also the namespace is DI\ZendFramework but in other bridges it's DI\Bridge\..., see for example https://github.com/PHP-DI/Symfony-Bridge/blob/master/composer.json#L9

I need to review the code, I think tagging the 3.0 version was maybe hasty because nobody has had time to test it or review it (beta versions are useful for that).

I'll be unavailable the next days but I'll get back to it ASAP

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

No branches or pull requests

3 participants