FW: BC Break in Zend\Mvc router configuration

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

FW: BC Break in Zend\Mvc router configuration

weierophinney
Administrator
I'm forwarding this message for Marco Pivetta (who's having issues with
our ML at the moment)...

---

Hi there,

I've just been pinged by Matthew because some people are confused by a
recent change to Zend\Mvc\Bootstrap.

In fact, routing configuration has been moved from $config['routes'] to
dependency injection container config ($config['di']).

To understand the change a little more, please see the pull request on
the skeleton application at
    https://github.com/zendframework/ZendSkeletonApplication/pull/24,
the changes to the configuration array are quite clear.  

*Please update your modules accordingly.*

The main advantage of this change is that you can now pull a
Zend\Mvc\Router\RouteStack instance from the service locator, and use it
in your DiC.  You can now also decide to use a different router by
changing the instantiator for Zend\Mvc\Router\RouteStack in your Zend\Di
definition, so you'll be able to create custom routers and not only rely
on the default one (which is Zend\Mvc\Router\Http\TreeRouteStack)

Example routing configuration for a module (this is the same you will
see in the skeleton application):

<?php
return array(
    'di' => array(
        'instance' => array(
            'Zend\Mvc\Router\RouteStack' => array(
                'parameters' => array(
                    'routes' => array(
                        'default' => array(
                            'type' => 'Zend\Mvc\Router\Http\Segment',
                            'options' => array(
                                'route' => '/[:controller[/:action]]',
                                'constraints' => array(
                                    'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                    'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                ),
                                'defaults' => array(
                                    'controller' => 'index',
                                    'action' => 'index',
                                ),
                            ),
                        ),
                        'home' => array(
                            'type' => 'Zend\Mvc\Router\Http\Literal',
                            'options' => array(
                                'route' => '/',
                                'defaults' => array(
                                    'controller' => 'index',
                                    'action' => 'index',
                                ),
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
);

Example of router as dependency (new feature):

class MyController {
    public function __construct(\Zend\Mvc\Router\RouteStack $router) {
        //you can now access the router used by the MVC application
    }
}

The changes to the library can be seen at:
https://github.com/zendframework/zf2/pull/768



--
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: FW: BC Break in Zend\Mvc router configuration

Andreas Möller
> I'm forwarding this message for Marco Pivetta (who's having issues with
> our ML at the moment)…

I'm having the same issues, as I've not received this message either and I don't have a clue how many emails never arrive or get through to the mailing list.

Can this be fixed soon?


Best regards,

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: FW: BC Break in Zend\Mvc router configuration

weierophinney
Administrator
-- Andreas Möller <[hidden email]> wrote
(on Wednesday, 15 February 2012, 04:23 PM +0100):
> > I'm forwarding this message for Marco Pivetta (who's having issues with
> > our ML at the moment)…
>
> I'm having the same issues, as I've not received this message either
> and I don't have a clue how many emails never arrive or get through to
> the mailing list.
>
> Can this be fixed soon?

The IT team did a ton of fixes last week, and I can confirm that the
moderation emails are being properly sent at this time, headers are
working correctly, etc. I've also confirmed that both your address and
the one from ocramius are subscribed. The fact that I received this
email to the list indicates that at least yours are coming through; so
if you're not receiving them, you may need to check your own spam
filters.

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: BC Break in Zend\Mvc router configuration

Andreas Möller
> The IT team did a ton of fixes last week, and I can confirm that the
> moderation emails are being properly sent at this time, headers are
> working correctly, etc. I've also confirmed that both your address and
> the one from ocramius are subscribed. The fact that I received this
> email to the list indicates that at least yours are coming through; so
> if you're not receiving them, you may need to check your own spam
> filters.

Thanks, Matthew.

Good to see that my email is coming through to you, but I never (!) receive any emails I sent to the mailing list. This used to be the case some time ago, and I've been on this mailing list - albeit with a different email address - since summer 2008. I don't know about others, but someone has mentioned this issue a few days ago, too.

This way I can't tell if an email ever got through - only if someone replies to it, which might not be the case.

I've not set up any spam filters - but maybe Google has (Google Apps).  I've not found any emails in my spam folders that were from the mailing list (except for an email with some Chinese stuff in it), but I've added a filter that could inhibit emails marked as spam to be sent to my spam folder.

Still, it'd be nice to keep posted about what's going on - but I've checked on Nabble, and there's a number of emails that I never received and were not marked with "This post has NOT been accepted by the mailing list yet.".


Best regards,

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: BC Break in Zend\Mvc router configuration

H Glenn Hatfield

On Feb 15, 2012, at 9:16 AM, Andreas Möller wrote:

> This way I can't tell if an email ever got through - only if someone replies to it, which might not be the case.
>
> I've not set up any spam filters - but maybe Google has (Google Apps).  I've not found any emails in my spam folders that were from the mailing list (except for an email with some Chinese stuff in it), but I've added a filter that could inhibit emails marked as spam to be sent to my spam folder.

Gmail (and Google Apps) seems to have a nice 'feature' to not show your messages which you send to a list. See this post:

http://www.google.com/support/forum/p/gmail/thread?tid=3ba178dadb8ea06d&hl=en

-H
Reply | Threaded
Open this post in threaded view
|

Re: BC Break in Zend\Mvc router configuration

Andreas Möller
> Gmail (and Google Apps) seems to have a nice 'feature' to not show your messages which you send to a list. See this post:

Nice!

> http://www.google.com/support/forum/p/gmail/thread?tid=3ba178dadb8ea06d&hl=en

Thanks a lot.


Andreas
Reply | Threaded
Open this post in threaded view
|

Re: BC Break in Zend\Mvc router configuration

Andreas Möller
In reply to this post by H Glenn Hatfield
> Gmail (and Google Apps) seems to have a nice 'feature' to not show your messages which you send to a list. See this post:
>
> http://www.google.com/support/forum/p/gmail/thread?tid=3ba178dadb8ea06d&hl=en

Possibly, the problem that you have to check the folder/label with which emails sent to the mailing list can be fixed by forwarding the emails to an alias of the same mailbox (this mail is a test, actually, sorry for bothering).


Best regards,

Andreas