[fw-general] Re: ZeTheme in zf2

2012-09-30 Thread Marco Pivetta
by the module itself. Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 30 September 2012 10:32, fwahlqvist [via Zend Framework Community] ml-node+s634137n4657232...@n4.nabble.com wrote: Hi, The skeleton applications theme is still being displayed instead

[fw-general] Re: Zend Tool and ZF2

2012-10-01 Thread Marco Pivetta
zfproject.xml coming any-when soon. I can ensure you that Zend Studio, being compatible with PHP 5.3 (probably also 5.4), is already fully compatible with ZF2 :P Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 1 October 2012 06:21, gaz1234 [via Zend Framework Community] ml

[fw-general] Re: ZF2 outputting files

2012-10-01 Thread Marco Pivetta
function indexAction() { $response = new \Zend\Http\Response\Stream(); $response-setThis(); $response-setThat(); $response-setMore(); $response-setStream(fopen('path/to/file.txt', 'r')); return $response; } Marco Pivetta http://twitter.com

[fw-general] Re: zf2 Modules - Application is comparable to the old default ?

2012-10-01 Thread Marco Pivetta
, but the configs it provides should be defined in your modules if you don't use it. Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 30 September 2012 21:30, whisher [via Zend Framework Community] ml-node+s634137n4657237...@n4.nabble.com wrote: Hi all, I'm just

[fw-general] Re: Mocking in zf2 is not such easy

2012-10-11 Thread Marco Pivetta
used in OcraDiCompiler or AssetManager for that, but controllers really don't make any difference if compared to all the rest. Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 11 October 2012 14:31, pablofmorales [via Zend Framework Community] ml-node+s634137n4657494...@n4

[fw-general] Re: Running PHP classes in controller

2012-10-13 Thread Marco Pivetta
You are simply not using the correct namespace: new \ZipArchive(); or use ZipArchive; // at the top of your file, after namespace declaration new Ziparchive(); Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 13 October 2012 13:44, Paladyn [via Zend Framework

Re: [fw-general] PHP Fatal error: Cannot redeclare class PHPUnit_Framework_TestCase

2012-10-19 Thread Marco Pivetta
You should probably run /vendor/bin/phpunit instead of your system PHPUnit... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 October 2012 04:45, gaz1234 garyw3...@gmail.com wrote: I have received the below error after following the instructions for unit

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Marco Pivetta
Hey there, for such an use case, I wouldn't use is_readable, as it will cause a stat call in production environment. You can handle this via an environment variable or by always having application.config.local.php and not committing it to your source control system. Marco Pivetta http

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Marco Pivetta
Yes, the `.local` file would contain `?php return array();` Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 10:57, Matus Zeman matus.ze...@gmail.com wrote: TBH I think more fail-safe solution is without is_array check - considering the contract

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
Heya, I have 5.3.14 on the windows box and it works just fine. I don't trust the box anyway, but I just copied the files from http://downloads.php.net/pierre/ Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 16:04, Ralf Eggert r.egg...@travello.de

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
Oh, snap, wait... I have PHP 5.3.14 TS (`php --info | grep Thread` tells you that). Looks like there's no compiled intl on that list. Try downloading the zip from http://windows.php.net/download/ . Each zip file has a `php_int.dll` file in the `ext/` dir. Marco Pivetta http://twitter.com

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
There's another solution, but it comes from the usual why Windows debate ;) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 16:58, Ralf Eggert r.egg...@travello.de wrote: Hi Marco, well, the problem is not the missing php_intl.dll file

Re: [fw-general] Question about application.config.php

2012-10-26 Thread Marco Pivetta
You should be able to retrieve the config in `application.config.php`. If you look at `Zend\Mvc\Application::init()`, that config is set in a service called `ApplicationConfig`, so just `$sm-get('ApplicationConfig');` ;) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com

Re: [fw-general] zf1 - to be abandoned?

2012-11-04 Thread Marco Pivetta
day, you'll have to switch. ZF1 is still good and moving to ZF2 is not that terrible if you did things in a clean way. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 November 2012 19:30, Mike Wright mike.wri...@mailinator.com wrote: Hi all, As work has progressed

