zf1s / zf1

Monorepo of a fork of Zend Framework 1, with all components split into individual composer packages. PHP 5.3-8.3 compatible.
BSD 3-Clause "New" or "Revised" License
59 stars 22 forks source link

[zend-view] update zend-view deps according to usage #178

Closed smhg closed 9 months ago

smhg commented 9 months ago

I've listed everything used in view helpers under suggest.

That means a lot of additions, but also that Zend_Controller and Zend_Locale are no longer required dependencies. I can't imagine both are not installed explicitly when needed, but feel free to disagree of course.

closes #176

falkenhawk commented 9 months ago

@smhg maybe zend-controller was listed in required dependencies, because it's tightly coupled with Zend_View_Helper_Action which tends to be used a lot? 🤔 But on the other hand, to make it in line with other view helpers, all dependencies used by them should be optional 🤔 And that is what you did. The action helper doesn't deserve a special treatment, does it?

smhg commented 9 months ago

@falkenhawk

FWIW: in my project Zend_View is used for email template rendering, independent of Zend_Controller. It is probably not common usage.

But I do think coupling should be on the loose side. Because in the end, projects should likely be refactoring away from ZF1 and thus it is useful to require only the absolute minimum rather than the safe maximum.

And, when using zf1s as a zf1 replacement, what you are looking for includes 'less coupling' probably?

Also, specifically in the Zend_Controller case, I think it must be quite uncommon to only specify Zend_View in your project and count on it including Zend_Controller, no?

Feel free to disagree of course.