Prior to Symfony Forms 2.3.0, there was no DI available for the class David pointed out.
But, now, there is.
https://github.com/symfony/symfony/blob ... LOG.md#230
(See fourth bullet)
Also, the commit that implements the change
I haven't fully investigated the impllications, but in the 10 minutes I spent on this, it seems easy enough?
(@Exreaction: I didn't immediately see a branch at github.com/exreaction/phpbb3 that made me think "that's the right one", so I didn't look at your code at all, if it is published)
Stop disabling super globals
- A_Jelly_Doughnut
- Registered User
- Posts: 1780
- Joined: Wed Jun 04, 2003 4:23 pm
Re: Stop disabling super globals
A_Jelly_Doughnut
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: Stop disabling super globals
Yes, I've been using that (it's an open, WIP PR, but I may not have pushed all of my local changes, it's been a while)
Perhaps it is simply something that was over-looked and needs to be fixed. I've opened a bug ticket on their tracker. https://github.com/symfony/symfony/issues/10009
Perhaps it is simply something that was over-looked and needs to be fixed. I've opened a bug ticket on their tracker. https://github.com/symfony/symfony/issues/10009
Re: Stop disabling super globals
hi,
does this mean that in 3.1, this
does this mean that in 3.1, this
isset ( $_POST ['templatevariable']
won't work because there's no $_POST array anymore ?- imkingdavid
- Registered User
- Posts: 1050
- Joined: Thu Jul 30, 2009 12:06 pm
Re: Stop disabling super globals
I believe isset() is allowed, but in 3.1 is it strongly recommended that you just usesajaki wrote:hi,
does this mean that in 3.1, thisisset ( $_POST ['templatevariable']
won't work because there's no $_POST array anymore ?
$request->is_set_post('templatevariable');
Re: Stop disabling super globals
Please don't use globals like $_POST in 3.1. There are methods like $request->is_set() and $request->is_set_post().
- wintstar
- Registered User
- Posts: 108
- Joined: Sun Dec 02, 2012 1:38 pm
- Location: Gießen /Hessen Germany
- Contact:
Re: Stop disabling super globals
I have a problem with
Error message
Illegal use of $_SERVER. You must use the request class or request_var() to access input data. This error message was generated by deactivated_super_global.
Code: Select all
$this->setSessionIP($_SERVER['REMOTE_ADDR']);
Illegal use of $_SERVER. You must use the request class or request_var() to access input data. This error message was generated by deactivated_super_global.
Greeting Stephan
Re: Stop disabling super globals
Maybe use
$request->server('REMOTE_ADDR')
?- wintstar
- Registered User
- Posts: 108
- Joined: Sun Dec 02, 2012 1:38 pm
- Location: Gießen /Hessen Germany
- Contact:
Re: Stop disabling super globals
Thanks Marc, but comes the next Error
Undefined variable: request
Undefined variable: request
Greeting Stephan
Re: Stop disabling super globals
You have to use the global variable $request or pass the request class to your service container. It obviously won't work otherwise.