Re: [fw-general] zf1 - to be abandoned? We are in the same position. We just have to dump everything we have done and start over, I guess!

2012-11-04 Thread Marco Pivetta
on and rewrite everything... Or get involved and be part of the wheel that changes all this :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 4 November 2012 19:53, cheresha...@ihahockey.com cheresha...@ihahockey.com wrote: Hello Mike, Unfortunately we are in the same

Re: [fw-general] AssetManager installation from Git

2012-11-04 Thread Marco Pivetta
Heya, You can autoload whatever you want in your `init_autoload.php` file (if you are using the skeleton application). Same method applies for AssetManager, DoctrineModule and others that were thought to be used with composer first. Marco Pivetta http://twitter.com/Ocramius http

Re: [fw-general] ZF2 Documentation

2012-11-09 Thread Marco Pivetta
add the required comments (or at least those for the things you think are not clear enough). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 November 2012 06:29, Greg dev...@gmail.com wrote: I haven't tried to follow much recently. Honestly, until such time that I

Re: [fw-general] ZF2. Where the ideas about the Design Patterns, Software Architecture and inspiration is coming from?

2012-11-11 Thread Marco Pivetta
, why don't we do this?, and then somebody picking that and writing it as code. So far, I think it's been a great way of doing things :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 11 November 2012 16:47, cheresha...@ihahockey.com cheresha...@ihahockey.com wrote

Re: [fw-general] ZF2 with Doctrine 2 - Injecting dependencies in entities which are loaded by Doctrine

2012-11-11 Thread Marco Pivetta
, and then attach your own listener that injects the dependencies (Zend\Di may be useful in this case, but maybe a bit slow for you). I may also point out that having the service locator everywhere is just wrong and brings to really untestable code (mocking becomes really a problem). Marco Pivetta

Re: [fw-general] Doctrine Hydration Fails if Entity Object is a Proxy

2012-11-12 Thread Marco Pivetta
Hey Ludwig, can you move this (very good) bug report to DoctrineModule issues? It's really a tricky one :\ Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 November 2012 04:30, Ludwig Ruderstaller l...@cwd.at wrote: Hi, Simple setup. Longer Story :-) Table

Re: [fw-general] Zend\Di behavior question

2012-12-06 Thread Marco Pivetta
Looks like some injection is going on. Are you able to dump a diff of the two objects after instantiation? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 December 2012 11:26, gordon stratton gordon.strat...@gmail.com wrote: I ran into some behavior which I

Re: [fw-general] Zend\Di behavior question

2012-12-06 Thread Marco Pivetta
are used for injections. Before, it was probably injecting `null`. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 December 2012 11:51, gordon stratton gordon.strat...@gmail.com wrote: Indeed, that's what it seems like! I really didn't want to write something like

Re: [fw-general] Zend\Di behavior question

2012-12-06 Thread Marco Pivetta
ok, can you open an issue with a failing test on such a test asset? class IShallNotGetInjections { public function setWhatever($whatever = true) { throw new InvalidArgumentException('Should not be called'); } } I can then look into it. Marco Pivetta http://twitter.com

Re: [fw-general] Feedback wanted on Markdown plugin module

2012-12-10 Thread Marco Pivetta
at EdpMarkdown? https://github.com/EvanDotPro/EdpMarkdown/ Keep on developing! :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 December 2012 08:39, fwahlqvist fwahlqv...@gmail.com wrote: Hi all, I am in the process of learning ZF2 and learning by doing... I

[fw-general] Re: CMS example with ZF 2

2012-12-13 Thread Marco Pivetta
Heya, There is no fully working example of CMS built with ZF2. Consider looking at Ensemble though, they're building an open-source one. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 December 2012 08:46, bolshii [via Zend Framework Community] ml-node

Re: [fw-general] Why is there no formFieldset() view helper?

2012-12-13 Thread Marco Pivetta
Why would fieldsets in the form component represent HTML fieldsets? HTML fieldsets have no meaning at all IMO... They could be replaced by div/ if it wasn't a question of semantics. A Form does not necessarily represent an HTML form. Marco Pivetta http://twitter.com/Ocramius http

Re: [fw-general] Why is there no formFieldset() view helper?

