Robert Stoll wrote on 13/11/2014 12:30:
-Ursprüngliche Nachricht-
>Von: Rowan Collins [mailto:rowan.coll...@gmail.com]
>Gesendet: Donnerstag, 13. November 2014 11:57
>An:internals@lists.php.net
>Betreff: Re: AW: [PHP-DEV] forbid use declaration outside of a namespace in
PHP
[PHP-DEV] forbid use declaration outside of a namespace in
> PHP 7
>
> On 13 November 2014 11:29, Johannes Schlüter wrote:
>
> > On Wed, 2014-11-12 at 22:27 +0100, Robert Stoll wrote:
> >
> > > That's still perfectly fine because in your code the use statement
&
> -Ursprüngliche Nachricht-
> Von: Rowan Collins [mailto:rowan.coll...@gmail.com]
> Gesendet: Donnerstag, 13. November 2014 11:57
> An: internals@lists.php.net
> Betreff: Re: AW: [PHP-DEV] forbid use declaration outside of a namespace in
> PHP 7
>
> Robert Stoll w
On 13 November 2014 11:29, Johannes Schlüter wrote:
> On Wed, 2014-11-12 at 22:27 +0100, Robert Stoll wrote:
>
> > That's still perfectly fine because in your code the use statement is
> not outside of a namespace, it is implicitly in the default namespace.
> > I am talking about the two followin
On Wed, 2014-11-12 at 22:27 +0100, Robert Stoll wrote:
> That's still perfectly fine because in your code the use statement is not
> outside of a namespace, it is implicitly in the default namespace.
> I am talking about the two following scenarios:
>
> use \Exception;
> namespace test;
>
> $e
Robert Stoll wrote on 12/11/2014 21:27:
That's still perfectly fine because in your code the use statement is not
outside of a namespace, it is implicitly in the default namespace.
Surely if that's true of Adam's example, it's true of yours as well?
namespace a{
}
use some\UseDeclaration\w
> Sorry, I apparently missed this the first time. Would this mean that this
> sort of script (where we're using use statements
> without a
> namespace) would no longer work?
>
> use GuzzleHttp\Client;
>
> include __DIR__.'/vendor/autoload.php';
>
> $client = new Client;
> // $client is a Guz
On 11 November 2014 04:11, Robert Stoll wrote:
>> I always found it very ugly that it is possible to define a use outside of a
>> namespace. Consider the following:
>>
>> namespace{ //default namespace
>> }
>>
>> use foo\Bar;
>>
>> namespace test{
>> new Bar(); //error, test\Bar not found }
>>
> -Ursprüngliche Nachricht-
> Von: Stas Malyshev [mailto:smalys...@sugarcrm.com]
> Gesendet: Mittwoch, 12. November 2014 00:45
> An: Andrea Faulds; Robert Stoll
> Cc: Chris Wright; PHP Internals
> Betreff: Re: [PHP-DEV] forbid use declaration outside of a namespac
Hi!
> I don’t like the sound of changing the spec before the implementation.
I agree - whatever are our considerations and limitations on what we can
and can not do in PHP 7, the spec should reflect what is there.
Otherwise we end up releasing an implementation that does not match our
own spec, t
> On 11 Nov 2014, at 13:20, Robert Stoll wrote:
>
>> I would say that the lack of anyone saying "no, don't do this" probably
>> means everyone is OK with it. Suggest you work up a
>> patch and PR it, then ping the list to highlight it for further discussion.
>>
>
> Sounds reasonable but unfor
> I would say that the lack of anyone saying "no, don't do this" probably means
> everyone is OK with it. Suggest you work up a
> patch and PR it, then ping the list to highlight it for further discussion.
>
Sounds reasonable but unfortunately I do not have time at the moment to work up
a patch
On 11 November 2014 12:11, Robert Stoll wrote:
> > -Ursprüngliche Nachricht-
> > Von: Robert Stoll [mailto:p...@tutteli.ch]
> > Gesendet: Mittwoch, 29. Oktober 2014 20:55
> > An: 'PHP Internals'
> > Betreff: [PHP-DEV] forbid use declaration outs
> -Ursprüngliche Nachricht-
> Von: Robert Stoll [mailto:p...@tutteli.ch]
> Gesendet: Mittwoch, 29. Oktober 2014 20:55
> An: 'PHP Internals'
> Betreff: [PHP-DEV] forbid use declaration outside of a namespace in PHP 7
>
> Heya,
>
> I always found it ve
Heya,
I always found it very ugly that it is possible to define a use outside of a
namespace. Consider the following:
namespace{ //default namespace
}
use foo\Bar;
namespace test{
new Bar(); //error, test\Bar not found
}
After some thoughts it is quite clear that Bar is test\Bar and not fo
15 matches
Mail list logo