php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76425 Import Grouping from Multiple Namespaces
Submitted: 2018-06-07 15:34 UTC Modified: 2018-06-07 15:42 UTC
Votes:6
Avg. Score:4.2 ± 0.7
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:2 (50.0%)
From: jwillfiji at gmail dot com Assigned:
Status: Open Package: *Programming Data Structures
PHP Version: 7.2.5 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jwillfiji at gmail dot com
New email:
PHP Version: OS:

 

 [2018-06-07 15:34 UTC] jwillfiji at gmail dot com
Description:
------------
As of PHP 7.0, grouping items when important from namespaces became allowed, however this seems to be only when everything is from one namespace, and precludes allowing the shortened format if pulling multiple items from multiple namespaces. It is unclear if this was intended behavior, or if this is a bug. If this was intended, please change to request for this proposed functionality.

Test script:
---------------
namespace Foo;
class f1{}
class f2{}

namespace Bar;
class b1{}
class b2{}

namespace main;
use Foo\{f1,f2}, Bar\{b1,b2};

>> PHP Parse error: Syntax error, unexpected ',', expecting ';' on line 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-07 15:40 UTC] jwillfiji at gmail dot com
-PHP Version: 7.0.30 +PHP Version: 7.2.5
 [2018-06-07 15:40 UTC] jwillfiji at gmail dot com
For what it's worth, I am running PHP 7.2.5-1 on Ubuntu 16.04.1. My guess is this effects all version from 7.0 onward.
 [2018-06-07 15:42 UTC] nikic@php.net
-Type: Bug +Type: Feature/Change Request
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Oct 22 01:01:28 2019 UTC