2012-12-13 Thread Marco Pivetta
This is a Form on Paper: [image: Inline images 1] Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 December 2012 16:35, Ralf Eggert r.egg...@travello.de wrote: Marco Pivetta schrieb am 13.12.2012 16:21: Why would fieldsets in the form component represent HTML

[fw-general] Re: [ZF2] Using ServiceManager

2012-12-13 Thread Marco Pivetta
a ServiceLocator-aware class Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 December 2012 16:32, saiman [via Zend Framework Community] ml-node+s634137n4658461...@n4.nabble.com wrote: Hi all, Is it possible to create one instance of the service manager and use

Re: [fw-general] Re: [ZF2] Using ServiceManager

2012-12-13 Thread Marco Pivetta
If your instance comes from a Service Manager itself, you can handle its instantiation as you like. Basically, this means that you shouldn't create an instance yourself, but instead always fetch one from the service manager. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com

Re: [fw-general] Dependency Injection / Lazy Load

2012-12-14 Thread Marco Pivetta
objects lazy when they're marked to behave like that. I described extensively (some time ago) what seems to be your aim at http://ocramius.github.com/blog/zf2-and-symfony-service-proxies-with-doctrine-proxies/ Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 14 December

Re: [fw-general] Re: Feedback wanted on Markdown plugin module

2012-12-15 Thread Marco Pivetta
recommend to submit this to modules.zendframework.com ? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

[fw-general] Re: Download and Install Doctrine 2 without composer

2012-12-17 Thread Marco Pivetta
There's a lot of tutorials on how to install Doctrine ORM on http://www.doctrine-project.org/ If you're talking about DoctrineORMModule, composer installation is not officially supported, since it's a mess. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 December

[fw-general] Re: [BUG] Service Manager Not Shared Duplicate new Instance with multiple Abstract Factories

2012-12-17 Thread Marco Pivetta
Heya, Are you able to convert this to a PR with the failing test case attached? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 December 2012 13:46, richard [via Zend Framework Community] ml-node+s634137n4658508...@n4.nabble.com wrote: Example test: class

Re: [fw-general] Markdown renderer?

2012-12-20 Thread Marco Pivetta
Heya! Not a renderer, but there's https://github.com/EvanDotPro/EdpMarkdown/ and https://github.com/fwahlqvist/WdevMarkdown Maybe contribute to those? ;) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 20 December 2012 19:57, Andreas Möller a...@softe.is wrote

Re: [fw-general] ZFDebug for Doctrine2 ODM

2012-12-29 Thread Marco Pivetta
Heya, your config for the ORM has nothing to do with the ODM. We implemented integration with the toolbar, but for ZF2, not ZF1. If you're interested in checking how this was implemented, see https://github.com/doctrine/DoctrineMongoODMModule Marco Pivetta http://twitter.com/Ocramius http

Re: [fw-general] File upload with Post/Redirect/Get Plugin

2012-12-30 Thread Marco Pivetta
Heya, of course those files are gone. You have to store them before redirecting :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 30 December 2012 23:29, Ralf Eggert r.egg...@travello.de wrote: Hi, I like the Post/Redirect/Get Plugin very much. But when it comes

[fw-general] Re: \Zend\Feed\Reader\Reader::import Error!

2013-01-01 Thread Marco Pivetta
Benjamin, can you provide more details about the error? What's the stack trace for that exception? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 December 2012 22:40, benjamingb [via Zend Framework Community] ml-node+s634137n4658637...@n4.nabble.com wrote: I am

[fw-general] Re: Zend_Controller_Action deprecated methods

2013-01-01 Thread Marco Pivetta
Heya, I don't think those will change in ZF1 anymore, since no further development (besides maintenance) will be done there. In ZF2, `redirect`, `forward` and `param` are controller plugins. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 30 December 2012 13:50

Re: [fw-general] ServiceManager in ZF1

2013-01-23 Thread Marco Pivetta
You can require the package from ZF2 also in ZF1 applications Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 23 January 2013 14:40, Javier Garcia tirengar...@gmail.com wrote: Hi, i don't have the answer.. but.. is there a ServiceManager in zf1?? I look for it i

Re: [fw-general] Good or bad practice for view helpers

2013-01-26 Thread Marco Pivetta
Hi Ralph! I'd say this is a good practice! The view should not know that there is a pizza service, but the helper can have that. In fact, many helpers have references to more complex services like the router or generally things that are not view-specific. Marco Pivetta http://twitter.com

Re: [fw-general] Good or bad practice for view helpers

2013-01-26 Thread Marco Pivetta
Correct. Write operations and generally changes deriving from logic in views is really to be avoided. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 January 2013 18:23, Ralf Eggert r.egg...@travello.de wrote: Hi Marco, Thanks for your comment. I'd say

Re: [fw-general] [ZF2] PHPUnit mocks Zend\Db\Adapter and Travis-CI : type hinting

2013-01-28 Thread Marco Pivetta
Are you executing all the steps exactly like in your .travis.yml? Also, this looks like the mock could not be instantiated correctly. Autoloading problem? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 28 January 2013 19:06, jmleroux jmleroux@gmail.com wrote

Re: [fw-general] Re: [ZF2] PHPUnit mocks Zend\Db\Adapter and Travis-CI : type hinting

2013-01-28 Thread Marco Pivetta
A class was probably removed, and the mock wasn't valid anymore. Consider removing composer.lock from ZfcRbac. That file should not be there Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 29 January 2013 00:26, jmleroux jmleroux@gmail.com wrote: Thanks

[fw-general] Re: What happened to Zend/Markup?

2013-02-03 Thread Marco Pivetta
It is kicked out from the main repo, mainly because it lacks maintainers. This happened to a whole lot of ZF1 components which were ported to ZF2-style namespaces and didn't find an active maintainer. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 February 2013 17

[fw-general] Re: View Helpers Zend 2

2013-02-03 Thread Marco Pivetta
The logic is still the same, but you have to register your helper with the view helper plugin manager. You can take a look at my OcraLoremModule repository at https://github.com/Ocramius/OcraLoremModule, which registers two helpers Marco Pivetta http://twitter.com/Ocramius http

[fw-general] Re: View Helpers Zend 2

2013-02-03 Thread Marco Pivetta
It's an autoloading problem. Is your helper in `module/Application/src/Application/View/Helper/LowerCase.php` ? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 February 2013 21:49, Amino [via Zend Framework Community] ml-node+s634137n4658939...@n4.nabble.com wrote

Re: [fw-general] The Module Class - Sample Usage of “loadModules.post” Event

2013-02-04 Thread Marco Pivetta
Consider opening a Pull Request against https://github.com/zendframework/zf2-documentation Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 4 February 2013 11:55, whisher whishe...@gmail.com wrote: Hi, http://framework.zend.com/manual/2.0/en/modules/zend.module

[fw-general] Re: Doctrine 2 + ZF2 + Service

2013-02-06 Thread Marco Pivetta
Hi there! First of all, I strongly suggest you to just use DoctrineORMModule. You can read a tutorial about it at http://marco-pivetta.com/doctrine-orm-zf2-tutorial/ So far, it looks like your EntityManager is `null` (reading your description of the error). Marco Pivetta http://twitter.com

[fw-general] Re: Doctrine 2 + ZF2 + Service

2013-02-06 Thread Marco Pivetta
I think you are confusing ZF1 with ZF2... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 February 2013 11:03, eokorie [via Zend Framework Community] ml-node+s634137n4659039...@n4.nabble.com wrote: I have a function in my bootstrap that initiates Doctrine

[fw-general] Re: [zf2] 2.1.1 Container cannot write to storage due to type mismatch

2013-02-07 Thread Marco Pivetta
Looks like you will have to clear your current sessions. Check https://github.com/zendframework/zf2/issues/3700 and http://zend-framework-community.634137.n4.nabble.com/Release-Process-td4659063.html Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 7 February 2013 10

[fw-general] Re: ZF2 - Global enviroment configuration

2013-02-07 Thread Marco Pivetta
Doesn't really see like file configuration to me. Anyway, I'd use a simple php array put in config/autoload/your-cms-name.local.php if installations are standalone Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 7 February 2013 19:16, Paladyn [via Zend Framework

Re: [fw-general] How to handle 404 with action controller

2013-02-08 Thread Marco Pivetta
requesting`/thumbs/100-200-blah.png` Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 8 February 2013 22:22, Ralf Eggert r.egg...@travello.de wrote: Hi, My application is mainly just delivering images. Each image exists for a minimum size of 800x600 pixel on disk. When

Re: [fw-general] How to handle 404 with action controller

2013-02-08 Thread Marco Pivetta
Yes, http://framework.zend.com/manual/2.1/en/modules/zend.cache.pattern.capture-cache.htmlabstracts the concept quite well Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 8 February 2013 23:54, Andrew Ballard aball...@gmail.com wrote: On Feb 8, 2013 5:16 PM, Ralf

Re: [fw-general] Routing issue

2013-02-13 Thread Marco Pivetta
Some more information on your routing configuration may be needed... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 February 2013 10:18, eokorie eokorie2...@gmail.com wrote: Hi Everyone.. In one of my module, I have an IndexController with a few other actions

Re: [fw-general] Getting feeds for website

2013-02-13 Thread Marco Pivetta
ZF2 is still PHP... You can keep doing that... Consider looking into `Zend\Feed\Reader` anyway ( http://framework.zend.com/manual/2.0/en/modules/zend.feed.importing.html ) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 February 2013 10:28, sand...@orangemantra.com

Re: [fw-general] Session Serialization error of Zend\Authentication\Result

2013-02-19 Thread Marco Pivetta
You are trying to store objects that are un-serializable into a session (like an event manager or similars). Don't do that. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 February 2013 09:47, roberto blanko robertobla...@gmail.com wrote: Hello fellow devs, I

Re: [fw-general] Session Serialization error of Zend\Authentication\Result

2013-02-19 Thread Marco Pivetta
You can use a smarter auth storage. Doctrine's Auth storage adapter stores only the identifier: https://github.com/doctrine/DoctrineModule/blob/0.7.0/src/DoctrineModule/Authentication/Storage/ObjectRepository.php Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19

Re: [fw-general] Session Serialization error of Zend\Authentication\Result

2013-02-19 Thread Marco Pivetta
That's why external libraries exist. A framework is not a big universal problem solver. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 February 2013 10:40, roberto blanko robertobla...@gmail.com wrote: Thanks a lot, Marco. I’ll give that a try. But in the end

Re: [fw-general] Fundamental question: Why isn’t the service manager super global?

2013-02-19 Thread Marco Pivetta
, so I personally just inject everything I need at `__construct`. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 February 2013 10:37, roberto blanko robertobla...@gmail.com wrote: Hey devs, one problem drives me nuts, since I started working with ZF2 (never worked

Re: [fw-general] Speed of Zend\Db\Metadata

2013-02-19 Thread Marco Pivetta
Did you profile it before coming to conclusions? :) Throw xdebug at it and then go through it with kcachegrind or similar tools. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 February 2013 18:14, Dejan Cabrilo dcabr...@gmail.com wrote: Hello all, I started

[fw-general] Re: Any way for Zend to turn php warnings/notices into exceptions ?

2013-02-21 Thread Marco Pivetta
Did you already look into Zend\Stdlib\ErrorHandler? https://github.com/zendframework/zf2/blob/master/library/Zend/Stdlib/ErrorHandler.php Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 21 February 2013 19:30, Timothy Madden [via Zend Framework Community] ml-node

Re: [fw-general] Different ZF directories depending on installation choice

2013-02-22 Thread Marco Pivetta
Composer is not adopted by all users, thus the two possible paths. What is exactly your question about then? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 22 February 2013 08:30, Greg dev...@gmail.com wrote: Am I doing something wrong or are there two possible

[fw-general] Re: Force ZF2_PATH to be used

2013-02-22 Thread Marco Pivetta
Code that isn't under CVS doesn't exist. (that's final) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 22 February 2013 19:09, mpalourdio [via Zend Framework Community] ml-node+s634137n4659281...@n4.nabble.com wrote: thanks for reply. But my code isnt under CVS

[fw-general] Re: Force ZF2_PATH to be used

2013-02-22 Thread Marco Pivetta
Yes, that was irony :) (don't take it too much as a joke by the way: code under VCS is just a problem) Anyway, you can always tweak your init_autoload.php to suit your needs Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 22 February 2013 19:33, mpalourdio [via Zend

[fw-general] Re: How much modules is too much?

2013-02-22 Thread Marco Pivetta
This was already discussed before: http://zend-framework-community.634137.n4.nabble.com/Design-performance-question-many-modules-in-a-ZF2-application-td4657871.html Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 23 February 2013 00:44, BRampersad [via Zend Framework

[fw-general] Re: zend 2 EventManager reference

2013-02-24 Thread Marco Pivetta
Heya! You can edit that yourself at https://github.com/zendframework/zf2-documentation/edit/master/docs/languages/en/modules/zend.event-manager.event-manager.rst Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 February 2013 21:33, whisher [via Zend Framework

[fw-general] Re: zend 2 EventManager reference

2013-02-24 Thread Marco Pivetta
If you have a github account, once you edited the file you enter a commit message and Github will open a pull request on its own (basically a request for review and merge). It may not be obvious for newcomers, but it's easier than it looks like, so go on and try :) Marco Pivetta http

Re: [fw-general] How to use Doctrine 2

2013-02-27 Thread Marco Pivetta
Try with http://marco-pivetta.com/doctrine-orm-zf2-tutorial :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 27 February 2013 13:11, sand...@orangemantra.com sand...@orangemantra.com wrote: Hi All, I have tried to use doctrine 2 with zf2 but cant . Please help

[fw-general] Re: Doctrine 2 module is tight to MVC?

2013-02-27 Thread Marco Pivetta
The ORM module expects an MVC-ish setup, so that's the correct way of instantiating everything. That's also the way I setup functional tests in my test environment (see https://gist.github.com/Ocramius/3994325 ) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 27

[fw-general] Re: Doctrine 2 module is tight to MVC?

2013-02-28 Thread Marco Pivetta
The only MVC bit in my example is `Zend\Mvc\Service\ServiceManagerConfig`, and it makes things so simple that it's not even worth discussing it in my opinion. Yes, you can use DoctrineORMModule also without that by the way :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com

[fw-general] Re: Doctrine 2 module is tight to MVC?

2013-02-28 Thread Marco Pivetta
I agree on that. If you can inspect what dependencies we need on DoctrineORMModule, DoctrineMongoODMModule and DoctrineModule (excluding zendframework/zend-mvc) I'll be glad to merge a pull request :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 28 February 2013 11

[fw-general] Re: Zend Framework 2 - Unit Tests

2013-02-28 Thread Marco Pivetta
Not sure if trolling O_o git clone git://github.com/zendframework/zf2.git cd zf2 curl -s https://getcomposer.org/installer | php ./composer.phar install --dev cd tests ./run-tests.php Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 March 2013 00:44, Katalin [via

[fw-general] Re: Zend Framework 2 - Unit Tests

2013-02-28 Thread Marco Pivetta
No problem :) Pro-tip: if you have ant installed, just `ant travis` and everything should work much faster :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 March 2013 01:04, Katalin [via Zend Framework Community] ml-node+s634137n4659374...@n4.nabble.com wrote

[fw-general] Re: Zend Framework 2 - Unit Tests

2013-02-28 Thread Marco Pivetta
Tests should pass on master. If they don't, then consider inspecting them and eventually reporting back. And yes, by `ant` I mean Apache Ant :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 March 2013 01:20, Katalin [via Zend Framework Community] ml-node

Re: [fw-general] Clarification on 3rd-party libraries in ZF2

2013-03-13 Thread Marco Pivetta
Correct. That's basic PHP namespaces knowledge though. Here's a couple of resources you should read up before dealing with namespaces: The manual (obviously): http://php.net/manual/en/language.namespaces.php Namespaces in 120 seconds: http://www.youtube.com/watch?v=d1kDT8YFAhI Marco Pivetta

Re: [fw-general] Loading ZF2 on cPanel

2013-03-13 Thread Marco Pivetta
You can simply rename `public` to `public_html` and it will just work. A symlink does too. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 March 2013 20:01, Mark Taylor marquistay...@gmail.com wrote: Hi, I am wondering if it is possible to load ZF2 on a server

Re: [fw-general] Zend DIC Documentation / Specifying concrete implementations of constructor based on interfaces

2013-03-17 Thread Marco Pivetta
a specific `BarInterface` implementation when one is requestede: http://stackoverflow.com/questions/12426744/servicelocatorawareinterface-confuses-the-di-container-when-running-module-tests Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 16 March 2013 22:18, mbneto mbn

Re: [fw-general] Inject translator into an entity: good or bad?

2013-03-17 Thread Marco Pivetta
{ public function __construct(MyEntity $entity, Translator $translator) { // ... } } This may well happen in a hydrator (since the hydrator doesn't need to return the original entity instance). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 March 2013

Re: [fw-general] Zend DIC Documentation / Specifying concrete implementations of constructor based on interfaces

2013-03-20 Thread Marco Pivetta
Depends on your needs. Di is good for automated instantiation if that's your use case. For injections that won't change over time, you can simply use the ServiceManager. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 21 March 2013 03:05, mbneto mbn...@gmail.com wrote

[fw-general] Re: zend 2 ModuleRouteListener pratical example

2013-03-21 Thread Marco Pivetta
Heya! The ModuleRouteListener ( https://github.com/zendframework/zf2/blob/master/library/Zend/Mvc/ModuleRouteListener.php) prepends the module name to the requested controller name. That's useful if you want to use controller short names in routing :) Marco Pivetta http://twitter.com/Ocramius

[fw-general] Re: Doctrine 2 module runtime DB connection.

2013-03-21 Thread Marco Pivetta
You can simply define a service factory that instantiates a second Doctrine\DBAL\Connection, no? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 19 March 2013 14:21, Deserved [via Zend Framework Community] ml-node+s634137n4659528...@n4.nabble.com wrote: Could you

[fw-general] Re: Using DI in view helper in ZF 2.1

2013-03-21 Thread Marco Pivetta
You probably want to implement `ServiceLocatorAwareInterface` instead. Anyway, Di works also with 2.1.4 :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 14 March 2013 18:14, RobinvdM [via Zend Framework Community] ml-node+s634137n4659474...@n4.nabble.com wrote

Re: [fw-general] DI bug: spurious CircularDependencyExceptions possible

2013-03-25 Thread Marco Pivetta
Hi Chris, Can you please report this on the issue tracker at https://github.com/zendframework/zf2/issues ? Anyway, where should the try-catch be placed? Because there's a lot of entry points that could cause this as far as I know. Marco Pivetta http://twitter.com/Ocramius http

Re: [fw-general] DI bug: spurious CircularDependencyExceptions possible

2013-03-30 Thread Marco Pivetta
encompass the code where Di::$currentDependencies is manipulated. The catch block would then reset Di::$currentDependencies to array() and then re-throw the exception, so on entry the next time Di::$currentDependencies would be clean. Chris On Mon, Mar 25, 2013 at 8:33 PM, Marco Pivetta ocram

Re: [fw-general] DI bug: spurious CircularDependencyExceptions possible

2013-03-30 Thread Marco Pivetta
Perfect, thank you! :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 30 March 2013 18:54, Chris Toomey ctoo...@gmail.com wrote: Yep: https://github.com/zendframework/zf2/issues/4113 . I couldn't figure out how to add the Di label to it. Chris On Sat, Mar 30

[fw-general] Re: Fatal error: Maximum function nesting level of '100' reached, aborting!

2013-04-06 Thread Marco Pivetta
This can happen when using Zend\Di. Increase the allowed function call nesting level. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 April 2013 22:02, poashoas [via Zend Framework Community] ml-node+s634137n4659640...@n4.nabble.com wrote: I have just pulled

Re: [fw-general] Re: [ZF2] How to get data from related entity

2013-04-06 Thread Marco Pivetta
Yes, but it's not on your book :) You would have such a helper somewhere else, where you can access the functionality required to fetch the Author entity Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 7 April 2013 04:42, Dan.latter dan.lat...@gmail.com wrote: Yeah

Re: [fw-general] How to dispatch a custom 403 page in ZF2?

2013-04-07 Thread Marco Pivetta
Have you already looked at how BjyAuthorize handles this? Check the unauthorized view strategy: https://github.com/bjyoungblood/BjyAuthorize/blob/master/src/BjyAuthorize/View/UnauthorizedStrategy.php Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 7 April 2013 22:28

[fw-general] Re: Custom Library Outside vendor Folder

2013-04-10 Thread Marco Pivetta
You can just edit your `init_autoload.php` to suit your needs. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 April 2013 09:00, stef [via Zend Framework Community] ml-node+s634137n4659685...@n4.nabble.com wrote: Is it possible to place custom library files

Re: [fw-general] zf2 matched route getParam controller get the module instead

2013-04-10 Thread Marco Pivetta
Yes, this is what routing looks like in the MVC. What's the question exactly though? You don't route to modules, you route to controllers. After bootstrap, the module is blurred into the MVC and is not to be considered a self-standing context :) Marco Pivetta http://twitter.com/Ocramius http

Re: [fw-general] Are Administrators or Experts Answering Questions for ZF 1.x Anymore?

2013-04-11 Thread Marco Pivetta
in helping ZF2 newcomers or answering ZF2 questions in general. This is my point of view as contributor though. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 11 April 2013 19:02, i_banks bigbank...@gmail.com wrote: Sorry but I just had to ask because there seems

Re: [fw-general] Zend 2 View setTemplate dont trigger any errors

2013-04-12 Thread Marco Pivetta
Is that piece of code actually executed? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 April 2013 18:55, whisher whishe...@gmail.com wrote: Hi, using this code public function indexAction() { $view = new ViewModel(array( 'message

[fw-general] Re: Doctrine zf2 tests Marco Pivetta

2013-04-16 Thread Marco Pivetta
You can check https://gist.github.com/Ocramius/3994325 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 16 April 2013 13:20, Katalin [via Zend Framework Community] ml-node+s634137n4659730...@n4.nabble.com wrote: Hi! Not a long time ago i found out about mock

[fw-general] Re: Cannot update to the current Zend Framework version 2.1.6

2013-04-17 Thread Marco Pivetta
Latest stable version is 2.1.4. The readme in master was probably re-adapted in preparation for the 2.1.5 release, which should happen shortly. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 April 2013 18:01, automatix [via Zend Framework Community] ml-node

[fw-general] Re: zf2 tests can't load ./vendor modules

2013-04-17 Thread Marco Pivetta
You may want to check http://stackoverflow.com/questions/14768621/zend-framework-2-tutorial-module-application-could-not-be-initialized Also: what is the exact exception? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 April 2013 18:09, Katalin [via Zend Framework

[fw-general] Re: zf2 tests can't load ./vendor modules

2013-04-17 Thread Marco Pivetta
DoctrineModule does not support autoloading without composer anymore. You may want to require the composer autoloader in your Bootstrap.php :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 April 2013 18:29, Katalin [via Zend Framework Community] ml-node

[fw-general] Re: Cannot update to the current Zend Framework version 2.1.6

2013-04-17 Thread Marco Pivetta
Go to github, see the tags in the dropdown or in the github project's tags section: https://github.com/zendframework/zf2/tags Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 17 April 2013 19:55, automatix [via Zend Framework Community] ml-node+s634137n465975...@n4

[fw-general] Re: What is the correct structure for a module that involves more than one table?

2013-04-18 Thread Marco Pivetta
` of pages - it can do much much more! Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 18 April 2013 09:18, omaryesith [via Zend Framework Community] ml-node+s634137n4659763...@n4.nabble.com wrote: I am designing an application where one module involves more than one

Re: [fw-general] Sort the namespace use statements?

2013-04-20 Thread Marco Pivetta
Sort them and group them by meaning :) On 20 Apr 2013 16:06, Ralf Eggert r.egg...@travello.de wrote: Hi, I wonder if there is any best practice or recommendation on how to sort the namespace use statements on top of each file. Should they be sorted: a) by name b) by usage order in the file

[fw-general] Re: Exception handle in zf2

2013-04-21 Thread Marco Pivetta
You can simply attach a listener to the application, listening for event `Zend\Mvc\Event::EVENT_DISPATCH_ERROR`. That allows you to manipulate how exceptions are handled :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 20 April 2013 08:46, maxgu [via Zend Framework

<    1   2   3   4   >